Accepting request 1008900 from home:badshah400:Staging
We need to maintain version 2.x of Catch2 at least until most upstream packages catch up to Catch2 >= 3. See comments on sr#1005804 for rationale. OBS-URL: https://build.opensuse.org/request/show/1008900 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/Catch2-2?expand=0&rev=1
This commit is contained in:
commit
ccf8649b3b
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -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
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
.osc
|
3
Catch2-2.13.9.tar.gz
Normal file
3
Catch2-2.13.9.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:06dbc7620e3b96c2b69d57bf337028bf245a211b3cddb843835bfe258f427a52
|
||||||
|
size 661915
|
10
Catch2-2.changes
Normal file
10
Catch2-2.changes
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Oct 8 04:21:27 UTC 2022 - Atri Bhattacharya <badshah400@gmail.com>
|
||||||
|
|
||||||
|
- 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.
|
79
Catch2-2.spec
Normal file
79
Catch2-2.spec
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
#
|
||||||
|
# spec file for package Catch2-2
|
||||||
|
#
|
||||||
|
# Copyright (c) 2022 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.9
|
||||||
|
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
|
21
fix-pragmas-old-gcc.patch
Normal file
21
fix-pragmas-old-gcc.patch
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
diff -Nur Catch2-2.13.9/projects/SelfTest/UsageTests/Message.tests.cpp new/projects/SelfTest/UsageTests/Message.tests.cpp
|
||||||
|
--- Catch2-2.13.9/projects/SelfTest/UsageTests/Message.tests.cpp 2022-04-12 22:38:17.000000000 +0200
|
||||||
|
+++ new/projects/SelfTest/UsageTests/Message.tests.cpp 2022-04-26 14:20:39.792719016 +0200
|
||||||
|
@@ -243,7 +243,7 @@
|
||||||
|
|
||||||
|
// Clang and gcc have different names for this warning, and clang also
|
||||||
|
// warns about an unused value
|
||||||
|
-#if defined(__GNUG__) && !defined(__clang__)
|
||||||
|
+#if defined(__GNUG__) && __GNUG__ >= 8 && !defined(__clang__)
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wcomma-subscript"
|
||||||
|
#elif defined(__clang__)
|
||||||
|
@@ -262,7 +262,7 @@
|
||||||
|
SUCCEED();
|
||||||
|
}
|
||||||
|
|
||||||
|
-#ifdef __GNUG__
|
||||||
|
+#if defined(__GNUG__) && __GNUG__ >= 8
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue
Block a user