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.

199 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.10.2
  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:=d240abe6da9c65cb1900dd9bf3a3501ccf88b3c2a1cb98317d03f272dda5b265
  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_INSTALL:=1
  19. PKG_BUILD_PARALLEL:=0
  20. include $(INCLUDE_DIR)/host-build.mk
  21. include $(INCLUDE_DIR)/package.mk
  22. include $(INCLUDE_DIR)/nls.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 $(ICONV_DEPENDS)
  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. --with-html \
  64. --without-ftp \
  65. --without-http \
  66. --without-iso8859x \
  67. --without-legacy \
  68. --with-output \
  69. --without-pattern \
  70. --without-push \
  71. --without-python \
  72. --with-reader \
  73. --without-readline \
  74. --without-regexps \
  75. --with-sax1 \
  76. --with-schemas \
  77. --with-threads \
  78. --with-tree \
  79. --with-valid \
  80. --with-writer \
  81. --with-xinclude \
  82. --with-xpath \
  83. --with-xptr \
  84. --with-zlib=$(STAGING_DIR)/usr \
  85. --without-lzma
  86. HOST_CONFIGURE_ARGS += \
  87. --disable-shared \
  88. --enable-static \
  89. --with-pic \
  90. --with-c14n \
  91. --without-catalog \
  92. --with-debug \
  93. --with-html \
  94. --without-ftp \
  95. --without-http \
  96. --without-iconv \
  97. --without-iso8859x \
  98. --without-legacy \
  99. --with-output \
  100. --without-pattern \
  101. --without-push \
  102. --without-python \
  103. --with-reader \
  104. --without-readline \
  105. --without-regexps \
  106. --with-sax1 \
  107. --with-schemas \
  108. --with-threads \
  109. --with-tree \
  110. --with-valid \
  111. --with-writer \
  112. --with-xinclude \
  113. --with-xpath \
  114. --with-xptr \
  115. --with-zlib \
  116. --without-lzma
  117. define Build/InstallDev
  118. $(INSTALL_DIR) $(2)/bin
  119. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/xml2-config \
  120. $(2)/bin/$(GNU_TARGET_NAME)-xml2-config
  121. $(SED) 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
  122. $(2)/bin/$(GNU_TARGET_NAME)-xml2-config
  123. $(LN) $(GNU_TARGET_NAME)-xml2-config $(2)/bin/xml2-config
  124. $(INSTALL_DIR) $(1)/usr/include
  125. $(CP) $(PKG_INSTALL_DIR)/usr/include/libxml2 $(1)/usr/include/
  126. $(INSTALL_DIR) $(1)/usr/lib
  127. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxml2.{la,a,so*} $(1)/usr/lib/
  128. $(INSTALL_DIR) $(1)/usr/lib/cmake/libxml2
  129. $(CP) $(PKG_INSTALL_DIR)/usr/lib/cmake/libxml2/libxml2-config.cmake \
  130. $(1)/usr/lib/cmake/libxml2
  131. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  132. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libxml-2.0.pc $(1)/usr/lib/pkgconfig/
  133. $(INSTALL_DIR) $(2)/share/aclocal/
  134. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/aclocal/* $(2)/share/aclocal
  135. endef
  136. define Host/Install
  137. $(call Host/Install/Default)
  138. mv $(1)/bin/xml2-config $(1)/bin/$(GNU_HOST_NAME)-xml2-config
  139. $(LN) $(GNU_HOST_NAME)-xml2-config $(1)/bin/xml2-config
  140. endef
  141. define Package/libxml2/install
  142. $(INSTALL_DIR) $(1)/usr/lib
  143. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxml2.so.* $(1)/usr/lib/
  144. endef
  145. define Package/libxml2-dev/install
  146. $(INSTALL_DIR) $(1)/usr/bin
  147. $(CP) $(PKG_INSTALL_DIR)/usr/bin/xml2-config $(1)/usr/bin/
  148. $(SED) "s,$(STAGING_DIR),,g" $(1)/usr/bin/xml2-config
  149. $(INSTALL_DIR) $(1)/usr/include/
  150. $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
  151. $(INSTALL_DIR) $(1)/usr/lib
  152. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxml2.so $(1)/usr/lib/
  153. $(INSTALL_DIR) $(1)/usr/lib/{cmake,pkgconfig}
  154. $(CP) $(PKG_INSTALL_DIR)/usr/lib/{cmake,pkgconfig} $(1)/usr/lib/
  155. $(SED) "s,$(STAGING_DIR),,g" $(1)/usr/lib/pkgconfig/*.pc
  156. $(INSTALL_DIR) $(1)/usr/share/aclocal
  157. $(CP) $(PKG_INSTALL_DIR)/usr/share/aclocal/* $(1)/usr/share/aclocal
  158. endef
  159. define Package/libxml2-utils/install
  160. $(INSTALL_DIR) $(1)/usr/bin
  161. $(CP) $(PKG_INSTALL_DIR)/usr/bin/xmllint $(1)/usr/bin/
  162. $(CP) $(PKG_INSTALL_DIR)/usr/bin/xmlcatalog $(1)/usr/bin/
  163. endef
  164. $(eval $(call HostBuild))
  165. $(eval $(call BuildPackage,libxml2))
  166. $(eval $(call BuildPackage,libxml2-dev))
  167. $(eval $(call BuildPackage,libxml2-utils))