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