You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

70 lines
1.6 KiB

  1. #
  2. # This is free software, licensed under the GNU General Public License v2.
  3. # See /LICENSE for more information.
  4. #
  5. include $(TOPDIR)/rules.mk
  6. PKG_NAME:=expat
  7. PKG_VERSION:=2.2.2
  8. PKG_RELEASE:=1
  9. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  10. PKG_SOURCE_URL:=@SF/expat
  11. PKG_HASH:=4376911fcf81a23ebd821bbabc26fd933f3ac74833f74924342c29aad2c86046
  12. PKG_MAINTAINER:=Steven Barth <cyrus@openwrt.org>, \
  13. Ted Hess <thess@kitschensync.net>
  14. PKG_LICENSE:=MIT
  15. PKG_LICENSE_FILES:=COPYING
  16. PKG_FIXUP:=autoreconf
  17. PKG_INSTALL:=1
  18. PKG_BUILD_PARALLEL:=1
  19. include $(INCLUDE_DIR)/host-build.mk
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/libexpat
  22. SECTION:=libs
  23. CATEGORY:=Libraries
  24. TITLE:=An XML parsing library
  25. URL:=https://libexpat.github.io/
  26. endef
  27. define Package/libexpat/description
  28. A fast, non-validating, stream-oriented XML parsing library.
  29. endef
  30. TARGET_CFLAGS += $(FPIC)
  31. HOST_CONFIGURE_VARS += \
  32. CPPFLAGS="$(HOST_CFLAGS) -DXML_POOR_ENTROPY"
  33. CONFIGURE_ARGS += \
  34. --enable-shared \
  35. --enable-static
  36. define Host/Install
  37. $(MAKE) -C $(HOST_BUILD_DIR) install
  38. endef
  39. define Build/InstallDev
  40. $(INSTALL_DIR) $(1)/usr/include
  41. $(CP) $(PKG_INSTALL_DIR)/usr/include/expat{,_external}.h $(1)/usr/include/
  42. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  43. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/expat.pc $(1)/usr/lib/pkgconfig/
  44. $(INSTALL_DIR) $(1)/usr/lib
  45. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libexpat.{a,so*} $(1)/usr/lib/
  46. endef
  47. define Package/libexpat/install
  48. $(INSTALL_DIR) $(1)/usr/lib
  49. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libexpat.so.* $(1)/usr/lib/
  50. endef
  51. $(eval $(call HostBuild))
  52. $(eval $(call BuildPackage,libexpat))