libxml2_2.9.9.bb 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. SUMMARY = "XML C Parser Library and Toolkit"
  2. DESCRIPTION = "The XML Parser Library allows for manipulation of XML files. Libxml2 exports Push and Pull type parser interfaces for both XML and HTML. It can do DTD validation at parse time, on a parsed document instance or with an arbitrary DTD. Libxml2 includes complete XPath, XPointer and Xinclude implementations. It also has a SAX like interface, which is designed to be compatible with Expat."
  3. HOMEPAGE = "http://www.xmlsoft.org/"
  4. BUGTRACKER = "http://bugzilla.gnome.org/buglist.cgi?product=libxml2"
  5. SECTION = "libs"
  6. LICENSE = "MIT"
  7. LIC_FILES_CHKSUM = "file://Copyright;md5=2044417e2e5006b65a8b9067b683fcf1 \
  8. file://hash.c;beginline=6;endline=15;md5=96f7296605eae807670fb08947829969 \
  9. file://list.c;beginline=4;endline=13;md5=cdbfa3dee51c099edb04e39f762ee907 \
  10. file://trio.c;beginline=5;endline=14;md5=6c025753c86d958722ec76e94cae932e"
  11. DEPENDS = "zlib virtual/libiconv"
  12. SRC_URI = "http://www.xmlsoft.org/sources/libxml2-${PV}.tar.gz;name=libtar \
  13. http://www.w3.org/XML/Test/xmlts20080827.tar.gz;subdir=${BP};name=testtar \
  14. file://libxml-64bit.patch \
  15. file://runtest.patch \
  16. file://run-ptest \
  17. file://python-sitepackages-dir.patch \
  18. file://libxml-m4-use-pkgconfig.patch \
  19. file://0001-Make-ptest-run-the-python-tests-if-python-is-enabled.patch \
  20. file://fix-execution-of-ptests.patch \
  21. "
  22. SRC_URI[libtar.md5sum] = "c04a5a0a042eaa157e8e8c9eabe76bd6"
  23. SRC_URI[libtar.sha256sum] = "94fb70890143e3c6549f265cee93ec064c80a84c42ad0f23e85ee1fd6540a871"
  24. SRC_URI[testtar.md5sum] = "ae3d1ebe000a3972afa104ca7f0e1b4a"
  25. SRC_URI[testtar.sha256sum] = "96151685cec997e1f9f3387e3626d61e6284d4d6e66e0e440c209286c03e9cc7"
  26. BINCONFIG = "${bindir}/xml2-config"
  27. PACKAGECONFIG ??= "python \
  28. ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \
  29. "
  30. PACKAGECONFIG[python] = "--with-python=${PYTHON},--without-python,python3"
  31. PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
  32. inherit autotools pkgconfig binconfig-disabled ptest features_check
  33. inherit ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3native', '', d)}
  34. RDEPENDS_${PN}-ptest += "make ${@bb.utils.contains('PACKAGECONFIG', 'python', 'libgcc python3-core python3-logging python3-shell python3-stringold python3-threading python3-unittest ${PN}-python', '', d)}"
  35. RDEPENDS_${PN}-python += "${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3-core', '', d)}"
  36. RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-gconv-ebcdic-us \
  37. glibc-gconv-ibm1141 \
  38. glibc-gconv-iso8859-5 \
  39. glibc-gconv-euc-jp \
  40. locale-base-en-us \
  41. "
  42. export PYTHON_SITE_PACKAGES="${PYTHON_SITEPACKAGES_DIR}"
  43. # WARNING: zlib is required for RPM use
  44. EXTRA_OECONF = "--without-debug --without-legacy --with-catalog --without-docbook --with-c14n --without-lzma --with-fexceptions"
  45. EXTRA_OECONF_class-native = "--without-legacy --without-docbook --with-c14n --without-lzma --with-zlib"
  46. EXTRA_OECONF_class-nativesdk = "--without-legacy --without-docbook --with-c14n --without-lzma --with-zlib"
  47. EXTRA_OECONF_linuxstdbase = "--with-debug --with-legacy --with-docbook --with-c14n --without-lzma --with-zlib"
  48. python populate_packages_prepend () {
  49. # autonamer would call this libxml2-2, but we don't want that
  50. if d.getVar('DEBIAN_NAMES'):
  51. d.setVar('PKG_libxml2', '${MLPREFIX}libxml2')
  52. }
  53. PACKAGE_BEFORE_PN += "${PN}-utils"
  54. PACKAGES += "${PN}-python"
  55. FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a"
  56. FILES_${PN}-dev += "${libdir}/xml2Conf.sh ${libdir}/cmake/*"
  57. FILES_${PN}-utils = "${bindir}/*"
  58. FILES_${PN}-python = "${PYTHON_SITEPACKAGES_DIR}"
  59. do_configure_prepend () {
  60. # executables take longer to package: these should not be executable
  61. find ${S}/xmlconf/ -type f -exec chmod -x {} \+
  62. }
  63. do_compile_ptest() {
  64. oe_runmake check-am
  65. }
  66. do_install_ptest () {
  67. cp -r ${S}/xmlconf ${D}${PTEST_PATH}
  68. if [ "${@bb.utils.filter('PACKAGECONFIG', 'python', d)}" ]; then
  69. sed -i -e 's|^\(PYTHON = \).*|\1${USRBINPATH}/${PYTHON_PN}|' \
  70. ${D}${PTEST_PATH}/python/tests/Makefile
  71. grep -lrZ '#!/usr/bin/python' ${D}${PTEST_PATH}/python |
  72. xargs -0 sed -i -e 's|/usr/bin/python|${USRBINPATH}/${PYTHON_PN}|'
  73. fi
  74. #Remove build host references from various Makefiles
  75. find "${D}${PTEST_PATH}" -name Makefile -type f -exec \
  76. sed -i \
  77. -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
  78. -e 's|${DEBUG_PREFIX_MAP}||g' \
  79. -e 's:${HOSTTOOLS_DIR}/::g' \
  80. -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
  81. -e 's:${RECIPE_SYSROOT}::g' \
  82. -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
  83. -e '/^RELDATE/d' \
  84. {} +
  85. }
  86. do_install_append_class-native () {
  87. # Docs are not needed in the native case
  88. rm ${D}${datadir}/gtk-doc -rf
  89. }
  90. BBCLASSEXTEND = "native nativesdk"