From ce8d120bfc1015ea23944ebbcfa3b536eeea2d6c Mon Sep 17 00:00:00 2001 From: Andrej Valek Date: Tue, 20 Mar 2018 10:47:15 +0100 Subject: libxml2: 2.9.7 -> 2.9.8 (From OE-Core rev: de24ead63802523daa19ce8528ac95d9e041eaf8) Signed-off-by: Andrej Valek Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- meta/recipes-core/libxml/libxml2/ansidecl.patch | 25 ---- meta/recipes-core/libxml/libxml2/runtest.patch | 151 ++++++++++++------------ meta/recipes-core/libxml/libxml2_2.9.7.bb | 105 ---------------- meta/recipes-core/libxml/libxml2_2.9.8.bb | 104 ++++++++++++++++ 4 files changed, 180 insertions(+), 205 deletions(-) delete mode 100644 meta/recipes-core/libxml/libxml2/ansidecl.patch delete mode 100644 meta/recipes-core/libxml/libxml2_2.9.7.bb create mode 100644 meta/recipes-core/libxml/libxml2_2.9.8.bb diff --git a/meta/recipes-core/libxml/libxml2/ansidecl.patch b/meta/recipes-core/libxml/libxml2/ansidecl.patch deleted file mode 100644 index 1085c680b6..0000000000 --- a/meta/recipes-core/libxml/libxml2/ansidecl.patch +++ /dev/null @@ -1,25 +0,0 @@ -Sadly cmake is broken. If it sees this reference and ansidecl is present, it will add a -dependency upon it, even if HAVE_ANSIDEC_H is never set. - -The easiest solution is to remove these lines, otherwise recipes like libzypp can have a -dependency on the ansidecl.h header via cmake. This can lead to odd results if the -header is removed (clean binutils) and then the code is recompiled. - -RP 2012/7/10 - -Upstream-Status: Inappropriate [its really a cmake bug] - -diff --git a/configure.ac b/configure.ac -index 0260281..fdb58e9 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -484 +483,0 @@ AC_CHECK_HEADERS([time.h]) --AC_CHECK_HEADERS([ansidecl.h]) -diff --git a/include/libxml/xmlversion.h.in b/include/libxml/xmlversion.h.in -index b173be9..d10f975 100644 ---- a/include/libxml/xmlversion.h.in -+++ b/include/libxml/xmlversion.h.in -@@ -413,3 +412,0 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version); --#ifdef HAVE_ANSIDECL_H --#include --#endif diff --git a/meta/recipes-core/libxml/libxml2/runtest.patch b/meta/recipes-core/libxml/libxml2/runtest.patch index cb171d5b36..544dc05834 100644 --- a/meta/recipes-core/libxml/libxml2/runtest.patch +++ b/meta/recipes-core/libxml/libxml2/runtest.patch @@ -6,8 +6,8 @@ Signed-off-by: Andrej Valek Upstream-Status: Backport diff -uNr a/Makefile.am b/Makefile.am ---- a/Makefile.am 2017-08-28 15:01:14.000000000 +0200 -+++ b/Makefile.am 2017-09-05 08:06:05.752287323 +0200 +--- a/Makefile.am 2017-12-02 09:58:10.000000000 +0100 ++++ b/Makefile.am 2018-03-20 08:27:34.360505864 +0100 @@ -202,6 +202,15 @@ #testOOM_DEPENDENCIES = $(DEPS) #testOOM_LDADD= $(LDADDS) @@ -24,10 +24,9 @@ diff -uNr a/Makefile.am b/Makefile.am runtests: runtest$(EXEEXT) testrecurse$(EXEEXT) testapi$(EXEEXT) \ testchar$(EXEEXT) testdict$(EXEEXT) runxmlconf$(EXEEXT) [ -d test ] || $(LN_S) $(srcdir)/test . - diff -uNr a/runsuite.c b/runsuite.c ---- a/runsuite.c 2013-04-12 16:17:11.462823238 +0200 -+++ b/runsuite.c 2013-04-17 14:07:24.352693211 +0200 +--- a/runsuite.c 2016-06-07 12:04:14.000000000 +0200 ++++ b/runsuite.c 2018-03-20 08:27:57.478817247 +0100 @@ -1162,6 +1162,7 @@ if (logfile != NULL) @@ -37,17 +36,19 @@ diff -uNr a/runsuite.c b/runsuite.c } #else /* !SCHEMAS */ diff -uNr a/runtest.c b/runtest.c ---- a/runtest.c 2013-04-16 13:19:15.087997290 +0200 -+++ b/runtest.c 2013-04-17 14:08:29.529949655 +0200 -@@ -4386,6 +4386,7 @@ - err++; - } +--- a/runtest.c 2017-11-13 22:00:17.000000000 +0100 ++++ b/runtest.c 2018-03-20 08:28:50.859047551 +0100 +@@ -4496,7 +4496,8 @@ } + + xmlCharEncCloseFunc(ebcdicHandler); +- ++ + printf("%s: %s\n", (err == 0) ? "PASS" : "FAIL", tst->desc); return(err); } -@@ -4455,6 +4456,7 @@ +@@ -4573,6 +4574,7 @@ xmlCleanupParser(); xmlMemoryDump(); @@ -56,8 +57,8 @@ diff -uNr a/runtest.c b/runtest.c } diff -uNr a/runxmlconf.c b/runxmlconf.c ---- a/runxmlconf.c 2013-04-16 12:53:49.900982990 +0200 -+++ b/runxmlconf.c 2013-04-17 14:09:21.111778104 +0200 +--- a/runxmlconf.c 2016-06-07 12:04:14.000000000 +0200 ++++ b/runxmlconf.c 2018-03-20 08:29:17.944862893 +0100 @@ -595,6 +595,7 @@ if (logfile != NULL) @@ -67,9 +68,9 @@ diff -uNr a/runxmlconf.c b/runxmlconf.c } diff -uNr a/testapi.c b/testapi.c ---- a/testapi.c 2013-04-12 16:16:57.763417659 +0200 -+++ b/testapi.c 2013-04-17 14:10:28.876924881 +0200 -@@ -1245,49 +1245,91 @@ +--- a/testapi.c 2018-01-25 07:39:15.000000000 +0100 ++++ b/testapi.c 2018-03-20 09:08:35.323980145 +0100 +@@ -1246,49 +1246,91 @@ testlibxml2(void) { int test_ret = 0; @@ -200,9 +201,19 @@ diff -uNr a/testapi.c b/testapi.c return(test_ret); } +diff -uNr a/testdict.c b/testdict.c +--- a/testdict.c 2016-06-07 12:04:14.000000000 +0200 ++++ b/testdict.c 2018-03-20 08:59:16.864275812 +0100 +@@ -440,5 +440,6 @@ + clean_strings(); + xmlCleanupParser(); + xmlMemoryDump(); ++ printf("%s: testdict\n\n", (ret == 0) ? "PASS" : "FAIL"); + return(ret); + } diff -uNr a/testchar.c b/testchar.c ---- a/testchar.c 2013-04-17 10:50:30.250147418 +0200 -+++ b/testchar.c 2013-04-18 16:11:28.455733800 +0200 +--- a/testchar.c 2016-06-07 12:04:14.000000000 +0200 ++++ b/testchar.c 2018-03-20 09:11:20.383573912 +0100 @@ -23,7 +23,7 @@ char document1[100] = "XXXX"; char document2[100] = ""; @@ -222,7 +233,7 @@ diff -uNr a/testchar.c b/testchar.c "Failed to detect invalid char for Byte 0x%02X: %c\n", i, i); + return(1); -+ } ++ } } else if ((i == '<') || (i == '&')) { @@ -230,8 +241,8 @@ diff -uNr a/testchar.c b/testchar.c + if ((lastError == 0) || (res != NULL)) { fprintf(stderr, "Failed to detect illegal char %c for Byte 0x%02X\n", i, i); -+ return(1); -+ } ++ return(1); ++ } } else if (((i < 0x20) || (i >= 0x80)) && (i != 0x9) && (i != 0xA) && (i != 0xD)) { @@ -239,8 +250,8 @@ diff -uNr a/testchar.c b/testchar.c + if ((lastError != XML_ERR_INVALID_CHAR) && (res != NULL)) { fprintf(stderr, "Failed to detect invalid char for Byte 0x%02X\n", i); -+ return(1); -+ } ++ return(1); ++ } } else if (res == NULL) { fprintf(stderr, @@ -250,7 +261,7 @@ diff -uNr a/testchar.c b/testchar.c if (res != NULL) xmlFreeDoc(res); } -+ return(0); ++ return(0); } -static void testDocumentRangeByte2(xmlParserCtxtPtr ctxt, char *document, @@ -268,7 +279,7 @@ diff -uNr a/testchar.c b/testchar.c "Failed to detect invalid char for Bytes 0x%02X 0x%02X\n", i, j); + return(1); -+ } ++ } } /* @@ -282,7 +293,7 @@ diff -uNr a/testchar.c b/testchar.c "Failed to detect invalid char for Bytes 0x%02X 0x%02X\n", i, j); + return(1); -+ } ++ } } /* @@ -296,7 +307,7 @@ diff -uNr a/testchar.c b/testchar.c "Failed to detect invalid char for Bytes 0x%02X 0x%02X\n", i, j); + return(1); -+ } ++ } } /* @@ -310,7 +321,7 @@ diff -uNr a/testchar.c b/testchar.c "Failed to detect invalid char for Bytes 0x%02X 0x%02X 0x00\n", i, j); + return(1); -+ } ++ } } /* @@ -318,13 +329,13 @@ diff -uNr a/testchar.c b/testchar.c else if ((lastError != 0) || (res == NULL)) { fprintf(stderr, "Failed to parse document for Bytes 0x%02X 0x%02X\n", i, j); -+ return(1); ++ return(1); } if (res != NULL) xmlFreeDoc(res); } } -+ return(0); ++ return(0); } /** @@ -438,20 +449,20 @@ diff -uNr a/testchar.c b/testchar.c + if (lastError != XML_ERR_INVALID_CHAR) { fprintf(stderr, "Failed to detect invalid char for Byte 0x%02X\n", i); -+ return(1); -+ } ++ return(1); ++ } } else if (i == 0xD) { - if ((c != 0xA) || (len != 1)) + if ((c != 0xA) || (len != 1)) { fprintf(stderr, "Failed to convert char for Byte 0x%02X\n", i); + return(1); -+ } ++ } } else if ((c != i) || (len != 1)) { fprintf(stderr, "Failed to parse char for Byte 0x%02X\n", i); -+ return(1); ++ return(1); } } -+ return(0); ++ return(0); } -static void testCharRangeByte2(xmlParserCtxtPtr ctxt, char *data) { @@ -468,8 +479,8 @@ diff -uNr a/testchar.c b/testchar.c fprintf(stderr, "Failed to detect invalid char for Bytes 0x%02X 0x%02X\n", i, j); -+ return(1); -+ } ++ return(1); ++ } } /* @@ -482,8 +493,8 @@ diff -uNr a/testchar.c b/testchar.c fprintf(stderr, "Failed to detect invalid char for Bytes 0x%02X 0x%02X: %d\n", i, j, c); -+ return(1); -+ } ++ return(1); ++ } } /* @@ -496,8 +507,8 @@ diff -uNr a/testchar.c b/testchar.c fprintf(stderr, "Failed to detect invalid char for Bytes 0x%02X 0x%02X: %d\n", i, j, c); -+ return(1); -+ } ++ return(1); ++ } } /* @@ -510,8 +521,8 @@ diff -uNr a/testchar.c b/testchar.c fprintf(stderr, "Failed to detect invalid char for Bytes 0x%02X 0x%02X 0x00\n", i, j); -+ return(1); -+ } ++ return(1); ++ } } /* @@ -531,7 +542,7 @@ diff -uNr a/testchar.c b/testchar.c } } } -+ return(0); ++ return(0); } -static void testCharRangeByte3(xmlParserCtxtPtr ctxt, char *data) { @@ -549,7 +560,7 @@ diff -uNr a/testchar.c b/testchar.c "Failed to detect invalid char for Bytes 0x%02X 0x%02X 0x%02X 0x%02X\n", i, j, K, data[3]); + return(1); -+ } ++ } } /* @@ -562,7 +573,7 @@ diff -uNr a/testchar.c b/testchar.c "Failed to detect invalid char for Bytes 0x%02X 0x%02X 0x%02X\n", i, j, K); + return(1); -+ } ++ } } /* @@ -576,7 +587,7 @@ diff -uNr a/testchar.c b/testchar.c "Failed to detect invalid char for Bytes 0x%02X 0x%02X 0x%02X\n", i, j, K); + return(1); -+ } ++ } } /* @@ -590,7 +601,7 @@ diff -uNr a/testchar.c b/testchar.c "Failed to detect invalid char 0x%04X for Bytes 0x%02X 0x%02X 0x%02X\n", value, i, j, K); + return(1); -+ } ++ } } /* @@ -598,7 +609,7 @@ diff -uNr a/testchar.c b/testchar.c fprintf(stderr, "Failed to parse char for Bytes 0x%02X 0x%02X 0x%02X\n", i, j, K); -+ return(1); ++ return(1); } /* @@ -606,12 +617,12 @@ diff -uNr a/testchar.c b/testchar.c fprintf(stderr, "Failed to parse char for Bytes 0x%02X 0x%02X 0x%02X: expect %d got %d\n", i, j, data[2], value, c); -+ return(1); ++ return(1); } } } } -+ return(0); ++ return(0); } -static void testCharRangeByte4(xmlParserCtxtPtr ctxt, char *data) { @@ -629,7 +640,7 @@ diff -uNr a/testchar.c b/testchar.c "Failed to detect invalid char for Bytes 0x%02X 0x%02X 0x%02X 0x%02X\n", i, j, K, data[3]); + return(1); -+ } ++ } } /* @@ -643,7 +654,7 @@ diff -uNr a/testchar.c b/testchar.c "Failed to detect invalid char for Bytes 0x%02X 0x%02X 0x%02X 0x%02X\n", i, j, K, L); + return(1); -+ } ++ } } /* @@ -657,7 +668,7 @@ diff -uNr a/testchar.c b/testchar.c "Failed to detect invalid char for Bytes 0x%02X 0x%02X 0x%02X 0x%02X\n", i, j, K, L); + return(1); -+ } ++ } } /* @@ -671,7 +682,7 @@ diff -uNr a/testchar.c b/testchar.c "Failed to detect invalid char 0x%04X for Bytes 0x%02X 0x%02X 0x%02X 0x%02X\n", value, i, j, K, L); + return(1); -+ } ++ } } /* @@ -679,7 +690,7 @@ diff -uNr a/testchar.c b/testchar.c fprintf(stderr, "Failed to parse char for Bytes 0x%02X 0x%02X 0x%02X\n", i, j, K); -+ return(1); ++ return(1); } /* @@ -687,13 +698,13 @@ diff -uNr a/testchar.c b/testchar.c fprintf(stderr, "Failed to parse char for Bytes 0x%02X 0x%02X 0x%02X: expect %d got %d\n", i, j, data[2], value, c); -+ return(1); ++ return(1); } } } } } -+ return(0); ++ return(0); } /** @@ -722,13 +733,13 @@ diff -uNr a/testchar.c b/testchar.c XML_CHAR_ENCODING_NONE); if (buf == NULL) { fprintf(stderr, "Failed to allocate input buffer\n"); -+ test_ret = 1; ++ test_ret = 1; goto error; } input = xmlNewInputStream(ctxt); if (input == NULL) { xmlFreeParserInputBuffer(buf); -+ test_ret = 1; ++ test_ret = 1; goto error; } input->filename = NULL; @@ -777,20 +788,10 @@ diff -uNr a/testchar.c b/testchar.c /* * Cleanup function for the XML library. -diff -uNr a/testdict.c b/testdict.c ---- a/testdict.c 2013-04-16 15:08:42.971177193 +0200 -+++ b/testdict.c 2013-04-18 15:59:00.699482439 +0200 -@@ -440,5 +440,6 @@ - clean_strings(); - xmlCleanupParser(); - xmlMemoryDump(); -+ printf("%s: testdict\n\n", (ret == 0) ? "PASS" : "FAIL"); - return(ret); - } diff -uNr a/testlimits.c b/testlimits.c ---- a/testlimits.c 2013-04-12 16:16:36.180354177 +0200 -+++ b/testlimits.c 2013-04-17 14:03:17.203092987 +0200 -@@ -1630,5 +1630,6 @@ +--- a/testlimits.c 2016-11-07 09:41:40.000000000 +0100 ++++ b/testlimits.c 2018-03-20 08:59:38.965581280 +0100 +@@ -1634,5 +1634,6 @@ xmlCleanupParser(); xmlMemoryDump(); @@ -798,8 +799,8 @@ diff -uNr a/testlimits.c b/testlimits.c return(ret); } diff -uNr a/testrecurse.c b/testrecurse.c ---- a/testrecurse.c 2013-04-16 13:19:49.366536295 +0200 -+++ b/testrecurse.c 2013-04-17 14:06:27.367091622 +0200 +--- a/testrecurse.c 2017-10-26 09:54:40.000000000 +0200 ++++ b/testrecurse.c 2018-03-20 09:00:46.781628749 +0100 @@ -892,6 +892,7 @@ err++; } diff --git a/meta/recipes-core/libxml/libxml2_2.9.7.bb b/meta/recipes-core/libxml/libxml2_2.9.7.bb deleted file mode 100644 index 2fb90a68a8..0000000000 --- a/meta/recipes-core/libxml/libxml2_2.9.7.bb +++ /dev/null @@ -1,105 +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 = "http://www.xmlsoft.org/" -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=96f7296605eae807670fb08947829969 \ - file://list.c;beginline=4;endline=13;md5=cdbfa3dee51c099edb04e39f762ee907 \ - file://trio.c;beginline=5;endline=14;md5=6c025753c86d958722ec76e94cae932e" - -DEPENDS = "zlib virtual/libiconv" - -SRC_URI = "http://www.xmlsoft.org/sources/libxml2-${PV}.tar.gz;name=libtar \ - http://www.w3.org/XML/Test/xmlts20080827.tar.gz;name=testtar \ - file://libxml-64bit.patch \ - file://ansidecl.patch \ - file://runtest.patch \ - file://run-ptest \ - file://python-sitepackages-dir.patch \ - file://libxml-m4-use-pkgconfig.patch \ - file://0001-Make-ptest-run-the-python-tests-if-python-is-enabled.patch \ - file://fix-execution-of-ptests.patch \ - " - -SRC_URI[libtar.md5sum] = "896608641a08b465098a40ddf51cefba" -SRC_URI[libtar.sha256sum] = "f63c5e7d30362ed28b38bfa1ac6313f9a80230720b7fb6c80575eeab3ff5900c" -SRC_URI[testtar.md5sum] = "ae3d1ebe000a3972afa104ca7f0e1b4a" -SRC_URI[testtar.sha256sum] = "96151685cec997e1f9f3387e3626d61e6284d4d6e66e0e440c209286c03e9cc7" - -BINCONFIG = "${bindir}/xml2-config" - -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', 'python3native', '', d)} - -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)}" - -RDEPENDS_${PN}-python += "${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3-core', '', d)}" - -RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-gconv-ebcdic-us glibc-gconv-ibm1141 glibc-gconv-iso8859-5" - -export PYTHON_SITE_PACKAGES="${PYTHON_SITEPACKAGES_DIR}" - -# WARNING: zlib is required for RPM use -EXTRA_OECONF = "--without-debug --without-legacy --with-catalog --without-docbook --with-c14n --without-lzma --with-fexceptions" -EXTRA_OECONF_class-native = "--without-legacy --without-docbook --with-c14n --without-lzma --with-zlib" -EXTRA_OECONF_class-nativesdk = "--without-legacy --without-docbook --with-c14n --without-lzma --with-zlib" -EXTRA_OECONF_linuxstdbase = "--with-debug --with-legacy --with-docbook --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') -} - -PACKAGES += "${PN}-utils ${PN}-python" - -FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a" -FILES_${PN}-dev += "${libdir}/xml2Conf.sh ${libdir}/cmake/*" -FILES_${PN}-utils += "${bindir}/*" -FILES_${PN}-python += "${PYTHON_SITEPACKAGES_DIR}" - -do_configure_prepend () { - # executables take longer to package: these should not be executable - find ${WORKDIR}/xmlconf/ -type f -exec chmod -x {} \+ -} - -do_compile_ptest() { - oe_runmake check-am -} - -do_install_ptest () { - cp -r ${WORKDIR}/xmlconf ${D}${PTEST_PATH} - if [ "${@bb.utils.filter('PACKAGECONFIG', 'python', d)}" ]; then - sed -i -e 's|^\(PYTHON = \).*|\1${USRBINPATH}/${PYTHON_PN}|' \ - ${D}${PTEST_PATH}/python/tests/Makefile - grep -lrZ '#!/usr/bin/python' ${D}${PTEST_PATH}/python | - xargs -0 sed -i -e 's|/usr/bin/python|${USRBINPATH}/${PYTHON_PN}|' - fi - #Remove build host references from various Makefiles - find "${D}${PTEST_PATH}" -name Makefile -type f -exec \ - sed -i \ - -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \ - -e 's|${DEBUG_PREFIX_MAP}||g' \ - -e 's:${HOSTTOOLS_DIR}/::g' \ - -e 's:${RECIPE_SYSROOT_NATIVE}::g' \ - -e 's:${RECIPE_SYSROOT}::g' \ - -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \ - -e '/^RELDATE/d' \ - {} + -} - -do_install_append_class-native () { - # Docs are not needed in the native case - rm ${D}${datadir}/gtk-doc -rf -} - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-core/libxml/libxml2_2.9.8.bb b/meta/recipes-core/libxml/libxml2_2.9.8.bb new file mode 100644 index 0000000000..d55e650911 --- /dev/null +++ b/meta/recipes-core/libxml/libxml2_2.9.8.bb @@ -0,0 +1,104 @@ +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 = "http://www.xmlsoft.org/" +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=96f7296605eae807670fb08947829969 \ + file://list.c;beginline=4;endline=13;md5=cdbfa3dee51c099edb04e39f762ee907 \ + file://trio.c;beginline=5;endline=14;md5=6c025753c86d958722ec76e94cae932e" + +DEPENDS = "zlib virtual/libiconv" + +SRC_URI = "http://www.xmlsoft.org/sources/libxml2-${PV}.tar.gz;name=libtar \ + http://www.w3.org/XML/Test/xmlts20080827.tar.gz;name=testtar \ + file://libxml-64bit.patch \ + file://runtest.patch \ + file://run-ptest \ + file://python-sitepackages-dir.patch \ + file://libxml-m4-use-pkgconfig.patch \ + file://0001-Make-ptest-run-the-python-tests-if-python-is-enabled.patch \ + file://fix-execution-of-ptests.patch \ + " + +SRC_URI[libtar.md5sum] = "b786e353e2aa1b872d70d5d1ca0c740d" +SRC_URI[libtar.sha256sum] = "0b74e51595654f958148759cfef0993114ddccccbb6f31aee018f3558e8e2732" +SRC_URI[testtar.md5sum] = "ae3d1ebe000a3972afa104ca7f0e1b4a" +SRC_URI[testtar.sha256sum] = "96151685cec997e1f9f3387e3626d61e6284d4d6e66e0e440c209286c03e9cc7" + +BINCONFIG = "${bindir}/xml2-config" + +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', 'python3native', '', d)} + +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)}" + +RDEPENDS_${PN}-python += "${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3-core', '', d)}" + +RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-gconv-ebcdic-us glibc-gconv-ibm1141 glibc-gconv-iso8859-5" + +export PYTHON_SITE_PACKAGES="${PYTHON_SITEPACKAGES_DIR}" + +# WARNING: zlib is required for RPM use +EXTRA_OECONF = "--without-debug --without-legacy --with-catalog --without-docbook --with-c14n --without-lzma --with-fexceptions" +EXTRA_OECONF_class-native = "--without-legacy --without-docbook --with-c14n --without-lzma --with-zlib" +EXTRA_OECONF_class-nativesdk = "--without-legacy --without-docbook --with-c14n --without-lzma --with-zlib" +EXTRA_OECONF_linuxstdbase = "--with-debug --with-legacy --with-docbook --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') +} + +PACKAGES += "${PN}-utils ${PN}-python" + +FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a" +FILES_${PN}-dev += "${libdir}/xml2Conf.sh ${libdir}/cmake/*" +FILES_${PN}-utils += "${bindir}/*" +FILES_${PN}-python += "${PYTHON_SITEPACKAGES_DIR}" + +do_configure_prepend () { + # executables take longer to package: these should not be executable + find ${WORKDIR}/xmlconf/ -type f -exec chmod -x {} \+ +} + +do_compile_ptest() { + oe_runmake check-am +} + +do_install_ptest () { + cp -r ${WORKDIR}/xmlconf ${D}${PTEST_PATH} + if [ "${@bb.utils.filter('PACKAGECONFIG', 'python', d)}" ]; then + sed -i -e 's|^\(PYTHON = \).*|\1${USRBINPATH}/${PYTHON_PN}|' \ + ${D}${PTEST_PATH}/python/tests/Makefile + grep -lrZ '#!/usr/bin/python' ${D}${PTEST_PATH}/python | + xargs -0 sed -i -e 's|/usr/bin/python|${USRBINPATH}/${PYTHON_PN}|' + fi + #Remove build host references from various Makefiles + find "${D}${PTEST_PATH}" -name Makefile -type f -exec \ + sed -i \ + -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \ + -e 's|${DEBUG_PREFIX_MAP}||g' \ + -e 's:${HOSTTOOLS_DIR}/::g' \ + -e 's:${RECIPE_SYSROOT_NATIVE}::g' \ + -e 's:${RECIPE_SYSROOT}::g' \ + -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \ + -e '/^RELDATE/d' \ + {} + +} + +do_install_append_class-native () { + # Docs are not needed in the native case + rm ${D}${datadir}/gtk-doc -rf +} + +BBCLASSEXTEND = "native nativesdk" -- cgit v1.2.3-54-g00ecf