summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan Miguel Carceller <22276694+jmcarcell@users.noreply.github.com>2024-05-04 16:33:44 +0200
committerGitHub <noreply@github.com>2024-05-04 09:33:44 -0500
commitf5946c4621035dd466953c8d2664ff5f82f38138 (patch)
tree859cd1420f9676124aa59a633c625606a071bc5b
parent8564ab19c324ca634f6dd50bdb5413a645179ef1 (diff)
downloadspack-f5946c4621035dd466953c8d2664ff5f82f38138.tar.gz
spack-f5946c4621035dd466953c8d2664ff5f82f38138.tar.bz2
spack-f5946c4621035dd466953c8d2664ff5f82f38138.tar.xz
spack-f5946c4621035dd466953c8d2664ff5f82f38138.zip
pythia8: Add a gzip variant and filter some compiler wrapper paths (#43807)
* Add a gzip variant and filter some compiler wrapper paths * Apply suggestions from code review Co-authored-by: Wouter Deconinck <wdconinc@gmail.com> --------- Co-authored-by: jmcarcell <jmcarcell@users.noreply.github.com> Co-authored-by: Wouter Deconinck <wdconinc@gmail.com>
-rw-r--r--var/spack/repos/builtin/packages/pythia8/package.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/var/spack/repos/builtin/packages/pythia8/package.py b/var/spack/repos/builtin/packages/pythia8/package.py
index 21e1f08437..f762c01226 100644
--- a/var/spack/repos/builtin/packages/pythia8/package.py
+++ b/var/spack/repos/builtin/packages/pythia8/package.py
@@ -59,6 +59,7 @@ class Pythia8(AutotoolsPackage):
)
variant("shared", default=True, description="Build shared library")
+ variant("gzip", default=False, description="Build with gzip support, for reading lhe.gz files")
variant(
"hepmc", default=True, description="Export PYTHIA events to the HEPMC format, version 2"
)
@@ -84,6 +85,7 @@ class Pythia8(AutotoolsPackage):
variant("mpich", default=False, description="Multi-threading support via MPICH")
variant("hdf5", default=False, description="Support the use of HDF5 format")
+ depends_on("zlib-api", when="+gzip")
depends_on("rsync", type="build")
depends_on("hepmc", when="+hepmc")
depends_on("hepmc3", when="+hepmc3")
@@ -116,6 +118,8 @@ class Pythia8(AutotoolsPackage):
conflicts("+hdf5", when="@:8.304", msg="HDF5 support was added in 8.304")
conflicts("+hdf5", when="~mpich", msg="MPICH is required for reading HDF5 files")
+ filter_compiler_wrappers("Makefile.inc", relative_root="share/Pythia8/examples")
+
def configure_args(self):
args = []
@@ -136,15 +140,11 @@ class Pythia8(AutotoolsPackage):
if "+madgraph5amc" in self.spec:
args.append("--with-mg5mes=" + self.spec["madgraph5amc"].prefix)
- else:
- args.append("--without-mg5mes")
args += self.with_or_without("hepmc3", activation_value="prefix")
if "+fastjet" in self.spec:
args.append("--with-fastjet3=" + self.spec["fastjet"].prefix)
- else:
- args.append("--without-fastjet3")
args += self.with_or_without("evtgen", activation_value="prefix")
args += self.with_or_without("root", activation_value="prefix")
@@ -160,6 +160,10 @@ class Pythia8(AutotoolsPackage):
if self.spec.satisfies("+hdf5"):
args.append("--with-highfive=" + self.spec["highfive"].prefix)
+ args += self.with_or_without(
+ "gzip", activation_value=lambda x: self.spec["zlib-api"].prefix
+ )
+
return args
def url_for_version(self, version):