File indexing completed on 2025-09-17 08:07:14
0001 from spack.package import *
0002 from spack.spec import Spec
0003
0004 try:
0005 from spack_repo.builtin.packages.acts.package import Acts as BuiltinActs
0006 except:
0007 from spack.pkg.builtin.acts import Acts as BuiltinActs
0008
0009 class Acts(BuiltinActs):
0010 def __init__(self, spec):
0011 super(Acts, self).__init__(spec)
0012
0013 for _spec in ["@:35+edm4hep", "@:35+podio"]:
0014 if Spec(_spec) in Acts.dependencies:
0015 del Acts.dependencies[Spec(_spec)]
0016
0017
0018 variant("pr4620", default=False, description="Acts#4620: ensure DD4hep ProtoLayer understands local coordinate extent")
0019 patch("pr4620.patch", when="@36:42 +pr4620")
0020 conflicts("+pr4620", when="~pr4502")
0021
0022 variant("pr4502", default=False, description="Acts#4502: propagate transform to ProtoLayer in DD4hep builder")
0023 patch(
0024 "https://github.com/acts-project/acts/pull/4502.patch?full_index=1",
0025 sha256="d9bb4c9748233ac9f9e2bed3fc7d3aec9e5f5181729243be93b9c6eeee7db737",
0026 when="@36:42 +pr4502",
0027 )
0028 variant("pr4496", default=False, description="Acts#4496: enlarge cylinder volume rmax for layers with displaced center")
0029 patch(
0030 "https://github.com/acts-project/acts/pull/4496.patch?full_index=1",
0031 sha256="5aa1fee7437aaac8dc70bbac728c73fa42e59dd2e75ee4d2e7fbde1845889d08",
0032 when="@9:42 +pr4496",
0033 )
0034
0035
0036 patch(
0037 "https://github.com/acts-project/acts/pull/4456.patch?full_index=1",
0038 sha256="d93a2792b40a82a412975ab183878e9f9d69a5018eef7a0a757ba650d31ab941",
0039 when="@39:",
0040 )
0041
0042
0043 patch("Plugins_Cuda_CMakeLists.patch", when="@38:39.0")
0044
0045
0046 patch(
0047 "https://github.com/acts-project/acts/pull/4380.patch?full_index=1",
0048 sha256="85e7b52a21c9933d503e47a4d02e20fee61cb9d41fbe8c1471070d42a20d8ec8",
0049 when="@30.3.0:41",
0050 )
0051
0052
0053 patch(
0054 "https://github.com/acts-project/acts/commit/50dcda3890ce75b28b1485131b8da698603a73be.patch?full_index=1",
0055 sha256="4826f9718dba083cb67583ec7751550e9d39980649404272aa1b1c78247e4050",
0056 when="@35",
0057 )
0058 conflicts("^geant4@11.3:", when="@:34")
0059
0060
0061 patch(
0062 "https://github.com/acts-project/acts/commit/8fce1a7b32aa39f967919adc4cabebbfde2a7a97.patch?full_index=1",
0063 sha256="78d4fac4235f7659c674a267f11e2d5bcad82af0d9df2036ef620d64997497d0",
0064 when="@30.3.0:34.0",
0065 )
0066
0067
0068 patch(
0069 "https://github.com/acts-project/acts/pull/3132.patch?full_index=1",
0070 sha256="e0c97940abc2b4eab50834f76dcfcf2e651b7bf961ad3dd6e124a56d4d5e1779",
0071 when="@30.3.0:34.0",
0072 )
0073 patch(
0074 "https://github.com/acts-project/acts/commit/3255dfc3dddf9c7a82aaddb041d4a6f095d19124.patch?full_index=1",
0075 sha256="60317f6a09a7d57721c1234fcf087ae85aeab27653976d1d3ac7a846c3b85a89",
0076 when="@20.1.0:26",
0077 )
0078
0079 @when("@33:35")
0080 def patch(self):
0081
0082 filter_file("_acts_podio_version 0.16", "_acts_podio_version 1.0", "CMakeLists.txt")
0083
0084 def cmake_args(self):
0085 args = super().cmake_args()
0086 if self.spec.satisfies("^python"):
0087 args.append(self.define("Python_EXECUTABLE", self.spec["python"].command.path))
0088 return args
0089
0090
0091
0092 _acts = Acts(Spec("acts"))