diff options
author | John Schoenick | 2019-09-27 14:22:38 -0700 |
---|---|---|
committer | John Schoenick | 2019-09-27 15:17:28 -0700 |
commit | 54af301e6a92b581b45da070c2e8b69d341e03c9 (patch) | |
tree | 5c0d9efd109b5d5c4d7f65e19c9094e36eea498b | |
parent | 2221ed1f732bccb9e8e64f4af6d8383ba5f12ce3 (diff) | |
download | aur-54af301e6a92b581b45da070c2e8b69d341e03c9.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 | 34 | ||||
-rw-r--r-- | PKGBUILD | 21 | ||||
-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:04:23 UTC 2019 +# Fri Sep 27 21:22:13 UTC 2019 pkgbase = mesa-aco-git pkgdesc = Mesa with the ACO compiler patchset, git version - pkgver = 19.3.0_devel.20190919.b738bf06917 - pkgrel = 3 + pkgver = 19.3.0_devel.20190927.d0ed7ce952c + pkgrel = 4 url = https://www.mesa3d.org arch = x86_64 license = custom @@ -43,19 +43,19 @@ pkgbase = mesa-aco-git depends = llvm-libs>=8.0.0 depends = llvm-libs<8.1 optdepends = opengl-man-pages: for the OpenGL API man pages - provides = mesa=19.3.0_devel.20190919.b738bf06917-3 - provides = mesa-git=19.3.0_devel.20190919.b738bf06917-3 - provides = vulkan-intel=19.3.0_devel.20190919.b738bf06917-3 - provides = vulkan-radeon=19.3.0_devel.20190919.b738bf06917-3 - provides = libva-mesa-driver=19.3.0_devel.20190919.b738bf06917-3 - provides = mesa-vdpau=19.3.0_devel.20190919.b738bf06917-3 - provides = vulkan-driver=19.3.0_devel.20190919.b738bf06917-3 - provides = opencl-mesa=19.3.0_devel.20190919.b738bf06917-3 - provides = mesa-vulkan-layer=19.3.0_devel.20190919.b738bf06917-3 - provides = vulkan-mesa-layer=19.3.0_devel.20190919.b738bf06917-3 + provides = mesa=19.3.0_devel.20190927.d0ed7ce952c-4 + provides = mesa-git=19.3.0_devel.20190927.d0ed7ce952c-4 + provides = vulkan-intel=19.3.0_devel.20190927.d0ed7ce952c-4 + provides = vulkan-radeon=19.3.0_devel.20190927.d0ed7ce952c-4 + provides = libva-mesa-driver=19.3.0_devel.20190927.d0ed7ce952c-4 + provides = mesa-vdpau=19.3.0_devel.20190927.d0ed7ce952c-4 + provides = vulkan-driver=19.3.0_devel.20190927.d0ed7ce952c-4 + provides = opencl-mesa=19.3.0_devel.20190927.d0ed7ce952c-4 + provides = mesa-vulkan-layer=19.3.0_devel.20190927.d0ed7ce952c-4 + provides = vulkan-mesa-layer=19.3.0_devel.20190927.d0ed7ce952c-4 provides = opengl-driver provides = opencl-driver - provides = mesa-libgl=19.3.0_devel.20190919.b738bf06917-3 + provides = mesa-libgl=19.3.0_devel.20190927.d0ed7ce952c-4 conflicts = mesa conflicts = mesa-git conflicts = opencl-mesa @@ -67,10 +67,12 @@ pkgbase = mesa-aco-git conflicts = vulkan-mesa-layer source = mesa-aco::git+https://github.com/daniel-schuermann/mesa source = LICENSE - md5sums = SKIP - md5sums = 5c65a0fe315dd347e09b1f2826a1df5a + source = glvnd-1.patch + source = glvnd-2.patch sha512sums = SKIP sha512sums = 25da77914dded10c1f432ebcbf29941124138824ceecaf1367b3deedafaecabc082d463abcfa3d15abff59f177491472b505bcb5ba0c4a51bb6b93b4721a23c2 + sha512sums = d3a58aaafbdab6e47207327bd519d4af20e39253e04e093be511df3495851d1e405959dfa78930e047846dc735178081e48a41148289e1b70242d877d9a4d129 + sha512sums = 70a9f75a6fed2f6e4828f491bc6a3a18daf9dc1bbc9d6d400c39902dddcba0671112c23b1ed5e8ebdc54e344235064e907b166c0dcfe80699a8d71bbb5decdd9 pkgname = mesa-aco-git @@ -12,8 +12,8 @@ pkgname=mesa-aco-git pkgdesc="Mesa with the ACO compiler patchset, git version" -pkgver=19.3.0_devel.20190919.b738bf06917 -pkgrel=3 +pkgver=19.3.0_devel.20190927.d0ed7ce952c +pkgrel=4 arch=('x86_64') makedepends=('git' 'python-mako' 'xorgproto' 'libxml2' 'libx11' 'libvdpau' 'libva' 'elfutils' 'libomxil-bellagio' 'libxrandr' @@ -40,12 +40,14 @@ url="https://www.mesa3d.org" license=('custom') source=('mesa-aco::git+https://github.com/daniel-schuermann/mesa' 'LICENSE' + 'glvnd-1.patch' + 'glvnd-2.patch' ) -md5sums=('SKIP' - '5c65a0fe315dd347e09b1f2826a1df5a' -) + sha512sums=('SKIP' '25da77914dded10c1f432ebcbf29941124138824ceecaf1367b3deedafaecabc082d463abcfa3d15abff59f177491472b505bcb5ba0c4a51bb6b93b4721a23c2' + 'd3a58aaafbdab6e47207327bd519d4af20e39253e04e093be511df3495851d1e405959dfa78930e047846dc735178081e48a41148289e1b70242d877d9a4d129' + '70a9f75a6fed2f6e4828f491bc6a3a18daf9dc1bbc9d6d400c39902dddcba0671112c23b1ed5e8ebdc54e344235064e907b166c0dcfe80699a8d71bbb5decdd9' ) @@ -109,6 +111,10 @@ 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 () { @@ -156,10 +162,5 @@ package() { # indirect rendering ln -s /usr/lib/libGLX_mesa.so.0 "${pkgdir}"/usr/lib/libGLX_indirect.so.0 - # 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/lib/pkgconfig/egl.pc - install -Dt "$pkgdir"/usr/share/licenses/$pkgname "$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 + |