diff --git a/evtgen-2.0.0.patch b/evtgen-2.0.0.patch index b5670c4a30c..88902f4e290 100644 --- a/evtgen-2.0.0.patch +++ b/evtgen-2.0.0.patch @@ -37,3 +37,42 @@ template class EvtMatrix { + +--- a/EvtGenExternal/EvtPythiaEngine.hh ++++ b/EvtGenExternal/EvtPythiaEngine.hh +@@ -82,7 +82,7 @@ + + bool _convertPhysCodes, _initialised, _useEvtGenRandom; + +- std::unique_ptr _evtgenRandom; ++ std::shared_ptr _evtgenRandom; + + std::map _addedPDGCodes; + }; + +--- a/src/EvtGenExternal/EvtPythiaEngine.cpp ++++ b/src/EvtGenExternal/EvtPythiaEngine.cpp +@@ -75,7 +75,7 @@ + // from EvtGen for Pythia 8. + _useEvtGenRandom = useEvtGenRandom; + +- _evtgenRandom = std::make_unique(); ++ _evtgenRandom = std::make_shared(); + + _initialised = false; + } +@@ -128,8 +128,13 @@ + + // Set the random number generator + if ( _useEvtGenRandom == true ) { ++#if PYTHIA_VERSION_INTEGER < 8310 + _genericPythiaGen->setRndmEnginePtr( _evtgenRandom.get() ); + _aliasPythiaGen->setRndmEnginePtr( _evtgenRandom.get() ); ++#else ++ _genericPythiaGen->setRndmEnginePtr( _evtgenRandom ); ++ _aliasPythiaGen->setRndmEnginePtr( _evtgenRandom ); ++#endif + } + + _genericPythiaGen->init(); + diff --git a/pythia8.spec b/pythia8.spec index c6500fc95f4..9d5c0cc076a 100644 --- a/pythia8.spec +++ b/pythia8.spec @@ -1,14 +1,11 @@ -### RPM external pythia8 309 +### RPM external pythia8 311 Source: https://pythia.org/download/pythia83/%{n}%{realversion}.tgz -# https://gitlab.com/Pythia8/releases/-/issues/289: fix compilation of C++20 code with pythia8 -Patch0: pythia8_309-289 Requires: hepmc hepmc3 lhapdf %prep %setup -q -n %{n}%{realversion} -%patch0 -p1 ./configure --prefix=%i --enable-shared --with-hepmc2=${HEPMC_ROOT} --with-hepmc3=${HEPMC3_ROOT} --with-lhapdf6=${LHAPDF_ROOT} --enable-mg5mes diff --git a/pythia8_309-289.patch b/pythia8_309-289.patch deleted file mode 100644 index ec5ba6655bc..00000000000 --- a/pythia8_309-289.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff --git a/include/Pythia8/SusyLesHouches.h b/include/Pythia8/SusyLesHouches.h -index 43d6d621..5a57a968 100644 ---- a/include/Pythia8/SusyLesHouches.h -+++ b/include/Pythia8/SusyLesHouches.h -@@ -28,7 +28,7 @@ namespace Pythia8 { - public: - - //Constructor. -- LHblock() : idnow(0), qDRbar(), i(), val() {} ; -+ LHblock() : idnow(0), qDRbar(), i(), val() {} ; - - //Does block exist? - bool exists() { return int(entry.size()) == 0 ? false : true ; }; -@@ -129,7 +129,7 @@ namespace Pythia8 { - template class LHmatrixBlock { - public: - //Constructor. Set uninitialized and explicitly zero. -- LHmatrixBlock() : entry(), qDRbar(), val() { -+ LHmatrixBlock() : entry(), qDRbar(), val() { - initialized=false; - for (i=1;i<=size;i++) { - for (j=1;j<=size;j++) { -@@ -208,7 +208,7 @@ namespace Pythia8 { - template class LHtensor3Block { - public: - //Constructor. Set uninitialized and explicitly zero. -- LHtensor3Block() : entry(), qDRbar(), val() { -+ LHtensor3Block() : entry(), qDRbar(), val() { - initialized=false; - for (i=1;i<=size;i++) { - for (j=1;j<=size;j++) {