diff options
Diffstat (limited to 'var')
4 files changed, 15 insertions, 142 deletions
diff --git a/var/spack/repos/builtin/packages/libglvnd-fe/package.py b/var/spack/repos/builtin/packages/libglvnd-fe/package.py deleted file mode 100644 index 6f737a9017..0000000000 --- a/var/spack/repos/builtin/packages/libglvnd-fe/package.py +++ /dev/null @@ -1,56 +0,0 @@ -# Copyright 2013-2019 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 import * - - -class LibglvndFe(BundlePackage): - """The GL Vendor-Neutral Dispatch library (Frontend Dummy Package) - - libglvnd is a vendor-neutral dispatch layer for arbitrating OpenGL API - calls between multiple vendors. It allows multiple drivers from different - vendors to coexist on the same filesystem, and determines which vendor to - dispatch each API call to at runtime. - - Both GLX and EGL are supported, in any combination with OpenGL and OpenGL - ES.""" - - homepage = "https://github.com/NVIDIA/libglvnd" - - version('1.1.1', sha256='71918ed1261e4eece18c0b74b50dc62c0237b8d526e83277ef078554544720b9') - - variant('glx', default=False, description='Provide GLX API') - variant('egl', default=False, description='Provide EGL API') - - depends_on('libglvnd') - - depends_on('libglvnd-be-gl') - depends_on('libglvnd-be-glx', when='+glx') - depends_on('libglvnd-be-egl', when='+egl') - - provides('gl') - provides('glx', when='+glx') - provides('egl', when='+egl') - - @property - def gl_libs(self): - return find_libraries('libOpenGL', - root=self.spec['libglvnd'].prefix, - shared=True, - recursive=True) - - @property - def glx_libs(self): - return find_libraries('libGLX', - root=self.spec['libglvnd'].prefix, - shared=True, - recursive=True) - - @property - def egl_libs(self): - return find_libraries('libEGL', - root=self.spec['libglvnd'].prefix, - shared=True, - recursive=True) diff --git a/var/spack/repos/builtin/packages/mesa/package.py b/var/spack/repos/builtin/packages/mesa/package.py index 94b352d8e2..b277a03d19 100644 --- a/var/spack/repos/builtin/packages/mesa/package.py +++ b/var/spack/repos/builtin/packages/mesa/package.py @@ -65,13 +65,9 @@ class Mesa(AutotoolsPackage): variant('opengles', default=False, description="Enable OpenGL ES support.") # Provides - provides('gl@4.5', when='+opengl ~glvnd') - provides('glx@1.4', when='+glx ~glvnd') - # provides('egl@1.5', when='+egl ~glvnd') - - provides('libglvnd-be-gl', when='+glvnd') - provides('libglvnd-be-glx', when='+glvnd +glx') - # provides('libglvnd-be-egl', when='+glvnd +egl') + provides('gl@4.5', when='+opengl') + provides('glx@1.4', when='+glx') + # provides('egl@1.5', when='+egl') # Variant dependencies depends_on('llvm@6:', when='+llvm') @@ -183,32 +179,10 @@ class Mesa(AutotoolsPackage): return args @property - def gl_libs(self): - result = LibraryList(()) - - if '~glvnd' in self.spec: - result.extend(find_libraries('libGL', - root=self.spec.prefix, - shared='+shared' in self.spec, - recursive=True)) - return result - - @property - def glx_libs(self): - result = LibraryList(()) - - if '~glvnd' in self.spec: - result.extend(find_libraries('libGLX', - root=self.spec.prefix, - shared='+shared' in self.spec, - recursive=True)) - return result - - def setup_run_environment(self, env): - if '+glx +glvnd' in self.spec: - env.set('__GLX_VENDOR_LIBRARY_NAME', 'mesa') - - if '+egl +glvnd' in self.spec: - env.set('__EGL_VENDOR_LIBRARY_FILENAMES', ':'.join(( - os.path.join(self.spec.prefix, 'share', 'glvnd', - 'egl_vendor.d', '50_mesa.json')))) + def libs(self): + for dir in ['lib64', 'lib']: + libs = find_libraries(['libGL', 'libOSMesa'], + join_path(self.prefix, dir), + shared=True, recursive=False) + if libs: + return libs diff --git a/var/spack/repos/builtin/packages/opengl/package.py b/var/spack/repos/builtin/packages/opengl/package.py index 572fc04845..413b8e0f45 100644 --- a/var/spack/repos/builtin/packages/opengl/package.py +++ b/var/spack/repos/builtin/packages/opengl/package.py @@ -13,14 +13,7 @@ class Opengl(Package): homepage = "https://www.opengl.org/" - variant('glvnd', - default=False, - description="Expose Graphics APIs through libglvnd") - - variant('glx', default=True, description="Enable GLX API.") - variant('egl', default=False, description="Enable EGL API.") - - provides('gl', when='~glvnd') + provides('gl') provides('gl@:4.5', when='@4.5:') provides('gl@:4.4', when='@4.4:') provides('gl@:4.3', when='@4.3:') @@ -40,19 +33,7 @@ class Opengl(Package): provides('gl@:1.0', when='@1.0:') if sys.platform != 'darwin': - provides('glx@1.4', when='~glvnd +glx') - - # NOTE: This package should have a dependency on libglvnd, but because it - # is exclusively provided externally the dependency is never traversed. - # depends_on('libglvnd', when='+glvnd') # don't uncomment this - - provides('libglvnd-be-gl', when='+glvnd') - provides('libglvnd-be-glx', when='+glvnd +glx') - provides('libglvnd-be-egl', when='+glvnd +egl') - - provides('egl@1.5', when='~glvnd +egl') - - depends_on('libglvnd', when='+glvnd') + provides('glx@1.4') # Override the fetcher method to throw a useful error message; # fixes GitHub issue (#7061) in which this package threw a @@ -99,25 +80,8 @@ class Opengl(Package): @property def libs(self): - result = LibraryList(()) - - # "libs" provided by glvnd; this package sets the environment variables - # so that glvnd, in turn, loads this package's libraries at run-time. - if '+glvnd' in self.spec: - return result - for dir in ['lib64', 'lib']: libs = find_libraries('libGL', join_path(self.prefix, dir), shared=True, recursive=False) if libs: - result.extend(libs) - break - - if '+egl' in self.spec: - for dir in ['lib64', 'lib']: - libs = find_libraries('libEGL', join_path(self.prefix, dir), - shared=True, recursive=False) - if libs: - result.extend(libs) - break - return result + return libs diff --git a/var/spack/repos/builtin/packages/paraview/package.py b/var/spack/repos/builtin/packages/paraview/package.py index f5195dc2bb..bb8b140b74 100644 --- a/var/spack/repos/builtin/packages/paraview/package.py +++ b/var/spack/repos/builtin/packages/paraview/package.py @@ -49,7 +49,6 @@ class Paraview(CMakePackage, CudaPackage): description='Builds a shared version of the library') variant('kits', default=True, description='Use module kits') - variant('egl', default=False, description="Enable EGL") conflicts('+python', when='+python3') conflicts('+python', when='@5.6:') @@ -59,9 +58,6 @@ class Paraview(CMakePackage, CudaPackage): # See commit: https://gitlab.kitware.com/paraview/paraview/-/commit/798d328c conflicts('~opengl2', when='@5.5:') - conflicts('+egl', when='+osmesa') - conflicts('+egl', when='+qt') - # Workaround for # adding the following to your packages.yaml # packages: @@ -93,10 +89,6 @@ class Paraview(CMakePackage, CudaPackage): depends_on('mesa+osmesa', when='+osmesa') depends_on('gl@3.2:', when='+opengl2') depends_on('gl@1.2:', when='~opengl2') - - depends_on('glx', when='~osmesa platform=linux') - depends_on('egl', when='+egl') - depends_on('libxt', when='~osmesa platform=linux') conflicts('+qt', when='+osmesa') @@ -216,9 +208,7 @@ class Paraview(CMakePackage, CudaPackage): cmake_args = [ '-DPARAVIEW_BUILD_QT_GUI:BOOL=%s' % variant_bool('+qt'), '-DVTK_OPENGL_HAS_OSMESA:BOOL=%s' % variant_bool('+osmesa'), - '-DVTK_OPENGL_HAS_EGL:BOOL=%s' % variant_bool('+egl'), - ('-DVTK_USE_X:BOOL=%s' % - variant_bool('~osmesa ~egl platform=linux')), + '-DVTK_USE_X:BOOL=%s' % nvariant_bool('+osmesa'), '-DVTK_RENDERING_BACKEND:STRING=%s' % rendering, '-DPARAVIEW_INSTALL_DEVELOPMENT_FILES:BOOL=%s' % includes, '-DBUILD_TESTING:BOOL=OFF', @@ -282,6 +272,7 @@ class Paraview(CMakePackage, CudaPackage): if 'darwin' in spec.architecture: cmake_args.extend([ + '-DVTK_USE_X:BOOL=OFF', '-DPARAVIEW_DO_UNIX_STYLE_INSTALLS:BOOL=ON', ]) |