From f8ab517fe2ed179a90381362a6af1f441b743d05 Mon Sep 17 00:00:00 2001 From: jmcarcell Date: Wed, 5 Jun 2024 15:52:07 +0200 Subject: [PATCH 1/8] Add a recipe for CLDConfig --- packages/cldconfig/package.py | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 packages/cldconfig/package.py diff --git a/packages/cldconfig/package.py b/packages/cldconfig/package.py new file mode 100644 index 00000000..f5c1d5a5 --- /dev/null +++ b/packages/cldconfig/package.py @@ -0,0 +1,30 @@ +# Copyright 2013-2020 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 Cldconfig(CMakePackage): + """Configuration files for the CLD detector concept""" + + homepage = "https://github.com/key4hep/CLDConfig" + git = "https://github.com/key4hep/CLDConfig" + + maintainers = ["jmcarcell"] + + version("main", branch="main") + + depends_on("k4geo", type="test") + depends_on("dd4hep", type="test") + depends_on("k4fwcore", type="test") + + def cmake_args(self): + args = [] + if "root" in self.spec: + args.append( + f"-DCMAKE_CXX_STANDARD={self.spec['root'].variants['cxxstd'].value}" + ) + args.append("-DBUILD_TESTING=%s" % self.run_tests) + return args From 728192a3a8a552faa2eba1a012c441e9d0c48e4e Mon Sep 17 00:00:00 2001 From: jmcarcell Date: Wed, 5 Jun 2024 16:14:09 +0200 Subject: [PATCH 2/8] Add CLDConfig to the stack --- packages/key4hep-stack/package.py | 1 + scripts/fetch_nightly_versions.py | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/key4hep-stack/package.py b/packages/key4hep-stack/package.py index 698e7713..7a7b52d4 100644 --- a/packages/key4hep-stack/package.py +++ b/packages/key4hep-stack/package.py @@ -51,6 +51,7 @@ class Key4hepStack(BundlePackage, Key4hepPackage): depends_on("babayaga") depends_on("bdsim") depends_on("bhlumi") + depends_on("cldconfig") depends_on("dd4hep") depends_on("delphes") depends_on("edm4hep") diff --git a/scripts/fetch_nightly_versions.py b/scripts/fetch_nightly_versions.py index 2c37b5e5..44716a00 100755 --- a/scripts/fetch_nightly_versions.py +++ b/scripts/fetch_nightly_versions.py @@ -105,6 +105,7 @@ def get_latest_commit( ("ced", "ilcsoft/ced"), ("cedviewer", "ilcsoft/cedviewer"), # ("cepcsw", "cepc/cepcsw"), + ("cldconfig", "key4hep/CLDConfig"), ("clicperformance", "ilcsoft/clicperformance"), ("conformaltracking", "ilcsoft/conformaltracking"), ("dd4hep", "aidasoft/dd4hep"), From f5c7f6996ae7ddcac47232e25d71545ec8f09385 Mon Sep 17 00:00:00 2001 From: jmcarcell Date: Wed, 5 Jun 2024 16:17:33 +0200 Subject: [PATCH 3/8] Add a tag --- packages/cldconfig/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/cldconfig/package.py b/packages/cldconfig/package.py index f5c1d5a5..515bcdb9 100644 --- a/packages/cldconfig/package.py +++ b/packages/cldconfig/package.py @@ -15,6 +15,7 @@ class Cldconfig(CMakePackage): maintainers = ["jmcarcell"] version("main", branch="main") + version("v02-04-01", tag="v02-04-01") depends_on("k4geo", type="test") depends_on("dd4hep", type="test") From 068a0908ff623279f4fc895769a6bf0fb34c8d15 Mon Sep 17 00:00:00 2001 From: jmcarcell Date: Wed, 5 Jun 2024 16:18:07 +0200 Subject: [PATCH 4/8] Add comment --- packages/cldconfig/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/cldconfig/package.py b/packages/cldconfig/package.py index 515bcdb9..002e55a1 100644 --- a/packages/cldconfig/package.py +++ b/packages/cldconfig/package.py @@ -15,6 +15,8 @@ class Cldconfig(CMakePackage): maintainers = ["jmcarcell"] version("main", branch="main") + # Old tag to make sure there is at least one, can be removed when + # there is another version("v02-04-01", tag="v02-04-01") depends_on("k4geo", type="test") From 2a048c4a2ff1624a7eff8d455c893bad9e925be2 Mon Sep 17 00:00:00 2001 From: jmcarcell Date: Wed, 5 Jun 2024 16:24:32 +0200 Subject: [PATCH 5/8] Remove the cxxstd --- packages/cldconfig/package.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/packages/cldconfig/package.py b/packages/cldconfig/package.py index 002e55a1..3248ec9a 100644 --- a/packages/cldconfig/package.py +++ b/packages/cldconfig/package.py @@ -25,9 +25,5 @@ class Cldconfig(CMakePackage): def cmake_args(self): args = [] - if "root" in self.spec: - args.append( - f"-DCMAKE_CXX_STANDARD={self.spec['root'].variants['cxxstd'].value}" - ) args.append("-DBUILD_TESTING=%s" % self.run_tests) return args From 3244942ef48a96e31fffb61b9053937e22671b5b Mon Sep 17 00:00:00 2001 From: jmcarcell Date: Wed, 5 Jun 2024 16:38:24 +0200 Subject: [PATCH 6/8] Add some dependencies --- packages/cldconfig/package.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/cldconfig/package.py b/packages/cldconfig/package.py index 3248ec9a..3a7f9d98 100644 --- a/packages/cldconfig/package.py +++ b/packages/cldconfig/package.py @@ -22,6 +22,12 @@ class Cldconfig(CMakePackage): depends_on("k4geo", type="test") depends_on("dd4hep", type="test") depends_on("k4fwcore", type="test") + depends_on("k4marlinwrapper", type="test") + depends_on("marlintrkprocessors", type="test") + depends_on("conformaltracking", type="test") + depends_on("ddmarlinpandora", type="test") + depends_on("clicperformance", type="test") + depends_on("lcfiplus", type="test") def cmake_args(self): args = [] From 45feba09d66c5627af72b580c7b72d49d913f57a Mon Sep 17 00:00:00 2001 From: jmcarcell Date: Wed, 5 Jun 2024 16:48:49 +0200 Subject: [PATCH 7/8] Add an env variable --- packages/cldconfig/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/cldconfig/package.py b/packages/cldconfig/package.py index 3a7f9d98..7374e4db 100644 --- a/packages/cldconfig/package.py +++ b/packages/cldconfig/package.py @@ -33,3 +33,6 @@ def cmake_args(self): args = [] args.append("-DBUILD_TESTING=%s" % self.run_tests) return args + + def setup_run_environment(self, env): + env.prepend_path("CLDCONFIG", self.prefix) From 5ddadfacf5df5fd708b4024ba5e49c5c65755681 Mon Sep 17 00:00:00 2001 From: jmcarcell Date: Wed, 5 Jun 2024 16:53:54 +0200 Subject: [PATCH 8/8] Add marlinfastjet --- packages/cldconfig/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/cldconfig/package.py b/packages/cldconfig/package.py index 7374e4db..4b98bfb4 100644 --- a/packages/cldconfig/package.py +++ b/packages/cldconfig/package.py @@ -28,6 +28,7 @@ class Cldconfig(CMakePackage): depends_on("ddmarlinpandora", type="test") depends_on("clicperformance", type="test") depends_on("lcfiplus", type="test") + depends_on("marlinfastjet", type="test") def cmake_args(self): args = []