1SUMMARY = "XML C Parser Library and Toolkit" 2DESCRIPTION = "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." 3HOMEPAGE = "https://gitlab.gnome.org/GNOME/libxml2" 4BUGTRACKER = "http://bugzilla.gnome.org/buglist.cgi?product=libxml2" 5SECTION = "libs" 6LICENSE = "MIT" 7LIC_FILES_CHKSUM = "file://Copyright;md5=5873615e8a9ecbf5c8857c4312ee05d6 \ 8 file://dict.c;beginline=6;endline=15;md5=2b4b7b827d2d8b080372433c4c9c85b6 \ 9 file://list.c;beginline=4;endline=13;md5=b9c25b021ccaf287e50060602d20f3a7 \ 10 " 11 12DEPENDS = "zlib virtual/libiconv" 13 14GNOMEBASEBUILDCLASS = "autotools" 15inherit gnomebase 16 17SRC_URI += "http://www.w3.org/XML/Test/xmlts20130923.tar;subdir=${BP};name=testtar \ 18 file://run-ptest \ 19 file://install-tests.patch \ 20 file://0001-Revert-cmake-Fix-installation-directories-in-libxml2.patch \ 21 " 22 23SRC_URI[archive.sha256sum] = "6de55cacc8c2bc758f2ef6f93c313cb30e4dd5d84ac5d3c7ccbd9344d8cc6833" 24SRC_URI[testtar.sha256sum] = "c6b2d42ee50b8b236e711a97d68e6c4b5c8d83e69a2be4722379f08702ea7273" 25 26# Disputed as a security issue, but fixed in d39f780 27CVE_STATUS[CVE-2023-45322] = "disputed: issue requires memory allocation to fail" 28 29BINCONFIG = "${bindir}/xml2-config" 30 31PACKAGECONFIG ??= "python" 32PACKAGECONFIG[python] = "--with-python=${PYTHON},--without-python,python3" 33 34inherit autotools pkgconfig binconfig-disabled ptest 35 36inherit_defer ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3targetconfig', '', d)} 37 38LDFLAGS:append:riscv64 = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld ptest', ' -fuse-ld=bfd', '', d)}" 39 40RDEPENDS:${PN}-ptest += "bash make locale-base-en-us ${@bb.utils.contains('PACKAGECONFIG', 'python', 'libgcc python3-core python3-logging python3-shell python3-stringold python3-threading python3-unittest ${PN}-python', '', d)}" 41 42RDEPENDS:${PN}-python += "${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3-core', '', d)}" 43 44RDEPENDS:${PN}-ptest:append:libc-musl = " musl-locales" 45RDEPENDS:${PN}-ptest:append:libc-glibc = " glibc-gconv-ebcdic-us \ 46 glibc-gconv-ibm1141 \ 47 glibc-gconv-iso8859-5 \ 48 glibc-gconv-euc-jp \ 49 " 50 51# WARNING: zlib is required for RPM use 52EXTRA_OECONF = "--without-debug --without-legacy --with-catalog --with-c14n --without-lzma" 53EXTRA_OECONF:class-native = "--without-legacy --with-c14n --without-lzma --with-zlib" 54EXTRA_OECONF:class-nativesdk = "--without-legacy --with-c14n --without-lzma --with-zlib" 55EXTRA_OECONF:linuxstdbase = "--with-debug --with-legacy --with-c14n --without-lzma --with-zlib" 56 57python populate_packages:prepend () { 58 # autonamer would call this libxml2-2, but we don't want that 59 if d.getVar('DEBIAN_NAMES'): 60 d.setVar('PKG:libxml2', '${MLPREFIX}libxml2') 61} 62 63PACKAGE_BEFORE_PN += "${PN}-utils" 64PACKAGES += "${PN}-python" 65 66FILES:${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a" 67FILES:${PN}-utils = "${bindir}/*" 68FILES:${PN}-python = "${PYTHON_SITEPACKAGES_DIR}" 69 70do_configure:prepend () { 71 # executables take longer to package: these should not be executable 72 find ${S}/xmlconf/ -type f -exec chmod -x {} \+ 73} 74 75do_install_ptest () { 76 oe_runmake DESTDIR=${D} ptestdir=${PTEST_PATH} install-test-data 77 78 cp -r ${S}/xmlconf ${D}${PTEST_PATH} 79 80 if ! ${@bb.utils.contains('PACKAGECONFIG', 'python', 'true', 'false', d)}; then 81 rm -rf ${D}${PTEST_DIR}/python 82 fi 83} 84 85# with musl we need to enable icu support explicitly for these tests 86do_install_ptest:append:libc-musl () { 87 rm -rf ${D}/${PTEST_PATH}/test/icu_parse_test.xml 88} 89 90do_install:append:class-native () { 91 # Docs are not needed in the native case 92 rm ${D}${datadir}/gtk-doc -rf 93 94 create_wrapper ${D}${bindir}/xmllint 'XML_CATALOG_FILES=${XML_CATALOG_FILES:-${sysconfdir}/xml/catalog}' 95} 96do_install[vardepsexclude] += "XML_CATALOG_FILES:-${sysconfdir}/xml/catalog" 97 98BBCLASSEXTEND = "native nativesdk" 99