summaryrefslogtreecommitdiff
path: root/gnustep-base
diff options
context:
space:
mode:
Diffstat (limited to 'gnustep-base')
-rw-r--r--gnustep-base/gnustep-base/Manifest1
-rw-r--r--gnustep-base/gnustep-base/files/gnustep-base-1.31.0-c23.patch47
-rw-r--r--gnustep-base/gnustep-base/gnustep-base-1.31.1.ebuild117
-rw-r--r--gnustep-base/gnustep-base/metadata.xml3
-rw-r--r--gnustep-base/gnustep-make/Manifest1
-rw-r--r--gnustep-base/gnustep-make/gnustep-make-2.9.3.ebuild147
-rw-r--r--gnustep-base/libobjc2/files/libobjc-2.2.1-remove-flags-from-eh_trampoline.patch28
-rw-r--r--gnustep-base/libobjc2/libobjc2-2.2.1-r1.ebuild40
8 files changed, 384 insertions, 0 deletions
diff --git a/gnustep-base/gnustep-base/Manifest b/gnustep-base/gnustep-base/Manifest
index 5f551eea26b3..510c28fd986f 100644
--- a/gnustep-base/gnustep-base/Manifest
+++ b/gnustep-base/gnustep-base/Manifest
@@ -1,3 +1,4 @@
DIST gnustep-base-1.28.0.tar.gz 4246622 BLAKE2B fdaa834ea3cb13b1d4717c2c7e6b59eff05d16e6a404ffed5f4ccfa2ee3db93ecfee5b95cc30be6a388f56fa28c67f1278ea298f222260dcc24abadaa1cb5e8f SHA512 e173fab28aa1b1df38de4216916db18934422a1d372b9fe6a68a6ff21b2ac0be38aa02631179a8ad62a4f2848080223f34771b364b1c0eebc96c84778677c50b
DIST gnustep-base-1.29.0.tar.gz 3697809 BLAKE2B 9810e6220df79e75130e8e3cdda5d8c42e1e05351461920549e3163752eccc9fa4bb375c36a8b987877cf557140e961dda7e0fac1c1c9affdb38893567695ddf SHA512 19e876f32e4dce403beeb5522ae942c23cc2b947217a38fd045a495d81b3734a8cf160fb768d8cff64c45d8ae63ba422658f705519786016d3e8216efe0a044c
DIST gnustep-base-1.30.0.tar.gz 3730872 BLAKE2B e4ceb975f65efee16b50bd82af1fcec9e91c92c296f5c1a990254ce58845f8e1b5a58b725214e90aade704ff631e6e2ec87adf7a8dc85c7e783fd53297d9e862 SHA512 c13d77a502f053dce425aa80995c97c397afe07b2b6a794f3d129ff2810d018288af18f656d30fa071e34a1d2f74b80896f67538a4142b56058f3d39ee2719af
+DIST gnustep-base-1.31.1.tar.gz 3831129 BLAKE2B 7bbab70fd5e78f75c0342d8d5a3e2175958a850b5ecc04fa6449e8a71aa998659755793d192c795865810d3b38ec10cfb284e7263a5ce301979930a25aa8a6ac SHA512 6de3a935766d6b3075e60da71525511de940521dd50d604af1eb67681bd6aa4693b889e6655f39c96b53178a86623a4c4510be004487a28fddd175dec928c933
diff --git a/gnustep-base/gnustep-base/files/gnustep-base-1.31.0-c23.patch b/gnustep-base/gnustep-base/files/gnustep-base-1.31.0-c23.patch
new file mode 100644
index 000000000000..89cd7643d327
--- /dev/null
+++ b/gnustep-base/gnustep-base/files/gnustep-base-1.31.0-c23.patch
@@ -0,0 +1,47 @@
+From 70d5ac40655659e38f0beb14cff083014bb4a747 Mon Sep 17 00:00:00 2001
+From: Alfred Wingate <parona@protonmail.com>
+Date: Thu, 27 Feb 2025 16:44:23 +0200
+Subject: [PATCH] Use signal_handler prototype that signal() expects
+
+C23 is stricter about function prototypes and as such this causes the
+build to fail on GCC-15 by default.
+
+Signed-off-by: Alfred Wingate <parona@protonmail.com>
+---
+ Tools/gdomap.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/Tools/gdomap.c b/Tools/gdomap.c
+index c04fb522c..9db5f6b47 100644
+--- a/Tools/gdomap.c
++++ b/Tools/gdomap.c
+@@ -192,7 +192,7 @@ static char *local_hostname = 0;
+ */
+ static void dump_stats();
+ #ifndef __MINGW__
+-static void dump_tables();
++static void dump_tables(int sig);
+ #endif
+ static void handle_accept();
+ static void handle_io();
+@@ -1135,7 +1135,7 @@ dump_stats()
+
+ #ifndef __MINGW__
+ static void
+-dump_tables()
++dump_tables(int sig)
+ {
+ FILE *fptr;
+
+@@ -3704,7 +3704,7 @@ tryWrite(int desc, int tim, unsigned char* dat, int len)
+ #if defined(__MINGW__) /* FIXME: Is this correct? */
+ rval = send(desc, (const char*)&dat[pos], len - pos, 0);
+ #else
+- void (*ifun)();
++ void (*ifun)(int);
+
+ /*
+ * Should be able to write this short a message immediately, but
+--
+2.48.1
+
diff --git a/gnustep-base/gnustep-base/gnustep-base-1.31.1.ebuild b/gnustep-base/gnustep-base/gnustep-base-1.31.1.ebuild
new file mode 100644
index 000000000000..fa1ab7ff942f
--- /dev/null
+++ b/gnustep-base/gnustep-base/gnustep-base-1.31.1.ebuild
@@ -0,0 +1,117 @@
+# Copyright 1999-2025 Gentoo Authors
+# 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"
+HOMEPAGE="https://gnustep.github.io"
+SRC_URI="https://github.com/gnustep/libs-base/releases/download/base-${PV//./_}/${P}.tar.gz"
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0/$(ver_cut 1-2)"
+KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="+gnutls +iconv +icu libdispatch +libffi zeroconf"
+
+# gnustep-make: tests use the option --timeout which was added in 2.9.3
+RDEPEND="${GNUSTEP_CORE_DEPEND}
+ >=gnustep-base/gnustep-make-2.9.3
+ gnutls? ( net-libs/gnutls:= )
+ iconv? ( virtual/libiconv )
+ icu? ( >=dev-libs/icu-49.0:= )
+ libdispatch? ( dev-libs/libdispatch )
+ 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}"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.26.0-no_compress_man.patch
+ "${FILESDIR}"/${PN}-1.31.0-c23.patch
+)
+
+src_prepare() {
+ default
+
+ # Slow and appears to break due to the network sandbox
+ sed -e '/START_SET("-sendSynchronousRequest:returningResponse:error:")/a SKIP("Gentoo")' \
+ -i Tests/base/NSURL/test00.m || die
+ sed -e '/START_SET("Capture")/a SKIP("Gentoo")' \
+ -e '/START_SET("Secure")/a SKIP("Gentoo")' \
+ -i Tests/base/NSURL/test02.m || die
+ sed -e '/START_SET("Keepalive")/a SKIP("Gentoo")' \
+ -i Tests/base/NSURLHandle/test01.m || die
+ rm -r Tests/base/NSURLConnection || die
+ rm -r Tests/base/NSConnection || die
+ sed -e '/PASS(byteCount>0, "read www.google.com");/d' \
+ -e '/PASS(byteCount>0, "read www.google.com https");/d' \
+ -i Tests/base/NSStream/socket.m || die
+ sed -e '/PASS(\[self status\] == URLHandleClientDidBeginLoading,/,/"URLHandleClientDidBeginLoading called");/d' \
+ -e '/PASS(\[self status\] == URLHandleClientDidFinishLoading,/,/"URLHandleClientDidFinishLoading called");/d' \
+ -i Tests/base/NSURLHandle/test00.m || die
+
+ # FIXME: It should use TEMP or TMP but it still fails
+ sed -e '/PASS(\[o length\] > 0, "we can get a temporary directory");/d' \
+ -i Tests/base/Functions/NSPathUtilities.m || die
+
+ # FIXME
+ rm Tests/base/NSFileHandle/general.m || die
+
+ # FIXME
+ sed -e '/PASS_EQUAL(\[\@"foo" stringByResolvingSymlinksInPath\], tmpdst,/,/"foo->bar relative symlink expanded by stringByResolvingSymlinksInPath")/d' \
+ -i Tests/base/NSString/test02.m || die
+
+ # FIXME
+ sed -e '/PASS(cred != nil, "generates self signed certificate");/d' \
+ -i Tests/base/GSTLS/basic.m || die
+}
+
+src_configure() {
+ egnustep_env
+
+ local myconf=(
+ $(use_enable libffi)
+ $(use_enable !libffi ffcall)
+ )
+ use libffi &&
+ myconf+=( --with-ffi-include=$($(tc-getPKG_CONFIG) --variable=includedir libffi) )
+
+ myconf+=(
+ $(use_enable gnutls tls)
+ $(use_enable iconv)
+ $(use_enable icu)
+ $(use_enable libdispatch)
+ $(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[@]}"
+}
+
+src_install() {
+ # We need to set LD_LIBRARY_PATH because the doc generation program
+ # 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.
+
+ egnustep_env
+ egnustep_install
+
+ if use doc ; then
+ export LD_LIBRARY_PATH="${S}/Source/obj:${LD_LIBRARY_PATH}"
+ egnustep_doc
+ fi
+ egnustep_install_config
+}
diff --git a/gnustep-base/gnustep-base/metadata.xml b/gnustep-base/gnustep-base/metadata.xml
index 5c7f3282e18e..78c3ec611b82 100644
--- a/gnustep-base/gnustep-base/metadata.xml
+++ b/gnustep-base/gnustep-base/metadata.xml
@@ -6,5 +6,8 @@
<name>Gentoo GNUstep Project</name>
</maintainer>
+ <use>
+ <flag name="libdispatch">Dispatch blocks via <pkg>dev-libs/libdispatch</pkg></flag>
+ </use>
<origin>gentoo-staging</origin>
</pkgmetadata> \ No newline at end of file
diff --git a/gnustep-base/gnustep-make/Manifest b/gnustep-base/gnustep-make/Manifest
index 632e6e123992..762f135b526f 100644
--- a/gnustep-base/gnustep-make/Manifest
+++ b/gnustep-base/gnustep-make/Manifest
@@ -1,3 +1,4 @@
DIST gnustep-make-2.9.0.tar.gz 611406 BLAKE2B 73bae19b5d3d3c1e069d22ce7087308166f632277d870fa5ab125d5bc004a1518a1edb6822c61e00b98fc13a1b3354440024bd13d98662002c15298745c4e935 SHA512 ff185affe32d4efc2009d72a3862bc3bffebce05ea5a7fdfbf4372774e57b6654863e317ce648c248716dd3e97a4320d697a313e7eefd04f5723186be6cbf1e3
DIST gnustep-make-2.9.1.tar.gz 621081 BLAKE2B 1523cdb2b38ebd32c9a6b52edd07302e425aaf5f9820d152c4a4c18b7a34dbcfd1615208f8a8588ea32db354c5955a7e76af50948c88e685bce48077fdc6d646 SHA512 ab36cea1e79ba1248ee7510f2a4d5f5fe5aa0ee7044d51a3b4f65ebaeed08134b3b3ea8a9e34cdb4fa90ac43143d96cf868ae766d2fdc4341419575eb1637f28
DIST gnustep-make-2.9.2.tar.gz 611483 BLAKE2B 6fe7a133832b8ceabca9b0a5aaf45323ebbc9139b843b0c307f44f56e794a98c3293ac31513f4c9236ddae27aec5e6935126f9804f52e37b24a3e1ce1e118d32 SHA512 f807a9cdf29f0fc7bbe92e1c9895f8675cc564fb0e6eecba2431ccde315a8a78491e6ef84d86a279c8af02843b2e2a4f436624824733a53de02e2656b092394a
+DIST gnustep-make-2.9.3.tar.gz 613252 BLAKE2B e3bf6f2e029cce2a15ad07871952dfd5246104c78a780040d623e1a31be117606f8c428edac39684e45386fc3053f34f83d6dfe2d99b9308ca7d6606710f7c7b SHA512 5fd1991f4e6707e698fb37b152dd3bec377391de4757919a4f194542f2a032a1ad484b63eb693115fab6753b5e726813c272540b78359163c332637194701ab2
diff --git a/gnustep-base/gnustep-make/gnustep-make-2.9.3.ebuild b/gnustep-base/gnustep-make/gnustep-make-2.9.3.ebuild
new file mode 100644
index 000000000000..72cf878d6810
--- /dev/null
+++ b/gnustep-base/gnustep-make/gnustep-make-2.9.3.ebuild
@@ -0,0 +1,147 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+inherit flag-o-matic gnustep-base prefix toolchain-funcs
+
+DESCRIPTION="GNUstep Makefile Package"
+HOMEPAGE="https://gnustep.github.io"
+SRC_URI="ftp://ftp.gnustep.org/pub/gnustep/core/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="custom-cflags libobjc2 native-exceptions"
+
+DEPEND="${GNUSTEP_CORE_DEPEND}
+ >=dev-build/make-3.75
+ libobjc2? ( gnustep-base/libobjc2
+ llvm-core/clang:* )
+ !libobjc2? ( !!gnustep-base/libobjc2
+ || (
+ sys-devel/gcc:*[objc]
+ llvm-core/clang:*
+ ) )"
+RDEPEND="${DEPEND}"
+
+PATCHES=( "${FILESDIR}"/${PN}-2.9.0-no_compress_man_pages.patch )
+
+pkg_setup() {
+ # Determine libobjc.so to use
+ if use libobjc2; then
+ libobjc_version=libobjc.so
+ else
+ # Find version in active gcc
+ for ver in {2..5};
+ do
+ if $(tc-getCC) -Werror -Wl,-l:libobjc.so.${ver} -x objective-c \
+ - <<<$'int main() {}' -o /dev/null 2> /dev/null;
+ then
+ libobjc_version=libobjc.so.${ver}
+ fi
+ done
+ fi
+
+ # Stop if we could not get libobjc.so
+ if [[ -z ${libobjc_version} ]]; then
+ eerror "${P} requires a working Objective-C runtime and a compiler with"
+ eerror "Objective-C support. Your current settings lack these requirements"
+ if ! use libobjc2;
+ then
+ eerror "Please switch your active compiler to gcc with USE=objc, or clang"
+ fi
+ die "Could not find Objective-C runtime"
+ fi
+
+ # For existing installations, determine if we will use another libobjc.so
+ if has_version gnustep-base/gnustep-make; then
+ local current_libobjc="$(awk -F: '/^OBJC_LIB_FLAG/ {print $2}' "${EPREFIX}"/usr/share/GNUstep/Makefiles/config.make)"
+ # Old installations did not set this explicitely
+ : ${current_libobjc:=libobjc.so.2}
+
+ if [[ ${current_libobjc} != ${libobjc_version} ]]; then
+ ewarn "Warning: changed libobjc.so version!!"
+ ewarn "The libobjc.so version used for gnustep-make has changed"
+ ewarn "(either by the libojbc2 use-flag or a GCC upgrade)"
+ ewarn "You must rebuild all gnustep packages installed."
+ ewarn ""
+ ewarn "To do so, please emerge gnustep-base/gnustep-updater and run:"
+ ewarn "# gnustep-updater -l"
+ fi
+ fi
+}
+
+src_prepare() {
+ # Multilib-strict
+ sed -e "s#/@libdir@#/$(get_libdir)#" -i FilesystemLayouts/fhs-system || die "sed failed"
+ cp "${FILESDIR}"/gnustep-5.{csh,sh} "${T}"/
+ eprefixify "${T}"/gnustep-5.{csh,sh}
+
+ default
+}
+
+src_configure() {
+ if use libobjc2 && tc-is-gcc; then
+ einfo "Forcing clang"
+ export CC="${CHOST}-clang"
+ export CXX="${CHOST}-clang++"
+
+ # Strip unsupported flags for clang
+ # bug #949599
+ strip-unsupported-flags
+ fi
+
+ # gnustep-make has sticky flags that affect other gnustep packages
+ # https://bugs.gentoo.org/950346
+ if ! use custom-cflags; then
+ strip-flags
+ filter-lto
+ fi
+
+ econf \
+ INSTALL="${EPREFIX}"/usr/bin/install \
+ --with-layout=fhs-system \
+ --with-config-file="${EPREFIX}"/etc/GNUstep/GNUstep.conf \
+ --with-objc-lib-flag=-l:${libobjc_version} \
+ $(use_enable native-exceptions native-objc-exceptions)
+}
+
+src_compile() {
+ emake
+ if use doc ; then
+ emake -C Documentation
+ fi
+}
+
+src_install() {
+ # Get GNUSTEP_* variables
+ . ./GNUstep.conf
+
+ local make_eval
+ use debug || make_eval="${make_eval} debug=no"
+ make_eval="${make_eval} verbose=yes"
+
+ emake ${make_eval} DESTDIR="${D}" install
+
+ # Copy the documentation
+ if use doc ; then
+ emake -C Documentation ${make_eval} DESTDIR="${D}" GNUSTEP_INSTALLATION_DOMAIN=SYSTEM install
+ fi
+
+ dodoc FAQ README RELEASENOTES
+
+ exeinto /etc/profile.d
+ doexe "${T}"/gnustep-?.sh
+ doexe "${T}"/gnustep-?.csh
+}
+
+pkg_postinst() {
+ # Warn about new layout if old GNUstep directory is still here
+ if [ -e /usr/GNUstep/System ]; then
+ ewarn "Old layout directory detected (/usr/GNUstep/System)"
+ ewarn "Gentoo has switched to FHS layout for GNUstep packages"
+ ewarn "You must first update the configuration files from this package,"
+ ewarn "then remerge all packages still installed with the old layout"
+ ewarn "You can use gnustep-base/gnustep-updater for this task"
+ fi
+}
diff --git a/gnustep-base/libobjc2/files/libobjc-2.2.1-remove-flags-from-eh_trampoline.patch b/gnustep-base/libobjc2/files/libobjc-2.2.1-remove-flags-from-eh_trampoline.patch
new file mode 100644
index 000000000000..4f5e786c29c3
--- /dev/null
+++ b/gnustep-base/libobjc2/files/libobjc-2.2.1-remove-flags-from-eh_trampoline.patch
@@ -0,0 +1,28 @@
+https://bugs.gentoo.org/926875
+https://bugs.gentoo.org/940647
+https://github.com/gnustep/libobjc2/pull/288
+https://github.com/gnustep/libobjc2/commit/4a0c2f1afee5a6c618d51fb33efb9ccb95b808b8
+https://github.com/gnustep/libobjc2/issues/177
+
+From 4a0c2f1afee5a6c618d51fb33efb9ccb95b808b8 Mon Sep 17 00:00:00 2001
+From: Frederik Carlier <frederik.carlier@keysight.com>
+Date: Tue, 2 Apr 2024 14:53:43 +0200
+Subject: [PATCH] Don't use CXXFLAGS when compiling eh_trampoline.cc
+
+We don't want the user to override these flags because that file
+needs to be compiled in a very specific way.
+
+Re-applies #178 (365e53632e8be41e49f21ee47a63e41be424a237)
+Related to #183
+Fixes #177
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -230,7 +230,7 @@ elseif (MINGW)
+ message(STATUS "Using MinGW-compatible exception model")
+ list(APPEND libobjc_CXX_SRCS objcxx_eh.cc objcxx_eh_mingw.cc)
+ else ()
+- separate_arguments(EH_PERSONALITY_FLAGS NATIVE_COMMAND ${CMAKE_CXX_FLAGS})
++ set(EH_PERSONALITY_FLAGS "")
+ if (CMAKE_CXX_COMPILER_TARGET)
+ list(APPEND EH_PERSONALITY_FLAGS "${CMAKE_CXX_COMPILE_OPTIONS_TARGET}${CMAKE_CXX_COMPILER_TARGET}")
+ endif ()
diff --git a/gnustep-base/libobjc2/libobjc2-2.2.1-r1.ebuild b/gnustep-base/libobjc2/libobjc2-2.2.1-r1.ebuild
new file mode 100644
index 000000000000..e8052aa857a7
--- /dev/null
+++ b/gnustep-base/libobjc2/libobjc2-2.2.1-r1.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2025 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://gnustep.github.io"
+SRC_URI="https://github.com/gnustep/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="dev-cpp/robin-map"
+BDEPEND="${RDEPEND}
+ llvm-core/clang"
+
+PATCHES=(
+ "${FILESDIR}"/libobjc-2.2.1-remove-flags-from-eh_trampoline.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=(
+ -DGNUSTEP_CONFIG=GNUSTEP_CONFIG-NOTFOUND
+ -DTESTS="$(usex test)"
+ )
+ cmake_src_configure
+}