Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-09-18 08:17:39

0001 # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
0002 # Spack Project Developers. See the top-level COPYRIGHT file for details.
0003 #
0004 # SPDX-License-Identifier: (Apache-2.0 OR MIT)
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.3",
0025         sha256="765bbe5b9573967e1aeed276d45bd299f3cf52251b6ec9b42fff9e2229fee663",
0026     )
0027     version(
0028         "0.1.2",
0029         sha256="4de4d8ce9f76830a1e1a2b4b680a78baa5ed2f28f1aaac4c0e861c48bbff259e",
0030     )
0031     version(
0032         "0.1.1",
0033         sha256="a29f576e11debeaa2e1a1da87eb51bd58281f7fd547906159e41aefc4635f265",
0034     )
0035     version(
0036         "0.1.0",
0037         sha256="2a4c083323ba43944ac1b5cae66f5b45205042cff0adb80506feb2b95a075179",
0038     )
0039     version(
0040         "0.0.2",
0041         sha256="7e4f8e601bdca3691725b3cc22e72409eb85e8a48852bdeed944590864339cb5",
0042     )
0043     version(
0044         "0.0.1",
0045         sha256="53ac535cc1bfed3dd9d482d942622a472617d4d53771d5cbc9da4feac071b770",
0046     )
0047 
0048     variant("root", default=False, description="Support reading ROOT files")
0049     variant("zlib", default=True, description="Support reading compressed files")
0050 
0051     depends_on("c", type="build", when="@:0.1.3")
0052     depends_on("cxx", type="build")
0053 
0054     depends_on("gsl")
0055     depends_on("hepmc3")
0056     depends_on("clhep")
0057     depends_on("yaml-cpp")
0058     depends_on("root", when="+root")
0059     depends_on("zlib", when="+zlib")
0060 
0061     root_cmakelists_dir = "cpp"
0062 
0063     def patch(self):
0064         filter_file(
0065             r"add_subdirectory\(test\)", "#add_subdirectory(test)", "cpp/CMakeLists.txt"
0066         )
0067         filter_file(r"enable_testing\(\)", "#enable_testing()", "cpp/CMakeLists.txt")
0068 
0069     def cmake_args(self):
0070         if "+root" in self.spec:
0071             cxxstd = self.spec["root"].variants["cxxstd"].value
0072         else:
0073             cxxstd = "11"
0074         args = [self.define("CMAKE_CXX_STANDARD", cxxstd)]
0075         return args