summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-12-28 23:49:38 +0000
committerSam James <sam@gentoo.org>2021-12-29 00:13:51 +0000
commit7571d22a49cdce0626968667e68638ff2111471e (patch)
treea11161e68869accbd59250577df6a2e83eec52b7 /dev-cpp
parentapp-emulation/protontricks: call xdg_desktop_database_update (diff)
downloadgentoo-7571d22a49cdce0626968667e68638ff2111471e.tar.gz
gentoo-7571d22a49cdce0626968667e68638ff2111471e.tar.bz2
gentoo-7571d22a49cdce0626968667e68638ff2111471e.zip
dev-cpp/catch: patch for glibc-2.34
Kind of cheesy patch but it is what it is, Catch1 is dead anyway. Closes: https://bugs.gentoo.org/803962 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-cpp')
-rw-r--r--dev-cpp/catch/catch-1.12.2-r1.ebuild44
-rw-r--r--dev-cpp/catch/files/catch-1.12.2-glibc-2.34-sigstksz.patch67
2 files changed, 111 insertions, 0 deletions
diff --git a/dev-cpp/catch/catch-1.12.2-r1.ebuild b/dev-cpp/catch/catch-1.12.2-r1.ebuild
new file mode 100644
index 000000000000..9120c50ed593
--- /dev/null
+++ b/dev-cpp/catch/catch-1.12.2-r1.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake
+
+if [[ ${PV} == *9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/catchorg/Catch2.git"
+ EGIT_BRANCH="Catch1.x"
+else
+ MY_P=${PN^}-${PV}
+ SRC_URI="https://github.com/catchorg/Catch2/archive/v${PV}.tar.gz -> ${MY_P}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
+
+ S="${WORKDIR}/${PN^}2-${PV}"
+fi
+
+DESCRIPTION="Modern C++ header-only framework for unit-tests"
+HOMEPAGE="https://github.com/catchorg/Catch2"
+
+LICENSE="Boost-1.0"
+SLOT="1"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="!<dev-cpp/catch-1.12.2:0"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.12.2-glibc-2.34-sigstksz.patch
+)
+
+src_configure() {
+ local mycmakeargs=(
+ -DNO_SELFTEST=$(usex !test)
+ )
+ cmake_src_configure
+}
+
+src_install() {
+ cmake_src_install
+ dodoc -r docs/.
+}
diff --git a/dev-cpp/catch/files/catch-1.12.2-glibc-2.34-sigstksz.patch b/dev-cpp/catch/files/catch-1.12.2-glibc-2.34-sigstksz.patch
new file mode 100644
index 000000000000..3c6e08384a5b
--- /dev/null
+++ b/dev-cpp/catch/files/catch-1.12.2-glibc-2.34-sigstksz.patch
@@ -0,0 +1,67 @@
+https://src.fedoraproject.org/rpms/catch1/raw/rawhide/f/catch1-sigstksz.patch
+https://bugs.gentoo.org/803962
+
+commit 34650cd9ea2f7e4aa1e61b84ecf9913b87870680
+Author: Tom Hughes <tom@compton.nu>
+Date: Fri Feb 19 10:45:49 2021 +0000
+
+ Patch for non-constant SIGSTKSZ
+
+--- a/include/internal/catch_fatal_condition.hpp
++++ b/include/internal/catch_fatal_condition.hpp
+@@ -136,7 +136,7 @@ namespace Catch {
+ static bool isSet;
+ static struct sigaction oldSigActions [sizeof(signalDefs)/sizeof(SignalDefs)];
+ static stack_t oldSigStack;
+- static char altStackMem[SIGSTKSZ];
++ static char altStackMem[32768];
+
+ static void handleSignal( int sig ) {
+ std::string name = "<unknown signal>";
+@@ -156,7 +156,7 @@ namespace Catch {
+ isSet = true;
+ stack_t sigStack;
+ sigStack.ss_sp = altStackMem;
+- sigStack.ss_size = SIGSTKSZ;
++ sigStack.ss_size = 32768;
+ sigStack.ss_flags = 0;
+ sigaltstack(&sigStack, &oldSigStack);
+ struct sigaction sa = { 0 };
+@@ -188,7 +188,7 @@ namespace Catch {
+ bool FatalConditionHandler::isSet = false;
+ struct sigaction FatalConditionHandler::oldSigActions[sizeof(signalDefs)/sizeof(SignalDefs)] = {};
+ stack_t FatalConditionHandler::oldSigStack = {};
+- char FatalConditionHandler::altStackMem[SIGSTKSZ] = {};
++ char FatalConditionHandler::altStackMem[32768] = {};
+
+
+ } // namespace Catch
+--- a/single_include/catch.hpp
++++ b/single_include/catch.hpp
+@@ -6540,7 +6540,7 @@ namespace Catch {
+ static bool isSet;
+ static struct sigaction oldSigActions [sizeof(signalDefs)/sizeof(SignalDefs)];
+ static stack_t oldSigStack;
+- static char altStackMem[SIGSTKSZ];
++ static char altStackMem[32768];
+
+ static void handleSignal( int sig ) {
+ std::string name = "<unknown signal>";
+@@ -6560,7 +6560,7 @@ namespace Catch {
+ isSet = true;
+ stack_t sigStack;
+ sigStack.ss_sp = altStackMem;
+- sigStack.ss_size = SIGSTKSZ;
++ sigStack.ss_size = 32768;
+ sigStack.ss_flags = 0;
+ sigaltstack(&sigStack, &oldSigStack);
+ struct sigaction sa = { 0 };
+@@ -6591,7 +6591,7 @@ namespace Catch {
+ bool FatalConditionHandler::isSet = false;
+ struct sigaction FatalConditionHandler::oldSigActions[sizeof(signalDefs)/sizeof(SignalDefs)] = {};
+ stack_t FatalConditionHandler::oldSigStack = {};
+- char FatalConditionHandler::altStackMem[SIGSTKSZ] = {};
++ char FatalConditionHandler::altStackMem[32768] = {};
+
+ } // namespace Catch
+