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.

142 lines
3.1 KiB

  1. #
  2. # Copyright (C) 2006-2016 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=libxml2
  9. PKG_VERSION:=2.9.8
  10. PKG_RELEASE:=3
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=http://xmlsoft.org/sources/
  13. PKG_HASH:=0b74e51595654f958148759cfef0993114ddccccbb6f31aee018f3558e8e2732
  14. PKG_LICENSE:=MIT
  15. PKG_LICENSE_FILES:=COPYING
  16. PKG_CPE_ID:=cpe:/a:xmlsoft:libxml2
  17. PKG_MAINTAINER:=Michael Heimpold <mhei@heimpold.de>
  18. PKG_FIXUP:=autoreconf
  19. PKG_INSTALL:=1
  20. PKG_BUILD_PARALLEL:=0
  21. include $(INCLUDE_DIR)/host-build.mk
  22. include $(INCLUDE_DIR)/package.mk
  23. define Package/libxml2
  24. SECTION:=libs
  25. CATEGORY:=Libraries
  26. TITLE:=Gnome XML library
  27. URL:=http://xmlsoft.org/
  28. DEPENDS:=+libpthread +zlib
  29. endef
  30. define Package/libxml2/description
  31. A library for manipulating XML and HTML resources.
  32. endef
  33. TARGET_CFLAGS += $(FPIC)
  34. CONFIGURE_ARGS += \
  35. --enable-shared \
  36. --enable-static \
  37. --with-c14n \
  38. --without-catalog \
  39. --with-debug \
  40. --without-docbook \
  41. --with-html \
  42. --without-ftp \
  43. --without-http \
  44. --without-iconv \
  45. --without-iso8859x \
  46. --without-legacy \
  47. --with-output \
  48. --without-pattern \
  49. --without-push \
  50. --without-python \
  51. --with-reader \
  52. --without-readline \
  53. --without-regexps \
  54. --with-sax1 \
  55. --with-schemas \
  56. --with-threads \
  57. --with-tree \
  58. --with-valid \
  59. --with-writer \
  60. --with-xinclude \
  61. --with-xpath \
  62. --with-xptr \
  63. --with-zlib=$(STAGING_DIR)/usr \
  64. --without-lzma
  65. HOST_CONFIGURE_ARGS += \
  66. --enable-shared \
  67. --enable-static \
  68. --with-c14n \
  69. --without-catalog \
  70. --with-debug \
  71. --without-docbook \
  72. --with-html \
  73. --without-ftp \
  74. --without-http \
  75. --without-iconv \
  76. --without-iso8859x \
  77. --without-legacy \
  78. --with-output \
  79. --without-pattern \
  80. --without-push \
  81. --without-python \
  82. --with-reader \
  83. --without-readline \
  84. --without-regexps \
  85. --with-sax1 \
  86. --with-schemas \
  87. --with-threads \
  88. --with-tree \
  89. --with-valid \
  90. --with-writer \
  91. --with-xinclude \
  92. --with-xpath \
  93. --with-xptr \
  94. --with-zlib \
  95. --without-lzma
  96. define Build/InstallDev
  97. $(INSTALL_DIR) $(2)/bin
  98. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/xml2-config $(2)/bin/
  99. $(SED) 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' $(2)/bin/xml2-config
  100. $(INSTALL_DIR) $(1)/usr/include
  101. $(CP) $(PKG_INSTALL_DIR)/usr/include/libxml2 $(1)/usr/include/
  102. $(INSTALL_DIR) $(1)/usr/lib
  103. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxml2.{la,a,so*} $(1)/usr/lib/
  104. $(INSTALL_DIR) $(1)/usr/lib/cmake/libxml2
  105. $(CP) $(PKG_INSTALL_DIR)/usr/lib/cmake/libxml2/libxml2-config.cmake \
  106. $(1)/usr/lib/cmake/libxml2
  107. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  108. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libxml-2.0.pc $(1)/usr/lib/pkgconfig/
  109. $(INSTALL_DIR) $(2)/share/aclocal/
  110. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/aclocal/* $(2)/share/aclocal
  111. endef
  112. define Package/libxml2/install
  113. $(INSTALL_DIR) $(1)/usr/lib
  114. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxml2.so* $(1)/usr/lib/
  115. endef
  116. define Host/Install
  117. $(SED) 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' $(HOST_BUILD_DIR)/xml2-config
  118. $(call Host/Install/Default)
  119. endef
  120. $(eval $(call HostBuild))
  121. $(eval $(call BuildPackage,libxml2))