Convert most "mesa" dependencies to use virtual gl and glx dependencies

This commit is contained in:
Chuck Atkins 2019-01-31 12:35:13 -05:00 committed by Omar Padron
parent e56e41600e
commit b9a0390724
11 changed files with 28 additions and 27 deletions

View File

@ -35,14 +35,15 @@ class Catalyst(CMakePackage):
variant('extras', default=False, description='Enable Extras support') variant('extras', default=False, description='Enable Extras support')
variant('rendering', default=False, description='Enable VTK Rendering support') variant('rendering', default=False, description='Enable VTK Rendering support')
variant('osmesa', default=True, description='Use offscreen rendering') variant('osmesa', default=True, description='Use offscreen rendering')
conflicts('+osmesa', when='~rendering')
depends_on('git', type='build') depends_on('git', type='build')
depends_on('mpi') depends_on('mpi')
depends_on('python@2:2.8', when='+python', type=("build", "link", "run")) depends_on('python@2:2.8', when='+python', type=("build", "link", "run"))
depends_on('python', when='~python', type=("build")) depends_on('python', when='~python', type=("build"))
depends_on('mesa', when='+rendering') depends_on('gl@3.2', when='+rendering')
depends_on('libx11', when='+rendering') depends_on('mesa+osmesa', when='+rendering+osmesa')
depends_on('libxt', when='+rendering') depends_on('glx', when='+rendering~osmesa')
depends_on('cmake@3.3:', type='build') depends_on('cmake@3.3:', type='build')
@when('@5.5.0:5.5.2') @when('@5.5.0:5.5.2')

View File

@ -18,7 +18,8 @@ class Dislin(Package):
version('11.0.linux.i586_64', '6fb099b54f41db009cafc702eebb5bc6') version('11.0.linux.i586_64', '6fb099b54f41db009cafc702eebb5bc6')
depends_on('motif') depends_on('motif')
depends_on('mesa') depends_on('gl')
depends_on('glx')
@property @property
def libs(self): def libs(self):

View File

@ -26,7 +26,7 @@ class Fsl(Package):
depends_on('python', type=('build', 'run')) depends_on('python', type=('build', 'run'))
depends_on('expat') depends_on('expat')
depends_on('libx11') depends_on('libx11')
depends_on('mesa-glu') depends_on('glu')
depends_on('zlib') depends_on('zlib')
depends_on('libpng') depends_on('libpng')
depends_on('boost') depends_on('boost')

View File

@ -3,7 +3,6 @@
# #
# SPDX-License-Identifier: (Apache-2.0 OR MIT) # SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import * from spack import *
import platform import platform
import os import os
@ -60,7 +59,9 @@ class Geant4(CMakePackage):
depends_on("expat") depends_on("expat")
depends_on("zlib") depends_on("zlib")
depends_on("mesa", when='+opengl') depends_on("xerces-c")
depends_on("gl", when='+opengl')
depends_on("glx", when='+opengl+x11')
depends_on("libx11", when='+x11') depends_on("libx11", when='+x11')
depends_on("libxmu", when='+x11') depends_on("libxmu", when='+x11')
depends_on("motif", when='+motif') depends_on("motif", when='+motif')
@ -88,8 +89,7 @@ def cmake_args(self):
'-DXERCESC_ROOT_DIR:STRING=%s' % '-DXERCESC_ROOT_DIR:STRING=%s' %
spec['xerces-c'].prefix, ] spec['xerces-c'].prefix, ]
arch = platform.system().lower() if 'platform=darwin' not in spec:
if arch != 'darwin':
if "+x11" in spec and "+opengl" in spec: if "+x11" in spec and "+opengl" in spec:
options.append('-DGEANT4_USE_OPENGL_X11=ON') options.append('-DGEANT4_USE_OPENGL_X11=ON')
if "+motif" in spec and "+opengl" in spec: if "+motif" in spec and "+opengl" in spec:

View File

@ -25,7 +25,7 @@ class Gplates(CMakePackage):
# Qt 5 does not support (at least) the Q_WS_* constants. # Qt 5 does not support (at least) the Q_WS_* constants.
depends_on('qt+opengl@4.4.0:4.99') depends_on('qt+opengl@4.4.0:4.99')
depends_on('qwt@6.0.1:') depends_on('qwt@6.0.1:')
depends_on('mesa-glu') depends_on('glu')
depends_on('glew') depends_on('glew')
# GDAL's OGRSFDriverRegistrar is not compatible anymore starting with 2.0. # GDAL's OGRSFDriverRegistrar is not compatible anymore starting with 2.0.
depends_on('gdal@1.3.2:1.99') depends_on('gdal@1.3.2:1.99')

View File

@ -18,7 +18,7 @@ class Libepoxy(AutotoolsPackage):
depends_on('pkgconfig', type='build') depends_on('pkgconfig', type='build')
depends_on('meson') depends_on('meson')
depends_on('mesa') depends_on('gl')
def configure_args(self): def configure_args(self):
# Disable egl, otherwise configure fails with: # Disable egl, otherwise configure fails with:

