diff options
-rw-r--r-- | etc/spack/defaults/packages.yaml | 2 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/mesa/package.py | 3 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/mesa18/package.py | 19 |
3 files changed, 9 insertions, 15 deletions
diff --git a/etc/spack/defaults/packages.yaml b/etc/spack/defaults/packages.yaml index 06aa41b2d8..17e7983edd 100644 --- a/etc/spack/defaults/packages.yaml +++ b/etc/spack/defaults/packages.yaml @@ -23,7 +23,7 @@ packages: daal: [intel-daal] elf: [elfutils] fftw-api: [fftw, amdfftw] - gl: [mesa+opengl, mesa18+opengl, opengl] + gl: [mesa+opengl, mesa18, opengl] glx: [mesa+glx, mesa18+glx, opengl] glu: [mesa-glu, openglu] golang: [gcc] diff --git a/var/spack/repos/builtin/packages/mesa/package.py b/var/spack/repos/builtin/packages/mesa/package.py index e7f2dcc575..c3988fbb30 100644 --- a/var/spack/repos/builtin/packages/mesa/package.py +++ b/var/spack/repos/builtin/packages/mesa/package.py @@ -80,6 +80,9 @@ class Mesa(MesonPackage): # TODO: Add vulkan to this conflict once made available conflicts('~opengl ~opengles') + # OpenGL ES requires OpenGL + conflicts('~opengl +opengles') + def meson_args(self): spec = self.spec args = [ diff --git a/var/spack/repos/builtin/packages/mesa18/package.py b/var/spack/repos/builtin/packages/mesa18/package.py index 1dcead5965..b882c9aa70 100644 --- a/var/spack/repos/builtin/packages/mesa18/package.py +++ b/var/spack/repos/builtin/packages/mesa18/package.py @@ -52,12 +52,11 @@ class Mesa18(AutotoolsPackage): is_linux = sys.platform.startswith('linux') variant('glx', default=is_linux, description="Enable the GLX frontend.") - # Back ends - variant('opengl', default=True, description="Enable full OpenGL support.") + # Additional backends variant('opengles', default=False, description="Enable OpenGL ES support.") # Provides - provides('gl@4.5', when='+opengl') + provides('gl@4.5') provides('glx@1.4', when='+glx') provides('osmesa', when='+osmesa') @@ -71,9 +70,6 @@ class Mesa18(AutotoolsPackage): # Require at least 1 front-end conflicts('~osmesa ~glx') - # Require at least 1 back-end - conflicts('~opengl ~opengles') - # Prevent an unnecessary xcb-dri dependency patch('autotools-x11-nodri.patch') @@ -103,7 +99,8 @@ class Mesa18(AutotoolsPackage): '--with-vulkan-drivers=', '--disable-egl', '--disable-gbm', - '--disable-dri'] + '--disable-dri', + '--enable-opengl'] args_platforms = [] args_gallium_drivers = ['swrast'] @@ -126,11 +123,6 @@ class Mesa18(AutotoolsPackage): else: args.append('--disable-glx') - if '+opengl' in spec: - args.append('--enable-opengl') - else: - args.append('--disable-opengl') - if '+opengles' in spec: args.extend(['--enable-gles1', '--enable-gles2']) else: @@ -184,8 +176,7 @@ class Mesa18(AutotoolsPackage): if '+glx' in spec: libs_to_seek.add('libGL') - if '+opengl' in spec: - libs_to_seek.add('libGL') + libs_to_seek.add('libGL') if '+opengles' in spec: libs_to_seek.add('libGLES') |