File indexing completed on 2025-01-18 09:15:26
0001
0002
0003
0004
0005
0006
0007 from spack.package import *
0008
0009
0010 class Afterburner(CMakePackage):
0011 """An EIC Monte Carlo Afterburner for beam effects."""
0012
0013 homepage = "https://github.com/eic/afterburner"
0014 url = "https://github.com/eic/afterburner/archive/refs/tags/v0.1.2.tar.gz"
0015 list_url = "https://github.com/eic/afterburner/tags"
0016 git = "https://github.com/eic/afterburner"
0017
0018 maintainers = ["wdconinc", "DraTeots"]
0019
0020 tags = ["eic"]
0021
0022 version("main", branch="main")
0023 version(
0024 "0.1.2",
0025 sha256="4de4d8ce9f76830a1e1a2b4b680a78baa5ed2f28f1aaac4c0e861c48bbff259e",
0026 )
0027 version(
0028 "0.1.1",
0029 sha256="a29f576e11debeaa2e1a1da87eb51bd58281f7fd547906159e41aefc4635f265",
0030 )
0031 version(
0032 "0.1.0",
0033 sha256="2a4c083323ba43944ac1b5cae66f5b45205042cff0adb80506feb2b95a075179",
0034 )
0035 version(
0036 "0.0.2",
0037 sha256="7e4f8e601bdca3691725b3cc22e72409eb85e8a48852bdeed944590864339cb5",
0038 )
0039 version(
0040 "0.0.1",
0041 sha256="53ac535cc1bfed3dd9d482d942622a472617d4d53771d5cbc9da4feac071b770",
0042 )
0043
0044 variant("root", default=False, description="Support reading ROOT files")
0045 variant("zlib", default=True, description="Support reading compressed files")
0046
0047 depends_on("cxx", type="build")
0048
0049 depends_on("gsl")
0050 depends_on("hepmc3")
0051 depends_on("clhep")
0052 depends_on("yaml-cpp")
0053 depends_on("root", when="+root")
0054 depends_on("zlib", when="+zlib")
0055
0056 root_cmakelists_dir = "cpp"
0057
0058 def patch(self):
0059 filter_file(
0060 r"add_subdirectory\(test\)", "#add_subdirectory(test)", "cpp/CMakeLists.txt"
0061 )
0062 filter_file(r"enable_testing\(\)", "#enable_testing()", "cpp/CMakeLists.txt")
0063
0064 def cmake_args(self):
0065 if "+root" in self.spec:
0066 cxxstd = self.spec["root"].variants["cxxstd"].value
0067 else:
0068 cxxstd = "11"
0069 args = [self.define("CMAKE_CXX_STANDARD", cxxstd)]
0070 return args