View File

@ -19,7 +19,7 @@ class Mrtrix3(Package):
depends_on('python@2.7:', type=('build', 'run')) depends_on('python@2.7:', type=('build', 'run'))
depends_on('py-numpy', type=('build', 'run')) depends_on('py-numpy', type=('build', 'run'))
depends_on('mesa-glu') depends_on('glu')
depends_on('qt+opengl@4.7:') depends_on('qt+opengl@4.7:')
depends_on('eigen') depends_on('eigen')
depends_on('zlib') depends_on('zlib')

View File

@ -46,7 +46,9 @@ class Paraview(CMakePackage):
depends_on('qt~opengl', when='@5.3.0:+qt~opengl2') depends_on('qt~opengl', when='@5.3.0:+qt~opengl2')
depends_on('qt@:4', when='@:5.2.0+qt') depends_on('qt@:4', when='@:5.2.0+qt')
depends_on('mesa+swrender', when='+osmesa') depends_on('mesa+osmesa', when='+osmesa')
depends_on('gl@3.2', when='+opengl2')
depends_on('gl@1.2', when='~opengl2')
depends_on('libxt', when='+qt') depends_on('libxt', when='+qt')
conflicts('+qt', when='+osmesa') conflicts('+qt', when='+osmesa')

View File

@ -26,8 +26,8 @@ class RRgl(RPackage):
depends_on('libpng', type=('link')) depends_on('libpng', type=('link'))
depends_on('libx11') depends_on('libx11')
depends_on('freetype', type=('link')) depends_on('freetype', type=('link'))
depends_on('mesa', type=('link')) depends_on('gl')
depends_on('mesa-glu', type=('link')) depends_on('glu')
depends_on('r-htmlwidgets', type=('build', 'run')) depends_on('r-htmlwidgets', type=('build', 'run'))
depends_on('r-htmltools', type=('build', 'run')) depends_on('r-htmltools', type=('build', 'run'))
depends_on('r-knitr', type=('build', 'run')) depends_on('r-knitr', type=('build', 'run'))
@ -40,7 +40,7 @@ class RRgl(RPackage):
def configure_args(self): def configure_args(self):
args = ['--x-includes=%s' % self.spec['libx11'].prefix.include, args = ['--x-includes=%s' % self.spec['libx11'].prefix.include,
'--x-libraries=%s' % self.spec['libx11'].prefix.lib, '--x-libraries=%s' % self.spec['libx11'].prefix.lib,
'--with-gl-includes=%s' % self.spec['mesa'].prefix.include, '--with-gl-includes=%s' % self.spec['gl'].prefix.include,
'--with-gl-libraries=%s' % self.spec['mesa'].prefix.lib, '--with-gl-libraries=%s' % self.spec['gl'].prefix.lib,
'--with-gl-prefix=%s' % self.spec['mesa'].prefix] '--with-gl-prefix=%s' % self.spec['gl'].prefix]
return args return args

View File

@ -19,8 +19,4 @@ class Virtualgl(CMakePackage):
version('2.5.2', '1a9f404f4a35afa9f56381cb33ed210c') version('2.5.2', '1a9f404f4a35afa9f56381cb33ed210c')
depends_on("libjpeg-turbo") depends_on("libjpeg-turbo")
# virtualgl require OpenGL but also wants to link libglu depends_on("glu")
# on systems without development packages, provide with spack and depends
# on mesa-glu, but we do not want Mesa OpenGL sw emulation, so added
# variant on mesa-glu to disable dependencies on sw emulated OpenGL
depends_on("mesa-glu~mesa")

View File

@ -5,6 +5,7 @@
import os import os
import sys
from spack import * from spack import *
@ -53,14 +54,14 @@ class Vtk(CMakePackage):
# The use of the OpenGL2 backend requires at least OpenGL Core Profile # The use of the OpenGL2 backend requires at least OpenGL Core Profile
# version 3.2 or higher. # version 3.2 or higher.
depends_on('gl@3.2:', when='+opengl2') depends_on('gl@3.2:', when='+opengl2')
depends_on('gl@1.2:', when='~opengl2')
# If you didn't ask for osmesa, then hw rendering using vendor-specific if sys.platform != 'darwin':
# drivers is faster, but it must be done externally. depends_on('glx', when='~osmesa')
depends_on('opengl', when='~osmesa')
# Note: it is recommended to use mesa+llvm, if possible. # Note: it is recommended to use mesa+llvm, if possible.
# mesa default is software rendering, llvm makes it faster # mesa default is software rendering, llvm makes it faster
depends_on('mesa', when='+osmesa') depends_on('mesa+osmesa', when='+osmesa')
# VTK will need Qt5OpenGL, and qt needs '-opengl' for that # VTK will need Qt5OpenGL, and qt needs '-opengl' for that
depends_on('qt+opengl', when='+qt') depends_on('qt+opengl', when='+qt')