Makefile 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. # This file is part of the OpenADK project. OpenADK is copyrighted
  2. # material, please see the LICENCE file in the top-level directory.
  3. include ${TOPDIR}/rules.mk
  4. PKG_NAME:= libxml2
  5. PKG_VERSION:= 2.9.1
  6. PKG_RELEASE:= 6
  7. PKG_MD5SUM:= 9c0cfef285d5c4a5c80d00904ddab380
  8. PKG_DESCR:= XML C parser and toolkit
  9. PKG_SECTION:= libs
  10. PKG_DEPENDS:= zlib
  11. PKG_BUILDDEP:= libxml2-host zlib
  12. HOST_BUILDDEP:= python2-host
  13. PKG_URL:= http://www.xmlsoft.org/
  14. PKG_SITES:= http://xmlsoft.org/sources/
  15. PKG_OPTS:= dev
  16. PKG_SUBPKGS:= LIBXML2 LIBXML2_PYTHON
  17. PKGSD_LIBXML2_PYTHON:= XML python bindings
  18. PKGSC_LIBXML2_PYTHON:= libs
  19. PKGSB_LIBXML2_PYTHON:= python2
  20. PKGSS_LIBXML2_PYTHON:= python2
  21. ifeq ($(ADK_STATIC),y)
  22. PKG_OPTS+= libmix
  23. endif
  24. include ${TOPDIR}/mk/host.mk
  25. include ${TOPDIR}/mk/package.mk
  26. $(eval $(call HOST_template,LIBXML2,libxml2,${PKG_VERSION}-${PKG_RELEASE}))
  27. $(eval $(call PKG_template,LIBXML2,libxml2,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
  28. $(eval $(call PKG_template,LIBXML2_PYTHON,libxml2-python,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_LIBXML2_PYTHON},${PKGSC_LIBXML2_PYTHON}))
  29. include $(TOPDIR)/mk/python.mk
  30. HOST_STYLE:= auto
  31. HOST_CONFIGURE_ARGS+= --with-python \
  32. --without-iconv \
  33. --without-lzma \
  34. --without-zlib
  35. HOST_MAKE_FLAGS+= LDFLAGS=-lpthread
  36. AUTOTOOL_STYLE:= autoreconf
  37. TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS))
  38. TARGET_LDFLAGS+= -lpthread
  39. ifneq ($(ADK_PACKAGE_LIBXML2_PYTHON),)
  40. CONFIGURE_ARGS+= --with-python
  41. else
  42. CONFIGURE_ARGS+= --without-python
  43. endif
  44. CONFIGURE_ARGS+= --without-c14n \
  45. --without-debug \
  46. --without-docbook \
  47. --with-catalog \
  48. --with-html \
  49. --without-ftp \
  50. --without-http \
  51. --without-iconv \
  52. --without-iso8859x \
  53. --without-legacy \
  54. --with-output \
  55. --without-pattern \
  56. --without-push \
  57. --with-reader \
  58. --without-readline \
  59. --without-regexps \
  60. --with-sax1 \
  61. --with-schemas \
  62. --with-threads \
  63. --with-tree \
  64. --with-valid \
  65. --with-writer \
  66. --with-xinclude \
  67. --with-xpath \
  68. --with-xptr \
  69. --with-zlib
  70. libxml2-install:
  71. ${INSTALL_DIR} ${IDIR_LIBXML2}/usr/lib
  72. ${CP} ${WRKINST}/usr/lib/libxml2.so* ${IDIR_LIBXML2}/usr/lib
  73. libxml2-python-install:
  74. $(INSTALL_DIR) $(IDIR_LIBXML2_PYTHON)/usr/lib/python$(PYTHON_VERSION)/site-packages
  75. $(CP) $(WRKINST)/usr/lib/python$(PYTHON_VERSION)/site-packages/*.{so,py} \
  76. $(IDIR_LIBXML2_PYTHON)/usr/lib/python$(PYTHON_VERSION)/site-packages
  77. include ${TOPDIR}/mk/host-bottom.mk
  78. include ${TOPDIR}/mk/pkg-bottom.mk