1 |
commit: c00985c576a4af05b6cc871fe63f93a6537bb20e |
2 |
Author: Mike Frysinger <vapier <AT> chromium <DOT> org> |
3 |
AuthorDate: Thu Jan 3 10:52:31 2019 +0000 |
4 |
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jan 3 10:54:21 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c00985c5 |
7 |
|
8 |
dev-libs/libxml2: fix reader5.py test #565576 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/565576 |
11 |
Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org> |
12 |
|
13 |
.../files/libxml2-2.9.8-out-of-tree-test.patch | 40 ++++++++++++++++++++++ |
14 |
dev-libs/libxml2/libxml2-2.9.8.ebuild | 3 ++ |
15 |
2 files changed, 43 insertions(+) |
16 |
|
17 |
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 |
18 |
new file mode 100644 |
19 |
index 00000000000..fcc441d05de |
20 |
--- /dev/null |
21 |
+++ b/dev-libs/libxml2/files/libxml2-2.9.8-out-of-tree-test.patch |
22 |
@@ -0,0 +1,40 @@ |
23 |
+https://gitlab.gnome.org/GNOME/libxml2/merge_requests/14 |
24 |
+ |
25 |
+From 54878c018af979b20ca1bfbf12599973484cae5b Mon Sep 17 00:00:00 2001 |
26 |
+From: Mike Frysinger <vapier@g.o> |
27 |
+Date: Thu, 3 Jan 2019 05:44:03 -0500 |
28 |
+Subject: [PATCH] fix reader5.py test when building out of tree |
29 |
+ |
30 |
+When building out of tree, the relative path this test uses doesn't |
31 |
+work. Resolve the path relative to the test script itself instead. |
32 |
+ |
33 |
+Url: https://bugs.gentoo.org/565576 |
34 |
+--- |
35 |
+ python/tests/reader5.py | 4 +++- |
36 |
+ 1 file changed, 3 insertions(+), 1 deletion(-) |
37 |
+ |
38 |
+diff --git a/python/tests/reader5.py b/python/tests/reader5.py |
39 |
+index 82d0daea474a..da5355ffc4c6 100755 |
40 |
+--- a/python/tests/reader5.py |
41 |
++++ b/python/tests/reader5.py |
42 |
+@@ -4,6 +4,7 @@ |
43 |
+ # this extract the Dragon bibliography entries from the XML specification |
44 |
+ # |
45 |
+ import libxml2 |
46 |
++import os |
47 |
+ import sys |
48 |
+ |
49 |
+ # Memory debug specific |
50 |
+@@ -14,7 +15,8 @@ Ravi Sethi, and Jeffrey D. Ullman. |
51 |
+ <emph>Compilers: Principles, Techniques, and Tools</emph>. |
52 |
+ Reading: Addison-Wesley, 1986, rpt. corr. 1988.</bibl>""" |
53 |
+ |
54 |
+-f = open('../../test/valid/REC-xml-19980210.xml', 'rb') |
55 |
++basedir = os.path.dirname(os.path.realpath(__file__)) |
56 |
++f = open(os.path.join(basedir, '../../test/valid/REC-xml-19980210.xml'), 'rb') |
57 |
+ input = libxml2.inputBuffer(f) |
58 |
+ reader = input.newTextReader("REC") |
59 |
+ res="" |
60 |
+-- |
61 |
+2.19.1 |
62 |
+ |
63 |
|
64 |
diff --git a/dev-libs/libxml2/libxml2-2.9.8.ebuild b/dev-libs/libxml2/libxml2-2.9.8.ebuild |
65 |
index 1917e19e628..fbb37285cb7 100644 |
66 |
--- a/dev-libs/libxml2/libxml2-2.9.8.ebuild |
67 |
+++ b/dev-libs/libxml2/libxml2-2.9.8.ebuild |
68 |
@@ -81,6 +81,9 @@ src_prepare() { |
69 |
# https://bugzilla.gnome.org/show_bug.cgi?id=760458 |
70 |
eapply "${FILESDIR}"/${PN}-2.9.2-python-ABIFLAG.patch |
71 |
|
72 |
+ # Fix python tests when building out of tree #565576 |
73 |
+ eapply "${FILESDIR}"/${PN}-2.9.8-out-of-tree-test.patch |
74 |
+ |
75 |
if [[ ${CHOST} == *-darwin* ]] ; then |
76 |
# Avoid final linking arguments for python modules |
77 |
sed -i -e '/PYTHON_LIBS/s/ldflags/libs/' configure.ac || die |