From f59aec3bf39df05b0e34f8ad7d484cabb395bfc308ed73eac8702d8f4c42c582 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Fri, 3 May 2024 10:43:34 +0200 Subject: [PATCH] Sync from SUSE:SLFO:Main Catch2-2 revision 89718d60b97926c65fbcc67520a88728 --- .gitattributes | 23 ++++++++++++ Catch2-2.13.10.tar.gz | 3 ++ Catch2-2.changes | 23 ++++++++++++ Catch2-2.spec | 79 +++++++++++++++++++++++++++++++++++++++ fix-pragmas-old-gcc.patch | 22 +++++++++++ 5 files changed, 150 insertions(+) create mode 100644 .gitattributes create mode 100644 Catch2-2.13.10.tar.gz create mode 100644 Catch2-2.changes create mode 100644 Catch2-2.spec create mode 100644 fix-pragmas-old-gcc.patch diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/Catch2-2.13.10.tar.gz b/Catch2-2.13.10.tar.gz new file mode 100644 index 0000000..9ba5d39 --- /dev/null +++ b/Catch2-2.13.10.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d54a712b7b1d7708bc7a819a8e6e47b2fde9536f487b89ccbca295072a7d9943 +size 662225 diff --git a/Catch2-2.changes b/Catch2-2.changes new file mode 100644 index 0000000..82f24cb --- /dev/null +++ b/Catch2-2.changes @@ -0,0 +1,23 @@ +------------------------------------------------------------------- +Wed Jan 18 08:32:54 UTC 2023 - Atri Bhattacharya + +- Update to version 2.13.10: + * Fixed issue with catch_discover_tests when there is multiple of + 256 tests (gh#catchorg/Catch2#2401, gh#catchorg/Catch2#2503). + * Catch2-provided main and wmain are explicitly marked as __cdecl + when compiled with MSVC (gh#catchorg/Catch2#2486, + gh#catchorg/Catch2#2487). + * Replaced deprecated std::aligned_storage + (gh#catchorg/Catch2#2419, gh#catchorg/Catch2#2420). +- Minor rebase of fix-pragmas-old-gcc.patch to apply cleanly. + +------------------------------------------------------------------- +Sat Oct 8 04:21:27 UTC 2022 - Atri Bhattacharya + +- Initial package: + * Branch off from obs://devel:libraries:c_c++/Catch2 at version + 2.13.9 and rename src package to Catch2-2. + * Catch2-2-devel: Add 'Provides: Catch2-devel = %{version}' + and 'Conflicts: Catch2-devel >= 3'. + * Drop CMAKE_RELEASE_TYPE=Release to use default + 'RelWithDebInfo' value from %cmake macro. diff --git a/Catch2-2.spec b/Catch2-2.spec new file mode 100644 index 0000000..785ac1e --- /dev/null +++ b/Catch2-2.spec @@ -0,0 +1,79 @@ +# +# spec file for package Catch2-2 +# +# Copyright (c) 2023 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%define srcname Catch2 +Name: Catch2-2 +Version: 2.13.10 +Release: 0 +Summary: A modern, C++-native, header-only, test framework for unit-tests, TDD and BDD +License: BSL-1.0 +URL: https://github.com/catchorg/Catch2/ +Source: https://github.com/catchorg/%{srcname}/archive/v%{version}.tar.gz#/%{srcname}-%{version}.tar.gz +#PATCH-FIX-OPENSUSE fix-pragmas-old-gcc.patch -- Fix usage of gcc pragmas for old gcc version on Leap gh#catchorg/Catch2#2416 +Patch0: fix-pragmas-old-gcc.patch +BuildRequires: cmake >= 3.5 +BuildRequires: gcc-c++ >= 6 +BuildRequires: pkgconfig + +%description +Catch2 stands for C++ Automated Test Cases in a Header and is a multi-paradigm +test framework for C++. which also supports Objective-C (and maybe C). +It is primarily distributed as a single header file, although certain +extensions may require additional headers. + +This package provides version 2.x of Catch2. + +%package devel +Summary: A modern, C++-native, header-only, test framework for unit-tests, TDD and BDD +Conflicts: Catch2-devel >= 3 +Provides: Catch2-devel = %{version} + +%description devel +Catch2 stands for C++ Automated Test Cases in a Header and is a multi-paradigm +test framework for C++. which also supports Objective-C (and maybe C). +It is primarily distributed as a single header file, although certain +extensions may require additional headers. + +This package provides version 2.x of Catch2. + +%prep +%autosetup -p1 -n %{srcname}-%{version} + +%build +%cmake \ + -DCMAKE_INSTALL_DOCDIR:PATH=%{_defaultdocdir}/%{name} \ + -DPKGCONFIG_INSTALL_DIR:PATH=%{_libdir}/pkgconfig \ + -DCATCH_BUILD_EXAMPLES:BOOL=ON +%cmake_build + +%install +%cmake_install + +%check +%ctest + +%files devel +%license LICENSE.txt +%doc README.md CODE_OF_CONDUCT.md +%doc %{_defaultdocdir}/%{name} +%{_datadir}/%{srcname}/ +%{_includedir}/catch2/ +%{_libdir}/cmake/%{srcname}/ +%{_libdir}/pkgconfig/catch2.pc + +%changelog diff --git a/fix-pragmas-old-gcc.patch b/fix-pragmas-old-gcc.patch new file mode 100644 index 0000000..1c46855 --- /dev/null +++ b/fix-pragmas-old-gcc.patch @@ -0,0 +1,22 @@ +Index: Catch2-2.13.10/projects/SelfTest/UsageTests/Message.tests.cpp +=================================================================== +--- Catch2-2.13.10.orig/projects/SelfTest/UsageTests/Message.tests.cpp ++++ Catch2-2.13.10/projects/SelfTest/UsageTests/Message.tests.cpp +@@ -242,7 +242,7 @@ std::ostream& operator<<(std::ostream& o + } + + // clang can handle GCC's diagnostic pragma +-#if defined( __GNUG__ ) || defined(__clang__) ++#if defined( __GNUG__ ) && __GNUG__ >= 8 || defined(__clang__) + # pragma GCC diagnostic push + #endif + // Clang and gcc have different names for this warning, and clang also +@@ -263,7 +263,7 @@ TEST_CASE("CAPTURE can deal with complex + CAPTURE( (1, 2), (2, 3) ); + SUCCEED(); + } +-#if defined( __GNUG__ ) || defined(__clang__) ++#if defined( __GNUG__ ) && __GNUG__ >= 8 || defined(__clang__) + # pragma GCC diagnostic pop + #endif +