commit:     3a9653ab117a5f179485f596d0d9d7978eb489ca
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sun May 28 21:54:03 2023 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sun May 28 21:54:03 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3a9653ab

gnustep-base/gnustep-base: add patch for >=libxml2-2.11

Closes: https://bugs.gentoo.org/907226
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 .../files/gnustep-base-1.29.0-libxml2-2.11.patch   | 23 +++++++++++
 .../gnustep-base/gnustep-base-1.29.0.ebuild        | 45 +++++++++++++---------
 2 files changed, 49 insertions(+), 19 deletions(-)

diff --git 
a/gnustep-base/gnustep-base/files/gnustep-base-1.29.0-libxml2-2.11.patch 
b/gnustep-base/gnustep-base/files/gnustep-base-1.29.0-libxml2-2.11.patch
new file mode 100644
index 000000000000..84abdd59dc80
--- /dev/null
+++ b/gnustep-base/gnustep-base/files/gnustep-base-1.29.0-libxml2-2.11.patch
@@ -0,0 +1,23 @@
+https://bugs.gentoo.org/907226
+
+From 37913d006d96a6bdcb963f4ca4889888dcce6094 Mon Sep 17 00:00:00 2001
+From: Frederik Seiffert <[email protected]>
+Date: Wed, 3 May 2023 13:49:09 +0200
+Subject: [PATCH] Fix GSXML compatibility with libxml2 v2.11.0
+
+Fixes #294.
+--- a/Source/Additions/GSXML.m
++++ b/Source/Additions/GSXML.m
+@@ -2671,10 +2671,12 @@ + (void) initialize
+                   return NULL;
+                 }
+               ret->owner = 1;
++#if LIBXML_VERSION < 21100
+               if (ret->checked == 0)
+                 {
+                   ret->checked = 1;
+                 }
++#endif
+             }
+         }
+     }

diff --git a/gnustep-base/gnustep-base/gnustep-base-1.29.0.ebuild 
b/gnustep-base/gnustep-base/gnustep-base-1.29.0.ebuild
index 6cdbc4653361..93fc96a1e08c 100644
--- a/gnustep-base/gnustep-base/gnustep-base-1.29.0.ebuild
+++ b/gnustep-base/gnustep-base/gnustep-base-1.29.0.ebuild
@@ -2,6 +2,7 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
+
 inherit gnustep-base toolchain-funcs
 
 DESCRIPTION="A library of general-purpose, non-graphical Objective C objects"
@@ -18,45 +19,51 @@ RDEPEND="${GNUSTEP_CORE_DEPEND}
        gnutls? ( net-libs/gnutls:= )
        iconv? ( virtual/libiconv )
        icu? ( >=dev-libs/icu-49.0:= )
-       !libffi? ( dev-libs/ffcall
-               gnustep-base/gnustep-make[-native-exceptions] )
        libffi? ( dev-libs/libffi:= )
+       !libffi? (
+               dev-libs/ffcall
+               gnustep-base/gnustep-make[-native-exceptions]
+       )
        >=dev-libs/libxml2-2.6
        >=dev-libs/libxslt-1.1
        >=dev-libs/gmp-4.1:=
        >=sys-libs/zlib-1.2
        zeroconf? ( net-dns/avahi )"
-DEPEND="${RDEPEND}
-       virtual/pkgconfig"
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig"
 
 PATCHES=(
        "${FILESDIR}"/${PN}-1.26.0-no_compress_man.patch
+       "${FILESDIR}"/${PN}-1.29.0-libxml2-2.11.patch
 )
 
 src_configure() {
        egnustep_env
 
-       local myconf
-       if use libffi ; then
-               myconf="--enable-libffi --disable-ffcall 
--with-ffi-include=$($(tc-getPKG_CONFIG) --variable=includedir libffi)"
-       else
-               myconf="--disable-libffi --enable-ffcall"
-       fi
+       local myconf=(
+               $(use_enable libffi)
+               $(use_enable !libffi ffcall)
+       )
+       use libffi &&
+               myconf+=( --with-ffi-include=$($(tc-getPKG_CONFIG) 
--variable=includedir libffi) )
 
-       myconf="$myconf $(use_enable gnutls tls)"
-       myconf="$myconf $(use_enable iconv)"
-       myconf="$myconf $(use_enable icu)"
-       myconf="$myconf $(use_enable zeroconf)"
-       myconf="$myconf --with-xml-prefix=${EPREFIX}/usr"
-       myconf="$myconf --with-gmp-include=${EPREFIX}/usr/include 
--with-gmp-library=${EPREFIX}/usr/lib"
-       myconf="$myconf 
--with-default-config=${EPREFIX}/etc/GNUstep/GNUstep.conf"
+       myconf+=(
+               $(use_enable gnutls tls)
+               $(use_enable iconv)
+               $(use_enable icu)
+               $(use_enable zeroconf)
+               --with-xml-prefix="${ESYSROOT}"/usr
+               --with-gmp-include="${ESYSROOT}"/usr/include
+               --with-gmp-library="${ESYSROOT}"/usr/$(get_libdir)
+               --with-default-config="${ESYSROOT}"/etc/GNUstep/GNUstep.conf
+       )
 
-       econf $myconf
+       econf "${myconf[@]}"
 }
 
 src_install() {
        # We need to set LD_LIBRARY_PATH because the doc generation program
-       # uses the gnustep-base libraries.  Since egnustep_env "cleans the
+       # uses the gnustep-base libraries. Since egnustep_env "cleans the
        # environment" including our LD_LIBRARY_PATH, we're left no choice
        # but doing it like this.
 

Reply via email to