diff --git a/.gitignore b/.gitignore index 0c3aacb..3145a6c 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ /catch-1.10.0.tar.gz /catch-1.11.0.tar.gz /catch-1.12.0.tar.gz +/catch-2.1.0.tar.gz diff --git a/0001-Add-yet-another-expansion-of-INF-macro.patch b/0001-Add-yet-another-expansion-of-INF-macro.patch new file mode 100644 index 0000000..cecdab2 --- /dev/null +++ b/0001-Add-yet-another-expansion-of-INF-macro.patch @@ -0,0 +1,27 @@ +From f0909dfe02df36e70c4c95ed00d53cb3eacf0262 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= + +Date: Sun, 14 Jan 2018 17:04:36 +0100 +Subject: [PATCH] Add yet another expansion of INF macro + +Closes #1151 +--- + scripts/approvalTests.py | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/scripts/approvalTests.py b/scripts/approvalTests.py +index e16f7140..a2ab5d5a 100755 +--- a/scripts/approvalTests.py ++++ b/scripts/approvalTests.py +@@ -50,6 +50,8 @@ infParser = re.compile(r''' + | + \(__builtin_inff\(\)\) # Linux (ubuntu) INFINITY macro + | ++ \(__builtin_inff\ \(\)\) # Fedora INFINITY macro ++ | + __builtin_huge_valf\(\) # OSX macro + ''', re.VERBOSE) + nanParser = re.compile(r''' +-- +2.15.1 + diff --git a/catch.spec b/catch.spec index 189b5d1..96f1a91 100644 --- a/catch.spec +++ b/catch.spec @@ -1,15 +1,18 @@ %global debug_package %{nil} Name: catch -Version: 1.12.0 +Version: 2.1.0 Release: 1%{?dist} 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 +# https://github.com/catchorg/Catch2/commit/f0909dfe02df36e70c4c95ed00d53cb3eacf0262 +Patch0001: 0001-Add-yet-another-expansion-of-INF-macro.patch BuildRequires: cmake make gcc-c++ +BuildRequires: %{_bindir}/python3 %description Catch stands for C++ Automated Test Cases in Headers and is a @@ -31,6 +34,11 @@ is packaged up as a single header for extra convenience. %prep %autosetup -p 1 -n Catch2-%{version} +# Putting -Werror always breaks when linters change and is bad for production +# https://github.com/catchorg/Catch2/issues/1152 +sed -i -e "s|-Werror\([^=]\)|\1|" CMakeLists.txt +# No python, just python3 +sed -i -e "s|COMMAND python |COMMAND %{_bindir}/python3 |" CMakeLists.txt %build @@ -39,8 +47,7 @@ is packaged up as a single header for extra convenience. %install -mkdir -p %{buildroot}%{_includedir} -cp -pr include %{buildroot}%{_includedir}/catch +%make_install -Cbuild %check @@ -49,12 +56,16 @@ ctest -V %{?_smp_mflags} %files devel -%doc README.md catch-logo-small.png docs +%doc README.md docs %license LICENSE.txt -%{_includedir}/catch +%{_includedir}/catch/ +%{_datadir}/pkgconfig/catch.pc %changelog +* Sun Jan 14 2018 Igor Gnatenko - 2.1.0-1 +- Update to 2.1.0 + * Sun Jan 14 2018 Tom Hughes - 1.12.0-1 - Update to 1.12.0 upstream release diff --git a/sources b/sources index 78136c7..d3403ff 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (catch-1.12.0.tar.gz) = 94da3837d2c2cf5fad4f85815ec2660ffddef02e52e490ca1f0c35e7b17c8154053ced095fda147e86dbd0cdad14936bb8b0a55464a8f93fab4150f1cfb0888d +SHA512 (catch-2.1.0.tar.gz) = 1fa0d1cb607fcb8dec37437fa788868324b0ded8e929138f4167d57bafa567b64955546142699a3e3bd2aeb7d36b7c2c7c426aaf3d68b94bddd43b2f78026fc8