summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/relax/package.py
blob: c8f7cac42093da5d455f9f25b067b4c289be8e17 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# 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 Relax(CMakePackage):
    """A set of Reflex libraries for the most common used general data types in
    the LHC Computing Grid"""

    homepage = "https://twiki.cern.ch/twiki/bin/view/LCG/RELAX"
    url = "http://lcgpackages.web.cern.ch/lcgpackages/tarFiles/sources/RELAX-1.tar.gz"

    tags = ["hep"]

    version("root6", sha256="1d24b1a0884bbe99d60f7d02fea45d59695c158ab5e53516ac3fb780eb460bb4")

    depends_on("clhep")
    depends_on("gsl")
    depends_on("hepmc@:2")
    depends_on("root@6.0.0:")

    def cmake_args(self):
        spec = self.spec
        cxxstd = self.spec["root"].variants["cxxstd"].value
        hepmc_lib = spec["hepmc"].prefix.lib.join("libHepMC.so")

        args = [
            "-DCMAKE_CXX_STANDARD={0}".format(cxxstd),
            "-DROOT_BINARY_PATH={0}".format(spec["root"].prefix.bin),
            "-DHEPMC_INCLUDE_DIR={0}".format(spec["hepmc"].prefix.include),
            "-DHEPMC_LIBRARIES={0}".format(hepmc_lib),
        ]

        return args