From 4bd6fb3488909357ba04cb52a41d3d61086efed3 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Sun, 25 Jun 2023 23:22:22 +0200 Subject: libxml2: update 2.10.4 -> 2.11.4 Drop backports. Drop libxml-64bit.patch (no longer necessary). (From OE-Core rev: 24860598ba8557ea3a145f249938ea411f1ef1d8) Signed-off-by: Alexander Kanavin Signed-off-by: Alexandre Belloni Signed-off-by: Richard Purdie --- meta/recipes-core/libxml/libxml2/fix-tests.patch | 222 --------------------- .../libxml/libxml2/install-tests.patch | 17 +- .../recipes-core/libxml/libxml2/libxml-64bit.patch | 28 --- .../libxml/libxml2/libxml-m4-use-pkgconfig.patch | 212 -------------------- meta/recipes-core/libxml/libxml2_2.10.4.bb | 103 ---------- meta/recipes-core/libxml/libxml2_2.11.4.bb | 100 ++++++++++ 6 files changed, 107 insertions(+), 575 deletions(-) delete mode 100644 meta/recipes-core/libxml/libxml2/fix-tests.patch delete mode 100644 meta/recipes-core/libxml/libxml2/libxml-64bit.patch delete mode 100644 meta/recipes-core/libxml/libxml2/libxml-m4-use-pkgconfig.patch delete mode 100644 meta/recipes-core/libxml/libxml2_2.10.4.bb create mode 100644 meta/recipes-core/libxml/libxml2_2.11.4.bb diff --git a/meta/recipes-core/libxml/libxml2/fix-tests.patch b/meta/recipes-core/libxml/libxml2/fix-tests.patch deleted file mode 100644 index 80678efcfe..0000000000 --- a/meta/recipes-core/libxml/libxml2/fix-tests.patch +++ /dev/null @@ -1,222 +0,0 @@ -Backport the following patches to fix the reader2 and runsuite test cases: - -b92768cd tests: Enable "runsuite" test -0ac8c15e python/tests/reader2: use absolute paths everywhere -b9ba5e1d python/tests/reader2: always exit(1) if a test fails - -Upstream-Status: Backport -Signed-off-by: Ross Burton - -diff --git a/python/tests/reader2.py b/python/tests/reader2.py -index 65cecd47..6e6353b4 100755 ---- a/python/tests/reader2.py -+++ b/python/tests/reader2.py -@@ -6,7 +6,6 @@ - import sys - import glob - import os --import string - import libxml2 - try: - import StringIO -@@ -20,103 +19,104 @@ libxml2.debugMemory(1) - - err = "" - basedir = os.path.dirname(os.path.realpath(__file__)) --dir_prefix = os.path.join(basedir, "../../test/valid/") -+dir_prefix = os.path.realpath(os.path.join(basedir, "..", "..", "test", "valid")) -+ - # This dictionary reflects the contents of the files - # ../../test/valid/*.xml.err that are not empty, except that - # the file paths in the messages start with ../../test/ - - expect = { - '766956': --"""../../test/valid/dtds/766956.dtd:2: parser error : PEReference: expecting ';' -+"""{0}/dtds/766956.dtd:2: parser error : PEReference: expecting ';' - %ä%ent; - ^ --../../test/valid/dtds/766956.dtd:2: parser error : Content error in the external subset -+{0}/dtds/766956.dtd:2: parser error : Content error in the external subset - %ä%ent; - ^ - Entity: line 1: - value - ^ --""", -+""".format(dir_prefix), - '781333': --"""../../test/valid/781333.xml:4: element a: validity error : Element a content does not follow the DTD, expecting ( ..., got -+"""{0}/781333.xml:4: element a: validity error : Element a content does not follow the DTD, expecting ( ..., got - - ^ --../../test/valid/781333.xml:5: element a: validity error : Element a content does not follow the DTD, Expecting more child -+{0}/781333.xml:5: element a: validity error : Element a content does not follow the DTD, Expecting more child - - ^ --""", -+""".format(dir_prefix), - 'cond_sect2': --"""../../test/valid/dtds/cond_sect2.dtd:15: parser error : All markup of the conditional section is not in the same entity -+"""{0}/dtds/cond_sect2.dtd:15: parser error : All markup of the conditional section is not in the same entity - %ent; - ^ - Entity: line 1: - ]]> - ^ --../../test/valid/dtds/cond_sect2.dtd:17: parser error : Content error in the external subset -+{0}/dtds/cond_sect2.dtd:17: parser error : Content error in the external subset - - ^ --""", -+""".format(dir_prefix), - 'rss': --"""../../test/valid/rss.xml:177: element rss: validity error : Element rss does not carry attribute version -+"""{0}/rss.xml:177: element rss: validity error : Element rss does not carry attribute version - - ^ --""", -+""".format(dir_prefix), - 't8': --"""../../test/valid/t8.xml:6: parser error : internal error: xmlParseInternalSubset: error detected in Markup declaration -+"""{0}/t8.xml:6: parser error : internal error: xmlParseInternalSubset: error detected in Markup declaration - - %defroot; %defmiddle; %deftest; - ^ - Entity: line 1: - <!ELEMENT root (middle) > - ^ --../../test/valid/t8.xml:6: parser error : internal error: xmlParseInternalSubset: error detected in Markup declaration -+{0}/t8.xml:6: parser error : internal error: xmlParseInternalSubset: error detected in Markup declaration - - %defroot; %defmiddle; %deftest; - ^ - Entity: line 1: - <!ELEMENT middle (test) > - ^ --../../test/valid/t8.xml:6: parser error : internal error: xmlParseInternalSubset: error detected in Markup declaration -+{0}/t8.xml:6: parser error : internal error: xmlParseInternalSubset: error detected in Markup declaration - - %defroot; %defmiddle; %deftest; - ^ - Entity: line 1: - <!ELEMENT test (#PCDATA) > - ^ --""", -+""".format(dir_prefix), - 't8a': --"""../../test/valid/t8a.xml:6: parser error : internal error: xmlParseInternalSubset: error detected in Markup declaration -+"""{0}/t8a.xml:6: parser error : internal error: xmlParseInternalSubset: error detected in Markup declaration - - %defroot;%defmiddle;%deftest; - ^ - Entity: line 1: - <!ELEMENT root (middle) > - ^ --../../test/valid/t8a.xml:6: parser error : internal error: xmlParseInternalSubset: error detected in Markup declaration -+{0}/t8a.xml:6: parser error : internal error: xmlParseInternalSubset: error detected in Markup declaration - - %defroot;%defmiddle;%deftest; - ^ - Entity: line 1: - <!ELEMENT middle (test) > - ^ --../../test/valid/t8a.xml:6: parser error : internal error: xmlParseInternalSubset: error detected in Markup declaration -+{0}/t8a.xml:6: parser error : internal error: xmlParseInternalSubset: error detected in Markup declaration - - %defroot;%defmiddle;%deftest; - ^ - Entity: line 1: - <!ELEMENT test (#PCDATA) > - ^ --""", -+""".format(dir_prefix), - 'xlink': --"""../../test/valid/xlink.xml:450: element termdef: validity error : ID dt-arc already defined -+"""{0}/xlink.xml:450: element termdef: validity error : ID dt-arc already defined -

