Makefile 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  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.8
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=http://xmlsoft.org/sources/
  13. PKG_HASH:=0b74e51595654f958148759cfef0993114ddccccbb6f31aee018f3558e8e2732
  14. PKG_LICENSE:=MIT
  15. PKG_LICENSE_FILES:=COPYING
  16. PKG_MAINTAINER:=Michael Heimpold <mhei@heimpold.de>
  17. PKG_FIXUP:=autoreconf
  18. PKG_INSTALL:=1
  19. PKG_BUILD_PARALLEL:=0
  20. include $(INCLUDE_DIR)/host-build.mk
  21. include $(INCLUDE_DIR)/package.mk
  22. define Package/libxml2
  23. SECTION:=libs
  24. CATEGORY:=Libraries
  25. TITLE:=Gnome XML library
  26. URL:=http://xmlsoft.org/
  27. DEPENDS:=+libpthread +zlib
  28. endef
  29. define Package/libxml2/description
  30. A library for manipulating XML and HTML resources.
  31. endef
  32. TARGET_CFLAGS += $(FPIC)
  33. CONFIGURE_ARGS += \
  34. --enable-shared \
  35. --enable-static \
  36. --with-c14n \
  37. --without-catalog \
  38. --with-debug \
  39. --without-docbook \
  40. --with-html \
  41. --without-ftp \
  42. --without-http \
  43. --without-iconv \
  44. --without-iso8859x \
  45. --without-legacy \
  46. --with-output \
  47. --without-pattern \
  48. --without-push \
  49. --without-python \
  50. --with-reader \
  51. --without-readline \
  52. --without-regexps \
  53. --with-sax1 \
  54. --with-schemas \
  55. --with-threads \
  56. --with-tree \
  57. --with-valid \
  58. --with-writer \
  59. --with-xinclude \
  60. --with-xpath \
  61. --with-xptr \
  62. --with-zlib=$(STAGING_DIR)/usr \
  63. --without-lzma
  64. HOST_CONFIGURE_ARGS += \
  65. --enable-shared \
  66. --enable-static \
  67. --with-c14n \
  68. --without-catalog \
  69. --with-debug \
  70. --without-docbook \
  71. --with-html \
  72. --without-ftp \
  73. --without-http \
  74. --without-iconv \
  75. --without-iso8859x \
  76. --without-legacy \
  77. --with-output \
  78. --without-pattern \
  79. --without-push \
  80. --without-python \
  81. --with-reader \
  82. --without-readline \
  83. --without-regexps \
  84. --with-sax1 \
  85. --with-schemas \
  86. --with-threads \
  87. --with-tree \
  88. --with-valid \
  89. --with-writer \
  90. --with-xinclude \
  91. --with-xpath \
  92. --with-xptr \
  93. --with-zlib \
  94. --without-lzma
  95. define Build/InstallDev
  96. $(INSTALL_DIR) $(2)/bin
  97. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/xml2-config $(2)/bin/
  98. $(SED) 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' $(2)/bin/xml2-config
  99. $(INSTALL_DIR) $(1)/usr/include
  100. $(CP) $(PKG_INSTALL_DIR)/usr/include/libxml2 $(1)/usr/include/
  101. $(INSTALL_DIR) $(1)/usr/lib
  102. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxml2.{la,a,so*} $(1)/usr/lib/
  103. $(INSTALL_DIR) $(1)/usr/lib/cmake/libxml2
  104. $(CP) $(PKG_INSTALL_DIR)/usr/lib/cmake/libxml2/libxml2-config.cmake \
  105. $(1)/usr/lib/cmake/libxml2
  106. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  107. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libxml-2.0.pc $(1)/usr/lib/pkgconfig/
  108. $(INSTALL_DIR) $(2)/share/aclocal/
  109. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/aclocal/* $(2)/share/aclocal
  110. endef
  111. define Package/libxml2/install
  112. $(INSTALL_DIR) $(1)/usr/lib
  113. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxml2.so* $(1)/usr/lib/
  114. endef
  115. define Host/Install
  116. $(SED) 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' $(HOST_BUILD_DIR)/xml2-config
  117. $(call Host/Install/Default)
  118. endef
  119. $(eval $(call HostBuild))
  120. $(eval $(call BuildPackage,libxml2))