summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorStephen Nicholas Swatman <stephen@v25.nl>2024-09-03 15:32:17 +0200
committerGitHub <noreply@github.com>2024-09-03 08:32:17 -0500
commit5c297d8322590356c927eb22690ec16a2e655a02 (patch)
tree92fc93bac2e84809228eeefe6394a04507b73c93 /var
parent9e18e63053d37f8833fafd6b6d6e6ce7da9737b2 (diff)
downloadspack-5c297d8322590356c927eb22690ec16a2e655a02.tar.gz
spack-5c297d8322590356c927eb22690ec16a2e655a02.tar.bz2
spack-5c297d8322590356c927eb22690ec16a2e655a02.tar.xz
spack-5c297d8322590356c927eb22690ec16a2e655a02.zip
root: fix X11 and OpenGL-related issues on macOS (#45632)
* root: Add dependency on libglx We have been trying to build the Acts package on MacOS, and in this process we have been running into problems with the ROOT spec on that operating system; the primary issue we are encountering is that the compiler is unable to find the `GL/glx.h` header, which is part of glx. It seems, therefore, that ROOT depends on libglx, but this is not currently encoded in the spec. This commit ensures that ROOT depends on the virtual libglx package when both the OpenCL and X11 variants are enabled. * Enable builtin glew on MacOS * Allow `root+opengl+aqua~x` on macOS
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/root/package.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/root/package.py b/var/spack/repos/builtin/packages/root/package.py
index e0e49ae867..ed834a4c3f 100644
--- a/var/spack/repos/builtin/packages/root/package.py
+++ b/var/spack/repos/builtin/packages/root/package.py
@@ -336,6 +336,7 @@ class Root(CMakePackage):
depends_on("gl2ps", when="+opengl")
depends_on("gl", when="+opengl")
depends_on("glu", when="+opengl")
+ depends_on("libglx", when="+opengl+x")
# Qt4
depends_on("qt@:4", when="+qt4")
@@ -419,7 +420,9 @@ class Root(CMakePackage):
conflicts("target=ppc64le:", when="@:6.24")
# Incompatible variants
- if sys.platform != "darwin":
+ if sys.platform == "darwin":
+ conflicts("+opengl", when="~x ~aqua", msg="root+opengl requires X or Aqua")
+ else:
conflicts("+opengl", when="~x", msg="root+opengl requires X")
conflicts("+math", when="~gsl", msg="root+math requires GSL")
conflicts("+tmva", when="~gsl", msg="root+tmva requires GSL")
@@ -607,7 +610,7 @@ class Root(CMakePackage):
define("builtin_freetype", False),
define("builtin_ftgl", False),
define("builtin_gl2ps", False),
- define("builtin_glew", False),
+ define("builtin_glew", self.spec.satisfies("platform=darwin")),
define("builtin_gsl", False),
define("builtin_llvm", True),
define("builtin_lz4", self.spec.satisfies("@6.12.02:6.12")),