summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernard Cafarelli <voyageur@gentoo.org>2020-09-03 11:32:49 +0200
committerBernard Cafarelli <voyageur@gentoo.org>2020-09-03 11:33:03 +0200
commit857dd9c2e19f23e46a0b3e9121eb417caa858693 (patch)
tree31693edb8aad1ee3aaf1cdd3a68ad4473c22dcaf /gnustep-base/libobjc2
parentgnustep-base/libobjc2: drop old (diff)
downloadgentoo-857dd9c2e19f23e46a0b3e9121eb417caa858693.tar.gz
gentoo-857dd9c2e19f23e46a0b3e9121eb417caa858693.tar.bz2
gentoo-857dd9c2e19f23e46a0b3e9121eb417caa858693.zip
gnustep-base/libobjc2: 2.1 bump
Fixes quite a few bugs Migrated to cmake eclass No longer depends on libcxx Package-Manager: Portage-3.0.5, Repoman-3.0.1 Signed-off-by: Bernard Cafarelli <voyageur@gentoo.org>
Diffstat (limited to 'gnustep-base/libobjc2')
-rw-r--r--gnustep-base/libobjc2/Manifest2
-rw-r--r--gnustep-base/libobjc2/files/libobjc2-2.1-eh_trampoline.patch27
-rw-r--r--gnustep-base/libobjc2/files/libobjc2-2.1-pthread_link.patch12
-rw-r--r--gnustep-base/libobjc2/libobjc2-2.1.ebuild42
4 files changed, 83 insertions, 0 deletions
diff --git a/gnustep-base/libobjc2/Manifest b/gnustep-base/libobjc2/Manifest
index a9afd544951b..cfca9d8effe6 100644
--- a/gnustep-base/libobjc2/Manifest
+++ b/gnustep-base/libobjc2/Manifest
@@ -1 +1,3 @@
+DIST 757de82.tar.gz 63372 BLAKE2B 74078c6c16d7ac1891ce63b21ae2f06c8759f3a95db74a6acef2d51d605a7631ac37b8c8698752699e5c30d2e95876b1967e6c2c429403f1094b6b99dd4d272c SHA512 732e7f5b4ec0dc18c0c7b2b567e4fd65727918db76863aabb4433db22630e1e3c5ba3063de6dcf32f099c0d8cfd70b0d811d59f73a2cda362f6bd7054d14f999
DIST libobjc2-2.0.tar.gz 191800 BLAKE2B 71f54b1410e20bb638dce4cae8c2cc48ea07acf31a97f1994587a9f6401b725ac393abaef355e9476ef6a0622d80fb6fbe4b3c7f39294e7bedbba17cd4108278 SHA512 2b72506204b8fea6a76688ee96611613c4b7cf98942acc89905c531f4dc997ae0482ff10fa819c2471df6c06d5ebcd251167d8903a4f18d47507cd42baec3748
+DIST libobjc2-2.1.tar.gz 200290 BLAKE2B 67cd78238afad9afa4311669403be06ec8d001978e997128acc67cdba9c2b18482f66af4597c4a484556ce38bbfc4416b1b1cb8cde1d8f27f3b4d744d4581309 SHA512 a93c385f9ad53fce0f736088c3a18e72119c0128690725e435a35fe4250830d13e18899f98c7d80e6ea41cbfe1404f055d9d6c3d891ad7c770d47dcd0244fc7f
diff --git a/gnustep-base/libobjc2/files/libobjc2-2.1-eh_trampoline.patch b/gnustep-base/libobjc2/files/libobjc2-2.1-eh_trampoline.patch
new file mode 100644
index 000000000000..c956d15fbd59
--- /dev/null
+++ b/gnustep-base/libobjc2/files/libobjc2-2.1-eh_trampoline.patch
@@ -0,0 +1,27 @@
+From 4e07fb8457266b76311b2bf3dc5dbe8db790c0b5 Mon Sep 17 00:00:00 2001
+From: David Chisnall <github@theravensnest.org>
+Date: Wed, 26 Aug 2020 16:37:06 +0100
+Subject: [PATCH] Don't use CXXFLAGS when compiling eh_trampoline.cc
+
+The way that we were doing this didn't handle multiple flags and we
+actually don't want the user to override these flags because that file
+needs to be compiled in a very specific way.
+
+Fixes #177
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index e2746e9..80b7dfe 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -317,7 +317,7 @@ if (ENABLE_OBJCXX)
+ endif()
+ endif ()
+ add_custom_command(OUTPUT eh_trampoline.s
+- COMMAND ${CMAKE_CXX_COMPILER} ${CMAKE_CXX_FLAGS} -fPIC -S "${CMAKE_SOURCE_DIR}/eh_trampoline.cc" -o - -fexceptions -fno-inline | sed "s/__gxx_personality_v0/test_eh_personality/g" > "${CMAKE_BINARY_DIR}/eh_trampoline.s"
++ COMMAND ${CMAKE_CXX_COMPILER} -fPIC -S "${CMAKE_SOURCE_DIR}/eh_trampoline.cc" -o - -fexceptions -fno-inline | sed "s/__gxx_personality_v0/test_eh_personality/g" > "${CMAKE_BINARY_DIR}/eh_trampoline.s"
+ MAIN_DEPENDENCY eh_trampoline.cc)
+ list(APPEND libobjc_ASM_SRCS eh_trampoline.s)
+ list(APPEND libobjc_CXX_SRCS objcxx_eh.cc)
diff --git a/gnustep-base/libobjc2/files/libobjc2-2.1-pthread_link.patch b/gnustep-base/libobjc2/files/libobjc2-2.1-pthread_link.patch
new file mode 100644
index 000000000000..4d6f1d517db1
--- /dev/null
+++ b/gnustep-base/libobjc2/files/libobjc2-2.1-pthread_link.patch
@@ -0,0 +1,12 @@
+diff -Naur libobjc2-2.1.orig/CMakeLists.txt libobjc2-2.1/CMakeLists.txt
+--- libobjc2-2.1.orig/CMakeLists.txt 2020-08-23 17:10:20.000000000 +0200
++++ libobjc2-2.1/CMakeLists.txt 2020-09-03 10:51:38.716078009 +0200
+@@ -344,7 +344,7 @@
+ # threading implementation (we do for everything except thread-local storage)
+ set(CMAKE_THREAD_PREFER_PTHREAD)
+ include(FindThreads)
+-set(objc_LINK_FLAGS "${objc_LINK_FLAGS} ${CMAKE_THREAD_LIBS_INIT}")
++target_link_libraries(objc Threads::Threads)
+
+
+
diff --git a/gnustep-base/libobjc2/libobjc2-2.1.ebuild b/gnustep-base/libobjc2/libobjc2-2.1.ebuild
new file mode 100644
index 000000000000..98b36a4a4fa1
--- /dev/null
+++ b/gnustep-base/libobjc2/libobjc2-2.1.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit cmake
+
+DESCRIPTION="GNUstep Objective-C runtime"
+HOMEPAGE="http://www.gnustep.org"
+SRC_URI="https://github.com/gnustep/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ https://github.com/Tessil/robin-map/archive/757de82.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="boehm-gc test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="boehm-gc? ( dev-libs/boehm-gc )"
+BDEPEND="${RDEPEND}
+ sys-devel/clang"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-eh_trampoline.patch
+ "${FILESDIR}"/${P}-pthread_link.patch
+)
+
+src_prepare() {
+ cmake_src_prepare
+ cp -a "${WORKDIR}"/robin-map-757de829927489bee55ab02147484850c687b620/* \
+ "${S}"/third_party/robin-map || die
+}
+
+src_configure() {
+ export CC="clang"
+ export CXX="clang++"
+ local mycmakeargs=(
+ -DGNUSTEP_CONFIG=GNUSTEP_CONFIG-NOTFOUND
+ -DBOEHM_GC="$(usex boehm-gc)"
+ -DTESTS="$(usex test)"
+ )
+ cmake_src_configure
+}