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