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.

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