summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@chromium.org>2019-01-03 05:52:31 -0500
committerMike Frysinger <vapier@gentoo.org>2019-01-03 05:54:21 -0500
commitc00985c576a4af05b6cc871fe63f93a6537bb20e (patch)
tree0d6dddd8c10eea74fadfdd6be81f6fc46db93a05 /dev-libs
parentnet-misc/dropbox-cli: amd64 stable wrt bug #673098 (diff)
downloadgentoo-c00985c576a4af05b6cc871fe63f93a6537bb20e.tar.gz
gentoo-c00985c576a4af05b6cc871fe63f93a6537bb20e.tar.bz2
gentoo-c00985c576a4af05b6cc871fe63f93a6537bb20e.zip
dev-libs/libxml2: fix reader5.py test #565576
Closes: https://bugs.gentoo.org/565576 Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'dev-libs')
-rw-r--r--dev-libs/libxml2/files/libxml2-2.9.8-out-of-tree-test.patch40
-rw-r--r--dev-libs/libxml2/libxml2-2.9.8.ebuild3
2 files changed, 43 insertions, 0 deletions
diff --git a/dev-libs/libxml2/files/libxml2-2.9.8-out-of-tree-test.patch b/dev-libs/libxml2/files/libxml2-2.9.8-out-of-tree-test.patch
new file mode 100644
index 000000000000..fcc441d05de2
--- /dev/null
+++ b/dev-libs/libxml2/files/libxml2-2.9.8-out-of-tree-test.patch
@@ -0,0 +1,40 @@
+https://gitlab.gnome.org/GNOME/libxml2/merge_requests/14
+
+From 54878c018af979b20ca1bfbf12599973484cae5b Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Thu, 3 Jan 2019 05:44:03 -0500
+Subject: [PATCH] fix reader5.py test when building out of tree
+
+When building out of tree, the relative path this test uses doesn't
+work. Resolve the path relative to the test script itself instead.
+
+Url: https://bugs.gentoo.org/565576
+---
+ python/tests/reader5.py | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/python/tests/reader5.py b/python/tests/reader5.py
+index 82d0daea474a..da5355ffc4c6 100755
+--- a/python/tests/reader5.py
++++ b/python/tests/reader5.py
+@@ -4,6 +4,7 @@
+ # this extract the Dragon bibliography entries from the XML specification
+ #
+ import libxml2
++import os
+ import sys
+
+ # Memory debug specific
+@@ -14,7 +15,8 @@ Ravi Sethi, and Jeffrey D. Ullman.
+ <emph>Compilers: Principles, Techniques, and Tools</emph>.
+ Reading: Addison-Wesley, 1986, rpt. corr. 1988.</bibl>"""
+
+-f = open('../../test/valid/REC-xml-19980210.xml', 'rb')
++basedir = os.path.dirname(os.path.realpath(__file__))
++f = open(os.path.join(basedir, '../../test/valid/REC-xml-19980210.xml'), 'rb')
+ input = libxml2.inputBuffer(f)
+ reader = input.newTextReader("REC")
+ res=""
+--
+2.19.1
+
diff --git a/dev-libs/libxml2/libxml2-2.9.8.ebuild b/dev-libs/libxml2/libxml2-2.9.8.ebuild
index 1917e19e6284..fbb37285cb7f 100644
--- a/dev-libs/libxml2/libxml2-2.9.8.ebuild
+++ b/dev-libs/libxml2/libxml2-2.9.8.ebuild
@@ -81,6 +81,9 @@ src_prepare() {
# https://bugzilla.gnome.org/show_bug.cgi?id=760458
eapply "${FILESDIR}"/${PN}-2.9.2-python-ABIFLAG.patch
+ # Fix python tests when building out of tree #565576
+ eapply "${FILESDIR}"/${PN}-2.9.8-out-of-tree-test.patch
+
if [[ ${CHOST} == *-darwin* ]] ; then
# Avoid final linking arguments for python modules
sed -i -e '/PYTHON_LIBS/s/ldflags/libs/' configure.ac || die