An +Date: Mon, 5 Dec 2022 17:02:32 +0000 +Subject: [PATCH] add yocto-specific install-ptest target + Add a target to install the test suite. Upstream-Status: Inappropriate Signed-off-by: Ross Burton -From c7809dc6947324ea506a0c2bf132ecd37156f211 Mon Sep 17 00:00:00 2001 -From: Ross Burton -Date: Mon, 5 Dec 2022 17:02:32 +0000 -Subject: [PATCH] add yocto-specific install-ptest target - --- Makefile.am | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Makefile.am b/Makefile.am -index 316109b1..15e100be 100644 +index 5bc4018..57d27af 100644 --- a/Makefile.am +++ b/Makefile.am @@ -26,6 +26,16 @@ check_PROGRAMS = \ @@ -32,7 +32,4 @@ index 316109b1..15e100be 100644 + bin_PROGRAMS = xmllint xmlcatalog - nodist_bin_SCRIPTS = xml2-config --- -2.34.1 - + bin_SCRIPTS = xml2-config diff --git a/meta/recipes-core/libxml/libxml2/libxml-64bit.patch b/meta/recipes-core/libxml/libxml2/libxml-64bit.patch deleted file mode 100644 index fd8e469dd3..0000000000 --- a/meta/recipes-core/libxml/libxml2/libxml-64bit.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 056b14345b1abd76a761ab14538f1bc21302781a Mon Sep 17 00:00:00 2001 -From: Hongxu Jia -Date: Sat, 11 May 2019 20:26:51 +0800 -Subject: [PATCH] libxml 64bit - -Upstream-Status: Backport [from debian: bugs.debian.org/439843] -Signed-off-by: Hongxu Jia ---- - libxml.h | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/libxml.h b/libxml.h -index 64e30f7..4e80d90 100644 ---- a/libxml.h -+++ b/libxml.h -@@ -15,6 +15,9 @@ - #ifndef _LARGEFILE_SOURCE - #define _LARGEFILE_SOURCE - #endif -+#ifndef _LARGEFILE64_SOURCE -+#define _LARGEFILE64_SOURCE -+#endif - #ifndef _FILE_OFFSET_BITS - #define _FILE_OFFSET_BITS 64 - #endif --- -2.7.4 - diff --git a/meta/recipes-core/libxml/libxml2/libxml-m4-use-pkgconfig.patch b/meta/recipes-core/libxml/libxml2/libxml-m4-use-pkgconfig.patch deleted file mode 100644 index 639c80bd6c..0000000000 --- a/meta/recipes-core/libxml/libxml2/libxml-m4-use-pkgconfig.patch +++ /dev/null @@ -1,212 +0,0 @@ -Change the AM_PATH_XML2 macros to use pkg-config instead of xml2-config. - -Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libxml2/-/commit/d598d8af0913b6e3d4e61ffa62397a275b669dca] -Signed-off-by: Ross Burton - - libxml.m4 | 189 ++---------------------------------------------------- - 1 file changed, 5 insertions(+), 184 deletions(-) - -diff --git a/libxml.m4 b/libxml.m4 -index fc7790c..1c53585 100644 ---- a/libxml.m4 -+++ b/libxml.m4 -@@ -1,191 +1,12 @@ --# Configure paths for LIBXML2 --# Simon Josefsson 2020-02-12 --# Fix autoconf 2.70+ warnings --# Mike Hommey 2004-06-19 --# use CPPFLAGS instead of CFLAGS --# Toshio Kuratomi 2001-04-21 --# Adapted from: --# Configure paths for GLIB --# Owen Taylor 97-11-3 -- - dnl AM_PATH_XML2([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) - dnl Test for XML, and define XML_CPPFLAGS and XML_LIBS - dnl --AC_DEFUN([AM_PATH_XML2],[ --AC_ARG_WITH(xml-prefix, -- [ --with-xml-prefix=PFX Prefix where libxml is installed (optional)], -- xml_config_prefix="$withval", xml_config_prefix="") --AC_ARG_WITH(xml-exec-prefix, -- [ --with-xml-exec-prefix=PFX Exec prefix where libxml is installed (optional)], -- xml_config_exec_prefix="$withval", xml_config_exec_prefix="") --AC_ARG_ENABLE(xmltest, -- [ --disable-xmltest Do not try to compile and run a test LIBXML program],, -- enable_xmltest=yes) -- -- if test x$xml_config_exec_prefix != x ; then -- xml_config_args="$xml_config_args" -- if test x${XML2_CONFIG+set} != xset ; then -- XML2_CONFIG=$xml_config_exec_prefix/bin/xml2-config -- fi -- fi -- if test x$xml_config_prefix != x ; then -- xml_config_args="$xml_config_args --prefix=$xml_config_prefix" -- if test x${XML2_CONFIG+set} != xset ; then -- XML2_CONFIG=$xml_config_prefix/bin/xml2-config -- fi -- fi -- -- AC_PATH_PROG(XML2_CONFIG, xml2-config, no) -- min_xml_version=ifelse([$1], ,2.0.0,[$1]) -- AC_MSG_CHECKING(for libxml - version >= $min_xml_version) -- no_xml="" -- if test "$XML2_CONFIG" = "no" ; then -- no_xml=yes -- else -- XML_CPPFLAGS=`$XML2_CONFIG $xml_config_args --cflags` -- XML_LIBS=`$XML2_CONFIG $xml_config_args --libs` -- xml_config_major_version=`$XML2_CONFIG $xml_config_args --version | \ -- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` -- xml_config_minor_version=`$XML2_CONFIG $xml_config_args --version | \ -- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` -- xml_config_micro_version=`$XML2_CONFIG $xml_config_args --version | \ -- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` -- if test "x$enable_xmltest" = "xyes" ; then -- ac_save_CPPFLAGS="$CPPFLAGS" -- ac_save_LIBS="$LIBS" -- CPPFLAGS="$CPPFLAGS $XML_CPPFLAGS" -- LIBS="$XML_LIBS $LIBS" --dnl --dnl Now check if the installed libxml is sufficiently new. --dnl (Also sanity checks the results of xml2-config to some extent) --dnl -- rm -f conf.xmltest -- AC_RUN_IFELSE( -- [AC_LANG_SOURCE([[ --#include --#include --#include --#include -- --int --main() --{ -- int xml_major_version, xml_minor_version, xml_micro_version; -- int major, minor, micro; -- char *tmp_version; -- -- system("touch conf.xmltest"); -- -- /* Capture xml2-config output via autoconf/configure variables */ -- /* HP/UX 9 (%@#!) writes to sscanf strings */ -- tmp_version = (char *)strdup("$min_xml_version"); -- if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { -- printf("%s, bad version string from xml2-config\n", "$min_xml_version"); -- exit(1); -- } -- free(tmp_version); -- -- /* Capture the version information from the header files */ -- tmp_version = (char *)strdup(LIBXML_DOTTED_VERSION); -- if (sscanf(tmp_version, "%d.%d.%d", &xml_major_version, &xml_minor_version, &xml_micro_version) != 3) { -- printf("%s, bad version string from libxml includes\n", "LIBXML_DOTTED_VERSION"); -- exit(1); -- } -- free(tmp_version); -- -- /* Compare xml2-config output to the libxml headers */ -- if ((xml_major_version != $xml_config_major_version) || -- (xml_minor_version != $xml_config_minor_version) || -- (xml_micro_version != $xml_config_micro_version)) -- { -- printf("*** libxml header files (version %d.%d.%d) do not match\n", -- xml_major_version, xml_minor_version, xml_micro_version); -- printf("*** xml2-config (version %d.%d.%d)\n", -- $xml_config_major_version, $xml_config_minor_version, $xml_config_micro_version); -- return 1; -- } --/* Compare the headers to the library to make sure we match */ -- /* Less than ideal -- doesn't provide us with return value feedback, -- * only exits if there's a serious mismatch between header and library. -- */ -- LIBXML_TEST_VERSION; -- -- /* Test that the library is greater than our minimum version */ -- if ((xml_major_version > major) || -- ((xml_major_version == major) && (xml_minor_version > minor)) || -- ((xml_major_version == major) && (xml_minor_version == minor) && -- (xml_micro_version >= micro))) -- { -- return 0; -- } -- else -- { -- printf("\n*** An old version of libxml (%d.%d.%d) was found.\n", -- xml_major_version, xml_minor_version, xml_micro_version); -- printf("*** You need a version of libxml newer than %d.%d.%d.\n", -- major, minor, micro); -- printf("***\n"); -- printf("*** If you have already installed a sufficiently new version, this error\n"); -- printf("*** probably means that the wrong copy of the xml2-config shell script is\n"); -- printf("*** being found. The easiest way to fix this is to remove the old version\n"); -- printf("*** of LIBXML, but you can also set the XML2_CONFIG environment to point to the\n"); -- printf("*** correct copy of xml2-config. (In this case, you will have to\n"); -- printf("*** modify your LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf\n"); -- printf("*** so that the correct libraries are found at run-time))\n"); -- } -- return 1; --} --]])],, no_xml=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) -- CPPFLAGS="$ac_save_CPPFLAGS" -- LIBS="$ac_save_LIBS" -- fi -- fi -+AC_DEFUN([AM_PATH_XML2],[ -+ AC_REQUIRE([PKG_PROG_PKG_CONFIG]) - -- if test "x$no_xml" = x ; then -- AC_MSG_RESULT(yes (version $xml_config_major_version.$xml_config_minor_version.$xml_config_micro_version)) -- ifelse([$2], , :, [$2]) -- else -- AC_MSG_RESULT(no) -- if test "$XML2_CONFIG" = "no" ; then -- echo "*** The xml2-config script installed by LIBXML could not be found" -- echo "*** If libxml was installed in PREFIX, make sure PREFIX/bin is in" -- echo "*** your path, or set the XML2_CONFIG environment variable to the" -- echo "*** full path to xml2-config." -- else -- if test -f conf.xmltest ; then -- : -- else -- echo "*** Could not run libxml test program, checking why..." -- CPPFLAGS="$CPPFLAGS $XML_CPPFLAGS" -- LIBS="$LIBS $XML_LIBS" -- AC_LINK_IFELSE( -- [AC_LANG_PROGRAM([[ --#include --#include --]], [[ LIBXML_TEST_VERSION; return 0;]])], -- [ echo "*** The test program compiled, but did not run. This usually means" -- echo "*** that the run-time linker is not finding LIBXML or finding the wrong" -- echo "*** version of LIBXML. If it is not finding LIBXML, you'll need to set your" -- echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" -- echo "*** to the installed location Also, make sure you have run ldconfig if that" -- echo "*** is required on your system" -- echo "***" -- echo "*** If you have an old version installed, it is best to remove it, although" -- echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ], -- [ echo "*** The test program failed to compile or link. See the file config.log for the" -- echo "*** exact error that occurred. This usually means LIBXML was incorrectly installed" -- echo "*** or that you have moved LIBXML since it was installed. In the latter case, you" -- echo "*** may want to edit the xml2-config script: $XML2_CONFIG" ]) -- CPPFLAGS="$ac_save_CPPFLAGS" -- LIBS="$ac_save_LIBS" -- fi -- fi -+ verdep=ifelse([$1], [], [], [">= $1"]) -+ PKG_CHECK_MODULES(XML, [libxml-2.0 $verdep], [$2], [$3]) - -- XML_CPPFLAGS="" -- XML_LIBS="" -- ifelse([$3], , :, [$3]) -- fi -+ XML_CPPFLAGS=$XML_CFLAGS - AC_SUBST(XML_CPPFLAGS) -- AC_SUBST(XML_LIBS) -- rm -f conf.xmltest - ]) --- -2.34.1 - diff --git a/meta/recipes-core/libxml/libxml2_2.10.4.bb b/meta/recipes-core/libxml/libxml2_2.10.4.bb deleted file mode 100644 index 4f3b17093e..0000000000 --- a/meta/recipes-core/libxml/libxml2_2.10.4.bb +++ /dev/null @@ -1,103 +0,0 @@ -SUMMARY = "XML C Parser Library and Toolkit" -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." -HOMEPAGE = "https://gitlab.gnome.org/GNOME/libxml2" -BUGTRACKER = "http://bugzilla.gnome.org/buglist.cgi?product=libxml2" -SECTION = "libs" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://Copyright;md5=2044417e2e5006b65a8b9067b683fcf1 \ - file://hash.c;beginline=6;endline=15;md5=e77f77b12cb69e203d8b4090a0eee879 \ - file://list.c;beginline=4;endline=13;md5=b9c25b021ccaf287e50060602d20f3a7 \ - file://trio.c;beginline=5;endline=14;md5=cd4f61e27f88c1d43df112966b1cd28f" - -DEPENDS = "zlib virtual/libiconv" - -inherit gnomebase - -SRC_URI += "http://www.w3.org/XML/Test/xmlts20130923.tar;subdir=${BP};name=testtar \ - file://run-ptest \ - file://libxml-64bit.patch \ - file://fix-tests.patch \ - file://install-tests.patch \ - file://libxml-m4-use-pkgconfig.patch \ - " - -SRC_URI[archive.sha256sum] = "ed0c91c5845008f1936739e4eee2035531c1c94742c6541f44ee66d885948d45" -SRC_URI[testtar.sha256sum] = "c6b2d42ee50b8b236e711a97d68e6c4b5c8d83e69a2be4722379f08702ea7273" - -BINCONFIG = "${bindir}/xml2-config" - -# Fixed since 2.9.11 via -# https://gitlab.gnome.org/GNOME/libxml2/-/commit/c1ba6f54d32b707ca6d91cb3257ce9de82876b6f -CVE_CHECK_IGNORE += "CVE-2016-3709" - -PACKAGECONFIG ??= "python \ - ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \ -" -PACKAGECONFIG[python] = "--with-python=${PYTHON},--without-python,python3" -PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," - -inherit autotools pkgconfig binconfig-disabled ptest - -inherit ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3targetconfig', '', d)} - -LDFLAGS:append:riscv64 = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld ptest', ' -fuse-ld=bfd', '', d)}" - -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)}" - -RDEPENDS:${PN}-python += "${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3-core', '', d)}" - -RDEPENDS:${PN}-ptest:append:libc-musl = " musl-locales" -RDEPENDS:${PN}-ptest:append:libc-glibc = " glibc-gconv-ebcdic-us \ - glibc-gconv-ibm1141 \ - glibc-gconv-iso8859-5 \ - glibc-gconv-euc-jp \ - " - -# WARNING: zlib is required for RPM use -EXTRA_OECONF = "--without-debug --without-legacy --with-catalog --with-c14n --without-lzma --with-fexceptions" -EXTRA_OECONF:class-native = "--without-legacy --with-c14n --without-lzma --with-zlib" -EXTRA_OECONF:class-nativesdk = "--without-legacy --with-c14n --without-lzma --with-zlib" -EXTRA_OECONF:linuxstdbase = "--with-debug --with-legacy --with-c14n --without-lzma --with-zlib" - -python populate_packages:prepend () { - # autonamer would call this libxml2-2, but we don't want that - if d.getVar('DEBIAN_NAMES'): - d.setVar('PKG:libxml2', '${MLPREFIX}libxml2') -} - -PACKAGE_BEFORE_PN += "${PN}-utils" -PACKAGES += "${PN}-python" - -FILES:${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a" -FILES:${PN}-utils = "${bindir}/*" -FILES:${PN}-python = "${PYTHON_SITEPACKAGES_DIR}" - -do_configure:prepend () { - # executables take longer to package: these should not be executable - find ${S}/xmlconf/ -type f -exec chmod -x {} \+ -} - -do_install_ptest () { - oe_runmake DESTDIR=${D} ptestdir=${PTEST_PATH} install-test-data - - cp -r ${S}/xmlconf ${D}${PTEST_PATH} - - if ! ${@bb.utils.contains('PACKAGECONFIG', 'python', 'true', 'false', d)}; then - rm -rf ${D}${PTEST_DIR}/python - fi -} - -# with musl we need to enable icu support explicitly for these tests -do_install_ptest:append:libc-musl () { - rm -rf ${D}/${PTEST_PATH}/test/icu_parse_test.xml -} - -do_install:append:class-native () { - # Docs are not needed in the native case - rm ${D}${datadir}/gtk-doc -rf - - create_wrapper ${D}${bindir}/xmllint 'XML_CATALOG_FILES=${XML_CATALOG_FILES:-${sysconfdir}/xml/catalog}' -} -do_install[vardepsexclude] += "XML_CATALOG_FILES:-${sysconfdir}/xml/catalog" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-core/libxml/libxml2_2.11.4.bb b/meta/recipes-core/libxml/libxml2_2.11.4.bb new file mode 100644 index 0000000000..713d0baf6c --- /dev/null +++ b/meta/recipes-core/libxml/libxml2_2.11.4.bb @@ -0,0 +1,100 @@ +SUMMARY = "XML C Parser Library and Toolkit" +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." +HOMEPAGE = "https://gitlab.gnome.org/GNOME/libxml2" +BUGTRACKER = "http://bugzilla.gnome.org/buglist.cgi?product=libxml2" +SECTION = "libs" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://Copyright;md5=2044417e2e5006b65a8b9067b683fcf1 \ + file://hash.c;beginline=6;endline=15;md5=e77f77b12cb69e203d8b4090a0eee879 \ + file://list.c;beginline=4;endline=13;md5=b9c25b021ccaf287e50060602d20f3a7 \ + file://trio.c;beginline=5;endline=14;md5=cd4f61e27f88c1d43df112966b1cd28f" + +DEPENDS = "zlib virtual/libiconv" + +inherit gnomebase + +SRC_URI += "http://www.w3.org/XML/Test/xmlts20130923.tar;subdir=${BP};name=testtar \ + file://run-ptest \ + file://install-tests.patch \ + " + +SRC_URI[archive.sha256sum] = "737e1d7f8ab3f139729ca13a2494fd17bf30ddb4b7a427cf336252cab57f57f7" +SRC_URI[testtar.sha256sum] = "c6b2d42ee50b8b236e711a97d68e6c4b5c8d83e69a2be4722379f08702ea7273" + +BINCONFIG = "${bindir}/xml2-config" + +# Fixed since 2.9.11 via +# https://gitlab.gnome.org/GNOME/libxml2/-/commit/c1ba6f54d32b707ca6d91cb3257ce9de82876b6f +CVE_CHECK_IGNORE += "CVE-2016-3709" + +PACKAGECONFIG ??= "python \ + ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \ +" +PACKAGECONFIG[python] = "--with-python=${PYTHON},--without-python,python3" +PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," + +inherit autotools pkgconfig binconfig-disabled ptest + +inherit ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3targetconfig', '', d)} + +LDFLAGS:append:riscv64 = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld ptest', ' -fuse-ld=bfd', '', d)}" + +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)}" + +RDEPENDS:${PN}-python += "${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3-core', '', d)}" + +RDEPENDS:${PN}-ptest:append:libc-musl = " musl-locales" +RDEPENDS:${PN}-ptest:append:libc-glibc = " glibc-gconv-ebcdic-us \ + glibc-gconv-ibm1141 \ + glibc-gconv-iso8859-5 \ + glibc-gconv-euc-jp \ + " + +# WARNING: zlib is required for RPM use +EXTRA_OECONF = "--without-debug --without-legacy --with-catalog --with-c14n --without-lzma --with-fexceptions" +EXTRA_OECONF:class-native = "--without-legacy --with-c14n --without-lzma --with-zlib" +EXTRA_OECONF:class-nativesdk = "--without-legacy --with-c14n --without-lzma --with-zlib" +EXTRA_OECONF:linuxstdbase = "--with-debug --with-legacy --with-c14n --without-lzma --with-zlib" + +python populate_packages:prepend () { + # autonamer would call this libxml2-2, but we don't want that + if d.getVar('DEBIAN_NAMES'): + d.setVar('PKG:libxml2', '${MLPREFIX}libxml2') +} + +PACKAGE_BEFORE_PN += "${PN}-utils" +PACKAGES += "${PN}-python" + +FILES:${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a" +FILES:${PN}-utils = "${bindir}/*" +FILES:${PN}-python = "${PYTHON_SITEPACKAGES_DIR}" + +do_configure:prepend () { + # executables take longer to package: these should not be executable + find ${S}/xmlconf/ -type f -exec chmod -x {} \+ +} + +do_install_ptest () { + oe_runmake DESTDIR=${D} ptestdir=${PTEST_PATH} install-test-data + + cp -r ${S}/xmlconf ${D}${PTEST_PATH} + + if ! ${@bb.utils.contains('PACKAGECONFIG', 'python', 'true', 'false', d)}; then + rm -rf ${D}${PTEST_DIR}/python + fi +} + +# with musl we need to enable icu support explicitly for these tests +do_install_ptest:append:libc-musl () { + rm -rf ${D}/${PTEST_PATH}/test/icu_parse_test.xml +} + +do_install:append:class-native () { + # Docs are not needed in the native case + rm ${D}${datadir}/gtk-doc -rf + + create_wrapper ${D}${bindir}/xmllint 'XML_CATALOG_FILES=${XML_CATALOG_FILES:-${sysconfdir}/xml/catalog}' +} +do_install[vardepsexclude] += "XML_CATALOG_FILES:-${sysconfdir}/xml/catalog" + +BBCLASSEXTEND = "native nativesdk" -- cgit v1.2.3-54-g00ecf