libxml2_2.9.10.bb 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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. file://CVE-2020-7595.patch \
  22. file://CVE-2019-20388.patch \
  23. file://CVE-2020-24977.patch \
  24. file://fix-python39.patch \
  25. "
  26. SRC_URI[libtar.md5sum] = "10942a1dc23137a8aa07f0639cbfece5"
  27. SRC_URI[libtar.sha256sum] = "aafee193ffb8fe0c82d4afef6ef91972cbaf5feea100edc2f262750611b4be1f"
  28. SRC_URI[testtar.md5sum] = "ae3d1ebe000a3972afa104ca7f0e1b4a"
  29. SRC_URI[testtar.sha256sum] = "96151685cec997e1f9f3387e3626d61e6284d4d6e66e0e440c209286c03e9cc7"
  30. BINCONFIG = "${bindir}/xml2-config"
  31. PACKAGECONFIG ??= "python \
  32. ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \
  33. "
  34. PACKAGECONFIG[python] = "--with-python=${PYTHON},--without-python,python3"
  35. PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
  36. inherit autotools pkgconfig binconfig-disabled ptest
  37. inherit ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3native', '', d)}
  38. 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)}"
  39. RDEPENDS_${PN}-python += "${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3-core', '', d)}"
  40. RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-gconv-ebcdic-us \
  41. glibc-gconv-ibm1141 \
  42. glibc-gconv-iso8859-5 \
  43. glibc-gconv-euc-jp \
  44. locale-base-en-us \
  45. "
  46. export PYTHON_SITE_PACKAGES="${PYTHON_SITEPACKAGES_DIR}"
  47. # WARNING: zlib is required for RPM use
  48. EXTRA_OECONF = "--without-debug --without-legacy --with-catalog --without-docbook --with-c14n --without-lzma --with-fexceptions"
  49. EXTRA_OECONF_class-native = "--without-legacy --without-docbook --with-c14n --without-lzma --with-zlib"
  50. EXTRA_OECONF_class-nativesdk = "--without-legacy --without-docbook --with-c14n --without-lzma --with-zlib"
  51. EXTRA_OECONF_linuxstdbase = "--with-debug --with-legacy --with-docbook --with-c14n --without-lzma --with-zlib"
  52. python populate_packages_prepend () {
  53. # autonamer would call this libxml2-2, but we don't want that
  54. if d.getVar('DEBIAN_NAMES'):
  55. d.setVar('PKG_libxml2', '${MLPREFIX}libxml2')
  56. }
  57. PACKAGE_BEFORE_PN += "${PN}-utils"
  58. PACKAGES += "${PN}-python"
  59. FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a"
  60. FILES_${PN}-dev += "${libdir}/xml2Conf.sh ${libdir}/cmake/*"
  61. FILES_${PN}-utils = "${bindir}/*"
  62. FILES_${PN}-python = "${PYTHON_SITEPACKAGES_DIR}"
  63. do_configure_prepend () {
  64. # executables take longer to package: these should not be executable
  65. find ${S}/xmlconf/ -type f -exec chmod -x {} \+
  66. }
  67. do_compile_ptest() {
  68. oe_runmake check-am
  69. }
  70. do_install_ptest () {
  71. cp -r ${S}/xmlconf ${D}${PTEST_PATH}
  72. if [ "${@bb.utils.filter('PACKAGECONFIG', 'python', d)}" ]; then
  73. sed -i -e 's|^\(PYTHON = \).*|\1${USRBINPATH}/${PYTHON_PN}|' \
  74. ${D}${PTEST_PATH}/python/tests/Makefile
  75. grep -lrZ '#!/usr/bin/python' ${D}${PTEST_PATH}/python |
  76. xargs -0 sed -i -e 's|/usr/bin/python|${USRBINPATH}/${PYTHON_PN}|'
  77. fi
  78. #Remove build host references from various Makefiles
  79. find "${D}${PTEST_PATH}" -name Makefile -type f -exec \
  80. sed -i \
  81. -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
  82. -e 's|${DEBUG_PREFIX_MAP}||g' \
  83. -e 's:${HOSTTOOLS_DIR}/::g' \
  84. -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
  85. -e 's:${RECIPE_SYSROOT}::g' \
  86. -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
  87. -e '/^RELDATE/d' \
  88. {} +
  89. }
  90. do_install_append_class-native () {
  91. # Docs are not needed in the native case
  92. rm ${D}${datadir}/gtk-doc -rf
  93. }
  94. BBCLASSEXTEND = "native nativesdk"