diff options
author | Wouter Deconinck <wdconinc@gmail.com> | 2023-03-01 07:36:16 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-01 14:36:16 +0100 |
commit | dd854e86d98159e5bb1e9fcbe34605a97d8cfe2a (patch) | |
tree | 782c172040eaf511f52f486a664e767a84932e18 | |
parent | 1500246ab75910f4dd485e216731289713735894 (diff) | |
download | spack-dd854e86d98159e5bb1e9fcbe34605a97d8cfe2a.tar.gz spack-dd854e86d98159e5bb1e9fcbe34605a97d8cfe2a.tar.bz2 spack-dd854e86d98159e5bb1e9fcbe34605a97d8cfe2a.tar.xz spack-dd854e86d98159e5bb1e9fcbe34605a97d8cfe2a.zip |
sartre: new package (#32713)
-rw-r--r-- | var/spack/repos/builtin/packages/sartre/package.py | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/sartre/package.py b/var/spack/repos/builtin/packages/sartre/package.py new file mode 100644 index 0000000000..638e9f12bb --- /dev/null +++ b/var/spack/repos/builtin/packages/sartre/package.py @@ -0,0 +1,46 @@ +# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class Sartre(CMakePackage): + """Sartre 1 is an event generator for exclusive diffractive vector + meson production and DVCS in ep and eA collisions based on the + dipole model.""" + + homepage = "https://sartre.hepforge.org" + url = "https://sartre.hepforge.org/downloads/?f=sartre-1.39-src.tgz" + list_url = "https://sartre.hepforge.org/downloads/" + + maintainers("wdconinc") + + version("1.39", sha256="82ed77243bea61bb9335f705c4b132f0b53d0de17c26b89389fa9cd3adcef44d") + + parallel = False + + depends_on("gsl") + depends_on("root") + depends_on("boost@1.39: +thread") + + # FIXME cuba is vendored in 1.39 + # depends_on("cuba@4:") + + def patch(self): + for file in ["CMakeLists.txt", "src/CMakeLists.txt", "gemini/CMakeLists.txt"]: + filter_file( + r"set\(CMAKE_CXX_STANDARD 11\)", + 'set(CMAKE_CXX_STANDARD 11 CACHE STRING "C++ standard")', + file, + ) + filter_file(r"\$\{CMAKE_INSTALL_PREFIX\}/sartre", "${CMAKE_INSTALL_PREFIX}", file) + filter_file(r"DESTINATION sartre/", "DESTINATION ", file) + + def cmake_args(self): + args = [ + "-DCMAKE_CXX_STANDARD={0}".format(self.spec["root"].variants["cxxstd"].value), + "-DMULTITHREADED=ON", + ] + return args |