thepeg: restrict rivet versions; evtgen: new variant sherpa (#48264)

* thepeg: restrict to rivet@:3 when @:2.2

* evtgen: new variant sherpa

* herwig3: require at least one external EvtGen component

* evtgen: fix typo

* evtgen: rm deprecated 01.* and autotools build system

* thepeg: fix typo

* herwig3: fix conflicts ^evtgen
This commit is contained in:
Wouter Deconinck 2025-01-06 10:27:48 -06:00 committed by GitHub
parent 4dd55e1b67
commit e8309b16fc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 13 additions and 55 deletions

View File

@ -16,24 +16,20 @@ class Evtgen(CMakePackage):
maintainers("vvolkl")
version("02.02.03", sha256="b642700b703190e3304edb98ff464622db5d03c1cfc5d275ba4a628227d7d6d0")
version("02.02.02", sha256="e543d1213cd5003124139d0dc7eee9247b0b9d44154ff8a88bac52ba91c5dfc9")
version("02.02.01", sha256="1fcae56c6b27b89c4a2f4b224d27980607442185f5570e961f6334a3543c6e77")
version("02.02.00", sha256="0c626e51cb17e799ad0ffd0beea5cb94d7ac8a5f8777b746aa1944dd26071ecf")
version("02.00.00", sha256="02372308e1261b8369d10538a3aa65fe60728ab343fcb64b224dac7313deb719")
# switched to cmake in 02.00.00
version(
"01.07.00",
sha256="2648f1e2be5f11568d589d2079f22f589c283a2960390bbdb8d9d7f71bc9c014",
deprecated=True,
)
depends_on("cxx", type="build") # generated
variant("pythia8", default=True, description="Build with pythia8")
variant("tauola", default=False, description="Build with tauola")
variant("photos", default=False, description="Build with photos")
variant("sherpa", default=False, description="build with sherpa")
variant("hepmc3", default=False, description="Link with hepmc3 (instead of hepmc)")
patch("g2c.patch", when="@01.07.00")
patch("evtgen-2.0.0.patch", when="@02.00.00 ^pythia8@8.304:")
depends_on("hepmc", when="~hepmc3")
@ -44,6 +40,8 @@ class Evtgen(CMakePackage):
depends_on("photos~hepmc3", when="+photos~hepmc3")
depends_on("tauola+hepmc3", when="+tauola+hepmc3")
depends_on("photos+hepmc3", when="+photos+hepmc3")
depends_on("sherpa@2:", when="@02.02.01: +sherpa")
depends_on("sherpa@:2", when="@:02 +sherpa")
conflicts(
"^pythia8+evtgen",
@ -53,7 +51,6 @@ class Evtgen(CMakePackage):
"that cannot be resolved at the moment! "
"Use evtgen+pythia8^pythia8~evtgen.",
)
conflicts("+hepmc3", when="@:01", msg="hepmc3 support was added in 02.00.00")
@property
def root_cmakelists_dir(self):
@ -71,6 +68,7 @@ def cmake_args(self):
args.append(self.define_from_variant("EVTGEN_PYTHIA", "pythia8"))
args.append(self.define_from_variant("EVTGEN_TAUOLA", "tauola"))
args.append(self.define_from_variant("EVTGEN_PHOTOS", "photos"))
args.append(self.define_from_variant("EVTGEN_SHERPA", "sherpa"))
args.append(self.define_from_variant("EVTGEN_HEPMC3", "hepmc3"))
return args
@ -85,50 +83,5 @@ def patch(self):
filter_file("-shared", "-dynamiclib -undefined dynamic_lookup", "make.inc")
# Taken from AutotoolsPackage
def configure(self, spec, prefix):
"""Runs configure with the arguments specified in
:py:meth:`~.AutotoolsPackage.configure_args`
and an appropriately set prefix.
"""
options = getattr(self, "configure_flag_args", [])
options += ["--prefix={0}".format(prefix)]
options += self.configure_args()
with working_dir(self.build_directory, create=True):
configure(*options)
@when("@:01")
def configure_args(self):
args = []
args.append("--hepmcdir=%s" % self.spec["hepmc"].prefix)
if self.spec.satisfies("+pythia8"):
args.append("--pythiadir=%s" % self.spec["pythia8"].prefix)
if self.spec.satisfies("+photos"):
args.append("--photosdir=%s" % self.spec["photos"].prefix)
if self.spec.satisfies("+tauola"):
args.append("--tauoladir=%s" % self.spec["tauola"].prefix)
return args
@when("@:01")
def cmake(self, spec, prefix):
pass
@when("@:01")
def build(self, spec, prefix):
self.configure(spec, prefix)
# avoid parallel compilation errors
# due to libext_shared depending on lib_shared
with working_dir(self.build_directory):
make("lib_shared")
make("all")
@when("@:01")
def install(self, spec, prefix):
with working_dir(self.build_directory):
make("install")
def setup_run_environment(self, env):
env.set("EVTGEN", self.prefix.share)

View File

@ -35,6 +35,10 @@ class Herwig3(AutotoolsPackage):
depends_on("thepeg@2.2.3", when="@7.2.3")
depends_on("thepeg@2.3.0", when="@7.3.0")
depends_on("evtgen")
conflicts(
"^evtgen ~photos ~pythia8 ~sherpa ~tauola",
msg="At least one external EvtGen component required",
)
depends_on("boost +math+test")
depends_on("python", type=("build", "run"))

View File

@ -70,8 +70,9 @@ class Thepeg(AutotoolsPackage):
depends_on("hepmc3", when="hepmc=3")
conflicts("hepmc=3", when="@:2.1", msg="HepMC3 support was added in 2.2.0")
depends_on("fastjet", when="@2.0.0:")
depends_on("rivet@:3 hepmc=2", when="@2.0.3: +rivet hepmc=2")
depends_on("rivet@:3 hepmc=3", when="@2.0.3: +rivet hepmc=3")
depends_on("rivet hepmc=2", when="@2.0.3: +rivet hepmc=2")
depends_on("rivet hepmc=3", when="@2.0.3: +rivet hepmc=3")
depends_on("rivet@:3", when="@:2.2 +rivet")
depends_on("boost +test", when="@2.1.1:")
depends_on("autoconf", type="build")