Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-cpp/catch/files/, dev-cpp/catch/
Date: Wed, 29 Dec 2021 00:15:56
Message-Id: 1640736831.7571d22a49cdce0626968667e68638ff2111471e.sam@gentoo
1 commit: 7571d22a49cdce0626968667e68638ff2111471e
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Tue Dec 28 23:49:38 2021 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Wed Dec 29 00:13:51 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7571d22a
7
8 dev-cpp/catch: patch for glibc-2.34
9
10 Kind of cheesy patch but it is what it is, Catch1 is dead anyway.
11
12 Closes: https://bugs.gentoo.org/803962
13 Signed-off-by: Sam James <sam <AT> gentoo.org>
14
15 dev-cpp/catch/catch-1.12.2-r1.ebuild | 44 ++++++++++++++
16 .../files/catch-1.12.2-glibc-2.34-sigstksz.patch | 67 ++++++++++++++++++++++
17 2 files changed, 111 insertions(+)
18
19 diff --git a/dev-cpp/catch/catch-1.12.2-r1.ebuild b/dev-cpp/catch/catch-1.12.2-r1.ebuild
20 new file mode 100644
21 index 000000000000..9120c50ed593
22 --- /dev/null
23 +++ b/dev-cpp/catch/catch-1.12.2-r1.ebuild
24 @@ -0,0 +1,44 @@
25 +# Copyright 1999-2021 Gentoo Authors
26 +# Distributed under the terms of the GNU General Public License v2
27 +
28 +EAPI=7
29 +
30 +inherit cmake
31 +
32 +if [[ ${PV} == *9999 ]]; then
33 + inherit git-r3
34 + EGIT_REPO_URI="https://github.com/catchorg/Catch2.git"
35 + EGIT_BRANCH="Catch1.x"
36 +else
37 + MY_P=${PN^}-${PV}
38 + SRC_URI="https://github.com/catchorg/Catch2/archive/v${PV}.tar.gz -> ${MY_P}.tar.gz"
39 + KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
40 +
41 + S="${WORKDIR}/${PN^}2-${PV}"
42 +fi
43 +
44 +DESCRIPTION="Modern C++ header-only framework for unit-tests"
45 +HOMEPAGE="https://github.com/catchorg/Catch2"
46 +
47 +LICENSE="Boost-1.0"
48 +SLOT="1"
49 +IUSE="test"
50 +RESTRICT="!test? ( test )"
51 +
52 +RDEPEND="!<dev-cpp/catch-1.12.2:0"
53 +
54 +PATCHES=(
55 + "${FILESDIR}"/${PN}-1.12.2-glibc-2.34-sigstksz.patch
56 +)
57 +
58 +src_configure() {
59 + local mycmakeargs=(
60 + -DNO_SELFTEST=$(usex !test)
61 + )
62 + cmake_src_configure
63 +}
64 +
65 +src_install() {
66 + cmake_src_install
67 + dodoc -r docs/.
68 +}
69
70 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
71 new file mode 100644
72 index 000000000000..3c6e08384a5b
73 --- /dev/null
74 +++ b/dev-cpp/catch/files/catch-1.12.2-glibc-2.34-sigstksz.patch
75 @@ -0,0 +1,67 @@
76 +https://src.fedoraproject.org/rpms/catch1/raw/rawhide/f/catch1-sigstksz.patch
77 +https://bugs.gentoo.org/803962
78 +
79 +commit 34650cd9ea2f7e4aa1e61b84ecf9913b87870680
80 +Author: Tom Hughes <tom@×××××××.nu>
81 +Date: Fri Feb 19 10:45:49 2021 +0000
82 +
83 + Patch for non-constant SIGSTKSZ
84 +
85 +--- a/include/internal/catch_fatal_condition.hpp
86 ++++ b/include/internal/catch_fatal_condition.hpp
87 +@@ -136,7 +136,7 @@ namespace Catch {
88 + static bool isSet;
89 + static struct sigaction oldSigActions [sizeof(signalDefs)/sizeof(SignalDefs)];
90 + static stack_t oldSigStack;
91 +- static char altStackMem[SIGSTKSZ];
92 ++ static char altStackMem[32768];
93 +
94 + static void handleSignal( int sig ) {
95 + std::string name = "<unknown signal>";
96 +@@ -156,7 +156,7 @@ namespace Catch {
97 + isSet = true;
98 + stack_t sigStack;
99 + sigStack.ss_sp = altStackMem;
100 +- sigStack.ss_size = SIGSTKSZ;
101 ++ sigStack.ss_size = 32768;
102 + sigStack.ss_flags = 0;
103 + sigaltstack(&sigStack, &oldSigStack);
104 + struct sigaction sa = { 0 };
105 +@@ -188,7 +188,7 @@ namespace Catch {
106 + bool FatalConditionHandler::isSet = false;
107 + struct sigaction FatalConditionHandler::oldSigActions[sizeof(signalDefs)/sizeof(SignalDefs)] = {};
108 + stack_t FatalConditionHandler::oldSigStack = {};
109 +- char FatalConditionHandler::altStackMem[SIGSTKSZ] = {};
110 ++ char FatalConditionHandler::altStackMem[32768] = {};
111 +
112 +
113 + } // namespace Catch
114 +--- a/single_include/catch.hpp
115 ++++ b/single_include/catch.hpp
116 +@@ -6540,7 +6540,7 @@ namespace Catch {
117 + static bool isSet;
118 + static struct sigaction oldSigActions [sizeof(signalDefs)/sizeof(SignalDefs)];
119 + static stack_t oldSigStack;
120 +- static char altStackMem[SIGSTKSZ];
121 ++ static char altStackMem[32768];
122 +
123 + static void handleSignal( int sig ) {
124 + std::string name = "<unknown signal>";
125 +@@ -6560,7 +6560,7 @@ namespace Catch {
126 + isSet = true;
127 + stack_t sigStack;
128 + sigStack.ss_sp = altStackMem;
129 +- sigStack.ss_size = SIGSTKSZ;
130 ++ sigStack.ss_size = 32768;
131 + sigStack.ss_flags = 0;
132 + sigaltstack(&sigStack, &oldSigStack);
133 + struct sigaction sa = { 0 };
134 +@@ -6591,7 +6591,7 @@ namespace Catch {
135 + bool FatalConditionHandler::isSet = false;
136 + struct sigaction FatalConditionHandler::oldSigActions[sizeof(signalDefs)/sizeof(SignalDefs)] = {};
137 + stack_t FatalConditionHandler::oldSigStack = {};
138 +- char FatalConditionHandler::altStackMem[SIGSTKSZ] = {};
139 ++ char FatalConditionHandler::altStackMem[32768] = {};
140 +
141 + } // namespace Catch
142 +