Skip to content

Commit 0844bd0

Browse files
authored
ROOT: use github mirror, clean dangling version references (spack#2871)
* ROOT: use github instead of cern for downloads * ROOT: delete references to removed versions which required python 2.7 * Revert generic url and add specific urls * Fix use of removed variants * [@spackbot] updating style on behalf of sethrj * use url_for_version * [@spackbot] updating style on behalf of sethrj
1 parent 935196d commit 0844bd0

File tree

2 files changed

+15
-85
lines changed

2 files changed

+15
-85
lines changed

repos/spack_repo/builtin/packages/gaudi/package.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,6 @@ class Gaudi(CMakePackage, CudaPackage):
176176
depends_on("py-pyyaml", type=("build", "run", "test"))
177177
depends_on("range-v3")
178178
depends_on("root +python +root7 +ssl +tbb")
179-
requires("^root +threads", when="^root@:6.19.01")
180179
# force root to have the same cxxstd
181180
for _cxxstd in _cxxstd_values:
182181
for _v in _cxxstd:

repos/spack_repo/builtin/packages/root/package.py

Lines changed: 15 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,6 @@ class Root(CMakePackage):
116116
# Widely used patch (CMS, FNAL) to increase the size of static
117117
# buffers used to improve the operation of TString.
118118
patch("format-stringbuf-size.patch", level=0)
119-
# Support use of `mariadb-c-client` and `mariadb` to provide the
120-
# MySQL API _cf_
121-
# https://github.com/root-project/root/commit/9c0fa8c554a569c971185249f9acfff4418c0c13.
122-
patch("find-mysql.patch", level=1, when="@:6.16.00")
123119
# Some ROOT versions did not honor the option to avoid building an
124120
# internal version of unuran, _cf_
125121
# https://github.com/root-project/ROOT/commit/3e60764f133218b6938e5aa4986de760e8f058d9.
@@ -281,15 +277,13 @@ class Root(CMakePackage):
281277
variant("spectrum", default=False, description="Enable support for TSpectrum")
282278
variant("sqlite", default=False, description="Enable SQLite support")
283279
variant("ssl", default=False, description="Enable SSL encryption support")
284-
variant("table", when="@:6.17", default=False, description="Build libTable contrib library")
285280
variant("tbb", default=True, description="TBB multi-threading support")
286281
variant(
287282
"tiff",
288283
when="@6.36:",
289284
default=True,
290285
description="Support TIFF in image processing (requires libtiff)",
291286
)
292-
variant("threads", when="@:6.19.01", default=True, description="Enable using thread library")
293287
variant("tmva", default=False, description="Build TMVA multi variate analysis library")
294288
variant(
295289
"tmva-cpu",
@@ -334,9 +328,6 @@ class Root(CMakePackage):
334328
variant(
335329
"veccore", default=False, description="Enable support for VecCore SIMD abstraction library"
336330
)
337-
variant(
338-
"vmc", when="@:6.25", default=False, description="Enable the Virtual Monte Carlo interface"
339-
)
340331
variant(
341332
"webgui", default=True, description="Enable web-based UI components of ROOT", when="+root7"
342333
)
@@ -365,7 +356,6 @@ class Root(CMakePackage):
365356
depends_on("cxx", type="build")
366357
depends_on("fortran", type="build", when="+fortran")
367358

368-
depends_on("[email protected]:", type="build", when="@:6.16")
369359
depends_on("[email protected]:", type="build", when="@6.18.00:")
370360
depends_on("[email protected]:", type="build", when="@6.26.00:")
371361
depends_on("[email protected]:", type="build", when="@6.28.00: platform=darwin")
@@ -426,7 +416,6 @@ class Root(CMakePackage):
426416

427417
# Python
428418
depends_on("[email protected]:", when="+python", type=("build", "run"))
429-
depends_on("[email protected]:3.10", when="@:6.26.09 +python", type=("build", "run"))
430419
depends_on("[email protected]:", when="@6.34.00: +python", type=("build", "run"))
431420
depends_on("py-numpy", type=("build", "run"), when="+tmva-pymva")
432421
# See: https://sft.its.cern.ch/jira/browse/ROOT-10626
@@ -456,7 +445,6 @@ class Root(CMakePackage):
456445
depends_on("mysql-client", when="+mysql")
457446
depends_on("openssl", when="+ssl")
458447
depends_on("openssl", when="+davix") # Also with davix
459-
depends_on("[email protected]", when="+oracle @:6.24.01")
460448
depends_on("postgresql", when="+postgres")
461449
depends_on("pythia6+root", when="+pythia6")
462450
depends_on("pythia8", when="+pythia8")
@@ -468,16 +456,6 @@ class Root(CMakePackage):
468456
depends_on("shadow", when="+shadow")
469457
depends_on("sqlite", when="+sqlite")
470458
depends_on("tbb", when="+tbb")
471-
# See: https://github.com/root-project/root/issues/6933
472-
conflicts(
473-
"^[email protected]:", when="@:6.22", msg="Please use an older intel-tbb version for ROOT"
474-
)
475-
conflicts(
476-
477-
when="@:6.22",
478-
msg="Please use an older intel-tbb/intel-oneapi-tbb version for ROOT",
479-
)
480-
# depends_on('intel-tbb@:2021.0', when='@:6.22 ^intel-tbb')
481459
depends_on("unuran", when="+unuran")
482460
depends_on("[email protected]:", when="@6.07.04: +vc")
483461
depends_on("[email protected]:", when="@6.09.02: +vc")
@@ -496,19 +474,9 @@ class Root(CMakePackage):
496474
# See https://sft.its.cern.ch/jira/browse/ROOT-7517
497475
conflicts("%intel")
498476

499-
# ROOT <6.08 was incompatible with the GCC 5+ ABI
500-
conflicts("%gcc@5:", when="@:6.07")
501-
502-
# The version of Clang featured in ROOT <6.12 fails to build with
503-
# GCC 9.2.1, which we can safely extrapolate to the GCC 9 series.
504-
conflicts("%gcc@9:", when="@:6.11")
505-
506477
# GCC 15 support was added in 6.34.04
507478
conflicts("%gcc@15:", when="@:6.34.02")
508479

509-
# See https://github.com/root-project/root/issues/9297
510-
conflicts("target=ppc64le:", when="@:6.24")
511-
512480
# Incompatible variants
513481
if _is_macos:
514482
conflicts("+opengl", when="~x ~aqua", msg="root+opengl requires X or Aqua")
@@ -537,24 +505,10 @@ class Root(CMakePackage):
537505

538506
conflicts("%gcc@:10", when="cxxstd=20")
539507

540-
# See https://github.com/root-project/root/issues/11128
541-
conflicts("%clang@16:", when="@:6.26.07", msg="clang 16+ support was added in root 6.26.08")
542-
543-
# See https://github.com/spack/spack/pull/44826
544-
if _is_macos and macos_version() == Version("12"):
545-
conflicts("@:6.27", when="+python", msg="macOS 12 python support for 6.28: only")
546-
547-
# See https://github.com/root-project/root/issues/11714
548-
if _is_macos and macos_version() >= Version("13"):
549-
conflicts("@:6.26.09", msg="macOS 13 support was added in root 6.26.10")
550-
551508
# See https://github.com/root-project/root/issues/16219
552509
if _is_macos and macos_version() >= Version("15"):
553510
conflicts("@:6.32.05", msg="macOS 15 support was added in root 6.32.06")
554511

555-
# ROOT <6.14 is incompatible with Python >=3.7, which is the minimum supported by spack
556-
conflicts("+python", when="@:6.13", msg="Spack wants python >=3.7, too new for ROOT <6.14")
557-
558512
# ROOT does not support LTO builds
559513
# See https://github.com/root-project/root/issues/11135
560514
conflicts("+ipo", msg="LTO is not a supported configuration for building ROOT")
@@ -636,8 +590,6 @@ def _add_variant(variants, features, featurename, variantname):
636590
_add_variant(v, f, ("imt", "tbb"), "+tbb")
637591
if Version(version_str) <= Version("6.28"):
638592
_add_variant(v, f, "jemalloc", "+jemalloc")
639-
if Version(version_str) <= Version("6.17"):
640-
_add_variant(v, f, "memstat", "+memstat")
641593
_add_variant(v, f, ("minuit", "minuit2"), "+minuit")
642594
_add_variant(v, f, "mlp", "+mlp")
643595
if Version(version_str) <= Version("6.36"):
@@ -650,29 +602,19 @@ def _add_variant(variants, features, featurename, variantname):
650602
_add_variant(v, f, "pythia6", "+pythia6")
651603
_add_variant(v, f, "pythia8", "+pythia8")
652604
_add_variant(v, f, "pyroot", "+python")
653-
if Version(version_str) <= Version("6.17"):
654-
_add_variant(v, f, ("qt", "qtgsi"), "+qt4")
655-
if Version(version_str) >= Version("6.12") and Version(version_str) <= Version("6.34"):
605+
if Version(version_str) <= Version("6.34"):
656606
_add_variant(v, f, "qt5web", "+qt5")
657-
if Version(version_str) >= Version("6.26"):
658-
_add_variant(v, f, "qt6web", "+qt6")
607+
_add_variant(v, f, "qt6web", "+qt6")
659608
_add_variant(v, f, "r", "+r")
660609
_add_variant(v, f, "roofit", "+roofit")
661610
# webui feature renamed to webgui in 6.18
662-
if Version(version_str) >= Version("6.18"):
663-
_add_variant(v, f, ("root7", "webgui"), "+webgui")
664-
else:
665-
_add_variant(v, f, ("root7", "webui"), "+webgui")
611+
_add_variant(v, f, ("root7", "webgui"), "+webgui")
666612
_add_variant(v, f, "rpath", "+rpath")
667613
_add_variant(v, f, "runtime_cxxmodules", "+cxxmodules")
668614
_add_variant(v, f, "shadowpw", "+shadow")
669615
_add_variant(v, f, "spectrum", "+spectrum")
670616
_add_variant(v, f, "sqlite", "+sqlite")
671617
_add_variant(v, f, "ssl", "+ssl")
672-
if Version(version_str) <= Version("6.17"):
673-
_add_variant(v, f, "table", "+table")
674-
if Version(version_str) <= Version("6.19.01"):
675-
_add_variant(v, f, "thread", "+threads")
676618
_add_variant(v, f, "tmva", "+tmva")
677619
_add_variant(v, f, "tmva-cpu", "+tmva-cpu")
678620
_add_variant(v, f, "tmva-gpu", "+tmva-gpu")
@@ -682,13 +624,22 @@ def _add_variant(variants, features, featurename, variantname):
682624
_add_variant(v, f, "vc", "+vc")
683625
_add_variant(v, f, "vdt", "+vdt")
684626
_add_variant(v, f, "veccore", "+veccore")
685-
if Version(version_str) <= Version("6.25"):
686-
_add_variant(v, f, "vmc", "+vmc")
687627
_add_variant(v, f, ("x11", "xft"), "+x")
688628
_add_variant(v, f, "xml", "+xml")
689629
_add_variant(v, f, "xrootd", "+xrootd")
690630
return " ".join(v)
691631

632+
def url_for_version(self, version):
633+
dotted = version.dotted
634+
if version < Version("6.36.04"):
635+
# Older releases available only on CERN mirror
636+
return f"https://root.cern/download/root_v{dotted}.source.tar.gz"
637+
else:
638+
# Faster downloads
639+
dashed = version.dashed
640+
return f"https://github.com/root-project/root/releases/download/v{dashed}/root_v{dotted}.source.tar.gz"
641+
return url.format(version.underscored)
642+
692643
def cmake_args(self):
693644
define = self.define
694645
define_from_variant = self.define_from_variant
@@ -715,13 +666,6 @@ def cmake_args(self):
715666
define("CLING_CXX_PATH", self.compiler.cxx),
716667
]
717668

718-
if self.spec.satisfies("@:6.19.01"):
719-
options += [
720-
define("explicitlink", True),
721-
define("pch", True),
722-
define_from_variant("thread", "threads"),
723-
]
724-
725669
if self.spec.satisfies("@:6.28"):
726670
options.append(define("cxxmodules", False))
727671

@@ -831,7 +775,6 @@ def cmake_args(self):
831775
define_from_variant("sqlite"),
832776
define("srp", False),
833777
define_from_variant("ssl"),
834-
define_from_variant("table"),
835778
define_from_variant("tbb"),
836779
define("tcmalloc", False),
837780
define_from_variant("tmva"),
@@ -840,7 +783,6 @@ def cmake_args(self):
840783
define_from_variant("vc"),
841784
define_from_variant("vdt"),
842785
define_from_variant("veccore"),
843-
define_from_variant("vmc"),
844786
define_from_variant("x11", "x"),
845787
define_from_variant("xft", "x"),
846788
define_from_variant("xml"),
@@ -852,8 +794,6 @@ def cmake_args(self):
852794

853795
# Necessary due to name change of variant (webui->webgui)
854796
# https://github.com/root-project/root/commit/d631c542909f2f793ca7b06abc622e292dfc4934
855-
if self.spec.satisfies("@:6.17.02"):
856-
options.append(define_from_variant("webui", "webgui"))
857797
if self.spec.satisfies("@6.18.00:"):
858798
options.append(define_from_variant("webgui", "webgui"))
859799

@@ -865,9 +805,6 @@ def cmake_args(self):
865805
if self.spec.satisfies("@6.17.02:"):
866806
options.append(define_from_variant("tmva-pymva"))
867807

868-
if self.spec.satisfies("@:6.19.01"):
869-
options += [define("astiff", True), define("cling", True)]
870-
871808
if self.spec.satisfies("@6.20.02:"):
872809
options.append(define_from_variant("cudnn"))
873810
options.append(define_from_variant("pyroot", "python"))
@@ -943,10 +880,8 @@ def add_include_path(dep_name):
943880
env.append_path("SPACK_INCLUDE_DIRS", include_path)
944881

945882
# With that done, let's go fixing those deps
946-
if spec.satisfies("@:6.12"):
947-
add_include_path("zlib-api")
948883
if "+x" in spec:
949-
if spec.satisfies("@:6.08") or spec.satisfies("@6.22:"):
884+
if spec.satisfies("@6.22:"):
950885
add_include_path("xextproto")
951886
add_include_path("fontconfig")
952887
add_include_path("libx11")
@@ -962,11 +897,7 @@ def add_include_path(dep_name):
962897

963898
@property
964899
def root_library_path(self):
965-
# Where possible, we do not use LD_LIBRARY_PATH as that is non-portable
966-
# and pollutes the standard library-loading mechanisms on Linux systems.
967900
# The ROOT_LIBRARY_PATH environment variable was added to ROOT 6.26.
968-
if self.spec.satisfies("@:6.25"):
969-
return "LD_LIBRARY_PATH"
970901
return "ROOT_LIBRARY_PATH"
971902

972903
def setup_run_environment(self, env: EnvironmentModifications) -> None:

0 commit comments

Comments
 (0)