summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeth R. Johnson <johnsonsr@ornl.gov>2024-11-25 15:27:38 -0500
committerGitHub <noreply@github.com>2024-11-25 14:27:38 -0600
commit83624551e0889cd67edbd7e7a9e2c3d0295956b4 (patch)
tree8c6bed6d63fd20c09b60de1d84c8faab711e206c
parent741652caa105edcc0414d6a8f0d94bd4ba20a736 (diff)
downloadspack-83624551e0889cd67edbd7e7a9e2c3d0295956b4.tar.gz
spack-83624551e0889cd67edbd7e7a9e2c3d0295956b4.tar.bz2
spack-83624551e0889cd67edbd7e7a9e2c3d0295956b4.tar.xz
spack-83624551e0889cd67edbd7e7a9e2c3d0295956b4.zip
ROOT: default to +aqua~x on macOS (#47792)
-rw-r--r--var/spack/repos/builtin/packages/root/package.py27
1 files changed, 16 insertions, 11 deletions
diff --git a/var/spack/repos/builtin/packages/root/package.py b/var/spack/repos/builtin/packages/root/package.py
index 8aa95df8a2..73b016a271 100644
--- a/var/spack/repos/builtin/packages/root/package.py
+++ b/var/spack/repos/builtin/packages/root/package.py
@@ -12,6 +12,8 @@ from spack.operating_systems.mac_os import macos_version
from spack.package import *
from spack.util.environment import is_system_path
+_is_macos = sys.platform == "darwin"
+
class Root(CMakePackage):
"""ROOT is a data analysis framework."""
@@ -156,7 +158,7 @@ class Root(CMakePackage):
when="@6.32.0:6.32.02",
)
- if sys.platform == "darwin":
+ if _is_macos:
# Resolve non-standard use of uint, _cf_
# https://sft.its.cern.ch/jira/browse/ROOT-7886.
patch("math_uint.patch", when="@6.06.02")
@@ -186,7 +188,7 @@ class Root(CMakePackage):
# See README.md for specific notes about what ROOT configuration
# options are or are not supported, and why.
- variant("aqua", default=False, description="Enable Aqua interface")
+ variant("aqua", default=_is_macos, description="Enable native macOS (Cocoa) interface")
variant("arrow", default=False, description="Enable Arrow interface")
variant("cuda", when="@6.08.00:", default=False, description="Enable CUDA support")
variant("cudnn", when="@6.20.02:", default=False, description="Enable cuDNN support")
@@ -288,7 +290,7 @@ class Root(CMakePackage):
variant(
"webgui", default=True, description="Enable web-based UI components of ROOT", when="+root7"
)
- variant("x", default=True, description="Enable set of graphical options")
+ variant("x", default=(not _is_macos), description="Enable set of graphical options")
variant("xml", default=True, description="Enable XML parser interface")
variant("xrootd", default=False, description="Build xrootd file server and its client")
@@ -429,7 +431,7 @@ class Root(CMakePackage):
conflicts("target=ppc64le:", when="@:6.24")
# Incompatible variants
- if sys.platform == "darwin":
+ if _is_macos:
conflicts("+opengl", when="~x ~aqua", msg="root+opengl requires X or Aqua")
# https://github.com/root-project/root/issues/7160
conflicts("+aqua", when="~opengl", msg="+aqua requires OpenGL to be enabled")
@@ -455,15 +457,15 @@ class Root(CMakePackage):
conflicts("%clang@16:", when="@:6.26.07", msg="clang 16+ support was added in root 6.26.08")
# See https://github.com/spack/spack/pull/44826
- if sys.platform == "darwin" and macos_version() == Version("12"):
+ if _is_macos and macos_version() == Version("12"):
conflicts("@:6.27", when="+python", msg="macOS 12 python support for 6.28: only")
# See https://github.com/root-project/root/issues/11714
- if sys.platform == "darwin" and macos_version() >= Version("13"):
+ if _is_macos and macos_version() >= Version("13"):
conflicts("@:6.26.09", msg="macOS 13 support was added in root 6.26.10")
# See https://github.com/root-project/root/issues/16219
- if sys.platform == "darwin" and macos_version() >= Version("15"):
+ if _is_macos and macos_version() >= Version("15"):
conflicts("@:6.32.05", msg="macOS 15 support was added in root 6.32.06")
# ROOT <6.14 is incompatible with Python >=3.7, which is the minimum supported by spack
@@ -627,8 +629,6 @@ class Root(CMakePackage):
# Options related to ROOT's ability to download and build its own
# dependencies. Per Spack convention, this should generally be avoided.
- afterimage_enabled = ("+x" in self.spec) if "platform=darwin" not in self.spec else True
-
options += [
define("builtin_cfitsio", False),
define("builtin_davix", False),
@@ -655,7 +655,12 @@ class Root(CMakePackage):
]
if self.spec.satisfies("@:6.32"):
- options.append(define("builtin_afterimage", afterimage_enabled))
+ options.append(
+ define(
+ "builtin_afterimage",
+ ("+x" in self.spec) if "platform=darwin" not in self.spec else True,
+ )
+ )
# Features
options += [
@@ -764,7 +769,7 @@ class Root(CMakePackage):
# #################### Compiler options ####################
- if sys.platform == "darwin" and self.compiler.cc == "gcc":
+ if _is_macos and self.compiler.cc == "gcc":
cflags = "-D__builtin_unreachable=__builtin_trap"
options.extend([define("CMAKE_C_FLAGS", cflags), define("CMAKE_CXX_FLAGS", cflags)])