commit:     1962521dfb13aae2f73a0fddaba1c0a68e5b5670
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 23 00:27:27 2022 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sat Apr 23 00:27:27 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1962521d

dev-libs/libxml2: avoid creating /missing.xml in tests

Closes: https://bugs.gentoo.org/839804
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 .../files/libxml2-2.9.13-testapi-missing-xml.patch | 28 ++++++++++++++++++++++
 dev-libs/libxml2/libxml2-2.9.13-r1.ebuild          |  3 +++
 2 files changed, 31 insertions(+)

diff --git a/dev-libs/libxml2/files/libxml2-2.9.13-testapi-missing-xml.patch 
b/dev-libs/libxml2/files/libxml2-2.9.13-testapi-missing-xml.patch
new file mode 100644
index 000000000000..adbb3db72a5a
--- /dev/null
+++ b/dev-libs/libxml2/files/libxml2-2.9.13-testapi-missing-xml.patch
@@ -0,0 +1,28 @@
+From b31e07dbf40c3998dd466829e818f5870296272d Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <[email protected]>
+Date: Fri, 22 Apr 2022 20:14:05 -0400
+Subject: [PATCH] testapi: remove leading slash from "/missing.xml"
+
+Fixes an error when running tests in a sandbox on Gentoo Linux.
+
+Bug: https://bugs.gentoo.org/839804
+---
+ testapi.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/testapi.c b/testapi.c
+index d4258c43..c7a5b163 100644
+--- a/testapi.c
++++ b/testapi.c
+@@ -442,7 +442,7 @@ static void des_eaten_name(int no ATTRIBUTE_UNUSED, 
xmlChar *val ATTRIBUTE_UNUSE
+ #define gen_nb_fileoutput 6
+ 
+ static const char *gen_fileoutput(int no, int nr ATTRIBUTE_UNUSED) {
+-    if (no == 0) return("/missing.xml");
++    if (no == 0) return("missing.xml");
+     if (no == 1) return("<foo/>");
+     if (no == 2) return(REMOTE2GOOD);
+     if (no == 3) return(REMOTE1GOOD);
+-- 
+2.35.1
+

diff --git a/dev-libs/libxml2/libxml2-2.9.13-r1.ebuild 
b/dev-libs/libxml2/libxml2-2.9.13-r1.ebuild
index 3378e7fad44d..82dfa95b7b2f 100644
--- a/dev-libs/libxml2/libxml2-2.9.13-r1.ebuild
+++ b/dev-libs/libxml2/libxml2-2.9.13-r1.ebuild
@@ -77,6 +77,9 @@ PATCHES=(
 
        # Don't bother copying Python's libraries (bug #798942)
        "${WORKDIR}"/${PN}-2.9.12-dont-copy-python-ldflags.patch
+
+       # https://bugs.gentoo.org/839804
+       "${FILESDIR}"/libxml2-2.9.13-testapi-missing-xml.patch
 )
 
 src_unpack() {

Reply via email to