summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/garfieldpp/package.py
blob: 677612ca5cc73fbe88c35e86f41f4a8048109541 (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
# 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 Garfieldpp(CMakePackage):
    """Garfield++ is a toolkit for the detailed simulation of particle
    detectors based on ionisation measurement in gases and semiconductors."""

    homepage = "https://garfieldpp.web.cern.ch/garfieldpp/"
    url = "https://gitlab.cern.ch/garfield/garfieldpp/-/archive/4.0/garfieldpp-4.0.tar.gz"
    git = "https://gitlab.cern.ch/garfield/garfieldpp.git"

    tags = ["hep"]

    maintainers = ["mirguest"]

    variant("examples", default=False, description="Build garfield examples")

    version("master", branch="master")
    version("4.0", sha256="82bc1f0395213bd30a7cd854426e6757d0b4155e99ffd4405355c9648fa5ada3")
    version("3.0", sha256="c1282427a784658bc38b71c8e8cfc8c9f5202b185f0854d85f7c9c5a747c5406")

    depends_on("root")
    depends_on("gsl")
    depends_on("geant4", when="+examples")

    def cmake_args(self):
        args = [self.define_from_variant("WITH_EXAMPLES", "examples")]
        return args