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.

201 lines
4.8 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.9
  10. PKG_RELEASE:=4
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=http://xmlsoft.org/sources/
  13. PKG_HASH:=94fb70890143e3c6549f265cee93ec064c80a84c42ad0f23e85ee1fd6540a871
  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. define Package/libxml2-dev
  34. SECTION:=devel
  35. CATEGORY:=Development
  36. SUBMENU:=Libraries
  37. TITLE:=Development files for libxml2
  38. URL:=http://xmlsoft.org/
  39. DEPENDS:=+libxml2
  40. endef
  41. define Package/libxml2-dev/description
  42. A library for manipulating XML and HTML resources.
  43. This package contains the headers and xml2-config binary.
  44. endef
  45. define Package/libxml2-utils
  46. SECTION:=utils
  47. CATEGORY:=Utilities
  48. TITLE:=XML command line utilities (xmllint...)
  49. URL:=http://xmlsoft.org/
  50. DEPENDS:=+libxml2
  51. endef
  52. define Package/libxml2-utils/description
  53. This package contains the binaries xmllint and xmlcatalog
  54. from libxml2, a library for manipulating XML and HTML resources.
  55. endef
  56. TARGET_CFLAGS += $(FPIC)
  57. CONFIGURE_ARGS += \
  58. --enable-shared \
  59. --enable-static \
  60. --with-c14n \
  61. --without-catalog \
  62. --with-debug \
  63. --without-docbook \
  64. --with-html \
  65. --without-ftp \
  66. --without-http \
  67. --without-iconv \
  68. --without-iso8859x \
  69. --without-legacy \
  70. --with-output \
  71. --without-pattern \
  72. --without-push \
  73. --without-python \
  74. --with-reader \
  75. --without-readline \
  76. --without-regexps \
  77. --with-sax1 \
  78. --with-schemas \
  79. --with-threads \
  80. --with-tree \
  81. --with-valid \
  82. --with-writer \
  83. --with-xinclude \
  84. --with-xpath \
  85. --with-xptr \
  86. --with-zlib=$(STAGING_DIR)/usr \
  87. --without-lzma
  88. HOST_CONFIGURE_ARGS += \
  89. --enable-shared \
  90. --enable-static \
  91. --with-c14n \
  92. --without-catalog \
  93. --with-debug \
  94. --without-docbook \
  95. --with-html \
  96. --without-ftp \
  97. --without-http \
  98. --without-iconv \
  99. --without-iso8859x \
  100. --without-legacy \
  101. --with-output \
  102. --without-pattern \
  103. --without-push \
  104. --without-python \
  105. --with-reader \
  106. --without-readline \
  107. --without-regexps \
  108. --with-sax1 \
  109. --with-schemas \
  110. --with-threads \
  111. --with-tree \
  112. --with-valid \
  113. --with-writer \
  114. --with-xinclude \
  115. --with-xpath \
  116. --with-xptr \
  117. --with-zlib \
  118. --without-lzma
  119. define Build/InstallDev
  120. $(INSTALL_DIR) $(2)/bin
  121. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/xml2-config \
  122. $(2)/bin/$(GNU_TARGET_NAME)-xml2-config
  123. $(SED) 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
  124. $(2)/bin/$(GNU_TARGET_NAME)-xml2-config
  125. $(LN) $(GNU_TARGET_NAME)-xml2-config $(2)/bin/xml2-config
  126. $(INSTALL_DIR) $(1)/usr/include
  127. $(CP) $(PKG_INSTALL_DIR)/usr/include/libxml2 $(1)/usr/include/
  128. $(INSTALL_DIR) $(1)/usr/lib
  129. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxml2.{la,a,so*} $(1)/usr/lib/
  130. $(INSTALL_DIR) $(1)/usr/lib/cmake/libxml2
  131. $(CP) $(PKG_INSTALL_DIR)/usr/lib/cmake/libxml2/libxml2-config.cmake \
  132. $(1)/usr/lib/cmake/libxml2
  133. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  134. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libxml-2.0.pc $(1)/usr/lib/pkgconfig/
  135. $(INSTALL_DIR) $(2)/share/aclocal/
  136. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/aclocal/* $(2)/share/aclocal
  137. endef
  138. define Host/Install
  139. $(call Host/Install/Default)
  140. mv $(1)/bin/xml2-config $(1)/bin/$(GNU_HOST_NAME)-xml2-config
  141. $(LN) $(GNU_HOST_NAME)-xml2-config $(1)/bin/xml2-config
  142. endef
  143. define Package/libxml2/install
  144. $(INSTALL_DIR) $(1)/usr/lib
  145. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxml2.so.* $(1)/usr/lib/
  146. endef
  147. define Package/libxml2-dev/install
  148. $(INSTALL_DIR) $(1)/usr/bin
  149. $(CP) $(PKG_INSTALL_DIR)/usr/bin/xml2-config $(1)/usr/bin/
  150. $(SED) "s,$(STAGING_DIR),,g" $(1)/usr/bin/xml2-config
  151. $(INSTALL_DIR) $(1)/usr/include/
  152. $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
  153. $(INSTALL_DIR) $(1)/usr/lib
  154. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxml2.so $(1)/usr/lib/
  155. $(INSTALL_DIR) $(1)/usr/lib/{cmake,pkgconfig}
  156. $(CP) $(PKG_INSTALL_DIR)/usr/lib/{cmake,pkgconfig} $(1)/usr/lib/
  157. $(SED) "s,$(STAGING_DIR),,g" $(1)/usr/lib/pkgconfig/*.pc
  158. $(INSTALL_DIR) $(1)/usr/share/aclocal
  159. $(CP) $(PKG_INSTALL_DIR)/usr/share/aclocal/* $(1)/usr/share/aclocal
  160. endef
  161. define Package/libxml2-utils/install
  162. $(INSTALL_DIR) $(1)/usr/bin
  163. $(CP) $(PKG_INSTALL_DIR)/usr/bin/xmllint $(1)/usr/bin/
  164. $(CP) $(PKG_INSTALL_DIR)/usr/bin/xmlcatalog $(1)/usr/bin/
  165. endef
  166. $(eval $(call HostBuild))
  167. $(eval $(call BuildPackage,libxml2))
  168. $(eval $(call BuildPackage,libxml2-dev))
  169. $(eval $(call BuildPackage,libxml2-utils))