diff options
author | John Schoenick | 2019-09-27 15:19:14 -0700 |
---|---|---|
committer | John Schoenick | 2019-09-27 15:20:05 -0700 |
commit | 2759635e1e862ff982e6feab746422dd87ad4339 (patch) | |
tree | 7d70249d1aba94861203ba2a9617a9dd589743b7 | |
parent | 2eb7a1c52f5240a5fb391844bd8cab77db297d68 (diff) | |
download | aur-2759635e1e862ff982e6feab746422dd87ad4339.tar.gz |
Fix .pc file situation by backporting fixes not yet on branch
Brings in from upstream:
893fdda82b70ec4b735e29719597f90d06a1b150
ff97e08ad2ac33e47e72eb4b5f54bd1dc810746c
This won't be necessary when ACO rebases again
-rw-r--r-- | .SRCINFO | 29 | ||||
-rw-r--r-- | PKGBUILD | 26 | ||||
-rw-r--r-- | glvnd-1.patch | 122 | ||||
-rw-r--r-- | glvnd-2.patch | 148 |
4 files changed, 299 insertions, 26 deletions
@@ -1,9 +1,9 @@ # Generated by mksrcinfo v8 -# Fri Sep 20 21:03:22 UTC 2019 +# Fri Sep 27 22:19:58 UTC 2019 pkgbase = lib32-mesa-aco-git pkgdesc = Mesa with the ACO compiler patchset, git version - pkgver = 19.3.0_devel.20190919.b738bf06917 - pkgrel = 4 + pkgver = 19.3.0_devel.20190927.d0ed7ce952c + pkgrel = 5 url = https://www.mesa3d.org arch = x86_64 license = custom @@ -40,15 +40,15 @@ pkgbase = lib32-mesa-aco-git depends = lib32-llvm-libs>=8.0.0 depends = lib32-llvm-libs<8.1 optdepends = opengl-man-pages: for the OpenGL API man pages - provides = lib32-mesa=19.3.0_devel.20190919.b738bf06917-4 - provides = lib32-mesa-git=19.3.0_devel.20190919.b738bf06917-4 - provides = lib32-vulkan-intel=19.3.0_devel.20190919.b738bf06917-4 - provides = lib32-vulkan-radeon=19.3.0_devel.20190919.b738bf06917-4 - provides = lib32-libva-mesa-driver=19.3.0_devel.20190919.b738bf06917-4 - provides = lib32-vulkan-mesa-layer=19.3.0_devel.20190919.b738bf06917-4 - provides = lib32-mesa-vdpau=19.3.0_devel.20190919.b738bf06917-4 + provides = lib32-mesa=19.3.0_devel.20190927.d0ed7ce952c-5 + provides = lib32-mesa-git=19.3.0_devel.20190927.d0ed7ce952c-5 + provides = lib32-vulkan-intel=19.3.0_devel.20190927.d0ed7ce952c-5 + provides = lib32-vulkan-radeon=19.3.0_devel.20190927.d0ed7ce952c-5 + provides = lib32-libva-mesa-driver=19.3.0_devel.20190927.d0ed7ce952c-5 + provides = lib32-vulkan-mesa-layer=19.3.0_devel.20190927.d0ed7ce952c-5 + provides = lib32-mesa-vdpau=19.3.0_devel.20190927.d0ed7ce952c-5 provides = lib32-opengl-driver - provides = lib32-mesa-libgl=19.3.0_devel.20190919.b738bf06917-4 + provides = lib32-mesa-libgl=19.3.0_devel.20190927.d0ed7ce952c-5 conflicts = lib32-mesa conflicts = lib32-mesa-git conflicts = lib32-vulkan-intel @@ -59,12 +59,13 @@ pkgbase = lib32-mesa-aco-git source = mesa-aco::git+https://github.com/daniel-schuermann/mesa source = LICENSE source = llvm32.native - md5sums = SKIP - md5sums = 5c65a0fe315dd347e09b1f2826a1df5a - md5sums = 6b4a19068a323d7f90a3d3cd315ed1f9 + source = glvnd-1.patch + source = glvnd-2.patch sha512sums = SKIP sha512sums = 25da77914dded10c1f432ebcbf29941124138824ceecaf1367b3deedafaecabc082d463abcfa3d15abff59f177491472b505bcb5ba0c4a51bb6b93b4721a23c2 sha512sums = c7dbb390ebde291c517a854fcbe5166c24e95206f768cc9458ca896b2253aabd6df12a7becf831998721b2d622d0c02afdd8d519e77dea8e1d6807b35f0166fe + sha512sums = d3a58aaafbdab6e47207327bd519d4af20e39253e04e093be511df3495851d1e405959dfa78930e047846dc735178081e48a41148289e1b70242d877d9a4d129 + sha512sums = 70a9f75a6fed2f6e4828f491bc6a3a18daf9dc1bbc9d6d400c39902dddcba0671112c23b1ed5e8ebdc54e344235064e907b166c0dcfe80699a8d71bbb5decdd9 pkgname = lib32-mesa-aco-git @@ -12,8 +12,8 @@ pkgname=lib32-mesa-aco-git pkgdesc="Mesa with the ACO compiler patchset, git version" -pkgver=19.3.0_devel.20190919.b738bf06917 -pkgrel=4 +pkgver=19.3.0_devel.20190927.d0ed7ce952c +pkgrel=5 arch=('x86_64') makedepends=('python-mako' 'lib32-libxml2' 'lib32-libx11' 'xorgproto' 'lib32-gcc-libs' 'lib32-libvdpau' 'lib32-libelf' 'git' 'lib32-libgcrypt' 'lib32-systemd' @@ -35,13 +35,14 @@ url="https://www.mesa3d.org" license=('custom') source=('mesa-aco::git+https://github.com/daniel-schuermann/mesa' 'LICENSE' - 'llvm32.native') -md5sums=('SKIP' - '5c65a0fe315dd347e09b1f2826a1df5a' - '6b4a19068a323d7f90a3d3cd315ed1f9') + 'llvm32.native' + 'glvnd-1.patch' + 'glvnd-2.patch') sha512sums=('SKIP' '25da77914dded10c1f432ebcbf29941124138824ceecaf1367b3deedafaecabc082d463abcfa3d15abff59f177491472b505bcb5ba0c4a51bb6b93b4721a23c2' - 'c7dbb390ebde291c517a854fcbe5166c24e95206f768cc9458ca896b2253aabd6df12a7becf831998721b2d622d0c02afdd8d519e77dea8e1d6807b35f0166fe') + 'c7dbb390ebde291c517a854fcbe5166c24e95206f768cc9458ca896b2253aabd6df12a7becf831998721b2d622d0c02afdd8d519e77dea8e1d6807b35f0166fe' + 'd3a58aaafbdab6e47207327bd519d4af20e39253e04e093be511df3495851d1e405959dfa78930e047846dc735178081e48a41148289e1b70242d877d9a4d129' + '70a9f75a6fed2f6e4828f491bc6a3a18daf9dc1bbc9d6d400c39902dddcba0671112c23b1ed5e8ebdc54e344235064e907b166c0dcfe80699a8d71bbb5decdd9') # NINJAFLAGS is an env var used to pass commandline options to ninja # NOTE: It's your responbility to validate the value of $NINJAFLAGS. If unsure, don't set it. @@ -107,7 +108,13 @@ prepare() { if [ -d _build ]; then rm -rf _build fi + + cd "$srcdir"/mesa-aco + # Cherry-picks that haven't made it to the ACO branch yet to fix the .pc file situation with glvnd/egl + patch -Np1 -i "$srcdir"/glvnd-1.patch + patch -Np1 -i "$srcdir"/glvnd-2.patch } + build () { export CC="gcc -m32" export CXX="g++ -m32" @@ -163,11 +170,6 @@ package() { rm -rf "$pkgdir"/usr/share/drirc.d/ rm -rf "$pkgdir"/usr/share/vulkan/explicit_layer.d/ - # drop egl.pc -- upstream mesa has dropped this to fix confusion over who should provide it (conclusion: libglvnd), - # but as of 7/23 the ACO upstream doesn't have that patch. Drop it now so we don't conflict with the libglvnd - # provider, next ACO rebase should remove this file when they pick up c7831b604063 - rm -f "$pkgdir"/usr/lib32/pkgconfig/egl.pc - # indirect rendering ln -s /usr/lib32/libGLX_mesa.so.0 "${pkgdir}/usr/lib32/libGLX_indirect.so.0" install -Dt "$pkgdir"/usr/share/licenses/$pkgbase/ -m644 "$srcdir"/LICENSE diff --git a/glvnd-1.patch b/glvnd-1.patch new file mode 100644 index 000000000000..460a00372554 --- /dev/null +++ b/glvnd-1.patch @@ -0,0 +1,122 @@ +From 893fdda82b70ec4b735e29719597f90d06a1b150 Mon Sep 17 00:00:00 2001 +From: Eric Engestrom <eric.engestrom@intel.com> +Date: Thu, 19 Sep 2019 14:18:55 +0100 +Subject: [PATCH 1/2] meson: re-add incorrect pkg-config files with GLVND for + backward compatibility + +This is a bit counter-intuitive, but the issue is that GLVND is broken +in versions <= 1.1.1, so we need to keep wrongly providing these files +to cover up their mistake, otherwise the rest of the world ends up +broken. + +Suggested-by: Dylan Baker <dylan@pnwbakers.com> +Cc: mesa-stable@lists.freedesktop.org +Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> +Reviewed-by: Dylan Baker <dylan@pnwbakers.com> +--- + meson.build | 4 ++++ + src/egl/meson.build | 27 +++++++++++++++++---------- + src/mapi/meson.build | 2 +- + src/meson.build | 14 ++++++++++++-- + 4 files changed, 34 insertions(+), 13 deletions(-) + +diff --git a/meson.build b/meson.build +index a50f57991da..01f57aea18a 100644 +--- a/meson.build ++++ b/meson.build +@@ -1321,6 +1321,10 @@ endif + dep_glvnd = null_dep + if with_glvnd + dep_glvnd = dependency('libglvnd', version : '>= 0.2.0') ++ # GLVND until commit 0dfaea2bcb7cdcc785f9 ("Add pkg-config files for EGL, GL, ++ # GLES, and GLX.") was missing its pkg-config files, forcing every vendor to ++ # provide them and the distro maintainers to resolve the conflict. ++ glvnd_missing_pc_files = dep_glvnd.version().version_compare('< 1.2.0') + pre_args += '-DUSE_LIBGLVND=1' + endif + +diff --git a/src/egl/meson.build b/src/egl/meson.build +index 14aca2a2186..7038a68e955 100644 +--- a/src/egl/meson.build ++++ b/src/egl/meson.build +@@ -173,18 +173,25 @@ libegl = shared_library( + version : egl_lib_version, + ) + +-if not with_glvnd +- pkg.generate( +- name : 'egl', +- description : 'Mesa EGL Library', +- version : meson.project_version(), +- libraries : libegl, +- libraries_private: gl_priv_libs, +- requires_private : gl_priv_reqs, +- extra_cflags : gl_pkgconfig_c_flags, +- ) ++# If using glvnd the pkg-config header should not point to EGL_mesa, it should ++# point to EGL. glvnd is only available on unix like platforms so adding -l ++# should be safe here ++if with_glvnd and glvnd_missing_pc_files ++ _egl = '-L${libdir} -lEGL' ++else ++ _egl = libegl + endif + ++pkg.generate( ++ name : 'egl', ++ description : 'Mesa EGL Library', ++ version : meson.project_version(), ++ libraries : _egl, ++ libraries_private: gl_priv_libs, ++ requires_private : gl_priv_reqs, ++ extra_cflags : gl_pkgconfig_c_flags, ++) ++ + if with_tests and prog_nm.found() + if with_glvnd + egl_symbols = files('egl-glvnd-symbols.txt') +diff --git a/src/mapi/meson.build b/src/mapi/meson.build +index 2c79a04f1df..39c1dba7ce0 100644 +--- a/src/mapi/meson.build ++++ b/src/mapi/meson.build +@@ -35,7 +35,7 @@ if with_shared_glapi + else + libglapi = [] + endif +-if not with_glvnd ++if not with_glvnd or glvnd_missing_pc_files + if with_gles1 + subdir('es1api') + endif +diff --git a/src/meson.build b/src/meson.build +index 11e0011c057..ddbcd7f3ae4 100644 +--- a/src/meson.build ++++ b/src/meson.build +@@ -111,12 +111,22 @@ endif + + # This must be after at least mesa, glx, and gallium, since libgl will be + # defined in one of those subdirs depending on the glx provider. +-if with_glx != 'disabled' and not with_glvnd ++if with_glx != 'disabled' ++ # If using glvnd the pkg-config header should not point to GL_mesa, it should ++ # point to GL. glvnd is only available on unix like platforms so adding -l ++ # should be safe here ++ # TODO: in the glvnd case glvnd itself should really be providing this. ++ if with_glvnd and glvnd_missing_pc_files ++ _gl = '-L${libdir} -lGL' ++ else ++ _gl = libgl ++ endif ++ + pkg.generate( + name : 'gl', + description : 'Mesa OpenGL Library', + version : meson.project_version(), +- libraries : libgl, ++ libraries : _gl, + libraries_private : gl_priv_libs, + requires_private : gl_priv_reqs, + variables : ['glx_tls=yes'], +-- +2.23.0 + diff --git a/glvnd-2.patch b/glvnd-2.patch new file mode 100644 index 000000000000..df2767bd8e67 --- /dev/null +++ b/glvnd-2.patch @@ -0,0 +1,148 @@ +From ff97e08ad2ac33e47e72eb4b5f54bd1dc810746c Mon Sep 17 00:00:00 2001 +From: Dylan Baker <dylan@pnwbakers.com> +Date: Wed, 25 Sep 2019 23:25:27 +0000 +Subject: [PATCH 2/2] meson: fix logic for generating .pc files with old glvnd + +We want to generate PC files for non-glvnd builds and for builds with +old glvnd, but the current logic doesn't do that, it builds them +unconditionally, and for GLES it builds the shared libraries, which is +also not what we want. This does not generate .pc files for gles1 or +gles2. Which it we weren't doing before either, making this not a +regression but a return to status-quo.o + +Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/1838 +Fixes: 93df862b6affb6b8507e40601212a58012bfa873 + ("meson: re-add incorrect pkg-config files with GLVND for backward compatibility") +Reviewed-by: Matt Turner <mattst88@gmail.com> +--- + meson.build | 9 +++++---- + src/egl/meson.build | 30 ++++++++++++++++-------------- + src/mapi/meson.build | 2 +- + src/meson.build | 4 ++-- + 4 files changed, 24 insertions(+), 21 deletions(-) + +diff --git a/meson.build b/meson.build +index 01f57aea18a..1b494348ed9 100644 +--- a/meson.build ++++ b/meson.build +@@ -100,7 +100,7 @@ endif + + # shared-glapi is required if at least two OpenGL APIs are being built + if not with_shared_glapi +- if ((with_gles1 == 'true' and with_gles2 == 'true') or ++ if ((with_gles1 == 'true' and with_gles2 == 'true') or + (with_gles1 == 'true' and with_opengl) or + (with_gles2 == 'true' and with_opengl)) + error('shared-glapi required for building two or more of OpenGL, OpenGL ES 1.x, OpenGL ES 2.x') +@@ -397,7 +397,7 @@ endif + if with_glx != 'disabled' + if not (with_platform_x11 and with_any_opengl) + error('Cannot build GLX support without X11 platform support and at least one OpenGL API') +- elif with_glx == 'gallium-xlib' ++ elif with_glx == 'gallium-xlib' + if not with_gallium + error('Gallium-xlib based GLX requires at least one gallium driver') + elif not with_gallium_softpipe +@@ -405,7 +405,7 @@ if with_glx != 'disabled' + elif with_dri + error('gallium-xlib conflicts with any dri driver') + endif +- elif with_glx == 'xlib' ++ elif with_glx == 'xlib' + if with_dri + error('xlib conflicts with any dri driver') + endif +@@ -1319,6 +1319,7 @@ else + endif + + dep_glvnd = null_dep ++glvnd_missing_pc_files = false + if with_glvnd + dep_glvnd = dependency('libglvnd', version : '>= 0.2.0') + # GLVND until commit 0dfaea2bcb7cdcc785f9 ("Add pkg-config files for EGL, GL, +@@ -1455,7 +1456,7 @@ if with_platform_x11 + if with_glx == 'dri' or with_glx == 'gallium-xlib' + dep_glproto = dependency('glproto', version : '>= 1.4.14') + endif +- if with_glx == 'dri' ++ if with_glx == 'dri' + if with_dri_platform == 'drm' + dep_dri2proto = dependency('dri2proto', version : '>= 2.8') + dep_xxf86vm = dependency('xxf86vm') +diff --git a/src/egl/meson.build b/src/egl/meson.build +index 7038a68e955..7d738e2ebd1 100644 +--- a/src/egl/meson.build ++++ b/src/egl/meson.build +@@ -176,21 +176,23 @@ libegl = shared_library( + # If using glvnd the pkg-config header should not point to EGL_mesa, it should + # point to EGL. glvnd is only available on unix like platforms so adding -l + # should be safe here +-if with_glvnd and glvnd_missing_pc_files +- _egl = '-L${libdir} -lEGL' +-else +- _egl = libegl +-endif ++if not with_glvnd or glvnd_missing_pc_files ++ if glvnd_missing_pc_files ++ _egl = '-L${libdir} -lEGL' ++ else ++ _egl = libegl ++ endif + +-pkg.generate( +- name : 'egl', +- description : 'Mesa EGL Library', +- version : meson.project_version(), +- libraries : _egl, +- libraries_private: gl_priv_libs, +- requires_private : gl_priv_reqs, +- extra_cflags : gl_pkgconfig_c_flags, +-) ++ pkg.generate( ++ name : 'egl', ++ description : 'Mesa EGL Library', ++ version : meson.project_version(), ++ libraries : _egl, ++ libraries_private: gl_priv_libs, ++ requires_private : gl_priv_reqs, ++ extra_cflags : gl_pkgconfig_c_flags, ++ ) ++endif + + if with_tests and prog_nm.found() + if with_glvnd +diff --git a/src/mapi/meson.build b/src/mapi/meson.build +index 39c1dba7ce0..2c79a04f1df 100644 +--- a/src/mapi/meson.build ++++ b/src/mapi/meson.build +@@ -35,7 +35,7 @@ if with_shared_glapi + else + libglapi = [] + endif +-if not with_glvnd or glvnd_missing_pc_files ++if not with_glvnd + if with_gles1 + subdir('es1api') + endif +diff --git a/src/meson.build b/src/meson.build +index ddbcd7f3ae4..d01f84c0d46 100644 +--- a/src/meson.build ++++ b/src/meson.build +@@ -111,12 +111,12 @@ endif + + # This must be after at least mesa, glx, and gallium, since libgl will be + # defined in one of those subdirs depending on the glx provider. +-if with_glx != 'disabled' ++if with_glx != 'disabled' and (not with_glvnd or glvnd_missing_pc_files) + # If using glvnd the pkg-config header should not point to GL_mesa, it should + # point to GL. glvnd is only available on unix like platforms so adding -l + # should be safe here + # TODO: in the glvnd case glvnd itself should really be providing this. +- if with_glvnd and glvnd_missing_pc_files ++ if glvnd_missing_pc_files + _gl = '-L${libdir} -lGL' + else + _gl = libgl +-- +2.23.0 + |