Makefile 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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. DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.gz
  17. PKG_SUBPKGS:= LIBXML2 LIBXML2_PYTHON
  18. PKGSD_LIBXML2_PYTHON:= XML python bindings
  19. PKGSC_LIBXML2_PYTHON:= libs
  20. PKGSB_LIBXML2_PYTHON:= python2
  21. PKGSS_LIBXML2_PYTHON:= python2
  22. ifeq ($(ADK_STATIC),y)
  23. PKG_OPTS+= libmix
  24. endif
  25. include ${TOPDIR}/mk/host.mk
  26. include ${TOPDIR}/mk/package.mk
  27. $(eval $(call HOST_template,LIBXML2,libxml2,${PKG_VERSION}-${PKG_RELEASE}))
  28. $(eval $(call PKG_template,LIBXML2,libxml2,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
  29. $(eval $(call PKG_template,LIBXML2_PYTHON,libxml2-python,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_LIBXML2_PYTHON},${PKGSC_LIBXML2_PYTHON}))
  30. include $(TOPDIR)/mk/python.mk
  31. HOST_STYLE:= auto
  32. HOST_CONFIGURE_ARGS+= --with-python \
  33. --without-iconv \
  34. --without-lzma \
  35. --without-zlib
  36. HOST_MAKE_FLAGS+= LDFLAGS=-lpthread
  37. AUTOTOOL_STYLE:= autoreconf
  38. TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS))
  39. TARGET_LDFLAGS+= -lpthread
  40. ifneq ($(ADK_PACKAGE_LIBXML2_PYTHON),)
  41. CONFIGURE_ARGS+= --with-python
  42. else
  43. CONFIGURE_ARGS+= --without-python
  44. endif
  45. CONFIGURE_ARGS+= --without-c14n \
  46. --without-debug \
  47. --without-docbook \
  48. --with-catalog \
  49. --with-html \
  50. --without-ftp \
  51. --without-http \
  52. --without-iconv \
  53. --without-iso8859x \
  54. --without-legacy \
  55. --with-output \
  56. --without-pattern \
  57. --without-push \
  58. --with-reader \
  59. --without-readline \
  60. --without-regexps \
  61. --with-sax1 \
  62. --with-schemas \
  63. --with-threads \
  64. --with-tree \
  65. --with-valid \
  66. --with-writer \
  67. --with-xinclude \
  68. --with-xpath \
  69. --with-xptr \
  70. --with-zlib
  71. libxml2-install:
  72. ${INSTALL_DIR} ${IDIR_LIBXML2}/usr/lib
  73. ${CP} ${WRKINST}/usr/lib/libxml2.so* ${IDIR_LIBXML2}/usr/lib
  74. libxml2-python-install:
  75. $(INSTALL_DIR) $(IDIR_LIBXML2_PYTHON)/usr/lib/python$(PYTHON_VERSION)/site-packages
  76. $(CP) $(WRKINST)/usr/lib/python$(PYTHON_VERSION)/site-packages/*.{so,py} \
  77. $(IDIR_LIBXML2_PYTHON)/usr/lib/python$(PYTHON_VERSION)/site-packages
  78. include ${TOPDIR}/mk/host-bottom.mk
  79. include ${TOPDIR}/mk/pkg-bottom.mk