summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/libxml
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/libxml')
-rw-r--r--meta/recipes-core/libxml/libxml2/0001-Make-ptest-run-the-python-tests-if-python-is-enabled.patch98
-rw-r--r--meta/recipes-core/libxml/libxml2/ansidecl.patch25
-rw-r--r--meta/recipes-core/libxml/libxml2/fix-execution-of-ptests.patch33
-rw-r--r--meta/recipes-core/libxml/libxml2/libxml-64bit.patch24
-rw-r--r--meta/recipes-core/libxml/libxml2/libxml-m4-use-pkgconfig.patch18
-rw-r--r--meta/recipes-core/libxml/libxml2/python-sitepackages-dir.patch13
-rw-r--r--meta/recipes-core/libxml/libxml2/run-ptest1
-rw-r--r--meta/recipes-core/libxml/libxml2/runtest.patch290
-rw-r--r--meta/recipes-core/libxml/libxml2_2.9.10.bb110
-rw-r--r--meta/recipes-core/libxml/libxml2_2.9.4.bb70
10 files changed, 437 insertions, 245 deletions
diff --git a/meta/recipes-core/libxml/libxml2/0001-Make-ptest-run-the-python-tests-if-python-is-enabled.patch b/meta/recipes-core/libxml/libxml2/0001-Make-ptest-run-the-python-tests-if-python-is-enabled.patch
new file mode 100644
index 0000000000..5e9a0a506b
--- /dev/null
+++ b/meta/recipes-core/libxml/libxml2/0001-Make-ptest-run-the-python-tests-if-python-is-enabled.patch
@@ -0,0 +1,98 @@
+From 2b5fb416aa275fd2a17a0139a2f783998bcb42cc Mon Sep 17 00:00:00 2001
+From: Peter Kjellerstedt <pkj@axis.com>
+Date: Fri, 9 Jun 2017 17:50:46 +0200
+Subject: [PATCH] Make ptest run the python tests if python is enabled
+
+One of the tests (tstLastError.py) needed a minor correction. It might
+be due to the fact that the tests are forced to run with Python 3.
+
+Upstream-Status: Inappropriate [OE specific]
+Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
+
+---
+ Makefile.am | 2 +-
+ python/Makefile.am | 9 +++++++++
+ python/tests/Makefile.am | 10 ++++++++++
+ python/tests/tstLastError.py | 2 +-
+ 4 files changed, 21 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index ae62274..bd1e425 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -203,9 +203,9 @@ install-ptest:
+ install $(check_PROGRAMS) $(DESTDIR))
+ cp -r $(srcdir)/test $(DESTDIR)
+ cp -r $(srcdir)/result $(DESTDIR)
+- cp -r $(srcdir)/python $(DESTDIR)
+ cp Makefile $(DESTDIR)
+ sed -i -e 's|^Makefile:|_Makefile:|' $(DESTDIR)/Makefile
++ $(MAKE) -C python install-ptest
+
+ runtests: runtest$(EXEEXT) testrecurse$(EXEEXT) testapi$(EXEEXT) \
+ testchar$(EXEEXT) testdict$(EXEEXT) runxmlconf$(EXEEXT)
+diff --git a/python/Makefile.am b/python/Makefile.am
+index 34aed96..ba3ec6a 100644
+--- a/python/Makefile.am
++++ b/python/Makefile.am
+@@ -48,7 +48,16 @@ GENERATED = libxml2class.py libxml2class.txt $(BUILT_SOURCES)
+
+ $(GENERATED): $(srcdir)/generator.py $(API_DESC)
+ $(PYTHON) $(srcdir)/generator.py $(srcdir)
++
++install-ptest:
++ cp -r $(srcdir) $(DESTDIR)
++ sed -e 's|^Makefile:|_Makefile:|' \
++ -e 's|^\(tests test:\) all|\1|' Makefile >$(DESTDIR)/python/Makefile
++ $(MAKE) -C tests install-ptest
++else
++install-ptest:
+ endif
+
++.PHONY: tests test
+ tests test: all
+ cd tests && $(MAKE) tests
+diff --git a/python/tests/Makefile.am b/python/tests/Makefile.am
+index 227e24d..021bb29 100644
+--- a/python/tests/Makefile.am
++++ b/python/tests/Makefile.am
+@@ -59,6 +59,11 @@ XMLS= \
+ CLEANFILES = core tmp.xml *.pyc
+
+ if WITH_PYTHON
++install-ptest:
++ cp -r $(srcdir) $(DESTDIR)/python
++ sed -e 's|^Makefile:|_Makefile:|' \
++ -e 's|^\(srcdir = \).*|\1.|' Makefile >$(DESTDIR)/python/tests/Makefile
++
+ tests: $(PYTESTS)
+ @for f in $(XMLS) ; do test -f $$f || $(LN_S) $(srcdir)/$$f . ; done
+ @echo "## running Python regression tests"
+@@ -70,9 +75,14 @@ tests: $(PYTESTS)
+ if [ "$$?" -ne 0 ] ; then \
+ echo "-- $$test" ; \
+ echo "$$log" ; \
++ echo "FAIL: $$test"; \
+ exit 1 ; \
++ else \
++ echo "PASS: $$test"; \
+ fi ; \
+ done)
+ else
++install-ptest:
++
+ tests:
+ endif
+diff --git a/python/tests/tstLastError.py b/python/tests/tstLastError.py
+index 81d0acc..162c8db 100755
+--- a/python/tests/tstLastError.py
++++ b/python/tests/tstLastError.py
+@@ -25,7 +25,7 @@ class TestCase(unittest.TestCase):
+ when the exception is raised, check the libxml2.lastError for
+ expected values."""
+ # disable the default error handler
+- libxml2.registerErrorHandler(None,None)
++ libxml2.registerErrorHandler(lambda ctx,str: None,None)
+ try:
+ f(*args)
+ except exc:
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 <ansidecl.h>
--#endif
diff --git a/meta/recipes-core/libxml/libxml2/fix-execution-of-ptests.patch b/meta/recipes-core/libxml/libxml2/fix-execution-of-ptests.patch
new file mode 100644
index 0000000000..ad719d4f5f
--- /dev/null
+++ b/meta/recipes-core/libxml/libxml2/fix-execution-of-ptests.patch
@@ -0,0 +1,33 @@
+From 395c0f53ec226aaabedb166e6b3a7f8590b95a5f Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Sat, 11 May 2019 20:39:15 +0800
+Subject: [PATCH] Make sure that Makefile doesn't try to compile these tests
+ again on the target where the source dependencies won't be available.
+
+Upstream-Status: Inappropriate [cross-compile specific]
+
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+
+Rebase to 2.9.9
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ Makefile.am | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 8f4e43d..5edb930 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -211,8 +211,7 @@ install-ptest:
+ sed -i -e 's|^Makefile:|_Makefile:|' $(DESTDIR)/Makefile
+ $(MAKE) -C python install-ptest
+
+-runtests: runtest$(EXEEXT) testrecurse$(EXEEXT) testapi$(EXEEXT) \
+- testchar$(EXEEXT) testdict$(EXEEXT) runxmlconf$(EXEEXT)
++runtests:
+ [ -d test ] || $(LN_S) $(srcdir)/test .
+ [ -d result ] || $(LN_S) $(srcdir)/result .
+ $(CHECKER) ./runtest$(EXEEXT) && \
+--
+2.7.4
+
diff --git a/meta/recipes-core/libxml/libxml2/libxml-64bit.patch b/meta/recipes-core/libxml/libxml2/libxml-64bit.patch
index 1147017b61..fd8e469dd3 100644
--- a/meta/recipes-core/libxml/libxml2/libxml-64bit.patch
+++ b/meta/recipes-core/libxml/libxml2/libxml-64bit.patch
@@ -1,14 +1,19 @@
-Upstream-Status: Backport [from debian: bugs.debian.org/439843]
+From 056b14345b1abd76a761ab14538f1bc21302781a Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+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 <hongxu.jia@windriver.com>
---
- libxml.h | 3 +++
+ libxml.h | 3 +++
1 file changed, 3 insertions(+)
---- libxml2-2.6.29.orig/libxml.h
-+++ libxml2-2.6.29/libxml.h
-@@ -11,10 +11,13 @@
-
- #ifndef NO_LARGEFILE_SOURCE
+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
@@ -18,5 +23,6 @@ Upstream-Status: Backport [from debian: bugs.debian.org/439843]
#ifndef _FILE_OFFSET_BITS
#define _FILE_OFFSET_BITS 64
#endif
- #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
index 3277165618..e6998f6e68 100644
--- a/meta/recipes-core/libxml/libxml2/libxml-m4-use-pkgconfig.patch
+++ b/meta/recipes-core/libxml/libxml2/libxml-m4-use-pkgconfig.patch
@@ -1,11 +1,20 @@
-AM_PATH_XML2 uses xml-config which we disable through
+From 43edc9a445ed66cceb7533eadeef242940b4592c Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Sat, 11 May 2019 20:37:12 +0800
+Subject: [PATCH] AM_PATH_XML2 uses xml-config which we disable through
binconfig-disabled.bbclass, so port it to use pkg-config instead.
Upstream-Status: Pending
Signed-off-by: Ross Burton <ross.burton@intel.com>
+Rebase to 2.9.9
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ libxml.m4 | 186 ++------------------------------------------------------------
+ 1 file changed, 5 insertions(+), 181 deletions(-)
+
diff --git a/libxml.m4 b/libxml.m4
-index 68cd824..5fa0a9b 100644
+index 2d7a6f5..1c53585 100644
--- a/libxml.m4
+++ b/libxml.m4
@@ -1,188 +1,12 @@
@@ -183,7 +192,7 @@ index 68cd824..5fa0a9b 100644
- 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 occured. This usually means LIBXML was incorrectly installed"
+- 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"
@@ -202,3 +211,6 @@ index 68cd824..5fa0a9b 100644
- AC_SUBST(XML_LIBS)
- rm -f conf.xmltest
])
+--
+2.7.4
+
diff --git a/meta/recipes-core/libxml/libxml2/python-sitepackages-dir.patch b/meta/recipes-core/libxml/libxml2/python-sitepackages-dir.patch
index e83c8325e5..956ff3f33e 100644
--- a/meta/recipes-core/libxml/libxml2/python-sitepackages-dir.patch
+++ b/meta/recipes-core/libxml/libxml2/python-sitepackages-dir.patch
@@ -1,4 +1,7 @@
-Allow us to pass in PYTHON_SITE_PACKAGES
+From b038c3452667ed17ddb0e791cd7bdc7f8774ac29 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Sat, 11 May 2019 20:35:20 +0800
+Subject: [PATCH] Allow us to pass in PYTHON_SITE_PACKAGES
The python binary used when building for nativesdk doesn't give us the
correct path here so we need to be able to specify it ourselves.
@@ -6,16 +9,18 @@ correct path here so we need to be able to specify it ourselves.
Upstream-Status: Inappropriate [config]
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-Rebase to 2.9.2
+Rebase to 2.9.9
+
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
configure.ac | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
+index ca911f3..3bbd654 100644
--- a/configure.ac
+++ b/configure.ac
-@@ -813,7 +813,8 @@ dnl
+@@ -808,7 +808,8 @@ dnl
PYTHON_VERSION=
PYTHON_INCLUDES=
@@ -26,5 +31,5 @@ diff --git a/configure.ac b/configure.ac
pythondir=
if test "$with_python" != "no" ; then
--
-1.9.1
+2.7.4
diff --git a/meta/recipes-core/libxml/libxml2/run-ptest b/meta/recipes-core/libxml/libxml2/run-ptest
index 473d0b67a7..c313d83263 100644
--- a/meta/recipes-core/libxml/libxml2/run-ptest
+++ b/meta/recipes-core/libxml/libxml2/run-ptest
@@ -1,3 +1,4 @@
#!/bin/sh
+export LC_ALL=en_US.UTF-8
make -k runtests
diff --git a/meta/recipes-core/libxml/libxml2/runtest.patch b/meta/recipes-core/libxml/libxml2/runtest.patch
index 397ab20c30..0dbb353c0f 100644
--- a/meta/recipes-core/libxml/libxml2/runtest.patch
+++ b/meta/recipes-core/libxml/libxml2/runtest.patch
@@ -1,37 +1,48 @@
-Add 'install-ptest' rule.
-Print a standard result line for each test.
+Add 'install-ptest' rule. Print a standard result line for
+each test.
Signed-off-by: Mihaela Sendrea <mihaela.sendrea@enea.com>
-Upstream-Status: Pending
+Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
+Upstream-Status: Backport
-diff -uNr a/Makefile.am b/Makefile.am
---- a/Makefile.am 2013-04-17 14:51:42.633386477 +0200
-+++ b/Makefile.am 2013-04-19 14:47:51.544720568 +0200
-@@ -202,10 +202,19 @@
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ Makefile.am | 9 ++++
+ runsuite.c | 1 +
+ runtest.c | 2 +
+ runxmlconf.c | 1 +
+ testapi.c | 122 ++++++++++++++++++++++++++++++---------------
+ testchar.c | 156 +++++++++++++++++++++++++++++++++++++++++-----------------
+ testdict.c | 1 +
+ testlimits.c | 1 +
+ testrecurse.c | 2 +
+ 9 files changed, 210 insertions(+), 85 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 9c630be..7cfd04b 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -202,6 +202,15 @@ runxmlconf_LDADD= $(LDADDS)
#testOOM_DEPENDENCIES = $(DEPS)
#testOOM_LDADD= $(LDADDS)
+install-ptest:
+ @(if [ -d .libs ] ; then cd .libs; fi; \
-+ install $(noinst_PROGRAMS) $(DESTDIR))
++ install $(check_PROGRAMS) $(DESTDIR))
+ cp -r $(srcdir)/test $(DESTDIR)
+ cp -r $(srcdir)/result $(DESTDIR)
+ cp -r $(srcdir)/python $(DESTDIR)
+ cp Makefile $(DESTDIR)
+ sed -i -e 's|^Makefile:|_Makefile:|' $(DESTDIR)/Makefile
+
- runtests:
+ runtests: runtest$(EXEEXT) testrecurse$(EXEEXT) testapi$(EXEEXT) \
+ testchar$(EXEEXT) testdict$(EXEEXT) runxmlconf$(EXEEXT)
[ -d test ] || $(LN_S) $(srcdir)/test .
- [ -d result ] || $(LN_S) $(srcdir)/result .
-- $(CHECKER) ./runtest$(EXEEXT) && $(CHECKER) ./testrecurse$(EXEEXT) &&$(CHECKER) ./testapi$(EXEEXT) && $(CHECKER) ./testchar$(EXEEXT)&& $(CHECKER) ./testdict$(EXEEXT) && $(CHECKER) ./runxmlconf$(EXEEXT)
-+ ./runtest$(EXEEXT) ; ./testrecurse$(EXEEXT) ; ./testapi$(EXEEXT) ; ./testchar$(EXEEXT) ; ./testdict$(EXEEXT) ; ./runxmlconf$(EXEEXT)
- @(if [ "$(PYTHON_SUBDIR)" != "" ] ; then cd python ; \
- $(MAKE) tests ; fi)
-
-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
-@@ -1162,6 +1162,7 @@
+diff --git a/runsuite.c b/runsuite.c
+index aaab13e..9ba2c5d 100644
+--- a/runsuite.c
++++ b/runsuite.c
+@@ -1162,6 +1162,7 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
if (logfile != NULL)
fclose(logfile);
@@ -39,18 +50,19 @@ diff -uNr a/runsuite.c b/runsuite.c
return(ret);
}
#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++;
- }
- }
+diff --git a/runtest.c b/runtest.c
+index addda5c..8ba5d59 100644
+--- a/runtest.c
++++ b/runtest.c
+@@ -4501,6 +4501,7 @@ launchTests(testDescPtr tst) {
+ xmlCharEncCloseFunc(ebcdicHandler);
+ xmlCharEncCloseFunc(eucJpHandler);
+
+ printf("%s: %s\n", (err == 0) ? "PASS" : "FAIL", tst->desc);
return(err);
}
-@@ -4455,6 +4456,7 @@
+@@ -4577,6 +4578,7 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
xmlCleanupParser();
xmlMemoryDump();
@@ -58,10 +70,11 @@ diff -uNr a/runtest.c b/runtest.c
return(ret);
}
-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
-@@ -595,6 +595,7 @@
+diff --git a/runxmlconf.c b/runxmlconf.c
+index cef20f4..4f291fb 100644
+--- a/runxmlconf.c
++++ b/runxmlconf.c
+@@ -595,6 +595,7 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
if (logfile != NULL)
fclose(logfile);
@@ -69,15 +82,15 @@ diff -uNr a/runxmlconf.c b/runxmlconf.c
return(ret);
}
-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 @@
+diff --git a/testapi.c b/testapi.c
+index 4a751e2..7ccc066 100644
+--- a/testapi.c
++++ b/testapi.c
+@@ -1246,49 +1246,91 @@ static int
testlibxml2(void)
{
int test_ret = 0;
-+ int ret = 0;
-
+-
- test_ret += test_HTMLparser();
- test_ret += test_HTMLtree();
- test_ret += test_SAX2();
@@ -117,6 +130,8 @@ diff -uNr a/testapi.c b/testapi.c
- test_ret += test_xpath();
- test_ret += test_xpathInternals();
- test_ret += test_xpointer();
++ int ret = 0;
++
+ test_ret += (ret = test_HTMLparser());
+ printf("%s: HTMLparser\n", (ret == 0) ? "PASS" : "FAIL");
+ test_ret += (ret = test_HTMLtree());
@@ -203,10 +218,11 @@ diff -uNr a/testapi.c b/testapi.c
return(test_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
-@@ -23,7 +23,7 @@
+diff --git a/testchar.c b/testchar.c
+index 0d08792..f555d3b 100644
+--- a/testchar.c
++++ b/testchar.c
+@@ -23,7 +23,7 @@ static void errorHandler(void *unused, xmlErrorPtr err) {
char document1[100] = "<doc>XXXX</doc>";
char document2[100] = "<doc foo='XXXX'/>";
@@ -215,7 +231,7 @@ diff -uNr a/testchar.c b/testchar.c
int len, char *data, int forbid1, int forbid2) {
int i;
xmlDocPtr res;
-@@ -37,33 +37,41 @@
+@@ -37,33 +37,41 @@ static void testDocumentRangeByte1(xmlParserCtxtPtr ctxt, char *document,
res = xmlReadMemory(document, len, "test", NULL, 0);
if ((i == forbid1) || (i == forbid2)) {
@@ -225,7 +241,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 == '&')) {
@@ -233,8 +249,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)) {
@@ -242,8 +258,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,
@@ -253,7 +269,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,
@@ -261,7 +277,7 @@ diff -uNr a/testchar.c b/testchar.c
int len, char *data) {
int i, j;
xmlDocPtr res;
-@@ -80,10 +88,12 @@
+@@ -80,10 +88,12 @@ static void testDocumentRangeByte2(xmlParserCtxtPtr ctxt, char *document,
/* if first bit of first char is set, then second bit must too */
if ((i & 0x80) && ((i & 0x40) == 0)) {
@@ -271,11 +287,11 @@ diff -uNr a/testchar.c b/testchar.c
"Failed to detect invalid char for Bytes 0x%02X 0x%02X\n",
i, j);
+ return(1);
-+ }
++ }
}
/*
-@@ -91,10 +101,12 @@
+@@ -91,10 +101,12 @@ static void testDocumentRangeByte2(xmlParserCtxtPtr ctxt, char *document,
* bits must be 10
*/
else if ((i & 0x80) && ((j & 0xC0) != 0x80)) {
@@ -285,11 +301,11 @@ diff -uNr a/testchar.c b/testchar.c
"Failed to detect invalid char for Bytes 0x%02X 0x%02X\n",
i, j);
+ return(1);
-+ }
++ }
}
/*
-@@ -102,10 +114,12 @@
+@@ -102,10 +114,12 @@ static void testDocumentRangeByte2(xmlParserCtxtPtr ctxt, char *document,
* than 0x80, i.e. one of bits 5 to 1 of i must be set
*/
else if ((i & 0x80) && ((i & 0x1E) == 0)) {
@@ -299,11 +315,11 @@ diff -uNr a/testchar.c b/testchar.c
"Failed to detect invalid char for Bytes 0x%02X 0x%02X\n",
i, j);
+ return(1);
-+ }
++ }
}
/*
-@@ -113,10 +127,12 @@
+@@ -113,10 +127,12 @@ static void testDocumentRangeByte2(xmlParserCtxtPtr ctxt, char *document,
* at least 3 bytes, but we give only 2 !
*/
else if ((i & 0xE0) == 0xE0) {
@@ -313,25 +329,25 @@ 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);
-+ }
++ }
}
/*
-@@ -125,11 +141,13 @@
+@@ -125,11 +141,13 @@ static void testDocumentRangeByte2(xmlParserCtxtPtr ctxt, char *document,
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);
}
/**
-@@ -141,9 +159,10 @@
+@@ -141,9 +159,10 @@ static void testDocumentRangeByte2(xmlParserCtxtPtr ctxt, char *document,
* CDATA in text or in attribute values.
*/
@@ -343,7 +359,7 @@ diff -uNr a/testchar.c b/testchar.c
/*
* Set up a parsing context using the first document as
-@@ -152,7 +171,7 @@
+@@ -152,7 +171,7 @@ static void testDocumentRanges(void) {
ctxt = xmlNewParserCtxt();
if (ctxt == NULL) {
fprintf(stderr, "Failed to allocate parser context\n");
@@ -352,7 +368,7 @@ diff -uNr a/testchar.c b/testchar.c
}
printf("testing 1 byte char in document: 1");
-@@ -163,7 +182,7 @@
+@@ -163,7 +182,7 @@ static void testDocumentRanges(void) {
data[2] = ' ';
data[3] = ' ';
/* test 1 byte injection at beginning of area */
@@ -361,7 +377,7 @@ diff -uNr a/testchar.c b/testchar.c
data, -1, -1);
printf(" 2");
fflush(stdout);
-@@ -172,7 +191,7 @@
+@@ -172,7 +191,7 @@ static void testDocumentRanges(void) {
data[2] = ' ';
data[3] = ' ';
/* test 1 byte injection at end of area */
@@ -370,7 +386,7 @@ diff -uNr a/testchar.c b/testchar.c
data + 3, -1, -1);
printf(" 3");
-@@ -183,7 +202,7 @@
+@@ -183,7 +202,7 @@ static void testDocumentRanges(void) {
data[2] = ' ';
data[3] = ' ';
/* test 1 byte injection at beginning of area */
@@ -379,7 +395,7 @@ diff -uNr a/testchar.c b/testchar.c
data, '\'', -1);
printf(" 4");
fflush(stdout);
-@@ -192,7 +211,7 @@
+@@ -192,7 +211,7 @@ static void testDocumentRanges(void) {
data[2] = ' ';
data[3] = ' ';
/* test 1 byte injection at end of area */
@@ -388,7 +404,7 @@ diff -uNr a/testchar.c b/testchar.c
data + 3, '\'', -1);
printf(" done\n");
-@@ -204,7 +223,7 @@
+@@ -204,7 +223,7 @@ static void testDocumentRanges(void) {
data[2] = ' ';
data[3] = ' ';
/* test 2 byte injection at beginning of area */
@@ -397,7 +413,7 @@ diff -uNr a/testchar.c b/testchar.c
data);
printf(" 2");
fflush(stdout);
-@@ -213,7 +232,7 @@
+@@ -213,7 +232,7 @@ static void testDocumentRanges(void) {
data[2] = ' ';
data[3] = ' ';
/* test 2 byte injection at end of area */
@@ -406,7 +422,7 @@ diff -uNr a/testchar.c b/testchar.c
data + 2);
printf(" 3");
-@@ -224,7 +243,7 @@
+@@ -224,7 +243,7 @@ static void testDocumentRanges(void) {
data[2] = ' ';
data[3] = ' ';
/* test 2 byte injection at beginning of area */
@@ -415,7 +431,7 @@ diff -uNr a/testchar.c b/testchar.c
data);
printf(" 4");
fflush(stdout);
-@@ -233,14 +252,15 @@
+@@ -233,14 +252,15 @@ static void testDocumentRanges(void) {
data[2] = ' ';
data[3] = ' ';
/* test 2 byte injection at end of area */
@@ -433,7 +449,7 @@ diff -uNr a/testchar.c b/testchar.c
int i = 0;
int len, c;
-@@ -255,19 +275,25 @@
+@@ -255,19 +275,25 @@ static void testCharRangeByte1(xmlParserCtxtPtr ctxt, char *data) {
c = xmlCurrentChar(ctxt, &len);
if ((i == 0) || (i >= 0x80)) {
/* we must see an error there */
@@ -441,20 +457,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) {
@@ -462,7 +478,7 @@ diff -uNr a/testchar.c b/testchar.c
int i, j;
int len, c;
-@@ -284,10 +310,12 @@
+@@ -284,10 +310,12 @@ static void testCharRangeByte2(xmlParserCtxtPtr ctxt, char *data) {
/* if first bit of first char is set, then second bit must too */
if ((i & 0x80) && ((i & 0x40) == 0)) {
@@ -471,12 +487,12 @@ 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);
++ }
}
/*
-@@ -295,10 +323,12 @@
+@@ -295,10 +323,12 @@ static void testCharRangeByte2(xmlParserCtxtPtr ctxt, char *data) {
* bits must be 10
*/
else if ((i & 0x80) && ((j & 0xC0) != 0x80)) {
@@ -485,12 +501,12 @@ 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);
++ }
}
/*
-@@ -306,10 +336,12 @@
+@@ -306,10 +336,12 @@ static void testCharRangeByte2(xmlParserCtxtPtr ctxt, char *data) {
* than 0x80, i.e. one of bits 5 to 1 of i must be set
*/
else if ((i & 0x80) && ((i & 0x1E) == 0)) {
@@ -499,12 +515,12 @@ 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);
++ }
}
/*
-@@ -317,10 +349,12 @@
+@@ -317,10 +349,12 @@ static void testCharRangeByte2(xmlParserCtxtPtr ctxt, char *data) {
* at least 3 bytes, but we give only 2 !
*/
else if ((i & 0xE0) == 0xE0) {
@@ -513,12 +529,12 @@ 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);
++ }
}
/*
-@@ -329,6 +363,7 @@
+@@ -329,6 +363,7 @@ static void testCharRangeByte2(xmlParserCtxtPtr ctxt, char *data) {
else if ((lastError != 0) || (len != 2)) {
fprintf(stderr,
"Failed to parse char for Bytes 0x%02X 0x%02X\n", i, j);
@@ -526,7 +542,7 @@ diff -uNr a/testchar.c b/testchar.c
}
/*
-@@ -338,12 +373,14 @@
+@@ -338,12 +373,14 @@ static void testCharRangeByte2(xmlParserCtxtPtr ctxt, char *data) {
fprintf(stderr,
"Failed to parse char for Bytes 0x%02X 0x%02X: expect %d got %d\n",
i, j, ((j & 0x3F) + ((i & 0x1F) << 6)), c);
@@ -534,7 +550,7 @@ diff -uNr a/testchar.c b/testchar.c
}
}
}
-+ return(0);
++ return(0);
}
-static void testCharRangeByte3(xmlParserCtxtPtr ctxt, char *data) {
@@ -542,7 +558,7 @@ diff -uNr a/testchar.c b/testchar.c
int i, j, k, K;
int len, c;
unsigned char lows[6] = {0, 0x80, 0x81, 0xC1, 0xFF, 0xBF};
-@@ -368,20 +405,24 @@
+@@ -368,20 +405,24 @@ static void testCharRangeByte3(xmlParserCtxtPtr ctxt, char *data) {
* at least 4 bytes, but we give only 3 !
*/
if ((i & 0xF0) == 0xF0) {
@@ -552,7 +568,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);
-+ }
++ }
}
/*
@@ -565,11 +581,11 @@ 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);
-+ }
++ }
}
/*
-@@ -390,10 +431,12 @@
+@@ -390,10 +431,12 @@ static void testCharRangeByte3(xmlParserCtxtPtr ctxt, char *data) {
* the 6th byte of data[1] must be set
*/
else if (((i & 0xF) == 0) && ((j & 0x20) == 0)) {
@@ -579,11 +595,11 @@ 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);
-+ }
++ }
}
/*
-@@ -401,10 +444,12 @@
+@@ -401,10 +444,12 @@ static void testCharRangeByte3(xmlParserCtxtPtr ctxt, char *data) {
*/
else if (((value > 0xD7FF) && (value <0xE000)) ||
((value > 0xFFFD) && (value <0x10000))) {
@@ -593,28 +609,28 @@ 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);
-+ }
++ }
}
/*
-@@ -414,6 +459,7 @@
+@@ -414,6 +459,7 @@ static void testCharRangeByte3(xmlParserCtxtPtr ctxt, char *data) {
fprintf(stderr,
"Failed to parse char for Bytes 0x%02X 0x%02X 0x%02X\n",
i, j, K);
-+ return(1);
++ return(1);
}
/*
-@@ -423,13 +469,15 @@
+@@ -423,13 +469,15 @@ static void testCharRangeByte3(xmlParserCtxtPtr ctxt, char *data) {
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) {
@@ -622,7 +638,7 @@ diff -uNr a/testchar.c b/testchar.c
int i, j, k, K, l, L;
int len, c;
unsigned char lows[6] = {0, 0x80, 0x81, 0xC1, 0xFF, 0xBF};
-@@ -458,10 +506,12 @@
+@@ -458,10 +506,12 @@ static void testCharRangeByte4(xmlParserCtxtPtr ctxt, char *data) {
* at least 5 bytes, but we give only 4 !
*/
if ((i & 0xF8) == 0xF8) {
@@ -632,11 +648,11 @@ 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);
-+ }
++ }
}
/*
-@@ -469,10 +519,12 @@
+@@ -469,10 +519,12 @@ static void testCharRangeByte4(xmlParserCtxtPtr ctxt, char *data) {
*/
else if (((j & 0xC0) != 0x80) || ((K & 0xC0) != 0x80) ||
((L & 0xC0) != 0x80)) {
@@ -646,11 +662,11 @@ 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);
-+ }
++ }
}
/*
-@@ -481,10 +533,12 @@
+@@ -481,10 +533,12 @@ static void testCharRangeByte4(xmlParserCtxtPtr ctxt, char *data) {
* the 6 or 5th byte of j must be set
*/
else if (((i & 0x7) == 0) && ((j & 0x30) == 0)) {
@@ -660,11 +676,11 @@ 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);
-+ }
++ }
}
/*
-@@ -493,10 +547,12 @@
+@@ -493,10 +547,12 @@ static void testCharRangeByte4(xmlParserCtxtPtr ctxt, char *data) {
else if (((value > 0xD7FF) && (value <0xE000)) ||
((value > 0xFFFD) && (value <0x10000)) ||
(value > 0x10FFFF)) {
@@ -674,33 +690,33 @@ 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);
-+ }
++ }
}
/*
-@@ -506,6 +562,7 @@
+@@ -506,6 +562,7 @@ static void testCharRangeByte4(xmlParserCtxtPtr ctxt, char *data) {
fprintf(stderr,
"Failed to parse char for Bytes 0x%02X 0x%02X 0x%02X\n",
i, j, K);
-+ return(1);
++ return(1);
}
/*
-@@ -515,11 +572,13 @@
+@@ -515,11 +572,13 @@ static void testCharRangeByte4(xmlParserCtxtPtr ctxt, char *data) {
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);
}
/**
-@@ -530,11 +589,12 @@
+@@ -530,11 +589,12 @@ static void testCharRangeByte4(xmlParserCtxtPtr ctxt, char *data) {
* cover the full range of UTF-8 chars accepted by XML-1.0
*/
@@ -714,7 +730,7 @@ diff -uNr a/testchar.c b/testchar.c
memset(data, 0, 5);
-@@ -545,17 +605,19 @@
+@@ -545,17 +605,19 @@ static void testCharRanges(void) {
ctxt = xmlNewParserCtxt();
if (ctxt == NULL) {
fprintf(stderr, "Failed to allocate parser context\n");
@@ -725,17 +741,17 @@ 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;
-@@ -567,25 +629,28 @@
+@@ -567,25 +629,28 @@ static void testCharRanges(void) {
printf("testing char range: 1");
fflush(stdout);
@@ -768,7 +784,7 @@ diff -uNr a/testchar.c b/testchar.c
/*
* this initialize the library and check potential ABI mismatches
* between the version it was compiled for and the actual shared
-@@ -602,8 +667,9 @@
+@@ -602,8 +667,9 @@ int main(void) {
/*
* Run the tests
*/
@@ -780,30 +796,33 @@ 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 @@
+diff --git a/testdict.c b/testdict.c
+index 40bebd0..114b934 100644
+--- a/testdict.c
++++ b/testdict.c
+@@ -440,5 +440,6 @@ int main(void)
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 @@
+diff --git a/testlimits.c b/testlimits.c
+index 68c94db..1584434 100644
+--- a/testlimits.c
++++ b/testlimits.c
+@@ -1634,5 +1634,6 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
xmlCleanupParser();
xmlMemoryDump();
+ printf("%s: testlimits\n", (ret == 0) ? "PASS" : "FAIL");
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
-@@ -892,6 +892,7 @@
+diff --git a/testrecurse.c b/testrecurse.c
+index f95ae1c..74c8f8b 100644
+--- a/testrecurse.c
++++ b/testrecurse.c
+@@ -892,6 +892,7 @@ launchTests(testDescPtr tst) {
err++;
}
}
@@ -811,10 +830,13 @@ diff -uNr a/testrecurse.c b/testrecurse.c
return(err);
}
-@@ -961,5 +962,6 @@
+@@ -961,5 +962,6 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) {
xmlCleanupParser();
xmlMemoryDump();
+ printf("%s: testrecurse\n\n", (ret == 0) ? "PASS" : "FAIL");
return(ret);
}
+--
+2.7.4
+
diff --git a/meta/recipes-core/libxml/libxml2_2.9.10.bb b/meta/recipes-core/libxml/libxml2_2.9.10.bb
new file mode 100644
index 0000000000..2c833fa7a2
--- /dev/null
+++ b/meta/recipes-core/libxml/libxml2_2.9.10.bb
@@ -0,0 +1,110 @@
+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;subdir=${BP};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] = "10942a1dc23137a8aa07f0639cbfece5"
+SRC_URI[libtar.sha256sum] = "aafee193ffb8fe0c82d4afef6ef91972cbaf5feea100edc2f262750611b4be1f"
+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 features_check
+
+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 \
+ glibc-gconv-euc-jp \
+ locale-base-en-us \
+ "
+
+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')
+}
+
+PACKAGE_BEFORE_PN += "${PN}-utils"
+PACKAGES += "${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 ${S}/xmlconf/ -type f -exec chmod -x {} \+
+}
+
+do_compile_ptest() {
+ oe_runmake check-am
+}
+
+do_install_ptest () {
+ cp -r ${S}/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.4.bb b/meta/recipes-core/libxml/libxml2_2.9.4.bb
deleted file mode 100644
index 265d2b73a9..0000000000
--- a/meta/recipes-core/libxml/libxml2_2.9.4.bb
+++ /dev/null
@@ -1,70 +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 = "ftp://xmlsoft.org/libxml2/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 \
- "
-
-SRC_URI[libtar.md5sum] = "ae249165c173b1ff386ee8ad676815f5"
-SRC_URI[libtar.sha256sum] = "ffb911191e509b966deb55de705387f14156e1a56b21824357cdf0053233633c"
-SRC_URI[testtar.md5sum] = "ae3d1ebe000a3972afa104ca7f0e1b4a"
-SRC_URI[testtar.sha256sum] = "96151685cec997e1f9f3387e3626d61e6284d4d6e66e0e440c209286c03e9cc7"
-
-BINCONFIG = "${bindir}/xml2-config"
-
-inherit autotools pkgconfig binconfig-disabled pythonnative ptest
-
-RDEPENDS_${PN}-ptest += "python-core"
-
-RDEPENDS_${PN}-python += "python-core"
-
-RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-gconv-ebcdic-us glibc-gconv-ibm1141"
-
-export PYTHON_SITE_PACKAGES="${PYTHON_SITEPACKAGES_DIR}"
-
-PACKAGECONFIG ??= "python \
- ${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)} \
-"
-PACKAGECONFIG[python] = "--with-python=${PYTHON},--without-python,python"
-PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
-
-# WARNING: zlib is require 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', True):
- 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_install_ptest () {
- cp -r ${WORKDIR}/xmlconf ${D}${PTEST_PATH}
-}
-
-BBCLASSEXTEND = "native nativesdk"