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.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.12
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=http://xmlsoft.org/sources/
  13. PKG_HASH:=c8d6681e38c56f172892c85ddc0852e1fd4b53b4209e7f4ebf17f7e2eae71d92
  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-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))