summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvvolkl <valentin.volkl@cern.ch>2020-12-11 15:15:41 +0100
committerGitHub <noreply@github.com>2020-12-11 15:15:41 +0100
commite6f2fa34d050cf0df5c9986418388c181dae6f77 (patch)
tree21c4e8894da2b45a1a676cdbc1265ec48fb82a35
parentd55dfe07d92b744cc87600e551f3215dfd6669dd (diff)
downloadspack-e6f2fa34d050cf0df5c9986418388c181dae6f77.tar.gz
spack-e6f2fa34d050cf0df5c9986418388c181dae6f77.tar.bz2
spack-e6f2fa34d050cf0df5c9986418388c181dae6f77.tar.xz
spack-e6f2fa34d050cf0df5c9986418388c181dae6f77.zip
dd4hep: added v01-15, edm4hep variant and updated url_for_version (#20304)
-rw-r--r--var/spack/repos/builtin/packages/dd4hep/package.py51
1 files changed, 32 insertions, 19 deletions
diff --git a/var/spack/repos/builtin/packages/dd4hep/package.py b/var/spack/repos/builtin/packages/dd4hep/package.py
index 1e1fa29e8e..dffb6fac47 100644
--- a/var/spack/repos/builtin/packages/dd4hep/package.py
+++ b/var/spack/repos/builtin/packages/dd4hep/package.py
@@ -24,22 +24,23 @@ class Dd4hep(CMakePackage):
tags = ['hep']
version('master', branch='master')
+ version('1.15', sha256='992a24bd4b3dfaffecec9d1c09e8cde2c7f89d38756879a47b23208242f4e352')
version('1.14.1', sha256='5b5742f1e23c2b36d3174cca95f810ce909c0eb66f3d6d7acb0ba657819e6717')
- version('1.14.0', sha256='b603aa3c0db8dda392253aa71fa4a0f0c3c9715d47df0b895d45c1e8849f4895')
+ version('1.14', sha256='b603aa3c0db8dda392253aa71fa4a0f0c3c9715d47df0b895d45c1e8849f4895')
version('1.13.1', sha256='83fa70cd74ce93b2f52f098388dff58d179f05ace5b50aea3f408bb8abf7cb73')
- version('1.13.0', sha256='0b1f9d902ebe21a9178c1e41204c066b29f68c8836fd1d03a9ce979811ddb295')
+ version('1.13', sha256='0b1f9d902ebe21a9178c1e41204c066b29f68c8836fd1d03a9ce979811ddb295')
version('1.12.1', sha256='85e8c775ec03c499ce10911e228342e757c81ce9ef2a9195cb253b85175a2e93')
- version('1.12.0', sha256='133a1fb8ce0466d2482f3ebb03e60b3bebb9b2d3e33d14ba15c8fbb91706b398')
+ version('1.12', sha256='133a1fb8ce0466d2482f3ebb03e60b3bebb9b2d3e33d14ba15c8fbb91706b398')
version('1.11.2', sha256='96a53dd26cb8df11c6dae54669fbc9cc3c90dd47c67e07b24be9a1341c95abc4')
version('1.11.1', sha256='d7902dd7f6744bbda92f6e303ad5a3410eec4a0d2195cdc86f6c1167e72893f0')
- version('1.11.0', sha256='25643296f15f9d11ad4ad550b7c3b92e8974fc56f1ee8e4455501010789ae7b6')
- version('1.10.0', sha256='1d6b5d1c368dc8bcedd9c61b7c7e1a44bad427f8bd34932516aff47c88a31d95')
+ version('1.11', sha256='25643296f15f9d11ad4ad550b7c3b92e8974fc56f1ee8e4455501010789ae7b6')
+ version('1.10', sha256='1d6b5d1c368dc8bcedd9c61b7c7e1a44bad427f8bd34932516aff47c88a31d95')
generator = 'Ninja'
# Workarounds for various TBB issues in DD4hep v1.11
# See https://github.com/AIDASoft/DD4hep/pull/613 .
- patch('tbb-workarounds.patch', when='@1.11.0')
+ patch('tbb-workarounds.patch', when='@1.11')
patch('tbb2.patch', when='@1.12.1')
variant('xercesc', default=False, description="Enable 'Detector Builders' based on XercesC")
@@ -47,6 +48,7 @@ class Dd4hep(CMakePackage):
variant('assimp', default=False, description="Enable CAD interface based on Assimp")
variant('hepmc3', default=False, description="Enable build with hepmc3")
variant('lcio', default=False, description="Enable build with lcio")
+ variant('edm4hep', default=True, description="Enable build with edm4hep")
variant('debug', default=False, description="Enable debug build")
depends_on('cmake @3.12:', type='build')
@@ -59,6 +61,7 @@ class Dd4hep(CMakePackage):
depends_on('assimp', when='+assimp')
depends_on('hepmc3', when="+hepmc3")
depends_on('lcio', when="+lcio")
+ depends_on('edm4hep', when="+edm4hep")
def cmake_args(self):
spec = self.spec
@@ -67,13 +70,14 @@ class Dd4hep(CMakePackage):
if cxxstd == "11":
cxxstd = "14"
args = [
+ self.define_from_variant('DD4HEP_USE_EDM4HEP', 'edm4hep'),
+ self.define_from_variant('DD4HEP_USE_XERCESC', 'xercesc'),
+ self.define_from_variant('DD4HEP_USE_GEANT4', 'geant4'),
+ self.define_from_variant('DD4HEP_USE_LCIO', 'lcio'),
+ self.define_from_variant('DD4HEP_USE_HEPMC3', 'hepmc3'),
+ self.define_from_variant('DD4HEP_LOAD_ASSIMP', 'assimp'),
+ self.define_from_variant('DD4HEP_BUILD_DEBUG', 'debug'),
"-DCMAKE_CXX_STANDARD={0}".format(cxxstd),
- "-DDD4HEP_USE_XERCESC={0}".format(spec.satisfies('+xercesc')),
- "-DDD4HEP_USE_GEANT4={0}".format(spec.satisfies('+geant4')),
- "-DDD4HEP_USE_LCIO={0}".format(spec.satisfies('+lcio')),
- "-DDD4HEP_LOAD_ASSIMP={0}".format(spec.satisfies('+assimp')),
- "-DDD4HEP_USE_HEPMC3={0}".format(spec.satisfies('+hepmc3')),
- "-DDD4HEP_BUILD_DEBUG={0}".format(spec.satisfies('+debug')),
"-DBUILD_TESTING={0}".format(self.run_tests),
"-DBOOST_ROOT={0}".format(spec['boost'].prefix),
"-DBoost_NO_BOOST_CMAKE=ON",
@@ -91,11 +95,20 @@ class Dd4hep(CMakePackage):
# dd4hep releases are dashes and padded with a leading zero
# the patch version is omitted when 0
# so for example v01-12-01, v01-12 ...
- major = (str(version[0]).zfill(2))
- minor = (str(version[1]).zfill(2))
- patch = (str(version[2]).zfill(2))
- if version[2] == 0:
- url = "https://github.com/AIDASoft/DD4hep/archive/v%s-%s.tar.gz" % (major, minor)
+ base_url = self.url.rsplit('/', 1)[0]
+ if len(version) == 1:
+ major = version[0]
+ minor, patch = 0, 0
+ elif len(version) == 2:
+ major, minor = version
+ patch = 0
else:
- url = "https://github.com/AIDASoft/DD4hep/archive/v%s-%s-%s.tar.gz" % (major, minor, patch)
- return url
+ major, minor, patch = version
+ # By now the data is normalized enough to handle it easily depending
+ # on the value of the patch version
+ if patch == 0:
+ version_str = 'v%02d-%02d.tar.gz' % (major, minor)
+ else:
+ version_str = 'v%02d-%02d-%02d.tar.gz' % (major, minor, patch)
+
+ return base_url + '/' + version_str