From 357cbb74c23c2c7dce297ea9c389a890ff9e7622 Mon Sep 17 00:00:00 2001 From: Jie Xiao Date: Sun, 16 Nov 2025 11:28:37 +0100 Subject: [PATCH 1/5] add recola --- recola.spec | 24 ++++++++++++++++++++++++ scram-tools.file/tools/recola/recola.xml | 8 ++++++++ 2 files changed, 32 insertions(+) create mode 100644 recola.spec create mode 100644 scram-tools.file/tools/recola/recola.xml diff --git a/recola.spec b/recola.spec new file mode 100644 index 00000000000..6c8da64489f --- /dev/null +++ b/recola.spec @@ -0,0 +1,24 @@ +### RPM external recola 1.4.4 +Source: https://recola.hepforge.org/downloads/%{n}-%{realversion}.tar.gz +Requires: collier +BuildRequires: cmake + +%define keep_archives true + +%prep +%setup -q -n recola-%{realversion} + +%build +rm -rf build && mkdir build +cmake -S . -B build \ + -DCMAKE_INSTALL_PREFIX=%{i} \ + -Dcollier_path=${COLLIER_ROOT} \ + -Dwith_smtests=ON +cmake --build build %{makeprocesses} + + +%install +cmake --install build +mv %{i}/lib/cmake %{i}/cmake +sed -i 's;^.*set(RECOLA_LIBRARY_DIR.*$;get_filename_component(RECOLA_LIBRARY_DIR "${CMAKE_CURRENT_LIST_DIR}/../lib" ABSOLUTE);' %{i}/cmake/recolaConfig.cmake +sed -i 's;^.*set(RECOLA_INCLUDE_DIR.*$;get_filename_component(RECOLA_INCLUDE_DIR "${CMAKE_CURRENT_LIST_DIR}/../include" ABSOLUTE);' %{i}/cmake/recolaConfig.cmake diff --git a/scram-tools.file/tools/recola/recola.xml b/scram-tools.file/tools/recola/recola.xml new file mode 100644 index 00000000000..98d323226f0 --- /dev/null +++ b/scram-tools.file/tools/recola/recola.xml @@ -0,0 +1,8 @@ + + + + + + + + From 30db9434036d4900bd8e64d021a3b3fc58e6eaa0 Mon Sep 17 00:00:00 2001 From: Jie Xiao Date: Sun, 16 Nov 2025 20:52:14 +0100 Subject: [PATCH 2/5] add cmake config of collier.spec --- collier.spec | 6 +++- ...rt.patch => sherpa-2.2.16-hepmcshort.patch | 18 +++++----- sherpa-cpp20.patch | 35 ------------------- sherpa.spec | 11 +++--- 4 files changed, 20 insertions(+), 50 deletions(-) rename sherpa-2.2.10-hepmcshort.patch => sherpa-2.2.16-hepmcshort.patch (77%) delete mode 100644 sherpa-cpp20.patch diff --git a/collier.spec b/collier.spec index 327dc9c627e..d7c35289f5a 100644 --- a/collier.spec +++ b/collier.spec @@ -20,8 +20,12 @@ cmake ../ \ make -j1 %install -mkdir -p %{i}/lib %{i}/include +mkdir -p %{i}/lib %{i}/include %{i}/cmake cp libcollier.a %{i}/lib cp modules/*.mod %{i}/include/ +cp collierConfig.cmake %{i}/cmake +sed -i 's;^.*set(COLLIER_LIBRARY_DIR.*$;get_filename_component(COLLIER_LIBRARY_DIR "${CMAKE_CURRENT_LIST_DIR}/../lib" ABSOLUTE);' %{i}/cmake/collierConfig.cmake +sed -i 's;^.*set(COLLIER_INCLUDE_DIR.*$;get_filename_component(COLLIER_INCLUDE_DIR "${CMAKE_CURRENT_LIST_DIR}/../include" ABSOLUTE);' %{i}/cmake/collierConfig.cmake + diff --git a/sherpa-2.2.10-hepmcshort.patch b/sherpa-2.2.16-hepmcshort.patch similarity index 77% rename from sherpa-2.2.10-hepmcshort.patch rename to sherpa-2.2.16-hepmcshort.patch index 44fecbb943e..5c28e584f11 100644 --- a/sherpa-2.2.10-hepmcshort.patch +++ b/sherpa-2.2.16-hepmcshort.patch @@ -1,7 +1,8 @@ -diff -Naur a/SHERPA/Main/Sherpa.C b/SHERPA/Main/Sherpa.C ---- a/SHERPA/Main/Sherpa.C 2020-08-24 10:09:46.822502996 +0200 -+++ b/SHERPA/Main/Sherpa.C 2020-08-24 10:15:36.098836763 +0200 -@@ -294,21 +294,23 @@ +diff --git a/SHERPA/Main/Sherpa.C b/SHERPA/Main/Sherpa.C +index 0a16d23..ecb58e0 100644 +--- a/SHERPA/Main/Sherpa.C ++++ b/SHERPA/Main/Sherpa.C +@@ -300,21 +300,23 @@ bool Sherpa::GenerateOneEvent(bool reset) } #ifdef USING__HEPMC2 @@ -29,10 +30,11 @@ diff -Naur a/SHERPA/Main/Sherpa.C b/SHERPA/Main/Sherpa.C p_hepmc3->AddCrossSection(event, TotalXS(), TotalErr()); } #endif -diff -Naur a/SHERPA/Main/Sherpa.H b/SHERPA/Main/Sherpa.H ---- a/SHERPA/Main/Sherpa.H 2020-08-24 10:09:46.822502996 +0200 -+++ b/SHERPA/Main/Sherpa.H 2020-08-24 10:11:27.751754145 +0200 -@@ -54,10 +54,10 @@ +diff --git a/SHERPA/Main/Sherpa.H b/SHERPA/Main/Sherpa.H +index 599178b..d654d2c 100644 +--- a/SHERPA/Main/Sherpa.H ++++ b/SHERPA/Main/Sherpa.H +@@ -54,10 +54,10 @@ namespace SHERPA { bool GenerateOneEvent(bool reset=true); #ifdef USING__HEPMC2 diff --git a/sherpa-cpp20.patch b/sherpa-cpp20.patch deleted file mode 100644 index b76c3ace7a5..00000000000 --- a/sherpa-cpp20.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 1de52ee230891277370fc4f787fc8cb4b7626ef2 Mon Sep 17 00:00:00 2001 -From: iarspider -Date: Wed, 28 Jun 2023 07:35:10 +0000 -Subject: [PATCH] [ATOOLS] Fix C++20 compilation errors - ---- - ATOOLS/Org/Getter_Function.H | 5 ++--- - 1 file changed, 2 insertions(+), 3 deletions(-) - -diff --git a/ATOOLS/Org/Getter_Function.H b/ATOOLS/Org/Getter_Function.H -index f68d190ca2..09340da390 100644 ---- a/ATOOLS/Org/Getter_Function.H -+++ b/ATOOLS/Org/Getter_Function.H -@@ -84,7 +84,7 @@ namespace ATOOLS { - void PrintInfo(std::ostream &str,const size_t width) const; \ - Object_Type *operator()(const Parameter_Type ¶meters) const; \ - public: \ -- Getter(const bool &d=true): \ -+ Getter(const bool &d=true): \ - Getter_Function(TAG) \ - { SetDisplay(d); } \ - }; \ -@@ -107,8 +107,7 @@ namespace ATOOLS { - void PrintInfo(std::ostream &str,const size_t width) const; \ - Object_Type *operator()(const Parameter_Type ¶meters) const; \ - public: \ -- Getter \ -- (const std::string &name,const bool d=true): \ -+ Getter(const std::string &name,const bool d=true): \ - Getter_Function(name) \ - { SetDisplay(d); } \ - }; \ --- -GitLab - diff --git a/sherpa.spec b/sherpa.spec index 5df1047e725..bb59dfe9d74 100644 --- a/sherpa.spec +++ b/sherpa.spec @@ -1,11 +1,10 @@ -### RPM external sherpa 2.2.15 -Source: http://www.hepforge.org/archive/sherpa/SHERPA-MC-%{realversion}.tar.gz -Requires: hepmc lhapdf blackhat sqlite python3 fastjet openmpi +### RPM external sherpa 2.2.16 +Source: git+https://gitlab.com/sherpa-team/sherpa.git?obj=master/v%{realversion}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}.tgz +Requires: hepmc lhapdf blackhat sqlite python3 fastjet openmpi recola BuildRequires: mcfm swig autotools -Patch0: sherpa-2.2.10-hepmcshort -Patch1: sherpa-cpp20 +Patch0: sherpa-2.2.16-hepmcshort #Avoid calling setenv: https://gitlab.com/sherpa-team/sherpa/-/commit/6ead62d7a2758612f8965fb5b61df8c012cf9cae.diff -Patch2: sherpa-setenv +Patch1: sherpa-setenv %{!?without_openloops:Requires: openloops} From e6fb775d0349bcc2b86e494aa27fa7863bf9bf9a Mon Sep 17 00:00:00 2001 From: Jie Xiao Date: Sun, 16 Nov 2025 22:41:10 +0100 Subject: [PATCH 3/5] add collierConfigVersion.cmake --- collier.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/collier.spec b/collier.spec index d7c35289f5a..d0c51bd7dee 100644 --- a/collier.spec +++ b/collier.spec @@ -24,6 +24,7 @@ mkdir -p %{i}/lib %{i}/include %{i}/cmake cp libcollier.a %{i}/lib cp modules/*.mod %{i}/include/ cp collierConfig.cmake %{i}/cmake +cp collierConfigVersion.cmake %{i}/cmake sed -i 's;^.*set(COLLIER_LIBRARY_DIR.*$;get_filename_component(COLLIER_LIBRARY_DIR "${CMAKE_CURRENT_LIST_DIR}/../lib" ABSOLUTE);' %{i}/cmake/collierConfig.cmake sed -i 's;^.*set(COLLIER_INCLUDE_DIR.*$;get_filename_component(COLLIER_INCLUDE_DIR "${CMAKE_CURRENT_LIST_DIR}/../include" ABSOLUTE);' %{i}/cmake/collierConfig.cmake From 45dee599e33031a3d6095ed1f78e943a5b4e1cbe Mon Sep 17 00:00:00 2001 From: Jie Xiao Date: Mon, 17 Nov 2025 00:06:58 +0100 Subject: [PATCH 4/5] add recola to sherpa --- recola.spec | 5 +++-- sherpa.spec | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/recola.spec b/recola.spec index 6c8da64489f..e40635eb6cc 100644 --- a/recola.spec +++ b/recola.spec @@ -1,4 +1,4 @@ -### RPM external recola 1.4.4 +### RPM external recola 1.5.0 Source: https://recola.hepforge.org/downloads/%{n}-%{realversion}.tar.gz Requires: collier BuildRequires: cmake @@ -19,6 +19,7 @@ cmake --build build %{makeprocesses} %install cmake --install build -mv %{i}/lib/cmake %{i}/cmake +mkdir %{i}/cmake +cp %{i}/lib/cmake/recolaConfig.cmake %{i}/cmake sed -i 's;^.*set(RECOLA_LIBRARY_DIR.*$;get_filename_component(RECOLA_LIBRARY_DIR "${CMAKE_CURRENT_LIST_DIR}/../lib" ABSOLUTE);' %{i}/cmake/recolaConfig.cmake sed -i 's;^.*set(RECOLA_INCLUDE_DIR.*$;get_filename_component(RECOLA_INCLUDE_DIR "${CMAKE_CURRENT_LIST_DIR}/../include" ABSOLUTE);' %{i}/cmake/recolaConfig.cmake diff --git a/sherpa.spec b/sherpa.spec index bb59dfe9d74..71216c3b644 100644 --- a/sherpa.spec +++ b/sherpa.spec @@ -9,7 +9,7 @@ Patch1: sherpa-setenv %{!?without_openloops:Requires: openloops} %prep -%setup -q -n SHERPA-MC-%{realversion} +%setup -q -n sherpa-%{realversion} autoreconf -i --force @@ -24,7 +24,6 @@ perl -p -i -e 's|-rdynamic||g' configure AddOns/Analysis/Scripts/Makefile.in %patch0 -p1 %patch1 -p1 -%patch2 -p1 %build export PYTHON=$(which python3) @@ -36,6 +35,7 @@ export PYTHON=$(which python3) --enable-pyext \ --enable-ufo \ ${OPENLOOPS_ROOT+--enable-openloops=$OPENLOOPS_ROOT} \ + ${RECOLA_ROOT+--enable-recola=$RECOLA_ROOT} \ --enable-mpi \ --with-sqlite3=$SQLITE_ROOT \ --enable-analysis \ From df2229bd9e554102e9a9aa0f5b089ade14c2e2ae Mon Sep 17 00:00:00 2001 From: Jie Xiao Date: Mon, 17 Nov 2025 12:18:12 +0100 Subject: [PATCH 5/5] update recola cmake --- recola.spec | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/recola.spec b/recola.spec index e40635eb6cc..889bc6add23 100644 --- a/recola.spec +++ b/recola.spec @@ -19,7 +19,5 @@ cmake --build build %{makeprocesses} %install cmake --install build -mkdir %{i}/cmake -cp %{i}/lib/cmake/recolaConfig.cmake %{i}/cmake -sed -i 's;^.*set(RECOLA_LIBRARY_DIR.*$;get_filename_component(RECOLA_LIBRARY_DIR "${CMAKE_CURRENT_LIST_DIR}/../lib" ABSOLUTE);' %{i}/cmake/recolaConfig.cmake -sed -i 's;^.*set(RECOLA_INCLUDE_DIR.*$;get_filename_component(RECOLA_INCLUDE_DIR "${CMAKE_CURRENT_LIST_DIR}/../include" ABSOLUTE);' %{i}/cmake/recolaConfig.cmake +sed -i 's;^.*set(RECOLA_LIBRARY_DIR.*$;get_filename_component(RECOLA_LIBRARY_DIR "${CMAKE_CURRENT_LIST_DIR}/../../lib" ABSOLUTE);' %{i}/lib/cmake/recolaConfig.cmake +sed -i 's;^.*set(RECOLA_INCLUDE_DIR.*$;get_filename_component(RECOLA_INCLUDE_DIR "${CMAKE_CURRENT_LIST_DIR}/../../include" ABSOLUTE);' %{i}/lib/cmake/recolaConfig.cmake