summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/glx/package.py
diff options
context:
space:
mode:
authorChuck Atkins <chuck.atkins@kitware.com>2022-07-29 13:04:42 -0500
committerGitHub <noreply@github.com>2022-07-29 12:04:42 -0600
commit57af891cb12cdba7c07fcac6c539adc292284755 (patch)
tree90d59d3d5ae09c79cf33ebed4be7657ccd79be89 /var/spack/repos/builtin/packages/glx/package.py
parent70c849f76b9c521b8422732b578a7775f44345bd (diff)
downloadspack-57af891cb12cdba7c07fcac6c539adc292284755.tar.gz
spack-57af891cb12cdba7c07fcac6c539adc292284755.tar.bz2
spack-57af891cb12cdba7c07fcac6c539adc292284755.tar.xz
spack-57af891cb12cdba7c07fcac6c539adc292284755.zip
OpenGL restructure (#31748)
* OpenGL: Restructures the OpenGL packages This provides concrete glx and osmesa packages which delegate to virtual libglx and libosmesa packages provided by mesa. This was necessary because GLX and OSMesa both provide gl implementations but with mesa providing the girtual gl package there was no way to properly distinguish which of the two opengl implementations was beiing requested when querying the spec['gl'] dependency. This additional level of indirection allows for that. * OpenGL: Adjust downstream dependents of OpenGL for the restructure This implements the necessary fixes in the packages that depend on OpenGL to work with the restructuring. This also attempts to create a consistent variant for specifying glx or osmesa.
Diffstat (limited to 'var/spack/repos/builtin/packages/glx/package.py')
-rw-r--r--var/spack/repos/builtin/packages/glx/package.py38
1 files changed, 38 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/glx/package.py b/var/spack/repos/builtin/packages/glx/package.py
new file mode 100644
index 0000000000..bd145b71cb
--- /dev/null
+++ b/var/spack/repos/builtin/packages/glx/package.py
@@ -0,0 +1,38 @@
+# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
+# Spack Project Developers. See the top-level COPYRIGHT file for details.
+#
+# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
+from spack.package import *
+
+
+class Glx(BundlePackage):
+ """Shim package for the GLX library."""
+ homepage = 'https://www.khronos.org/registry/OpenGL/index_gl.php'
+
+ version('1.4')
+
+ depends_on('libglx')
+ provides('gl@4.5')
+
+ @property
+ def home(self):
+ return self.spec['libglx'].home
+
+ @property
+ def headers(self):
+ return self.spec['libglx'].headers
+
+ @property
+ def libs(self):
+ return self.spec['libglx'].libs
+
+ @property
+ def gl_headers(self):
+ return find_headers('GL/gl',
+ root=self.gl_home,
+ recursive=True)
+
+ @property
+ def gl_libs(self):
+ return self.spec['libglx'].libs