Makefile 2.5 KB

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