File indexing completed on 2025-12-16 09:27:55
0001
0002
0003
0004
0005
0006 from spack.package import *
0007
0008
0009 class Pepsi(MakefilePackage):
0010 """PEPSI (Polarised Electron Proton Scattering Interactions)
0011 is a Monte Carlo generator for polarised deep inelastic
0012 scattering (pDIS)."""
0013
0014 homepage = "https://github.com/eic/pepsi"
0015 url = "https://github.com/eic/pepsi"
0016 list_url = "https://github.com/eic/pepsi/releases"
0017 git = "https://github.com/eic/pepsi.git"
0018
0019 tags = ["eic"]
0020
0021 version("master", branch="master")
0022
0023 depends_on("fortran", type="build")
0024
0025 depends_on("cernlib")
0026
0027 def patch(self):
0028 filter_file("/cern64/pro/lib", self.spec["cernlib"].prefix.lib, "Makefile")
0029 filter_file("packlib_noshift", "packlib", "Makefile")
0030 if self.spec.satisfies("%gcc@10.0.0:"):
0031 filter_file("-g -m64", "-g -fallow-argument-mismatch", "Makefile")
0032 else:
0033 filter_file("-g -m64", "-g", "Makefile")
0034
0035 def setup_build_environment(self, env):
0036 spec = self.spec
0037 env.set("EICDIRECTORY", self.spec.prefix)
0038
0039 def install(self, spec, prefix):
0040 mkdirp(prefix.bin)
0041 make()
0042 make("install")
0043 install_tree("pdf/", join_path(prefix.share, "pdf"))
0044 install_tree("STEER-FILES/", join_path(prefix.share, "STEER-FILES"))