From 1b42c1ead951ed6833511efe2575aeb566616c50 Mon Sep 17 00:00:00 2001 From: Akrit Date: Sat, 11 Oct 2025 11:52:49 +0200 Subject: [PATCH 1/2] Updates for Catch2 v2->v3 cmssw#49121 --- catch2.spec | 22 ++++++++++++++++++---- scram-tools.file/tools/catch2/catch2.xml | 7 +++++-- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/catch2.spec b/catch2.spec index 5d74dccc774..a5322e2bd74 100644 --- a/catch2.spec +++ b/catch2.spec @@ -1,10 +1,24 @@ -### RPM external catch2 2.13.6 -Source: https://raw.githubusercontent.com/catchorg/Catch2/v%{realversion}/single_include/catch2/catch.hpp +### RPM external catch2 3.11.0 + +Source: https://github.com/catchorg/Catch2/archive/refs/tags/v%{realversion}.tar.gz +BuildRequires: cmake gmake %prep +%setup -n Catch2-%{realversion} %build +cd %{_builddir} +rm -rf build && mkdir build && cd build + +cmake ../Catch2-%{realversion} \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX="%{i}" \ + -DCATCH_INSTALL_HELPERS=ON \ + -DCATCH_INSTALL_EXTRAS=ON \ + -DCMAKE_INSTALL_COMPONENT="devel" + +make %{makeprocesses} %install -mkdir %{i}/include -cp %{_sourcedir}/catch.hpp %{i}/include/ +cd %{_builddir}/build +make install diff --git a/scram-tools.file/tools/catch2/catch2.xml b/scram-tools.file/tools/catch2/catch2.xml index 93eaf67d5b7..4cab8b8f245 100644 --- a/scram-tools.file/tools/catch2/catch2.xml +++ b/scram-tools.file/tools/catch2/catch2.xml @@ -1,6 +1,9 @@ - + + + - + + From 38c18f07a1c706a9b305c20bf59f879e160793b7 Mon Sep 17 00:00:00 2001 From: Shahzad Malik Muzaffar Date: Mon, 13 Oct 2025 10:30:52 +0200 Subject: [PATCH 2/2] catch2: build shared libs, relocate .pc files; run verbose make --- catch2.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/catch2.spec b/catch2.spec index a5322e2bd74..6981c773c90 100644 --- a/catch2.spec +++ b/catch2.spec @@ -12,13 +12,17 @@ rm -rf build && mkdir build && cd build cmake ../Catch2-%{realversion} \ -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_SHARED_LIBS=ON \ -DCMAKE_INSTALL_PREFIX="%{i}" \ -DCATCH_INSTALL_HELPERS=ON \ -DCATCH_INSTALL_EXTRAS=ON \ -DCMAKE_INSTALL_COMPONENT="devel" -make %{makeprocesses} +make %{makeprocesses} VERBOSE=1 %install cd %{_builddir}/build make install + +%post +%{relocateConfig}share/pkgconfig/catch2*.pc