From b9757475584dbaa9573af30870f9a17cd9840934 Mon Sep 17 00:00:00 2001 From: Shahzad Malik Muzaffar Date: Tue, 15 Oct 2024 11:48:19 +0200 Subject: [PATCH 1/2] Unify geat4 deps and vecgeom selection --- celeritas.spec | 18 ++++-------------- dd4hep.spec | 12 +++--------- g4hepem.spec | 10 ++-------- geant4-deps.file | 16 ++++++++++++++++ geant4.spec | 17 +---------------- 5 files changed, 26 insertions(+), 47 deletions(-) create mode 100644 geant4-deps.file diff --git a/celeritas.spec b/celeritas.spec index 355ee6bf806..96b6b3e9ba9 100644 --- a/celeritas.spec +++ b/celeritas.spec @@ -1,22 +1,12 @@ ### RPM external celeritas v0.4.1 -## INCLUDE compilation_flags -## INCLUDE compilation_flags_lto -## INCLUDE cpp-standard -## INCLUDE vecgeom-opt -%define keep_archives true %define celeritas_gitversion %(echo %{realversion} | sed -e 's|^v||;s|-.*||') %define tag f9b51d72fc268bf22c5560b82d3dd3d7613a8106 Source: git+https://github.com/celeritas-project/celeritas?obj=develop/%{tag}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}.tgz -BuildRequires: cmake -%define build_flags -Wall -Wextra -pedantic %{?arch_build_flags} %{?lto_build_flags} %{?pgo_build_flags} -Requires: python3 -Requires: json -Requires: geant4 -Requires: expat xerces-c -%if %{enable_vecgeom} -Requires: vecgeom -%endif +%define package_build_flags -Wall -Wextra -pedantic +## INCLUDE geant4-deps +BuildRequires: cmake +Requires: python3 json geant4 %prep %setup -n %{n}-%{realversion} diff --git a/dd4hep.spec b/dd4hep.spec index 825f767a93a..221528ea44f 100644 --- a/dd4hep.spec +++ b/dd4hep.spec @@ -1,18 +1,12 @@ ### RPM external dd4hep v01-29-00 -## INCLUDE compilation_flags -## INCLUDE compilation_flags_lto -## INCLUDE cpp-standard - %define tag d119e3f8f5da75bd87632467df088197f84ed1b8 %define branch master %define github_user AIDASoft -%define keep_archives true Source: git+https://github.com/%{github_user}/DD4hep.git?obj=%{branch}/%{tag}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}.tgz -BuildRequires: cmake -Requires: root boost clhep xerces-c expat geant4 +## INCLUDE geant4-deps -%define build_flags -fPIC %{?arch_build_flags} %{?lto_build_flags} %{?pgo_build_flags} +Requires: root boost geant4 %define cmake_fixed_args \\\ -DCMAKE_INSTALL_PREFIX='%{i}' \\\ @@ -40,7 +34,7 @@ export BOOST_ROOT #Build normal Shared D4Hep without Geant4 rm -rf ../build; mkdir ../build; cd ../build -cmake %{cmake_fixed_args} -DBUILD_SHARED_LIBS=ON ../%{n}-%{realversion} +cmake %{cmake_fixed_args} -DBUILD_SHARED_LIBS=ON -DDD4HEP_USE_GEANT4=OFF ../%{n}-%{realversion} make %{makeprocesses} VERBOSE=1 make install diff --git a/g4hepem.spec b/g4hepem.spec index 373b2d7e354..f4e8c172f2c 100644 --- a/g4hepem.spec +++ b/g4hepem.spec @@ -1,17 +1,11 @@ ### RPM external g4hepem 20230309 -## INCLUDE compilation_flags -## INCLUDE compilation_flags_lto %define tag %{realversion} %define branch master %define github_user mnovak42 Source: git+https://github.com/%github_user/%{n}.git?obj=%{branch}/%{tag}&export=%{n}.%{realversion}&output=/%{n}.%{realversion}-%{tag}.tgz -BuildRequires: cmake gmake - -Requires: geant4 expat xerces-c - -%define keep_archives true -%define build_flags -fPIC %{?arch_build_flags} %{?lto_build_flags} %{?pgo_build_flags} +## INCLUDE geant4-deps +Requires: geant4 %prep %setup -n %{n}.%{realversion} diff --git a/geant4-deps.file b/geant4-deps.file new file mode 100644 index 00000000000..a1c5471774d --- /dev/null +++ b/geant4-deps.file @@ -0,0 +1,16 @@ +## INCLUDE compilation_flags +## INCLUDE compilation_flags_lto +## INCLUDE cpp-standard +## INCLUDE vecgeom-opt + +BuildRequires: cmake gmake +Requires: clhep +Requires: expat +Requires: xerces-c +%if %{enable_vecgeom} +Requires: vecgeom +%endif +Requires: zlib + +%define keep_archives true +%define build_flags %{?package_build_flags} -fPIC %{?arch_build_flags} %{?lto_build_flags} %{?pgo_build_flags} diff --git a/geant4.spec b/geant4.spec index e524d7d8c29..a09794717b2 100644 --- a/geant4.spec +++ b/geant4.spec @@ -1,25 +1,10 @@ ### RPM external geant4 11.2.2 -## INCLUDE compilation_flags -## INCLUDE compilation_flags_lto -## INCLUDE cpp-standard -## INCLUDE vecgeom-opt %define tag 95f4cebf4a63598d695070bf92e47355eef94a5f %define branch cms/v%{realversion} %define github_user cms-externals Source: git+https://github.com/%github_user/%{n}.git?obj=%{branch}/%{tag}&export=%{n}.%{realversion}&output=/%{n}.%{realversion}-%{tag}.tgz -BuildRequires: cmake gmake - -Requires: clhep -Requires: expat -Requires: xerces-c -%if %{enable_vecgeom} -Requires: vecgeom -%endif -Requires: zlib - -%define keep_archives true -%define build_flags -fPIC %{?arch_build_flags} %{?lto_build_flags} %{?pgo_build_flags} +## INCLUDE geant4-deps %prep %setup -n %{n}.%{realversion} From 6875da815b0a0bcd4abd608b0c439c52d3e84b19 Mon Sep 17 00:00:00 2001 From: Malik Shahzad Muzaffar Date: Tue, 15 Oct 2024 11:50:34 +0200 Subject: [PATCH 2/2] Update celeritas.spec --- celeritas.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/celeritas.spec b/celeritas.spec index 96b6b3e9ba9..ab3846b50b6 100644 --- a/celeritas.spec +++ b/celeritas.spec @@ -5,7 +5,6 @@ Source: git+https://github.com/celeritas-project/celeritas?obj=develop/%{tag}&ex %define package_build_flags -Wall -Wextra -pedantic ## INCLUDE geant4-deps -BuildRequires: cmake Requires: python3 json geant4 %prep