diff options
author | CoprDistGit <infra@openeuler.org> | 2024-12-12 16:35:32 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2024-12-12 16:35:32 +0000 |
commit | 2b79f7bae3ea7395a1067f6480b01313136b3e2b (patch) | |
tree | ff566d10e1f468e8d66c3c80a8afd4eea4f2f50e | |
parent | bad0e9e6aca7fb5b3dcef1b8cb6cb923436295ee (diff) |
automatic import of catch1openeuler24.03_LTS
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | catch1-sigstksz.patch | 68 | ||||
-rw-r--r-- | catch1.spec | 63 | ||||
-rw-r--r-- | sources | 1 |
4 files changed, 133 insertions, 0 deletions
@@ -0,0 +1 @@ +/catch1-1.12.2.tar.gz diff --git a/catch1-sigstksz.patch b/catch1-sigstksz.patch new file mode 100644 index 0000000..dbd8941 --- /dev/null +++ b/catch1-sigstksz.patch @@ -0,0 +1,68 @@ +commit 34650cd9ea2f7e4aa1e61b84ecf9913b87870680 +Author: Tom Hughes <tom@compton.nu> +Date: Fri Feb 19 10:45:49 2021 +0000 + + Patch for non-constant SIGSTKSZ + +diff --git a/include/internal/catch_fatal_condition.hpp b/include/internal/catch_fatal_condition.hpp +index 1dcd545d..f7d9e10d 100644 +--- 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 +diff --git a/single_include/catch.hpp b/single_include/catch.hpp +index fdb046fe..d64fd1a5 100644 +--- 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 + diff --git a/catch1.spec b/catch1.spec new file mode 100644 index 0000000..7716caf --- /dev/null +++ b/catch1.spec @@ -0,0 +1,63 @@ +%global debug_package %{nil} + +Name: catch1 +Version: 1.12.2 +Release: 7 +Summary: A modern, C++-native, header-only, framework for unit-tests, TDD and BDD + +License: Boost +URL: https://github.com/philsquared/Catch +Source0: https://github.com/philsquared/Catch/archive/v%{version}/%{name}-%{version}.tar.gz +Patch1: catch1-sigstksz.patch +BuildRequires: cmake make gcc-c++ + +%description +Catch stands for C++ Automated Test Cases in Headers and is a +multi-paradigm automated test framework for C++ and Objective-C (and, +maybe, C). It is implemented entirely in a set of header files, but +is packaged up as a single header for extra convenience. + + +%package devel +Summary: Development files for %{name} +Provides: %{name}-static = %{version}-%{release} +Conflicts: catch-devel + +%description devel +Catch stands for C++ Automated Test Cases in Headers and is a +multi-paradigm automated test framework for C++ and Objective-C (and, +maybe, C). It is implemented entirely in a set of header files, but +is packaged up as a single header for extra convenience. + + +%prep +%autosetup -p 1 -n Catch2-%{version} + + +%build +%cmake +%cmake_build + + +%install +mkdir -p %{buildroot}%{_includedir} +cp -pr include %{buildroot}%{_includedir}/catch + +%check +%ctest + +%files devel +%doc README.md catch-logo-small.png docs +%license LICENSE.txt +%{_includedir}/catch + + +%changelog +* Thu Nov 21 2024 Funda Wang <fundawang@yeah.net> - 1.12.2-7 +- adopt to new cmake macro + +* Tue Aug 10 2021 wangyue <wangyue92@huawei.com> - 1.12.2-6 +- Add patch for non-constant SIGSTKSZ + +* Sat Jul 18 2020 sunguoshuai <sunguoshuai@huawei.com> - 1.12.2-5 +- Package init @@ -0,0 +1 @@ +3df9c4c56d76c61d82a3bda395fbd492 catch1-1.12.2.tar.gz |