Fix Mesa GLES conflicts (#20184)

This commit is contained in:
Chuck Atkins 2020-11-30 17:54:24 -05:00 committed by GitHub
parent bb9f5d613c
commit 7d79db2de7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 15 deletions

View File

@ -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]

View File

@ -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 = [

View File

@ -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 @@ def configure_args(self):
'--with-vulkan-drivers=',
'--disable-egl',
'--disable-gbm',
'--disable-dri']
'--disable-dri',
'--enable-opengl']
args_platforms = []
args_gallium_drivers = ['swrast']
@ -126,11 +123,6 @@ def configure_args(self):
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 @@ def libs(self):
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')