1
0

Makefile 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  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:=2
  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 $(2)/bin/
  122. $(SED) 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' $(2)/bin/xml2-config
  123. $(INSTALL_DIR) $(1)/usr/include
  124. $(CP) $(PKG_INSTALL_DIR)/usr/include/libxml2 $(1)/usr/include/
  125. $(INSTALL_DIR) $(1)/usr/lib
  126. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxml2.{la,a,so*} $(1)/usr/lib/
  127. $(INSTALL_DIR) $(1)/usr/lib/cmake/libxml2
  128. $(CP) $(PKG_INSTALL_DIR)/usr/lib/cmake/libxml2/libxml2-config.cmake \
  129. $(1)/usr/lib/cmake/libxml2
  130. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  131. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libxml-2.0.pc $(1)/usr/lib/pkgconfig/
  132. $(INSTALL_DIR) $(2)/share/aclocal/
  133. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/aclocal/* $(2)/share/aclocal
  134. endef
  135. define Package/libxml2/install
  136. $(INSTALL_DIR) $(1)/usr/lib
  137. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxml2.so.* $(1)/usr/lib/
  138. endef
  139. define Package/libxml2-dev/install
  140. $(INSTALL_DIR) $(1)/usr/bin
  141. $(CP) $(PKG_INSTALL_DIR)/usr/bin/xml2-config $(1)/usr/bin/
  142. $(SED) "s,$(STAGING_DIR),,g" $(1)/usr/bin/xml2-config
  143. $(INSTALL_DIR) $(1)/usr/include/
  144. $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
  145. $(INSTALL_DIR) $(1)/usr/lib
  146. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxml2.so $(1)/usr/lib/
  147. $(INSTALL_DIR) $(1)/usr/lib/{cmake,pkgconfig}
  148. $(CP) $(PKG_INSTALL_DIR)/usr/lib/{cmake,pkgconfig} $(1)/usr/lib/
  149. $(SED) "s,$(STAGING_DIR),,g" $(1)/usr/lib/pkgconfig/*.pc
  150. $(INSTALL_DIR) $(1)/usr/share/aclocal
  151. $(CP) $(PKG_INSTALL_DIR)/usr/share/aclocal/* $(1)/usr/share/aclocal
  152. endef
  153. define Package/libxml2-utils/install
  154. $(INSTALL_DIR) $(1)/usr/bin
  155. $(CP) $(PKG_INSTALL_DIR)/usr/bin/xmllint $(1)/usr/bin/
  156. $(CP) $(PKG_INSTALL_DIR)/usr/bin/xmlcatalog $(1)/usr/bin/
  157. endef
  158. define Host/Install
  159. $(SED) 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' $(HOST_BUILD_DIR)/xml2-config
  160. $(call Host/Install/Default)
  161. endef
  162. $(eval $(call HostBuild))
  163. $(eval $(call BuildPackage,libxml2))
  164. $(eval $(call BuildPackage,libxml2-dev))
  165. $(eval $(call BuildPackage,libxml2-utils))