Makefile 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=libxml2
  3. PKG_VERSION:=2.11.4
  4. PKG_RELEASE:=1
  5. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  6. PKG_SOURCE_URL:=@GNOME/libxml2/$(basename $(PKG_VERSION))
  7. PKG_HASH:=737e1d7f8ab3f139729ca13a2494fd17bf30ddb4b7a427cf336252cab57f57f7
  8. PKG_LICENSE:=MIT
  9. PKG_LICENSE_FILES:=COPYING
  10. PKG_CPE_ID:=cpe:/a:xmlsoft:libxml2
  11. include $(INCLUDE_DIR)/host-build.mk
  12. include $(INCLUDE_DIR)/package.mk
  13. include $(INCLUDE_DIR)/cmake.mk
  14. include $(INCLUDE_DIR)/nls.mk
  15. define Package/libxml2
  16. SECTION:=libs
  17. CATEGORY:=Libraries
  18. TITLE:=Gnome XML library
  19. URL:=http://xmlsoft.org/
  20. DEPENDS:=+libpthread +zlib $(ICONV_DEPENDS)
  21. endef
  22. define Package/libxml2/description
  23. A library for manipulating XML and HTML resources.
  24. endef
  25. define Package/libxml2-dev
  26. SECTION:=devel
  27. CATEGORY:=Development
  28. SUBMENU:=Libraries
  29. TITLE:=Development files for libxml2
  30. URL:=http://xmlsoft.org/
  31. DEPENDS:=+libxml2
  32. endef
  33. define Package/libxml2-dev/description
  34. A library for manipulating XML and HTML resources.
  35. This package contains the headers and xml2-config binary.
  36. endef
  37. define Package/libxml2-utils
  38. SECTION:=utils
  39. CATEGORY:=Utilities
  40. TITLE:=XML command line utilities (xmllint...)
  41. URL:=http://xmlsoft.org/
  42. DEPENDS:=+libxml2
  43. endef
  44. define Package/libxml2-utils/description
  45. This package contains the binaries xmllint and xmlcatalog
  46. from libxml2, a library for manipulating XML and HTML resources.
  47. endef
  48. CMAKE_HOST_OPTIONS += \
  49. -DBUILD_SHARED_LIBS=OFF \
  50. -DLIBXML2_WITH_C14N=ON \
  51. -DLIBXML2_WITH_CATALOG=OFF \
  52. -DLIBXML2_WITH_DEBUG=ON \
  53. -DLIBXML2_WITH_FTP=OFF \
  54. -DLIBXML2_WITH_HTML=ON \
  55. -DLIBXML2_WITH_HTTP=OFF \
  56. -DLIBXML2_WITH_ICONV=ON \
  57. -DLIBXML2_WITH_ICU=OFF \
  58. -DLIBXML2_WITH_ISO8859X=OFF \
  59. -DLIBXML2_WITH_LEGACY=OFF \
  60. -DLIBXML2_WITH_LZMA=OFF \
  61. -DLIBXML2_WITH_MEM_DEBUG=OFF \
  62. -DLIBXML2_WITH_MODULES=OFF \
  63. -DLIBXML2_WITH_OUTPUT=ON \
  64. -DLIBXML2_WITH_PATTERN=ON \
  65. -DLIBXML2_WITH_PROGRAMS=OFF \
  66. -DLIBXML2_WITH_PUSH=ON \
  67. -DLIBXML2_WITH_PYTHON=OFF \
  68. -DLIBXML2_WITH_READER=ON \
  69. -DLIBXML2_WITH_REGEXPS=ON \
  70. -DLIBXML2_WITH_RUN_DEBUG=OFF \
  71. -DLIBXML2_WITH_SAX1=ON \
  72. -DLIBXML2_WITH_SCHEMAS=ON \
  73. -DLIBXML2_WITH_SCHEMATRON=OFF \
  74. -DLIBXML2_WITH_TESTS=OFF \
  75. -DLIBXML2_WITH_THREADS=ON \
  76. -DLIBXML2_WITH_THREAD_ALLOC=OFF \
  77. -DLIBXML2_WITH_TREE=ON \
  78. -DLIBXML2_WITH_VALID=ON \
  79. -DLIBXML2_WITH_WRITER=ON \
  80. -DLIBXML2_WITH_XINCLUDE=ON \
  81. -DLIBXML2_WITH_XPATH=ON \
  82. -DLIBXML2_WITH_XPTR=ON \
  83. -DLIBXML2_WITH_XPTR_LOCS=ON \
  84. -DLIBXML2_WITH_ZLIB=ON
  85. CMAKE_OPTIONS += \
  86. -DBUILD_SHARED_LIBS=ON \
  87. -DLIBXML2_WITH_C14N=ON \
  88. -DLIBXML2_WITH_CATALOG=OFF \
  89. -DLIBXML2_WITH_DEBUG=ON \
  90. -DLIBXML2_WITH_FTP=OFF \
  91. -DLIBXML2_WITH_HTML=ON \
  92. -DLIBXML2_WITH_HTTP=OFF \
  93. -DLIBXML2_WITH_ICONV=ON \
  94. -DLIBXML2_WITH_ICU=OFF \
  95. -DLIBXML2_WITH_ISO8859X=OFF \
  96. -DLIBXML2_WITH_LEGACY=OFF \
  97. -DLIBXML2_WITH_LZMA=OFF \
  98. -DLIBXML2_WITH_MEM_DEBUG=OFF \
  99. -DLIBXML2_WITH_MODULES=OFF \
  100. -DLIBXML2_WITH_OUTPUT=ON \
  101. -DLIBXML2_WITH_PATTERN=ON \
  102. -DLIBXML2_WITH_PROGRAMS=ON \
  103. -DLIBXML2_WITH_PUSH=ON \
  104. -DLIBXML2_WITH_PYTHON=OFF \
  105. -DLIBXML2_WITH_READER=ON \
  106. -DLIBXML2_WITH_REGEXPS=ON \
  107. -DLIBXML2_WITH_RUN_DEBUG=OFF \
  108. -DLIBXML2_WITH_SAX1=ON \
  109. -DLIBXML2_WITH_SCHEMAS=ON \
  110. -DLIBXML2_WITH_SCHEMATRON=OFF \
  111. -DLIBXML2_WITH_TESTS=OFF \
  112. -DLIBXML2_WITH_THREADS=ON \
  113. -DLIBXML2_WITH_THREAD_ALLOC=OFF \
  114. -DLIBXML2_WITH_TREE=ON \
  115. -DLIBXML2_WITH_VALID=ON \
  116. -DLIBXML2_WITH_WRITER=ON \
  117. -DLIBXML2_WITH_XINCLUDE=ON \
  118. -DLIBXML2_WITH_XPATH=ON \
  119. -DLIBXML2_WITH_XPTR=ON \
  120. -DLIBXML2_WITH_XPTR_LOCS=ON \
  121. -DLIBXML2_WITH_ZLIB=ON \
  122. -DHAVE_LIBHISTORY=OFF \
  123. -DHAVE_LIBREADLINE=OFF
  124. define Build/InstallDev
  125. $(INSTALL_DIR) $(2)/bin
  126. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/xml2-config \
  127. $(2)/bin/$(GNU_TARGET_NAME)-xml2-config
  128. $(SED) 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
  129. $(2)/bin/$(GNU_TARGET_NAME)-xml2-config
  130. $(LN) $(GNU_TARGET_NAME)-xml2-config $(2)/bin/xml2-config
  131. $(INSTALL_DIR) $(1)/usr/bin
  132. $(CP) $(PKG_INSTALL_DIR)/usr/bin/xmlcatalog $(1)/usr/bin/
  133. $(CP) $(PKG_INSTALL_DIR)/usr/bin/xmllint $(1)/usr/bin/
  134. $(INSTALL_DIR) $(1)/usr/include
  135. $(CP) $(PKG_INSTALL_DIR)/usr/include/libxml2 $(1)/usr/include/
  136. $(INSTALL_DIR) $(1)/usr/lib
  137. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxml2.so* $(1)/usr/lib/
  138. $(INSTALL_DIR) $(1)/usr/lib/cmake/libxml2
  139. $(CP) $(PKG_INSTALL_DIR)/usr/lib/cmake/libxml2-$(PKG_VERSION)/*.cmake \
  140. $(1)/usr/lib/cmake/libxml2
  141. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  142. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libxml-2.0.pc $(1)/usr/lib/pkgconfig/
  143. $(INSTALL_DIR) $(2)/share/aclocal/
  144. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/aclocal/* $(2)/share/aclocal
  145. endef
  146. define Host/Install
  147. $(call Host/Install/Default)
  148. mv $(1)/bin/xml2-config $(1)/bin/$(GNU_HOST_NAME)-xml2-config
  149. $(LN) $(GNU_HOST_NAME)-xml2-config $(1)/bin/xml2-config
  150. endef
  151. define Package/libxml2/install
  152. $(INSTALL_DIR) $(1)/usr/lib
  153. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxml2.so.* $(1)/usr/lib/
  154. endef
  155. define Package/libxml2-dev/install
  156. $(INSTALL_DIR) $(1)/usr/bin
  157. $(CP) $(PKG_INSTALL_DIR)/usr/bin/xml2-config $(1)/usr/bin/
  158. $(SED) "s,$(STAGING_DIR),,g" $(1)/usr/bin/xml2-config
  159. $(INSTALL_DIR) $(1)/usr/include/
  160. $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
  161. $(INSTALL_DIR) $(1)/usr/lib
  162. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxml2.so $(1)/usr/lib/
  163. $(INSTALL_DIR) $(1)/usr/lib/{cmake,pkgconfig}
  164. $(CP) $(PKG_INSTALL_DIR)/usr/lib/{cmake,pkgconfig} $(1)/usr/lib/
  165. $(SED) "s,$(STAGING_DIR),,g" $(1)/usr/lib/pkgconfig/*.pc
  166. $(INSTALL_DIR) $(1)/usr/share/aclocal
  167. $(CP) $(PKG_INSTALL_DIR)/usr/share/aclocal/* $(1)/usr/share/aclocal
  168. endef
  169. define Package/libxml2-utils/install
  170. $(INSTALL_DIR) $(1)/usr/bin
  171. $(CP) $(PKG_INSTALL_DIR)/usr/bin/xmllint $(1)/usr/bin/
  172. $(CP) $(PKG_INSTALL_DIR)/usr/bin/xmlcatalog $(1)/usr/bin/
  173. endef
  174. $(eval $(call HostBuild))
  175. $(eval $(call BuildPackage,libxml2))
  176. $(eval $(call BuildPackage,libxml2-dev))
  177. $(eval $(call BuildPackage,libxml2-utils))