commit:     e14105168d294ed10f439893980c5135462b2270
Author:     NHOrus <jy6x2b32pie9 <AT> yahoo <DOT> com>
AuthorDate: Sun Mar  8 11:00:58 2026 +0000
Commit:     Bernard Cafarelli <voyageur <AT> gentoo <DOT> org>
CommitDate: Tue Mar 10 08:54:07 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e1410516

gnustep-base/libobjc2: Port tests to C23

Backport of upstream commit.

Closes: https://bugs.gentoo.org/970708
Signed-off-by: NHOrus <jy6x2b32pie9 <AT> yahoo.com>
Part-of: https://codeberg.org/gentoo/gentoo/pulls/255
Merges: https://codeberg.org/gentoo/gentoo/pulls/255
Signed-off-by: Bernard Cafarelli <voyageur <AT> gentoo.org>

 .../files/libobjc2-2.3-incompatible-pointers.patch | 27 +++++++++++++
 gnustep-base/libobjc2/libobjc2-2.3-r1.ebuild       | 45 ++++++++++++++++++++++
 2 files changed, 72 insertions(+)

diff --git 
a/gnustep-base/libobjc2/files/libobjc2-2.3-incompatible-pointers.patch 
b/gnustep-base/libobjc2/files/libobjc2-2.3-incompatible-pointers.patch
new file mode 100644
index 000000000000..5b431714ab52
--- /dev/null
+++ b/gnustep-base/libobjc2/files/libobjc2-2.3-incompatible-pointers.patch
@@ -0,0 +1,27 @@
+https://bugs.gentoo.org/970708
+backported upstream patch for incomatible pointers. CI stuff
+trimmed.
+https://github.com/gnustep/libobjc2/commit/0e027650d960626b2119efabaebde20bb003a3db
+From 0e027650d960626b2119efabaebde20bb003a3db Mon Sep 17 00:00:00 2001
+From: Hugo Melder <[email protected]>
+Date: Sat, 25 Oct 2025 13:50:36 +0200
+Subject: [PATCH] Add Weekly CI (#352)
+
+* CI: add weekly workflow
+
+* CI: testing in feature branch
+
+* Test/FastPathAlloc: fix compilation error
+diff --git a/Test/FastPathAlloc.m b/Test/FastPathAlloc.m
+index 340a8dd3..f1eb6244 100644
+--- a/Test/FastPathAlloc.m
++++ b/Test/FastPathAlloc.m
+@@ -96,7 +96,7 @@ + (instancetype)alloc
+ @implementation ShouldInitSubclassed
+ + (instancetype) alloc
+ {
+-      return [ShouldInit alloc];
++      return (ShouldInitSubclassed *)[ShouldInit alloc];
+ }
+ @end
+ 

diff --git a/gnustep-base/libobjc2/libobjc2-2.3-r1.ebuild 
b/gnustep-base/libobjc2/libobjc2-2.3-r1.ebuild
new file mode 100644
index 000000000000..9dbd89a85b71
--- /dev/null
+++ b/gnustep-base/libobjc2/libobjc2-2.3-r1.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+inherit cmake flag-o-matic toolchain-funcs
+
+DESCRIPTION="GNUstep Objective-C runtime"
+HOMEPAGE="https://developer.gnustep.org/";
+SRC_URI="https://github.com/gnustep/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="libdispatch test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+       dev-cpp/robin-map
+       libdispatch? (
+               >=dev-libs/libdispatch-6.1.1
+       )
+       !libdispatch? ( !dev-libs/libdispatch )
+"
+BDEPEND="${RDEPEND}
+       llvm-core/clang"
+
+PATCHES=( "${FILESDIR}/${P}-incompatible-pointers.patch" )
+
+src_configure() {
+       if tc-is-gcc; then
+               einfo "Forcing clang"
+               export CC="${CHOST}-clang"
+               export CXX="${CHOST}-clang++"
+
+               # Strip unsupported flags for clang. bug #871933
+               strip-unsupported-flags
+       fi
+
+       local mycmakeargs=(
+               -DEMBEDDED_BLOCKS_RUNTIME=$(usex !libdispatch)
+               -DGNUSTEP_CONFIG=GNUSTEP_CONFIG-NOTFOUND
+               -DTESTS="$(usex test)"
+       )
+       cmake_src_configure
+}

Reply via email to