mesa: Revert updated meson build and restore autotools build (#11595)
Due to the large number of issues this migration has caused, this rolls back to the older autotools build. However, it still keeps the updates wrt variants and virtual packages.
This commit is contained in:
parent
30ec13f375
commit
e4f0726927
4 changed files with 67 additions and 129 deletions
|
@ -0,0 +1,14 @@
|
|||
diff --git a/configure.ac b/configure.ac
|
||||
index cd9ff25..79bc511 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -1859,7 +1859,9 @@ for plat in $platforms; do
|
||||
;;
|
||||
|
||||
x11)
|
||||
- PKG_CHECK_MODULES([XCB_DRI2], [x11-xcb xcb xcb-dri2 >= $XCBDRI2_REQUIRED xcb-xfixes])
|
||||
+ if test "x$enable_dri" = "xyes"; then
|
||||
+ PKG_CHECK_MODULES([XCB_DRI2], [x11-xcb xcb xcb-dri2 >= $XCBDRI2_REQUIRED xcb-xfixes])
|
||||
+ fi
|
||||
DEFINES="$DEFINES -DHAVE_X11_PLATFORM"
|
||||
;;
|
|
@ -1,32 +0,0 @@
|
|||
diff --git a/meson.build b/meson.build
|
||||
index d975b0d..cbd4a2c 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -1387,12 +1387,14 @@ if with_platform_x11
|
||||
dep_xshmfence = dependency('xshmfence', version : '>= 1.1')
|
||||
endif
|
||||
endif
|
||||
- if with_glx == 'dri'
|
||||
+ if with_glx == 'dri' or with_glx == 'gallium-xlib'
|
||||
+ dep_glproto = dependency('glproto', version : '>= 1.4.14')
|
||||
+ endif
|
||||
+ if with_glx == 'dri'
|
||||
if with_dri_platform == 'drm'
|
||||
dep_dri2proto = dependency('dri2proto', version : '>= 2.8')
|
||||
dep_xxf86vm = dependency('xxf86vm')
|
||||
endif
|
||||
- dep_glproto = dependency('glproto', version : '>= 1.4.14')
|
||||
endif
|
||||
if (with_egl or (
|
||||
with_gallium_vdpau or with_gallium_xvmc or with_gallium_xa or
|
||||
diff --git a/src/gallium/state_trackers/glx/xlib/meson.build b/src/gallium/state_trackers/glx/xlib/meson.build
|
||||
index f4ee754..34b93c9 100644
|
||||
--- a/src/gallium/state_trackers/glx/xlib/meson.build
|
||||
+++ b/src/gallium/state_trackers/glx/xlib/meson.build
|
||||
@@ -23,5 +23,5 @@ libxlib = static_library(
|
||||
files('glx_api.c', 'glx_getproc.c', 'glx_usefont.c', 'xm_api.c', 'xm_st.c'),
|
||||
c_args : c_vis_args,
|
||||
include_directories : [inc_common, inc_mapi, inc_mesa],
|
||||
- dependencies : [dep_x11, dep_xext, dep_xcb],
|
||||
+ dependencies : [dep_x11, dep_xext, dep_xcb, dep_glproto],
|
||||
)
|
|
@ -1,45 +0,0 @@
|
|||
commit ccb8ea7acfb710c6c5298f3ffcadbe3d79b9b913
|
||||
Author: Eric Engestrom <eric.engestrom@intel.com>
|
||||
Date: Thu May 2 12:42:48 2019 +0100
|
||||
|
||||
meson: expose glapi through osmesa
|
||||
|
||||
Suggested-by: Pierre Guillou <pierre.guillou@lip6.fr>
|
||||
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109659
|
||||
Fixes: f121a669c7d94d2ff672 "meson: build gallium based osmesa"
|
||||
Fixes: cbbd5bb889a2c271a504 "meson: build classic osmesa"
|
||||
Cc: Brian Paul <brianp@vmware.com>
|
||||
Cc: Dylan Baker <dylan@pnwbakers.com>
|
||||
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
|
||||
Tested-by: Chuck Atkins <chuck.atkins@kitware.com>
|
||||
|
||||
diff --git a/src/gallium/targets/osmesa/meson.build b/src/gallium/targets/osmesa/meson.build
|
||||
index b4ae8f4..e873e31 100644
|
||||
--- a/src/gallium/targets/osmesa/meson.build
|
||||
+++ b/src/gallium/targets/osmesa/meson.build
|
||||
@@ -43,9 +43,9 @@ libosmesa = shared_library(
|
||||
inc_gallium_drivers,
|
||||
],
|
||||
link_depends : osmesa_link_deps,
|
||||
- link_whole : [libosmesa_st],
|
||||
+ link_whole : [libosmesa_st, libglapi_static],
|
||||
link_with : [
|
||||
- libmesa_gallium, libgallium, libglapi_static, libws_null, osmesa_link_with,
|
||||
+ libmesa_gallium, libgallium, libws_null, osmesa_link_with,
|
||||
],
|
||||
dependencies : [
|
||||
dep_selinux, dep_thread, dep_clock, dep_unwind,
|
||||
diff --git a/src/mesa/drivers/osmesa/meson.build b/src/mesa/drivers/osmesa/meson.build
|
||||
index a406bb3..c479b74 100644
|
||||
--- a/src/mesa/drivers/osmesa/meson.build
|
||||
+++ b/src/mesa/drivers/osmesa/meson.build
|
||||
@@ -33,7 +33,8 @@ libosmesa = shared_library(
|
||||
include_directories : [
|
||||
inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux,
|
||||
],
|
||||
- link_with : [libmesa_classic, libglapi_static, osmesa_link_with],
|
||||
+ link_whole : libglapi_static,
|
||||
+ link_with : [libmesa_classic, osmesa_link_with],
|
||||
dependencies : [dep_thread, dep_selinux],
|
||||
version : '8.0.0',
|
||||
install : true,
|
|
@ -8,7 +8,7 @@
|
|||
import sys
|
||||
|
||||
|
||||
class Mesa(MesonPackage):
|
||||
class Mesa(AutotoolsPackage):
|
||||
"""Mesa is an open-source implementation of the OpenGL specification
|
||||
- a system for rendering interactive 3D graphics."""
|
||||
|
||||
|
@ -20,22 +20,19 @@ class Mesa(MesonPackage):
|
|||
# whatever version of LLVM you're using.
|
||||
git = "https://gitlab.freedesktop.org/mesa/mesa.git"
|
||||
|
||||
version('develop', branch='master')
|
||||
version('19.1.develop', branch='19.1')
|
||||
version('19.0.develop', branch='19.0')
|
||||
version('19.0.4', tag='mesa-19.0.4', preferred=True)
|
||||
version('19.0.3', tag='mesa-19.0.3')
|
||||
version('19.0.2', tag='mesa-19.0.2')
|
||||
version('19.0.1', tag='mesa-19.0.1')
|
||||
version('19.0.0', tag='mesa-19.0.0')
|
||||
version('18.3.6', tag='mesa-18.3.6', preferred=True)
|
||||
|
||||
depends_on('meson@0.45:', type='build')
|
||||
depends_on('binutils', type='build')
|
||||
depends_on('autoconf', type='build')
|
||||
depends_on('automake', type='build')
|
||||
depends_on('libtool', type='build')
|
||||
depends_on('m4', type='build')
|
||||
depends_on('pkgconfig', type='build')
|
||||
depends_on('binutils', when=(sys.platform != 'darwin'), type='build')
|
||||
depends_on('bison', type='build')
|
||||
depends_on('flex', type='build')
|
||||
depends_on('gettext', type='build')
|
||||
depends_on('pkgconfig', type='build')
|
||||
depends_on('python@3:', type='build')
|
||||
depends_on('python', type='build')
|
||||
depends_on('py-mako@0.8.0:', type='build')
|
||||
depends_on('libxml2')
|
||||
depends_on('zlib')
|
||||
|
@ -77,27 +74,29 @@ class Mesa(MesonPackage):
|
|||
depends_on('libxext', when='+glx')
|
||||
depends_on('glproto@1.4.14:', when='+glx', type='build')
|
||||
|
||||
# Fix glproto dependency for glx=gallium-xlib
|
||||
# https://gitlab.freedesktop.org/mesa/mesa/merge_requests/806
|
||||
# Was included in the upstream patch release for 19.0.4
|
||||
patch('glproto-mr806.patch', when='@19.0.0:19.0.3')
|
||||
# Prevent an unnecessary xcb-dri dependency
|
||||
patch('autotools-x11-nodri.patch')
|
||||
|
||||
# Fix missing gl symbols in OSMesa
|
||||
# https://bugs.freedesktop.org/show_bug.cgi?id=109659
|
||||
patch('meson-expose-glapi-through-osmesa.patch', when='@19.0.0:')
|
||||
def autoreconf(self, spec, prefix):
|
||||
which('autoreconf')('--force', '--verbose', '--install')
|
||||
|
||||
def meson_args(self):
|
||||
def configure_args(self):
|
||||
spec = self.spec
|
||||
args = [
|
||||
'-Dglvnd=false',
|
||||
'-Dgallium-nine=false',
|
||||
'-Dgallium-omx=disabled',
|
||||
'-Dgallium-opencl=disabled',
|
||||
'-Dgallium-va=false',
|
||||
'-Dgallium-vdpau=false',
|
||||
'-Dgallium-xa=false',
|
||||
'-Dgallium-xvmc=false',
|
||||
'-Dvulkan-drivers=']
|
||||
'--enable-shared',
|
||||
'--disable-static',
|
||||
'--disable-libglvnd',
|
||||
'--disable-nine',
|
||||
'--disable-omx-bellagio',
|
||||
'--disable-omx-tizonia',
|
||||
'--disable-opencl',
|
||||
'--disable-opencl-icd',
|
||||
'--disable-va',
|
||||
'--disable-vdpau',
|
||||
'--disable-xa',
|
||||
'--disable-xvmc',
|
||||
'--disable-osmesa',
|
||||
'--with-vulkan-drivers=']
|
||||
args_platforms = []
|
||||
args_gallium_drivers = ['swrast']
|
||||
args_dri_drivers = []
|
||||
|
@ -105,49 +104,51 @@ def meson_args(self):
|
|||
num_frontends = 0
|
||||
if '+osmesa' in spec:
|
||||
num_frontends += 1
|
||||
args.append('-Dosmesa=gallium')
|
||||
args.append('--enable-gallium-osmesa')
|
||||
else:
|
||||
args.append('-Dosmesa=disabled')
|
||||
args.append('--disable-gallium-osmesa')
|
||||
|
||||
if '+glx' in spec:
|
||||
num_frontends += 1
|
||||
args.append('-Dglx=gallium-xlib')
|
||||
if '+egl' in spec:
|
||||
args.append('--enable-glx=dri')
|
||||
else:
|
||||
args.append('--enable-glx=gallium-xlib')
|
||||
args_platforms.append('x11')
|
||||
else:
|
||||
args.append('-Dglx=disabled')
|
||||
args.append('--disable-glx')
|
||||
|
||||
if '+egl' in spec:
|
||||
num_frontends += 1
|
||||
args.extend(['-Degl=true', '-Dgbm=true'])
|
||||
args.extend(['--enable-egl', '--enable-gbm', '--enable-dri'])
|
||||
args_platforms.append('surfaceless')
|
||||
else:
|
||||
args.extend(['-Degl=false', '-Dgbm=false'])
|
||||
args.extend(['--disable-egl', '--disable-gbm', '--disable-dri'])
|
||||
|
||||
if '+opengl' in spec:
|
||||
args.append('-Dopengl=true')
|
||||
args.append('--enable-opengl')
|
||||
else:
|
||||
args.append('-Dopengl=false')
|
||||
args.append('--disable-opengl')
|
||||
|
||||
if '+opengles' in spec:
|
||||
args.extend(['-Dgles1=true', '-Dgles2=true'])
|
||||
args.extend(['--enable-gles1', '--enable-gles2'])
|
||||
else:
|
||||
args.extend(['-Dgles1=false', '-Dgles2=false'])
|
||||
|
||||
if '+egl' in spec or '+osmesa' in spec:
|
||||
args_platforms.append('surfaceless')
|
||||
args.extend(['--disable-gles1', '--disable-gles2'])
|
||||
|
||||
if num_frontends > 1:
|
||||
args.append('-Dshared-glapi=true')
|
||||
args.append('--enable-shared-glapi')
|
||||
else:
|
||||
args.append('-Dshared-glapi=false')
|
||||
args.append('--disable-shared-glapi')
|
||||
|
||||
if '+llvm' in spec:
|
||||
args.append('-Dllvm=true')
|
||||
args.append('--enable-llvm')
|
||||
args.append('--with-llvm-prefix=%s' % spec['llvm'].prefix)
|
||||
if '+link_dylib' in spec['llvm']:
|
||||
args.append('-Dshared-llvm=true')
|
||||
args.append('--enable-llvm-shared-libs')
|
||||
else:
|
||||
args.append('-Dshared-llvm=false')
|
||||
args.append('--disable-llvm-shared-libs')
|
||||
else:
|
||||
args.append('-Dllvm=false')
|
||||
args.append('--disable-llvm')
|
||||
|
||||
args_swr_arches = []
|
||||
if 'swr=avx' in spec:
|
||||
|
@ -162,11 +163,11 @@ def meson_args(self):
|
|||
if '+llvm' not in spec:
|
||||
raise SpecError('Variant swr requires +llvm')
|
||||
args_gallium_drivers.append('swr')
|
||||
args.append('-Dswr-arches=' + ','.join(args_swr_arches))
|
||||
args.append('--with-swr-archs=' + ','.join(args_swr_arches))
|
||||
|
||||
# Add the remaining list args
|
||||
args.append('-Dplatforms=' + ','.join(args_platforms))
|
||||
args.append('-Dgallium-drivers=' + ','.join(args_gallium_drivers))
|
||||
args.append('-Ddri-drivers=' + ','.join(args_dri_drivers))
|
||||
args.append('--with-platforms=' + ','.join(args_platforms))
|
||||
args.append('--with-gallium-drivers=' + ','.join(args_gallium_drivers))
|
||||
args.append('--with-dri-drivers=' + ','.join(args_dri_drivers))
|
||||
|
||||
return args
|
||||
|
|
Loading…
Reference in a new issue