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