summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/mesa-demos/package.py
diff options
context:
space:
mode:
Diffstat (limited to 'var/spack/repos/builtin/packages/mesa-demos/package.py')
-rw-r--r--var/spack/repos/builtin/packages/mesa-demos/package.py25
1 files changed, 6 insertions, 19 deletions
diff --git a/var/spack/repos/builtin/packages/mesa-demos/package.py b/var/spack/repos/builtin/packages/mesa-demos/package.py
index c85b2eb2e3..6282ddf9e0 100644
--- a/var/spack/repos/builtin/packages/mesa-demos/package.py
+++ b/var/spack/repos/builtin/packages/mesa-demos/package.py
@@ -2,8 +2,6 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-import sys
-
from spack.package import *
@@ -20,17 +18,8 @@ class MesaDemos(AutotoolsPackage):
version("8.2.0", sha256="5a9f71b815d968d0c3b77edfcc3782d0211f8520b00da9e554ccfed80c8889f6")
version("8.1.0", sha256="cc5826105355830208c90047fc38c5b09fa3ab0045366e7e859104935b00b76d")
- variant(
- "gl",
- default="glx" if sys.platform.startswith("linux") else "osmesa",
- values=("glx", "osmesa", "other"),
- multi=False,
- description="The OpenGL provider to use",
- )
- conflicts("^osmesa", when="gl=glx")
- conflicts("^osmesa", when="gl=other")
- conflicts("^glx", when="gl=osmesa")
- conflicts("^glx", when="gl=other")
+ depends_on("c", type="build") # generated
+ depends_on("cxx", type="build") # generated
depends_on("autoconf", type="build")
depends_on("automake", type="build")
@@ -39,10 +28,8 @@ class MesaDemos(AutotoolsPackage):
depends_on("pkgconfig", type="build")
depends_on("gl")
- depends_on("osmesa", when="gl=osmesa")
- depends_on("glx", when="gl=glx")
- depends_on("libx11", when="gl=glx")
- depends_on("libxext", when="gl=glx")
+ depends_on("libx11", when="^[virtuals=gl] glx")
+ depends_on("libxext", when="^[virtuals=gl] glx")
depends_on("glu")
depends_on("glew@1.5.4:")
@@ -64,11 +51,11 @@ class MesaDemos(AutotoolsPackage):
"--disable-rbug",
"--without-glut",
]
- if "gl=glx" in spec:
+ if spec.satisfies("^[virtuals=gl] glx"):
args.append("--enable-x11")
else:
args.append("--disable-x11")
- if "gl=osmesa" in spec:
+ if spec.satisfies("^[virtuals=gl] osmesa"):
args.append("--enable-osmesa")
else:
args.append("--disable-osmesa")