File indexing completed on 2025-01-18 09:15:27
0001
0002
0003
0004
0005
0006
0007 from spack.package import *
0008
0009
0010 class Synrad(CMakePackage):
0011 """SynRad+ is a modification of MolFlow+. Instead of molecules, it traces
0012 photons to calculate flux and power distribution on a surface caused by
0013 synchrotron radiation."""
0014
0015 homepage = "https://molflow.web.cern.ch"
0016 url = "https://gitlab.cern.ch/molflow_synrad/synrad/-/archive/v1.4.29/synrad-v1.4.29.zip"
0017 list_url = "https://gitlab.cern.ch/molflow_synrad/synrad/-/tags"
0018 git = "https://gitlab.cern.ch/molflow_synrad/synrad"
0019
0020 maintainers = ["wdconinc"]
0021
0022 version(
0023 "1.4.32",
0024 sha256="5cf60abe26af51d3cbf873cf43bf9ebe51ec46dd9d4fb95b9ca396e1b44fac00",
0025 )
0026 version(
0027 "1.4.31",
0028 sha256="c6c3952c5ec229de4369bc71666732aded640a985bf8b55c1521717b4478b8d6",
0029 )
0030 version(
0031 "1.4.29",
0032 sha256="30cd3020d9be8a6add9ae182a6d72357973e29b3b8486f6114118a193b81a4c8",
0033 )
0034
0035 variant("cli", default=True, description="Enable only the command line interface")
0036
0037 depends_on("cxx", type="build")
0038
0039 depends_on("curl")
0040 depends_on("gsl")
0041 depends_on("sdl2")
0042 depends_on("gtkplus")
0043
0044 def patch(self):
0045 filter_file(
0046
0047 r"^set\((OUTPUT_[A-Z]*_[A-Z]*) (\$\{OS_RELPATH\}/[a-z]*/).*\)",
0048
0049 r"set(\1 \2)",
0050 "CMake/Synrad.cmake",
0051 )
0052
0053 def cmake_args(self):
0054 args = [
0055 self.define_from_variant("NO_INTERFACE", "cli"),
0056 ]
0057 return args
0058
0059 def install(self, spec, prefix):
0060 install_tree(join_path(self.build_directory, "bin"), prefix.bin)
0061 install_tree(join_path(self.build_directory, "lib"), prefix.lib)
0062 return