From fa4b9a6abc54eacd4d6859c972a0a81913d59657 Mon Sep 17 00:00:00 2001 From: Valentin Volkl Date: Thu, 15 Jul 2021 14:06:41 +0200 Subject: simsipm: add new package (#24903) Co-authored-by: Massimiliano Culpo --- .../repos/builtin/packages/simsipm/package.py | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 var/spack/repos/builtin/packages/simsipm/package.py (limited to 'var') diff --git a/var/spack/repos/builtin/packages/simsipm/package.py b/var/spack/repos/builtin/packages/simsipm/package.py new file mode 100644 index 0000000000..9db1d87c82 --- /dev/null +++ b/var/spack/repos/builtin/packages/simsipm/package.py @@ -0,0 +1,38 @@ +# Copyright 2013-2021 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 import * + + +class Simsipm(CMakePackage): + """SimSiPM is a simple and easy to use C++ library providing a set of + object-oriented tools with all the functionality needed to describe + and simulate Silicon PhotonMultipliers (SiPM) sensors.""" + + url = "https://github.com/EdoPro98/SimSiPM/archive/refs/tags/v1.2.4.tar.gz" + homepage = "https://github.com/EdoPro98/SimSiPM/" + git = "https://github.com/EdoPro98/SimSiPM.git" + + tags = ['hep'] + + maintainers = ['vvolkl'] + + version('1.2.4', sha256='1c633bebb19c490b5e6dfa5ada4a6bc7ec36348237c2626d57843a25af923211') + + variant('python', default=False, description="Build pybind11-based python bindings") + variant('openmp', default=False, description="Use OpenMP") + + extends('python', when='+python') + depends_on('python@3.6:', when="+python", type=('build', 'run')) + depends_on('py-pybind11', when="+python", type=('build', 'link')) + + def cmake_args(self): + args = [ + self.define_from_variant("SIPM_BUILD_PYTHON", "python"), + self.define_from_variant("SIPM_ENABLE_OPENMP", "openmp"), + self.define("SIPM_ENABLE_TEST", self.run_tests), + + ] + return args -- cgit v1.2.3-70-g09d2