add glx variant to libepoxy (#11814)

This commit is contained in:
Gregory Lee 2019-06-24 14:57:17 -07:00 committed by Elizabeth Fischer
parent c575cc46db
commit 16ff38b784

View File

@ -19,9 +19,22 @@ class Libepoxy(AutotoolsPackage):
depends_on('pkgconfig', type='build')
depends_on('meson')
depends_on('gl')
depends_on('libx11', when='+glx')
variant('glx', default=True, description='enable GLX support')
def configure_args(self):
# Disable egl, otherwise configure fails with:
# error: Package requirements (egl) were not met
# Package 'egl', required by 'virtual:world', not found
return ['--enable-egl=no']
args = ['--enable-egl=no']
# --enable-glx defaults to auto and was failing on PPC64LE systems
# because libx11 was missing from the dependences. This explicitly
# enables/disables glx support.
if '+glx' in self.spec:
args.append('--enable-glx=yes')
else:
args.append('--enable-glx=no')
return args