From 15af816b3221c07aa9d061cb50d1869a93db8613 Mon Sep 17 00:00:00 2001 From: Ophidiophobia Date: Sat, 3 Oct 2020 16:02:05 +0200 Subject: [PATCH] mesa: update to 20.2.0 --- srcpkgs/mesa/patches/add-use-elf-tls.patch | 6 +++-- srcpkgs/mesa/patches/musl.patch | 26 ++++++++++---------- srcpkgs/mesa/template | 28 ++++++++++++++-------- 3 files changed, 34 insertions(+), 26 deletions(-) diff --git a/srcpkgs/mesa/patches/add-use-elf-tls.patch b/srcpkgs/mesa/patches/add-use-elf-tls.patch index d5b933d586d..617d8c0e946 100644 --- a/srcpkgs/mesa/patches/add-use-elf-tls.patch +++ b/srcpkgs/mesa/patches/add-use-elf-tls.patch @@ -9,10 +9,12 @@ index d228de0..972cd79 100644 endif # Android uses emutls for versions <= P/28. For USE_ELF_TLS we need ELF TLS. --if not ['windows', 'freebsd'].contains(host_machine.system()) and (not with_platform_android or get_option('platform-sdk-version') >= 29) + use_elf_tls = false +-if not ['windows', 'freebsd', 'openbsd'].contains(host_machine.system()) and (not with_platform_android or get_option('platform-sdk-version') >= 29) +with_use_elf_tls = get_option('use-elf-tls') -+if not ['windows', 'freebsd'].contains(host_machine.system()) and with_use_elf_tls and (not with_platform_android or get_option('platform-sdk-version') >= 29) ++if not ['windows', 'freebsd', 'openbsd'].contains(host_machine.system()) and with_use_elf_tls and (not with_platform_android or get_option('platform-sdk-version') >= 29) pre_args += '-DUSE_ELF_TLS' + use_elf_tls = true endif diff --git meson_options.txt meson_options.txt diff --git a/srcpkgs/mesa/patches/musl.patch b/srcpkgs/mesa/patches/musl.patch index ba679adab15..f00f0f78c99 100644 --- a/srcpkgs/mesa/patches/musl.patch +++ b/srcpkgs/mesa/patches/musl.patch @@ -9,8 +9,8 @@ #include "pipe/p_compiler.h" #include "pipe/p_state.h" ---- src/gallium/state_trackers/nine/threadpool.h.orig 2015-05-07 14:10:53.443337212 +0200 -+++ src/gallium/state_trackers/nine/threadpool.h 2015-05-07 14:11:04.210307653 +0200 +--- src/gallium/frontends/nine/threadpool.h.orig 2015-05-07 14:10:53.443337212 +0200 ++++ src/gallium/frontends/nine/threadpool.h 2015-05-07 14:11:04.210307653 +0200 @@ -24,6 +24,8 @@ #ifndef _THREADPOOL_H_ #define _THREADPOOL_H_ @@ -20,18 +20,16 @@ #define MAXTHREADS 1 struct threadpool { ---- src/util/rand_xor.c.orig 2017-06-20 00:38:57.199474067 +0200 -+++ src/util/rand_xor.c 2017-06-20 00:40:31.351279557 +0200 -@@ -23,7 +23,9 @@ - */ - - #if defined(__linux__) -+#include - #include -+#include +--- src/util/rand_xor.c.orig 2020-10-03 12:27:48.489024729 +0200 ++++ src/util/rand_xor.c 2020-10-03 12:31:05.927113521 +0200 +@@ -28,6 +28,7 @@ + #if defined(HAVE_GETRANDOM) + #include + #endif ++#include /* size_t, ssize_t */ #include #include - #else + #endif --- src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h +++ src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h @@ -28,6 +28,8 @@ @@ -43,8 +41,8 @@ #include "radv_radeon_winsys.h" #include "ac_gpu_info.h" #include "addrlib/addrinterface.h" ---- src/gallium/state_trackers/nine/nine_debug.c.orig 2020-03-06 07:46:48.278918421 +0100 -+++ src/gallium/state_trackers/nine/nine_debug.c 2020-03-06 07:51:32.919964119 +0100 +--- src/gallium/frontends/nine/nine_debug.c.orig 2020-03-06 07:46:48.278918421 +0100 ++++ src/gallium/frontends/nine/nine_debug.c 2020-03-06 07:51:32.919964119 +0100 @@ -65,7 +65,7 @@ _nine_debug_printf( unsigned long flag, { static boolean first = TRUE; diff --git a/srcpkgs/mesa/template b/srcpkgs/mesa/template index 13de387a00b..528a0c979c3 100644 --- a/srcpkgs/mesa/template +++ b/srcpkgs/mesa/template @@ -1,6 +1,6 @@ # Template file for 'mesa' pkgname=mesa -version=20.1.9 +version=20.2.0 revision=1 wrksrc="mesa-${version}" build_style=meson @@ -23,7 +23,7 @@ license="MIT, LGPL-2.1-or-later" homepage="https://www.mesa3d.org/" changelog="https://docs.mesa3d.org/relnotes/${version}.html" distfiles="https://mesa.freedesktop.org/archive/mesa-${version}.tar.xz" -checksum=b251ca0769b722058986640d48f8457c596142cfbee1a83cba91b83391427382 +checksum=63f0359575d558ef98dd78adffc0df4c66b76964ebf603b778b7004964191d30 build_options="wayland" build_options_default="wayland" @@ -40,9 +40,9 @@ replaces="libGL>=10_1<19.2.5_2 libEGL>=10_1<19.2.5_2 libGLES>=10_1<19.2.5_2" # swrast always present _gallium_drivers=" -Dgallium-drivers=swrast" -_vulkan_drivers=" -Dvulkan-drivers=" +_vulkan_drivers="" # pre-gallium drivers are mostly for old ati + i915/965 -_dri_drivers=" -Ddri-drivers=" +_dri_drivers="" # amd and nvidia drivers on all platforms except where it makes no sense # amd implicitly enables clover opencl, also enable hwdec and virgl too @@ -74,8 +74,10 @@ if [ "$_have_amd" ]; then _have_opencl=yes _have_vulkan=yes _gallium_drivers+=",r300,r600,radeonsi" - _vulkan_drivers+=",amd" - _dri_drivers+=",r100,r200" + [ ! -z "$_vulkan_drivers" ] && _vulkan_drivers+="," + _vulkan_drivers+="amd" + [ ! -z "$_dri_drivers" ] && _dri_drivers+="," + _dri_drivers+="r100,r200" subpackages+=" mesa-vulkan-radeon" # transitional dummy packages subpackages+=" mesa-ati-dri" @@ -84,8 +86,10 @@ fi if [ "$_have_intel" ]; then _have_vulkan=yes _gallium_drivers+=",iris" - _vulkan_drivers+=",intel" - _dri_drivers+=",i915,i965" + [ ! -z "$_vulkan_drivers" ] && _vulkan_drivers+="," + _vulkan_drivers+="intel" + [ ! -z "$_dri_drivers" ] && _dri_drivers+="," + _dri_drivers+="i915,i965" subpackages+=" mesa-vulkan-intel" # transitional dummy packages subpackages+=" mesa-intel-dri" @@ -98,7 +102,8 @@ if [ "$_have_nv" ]; then # transitional dummy packages subpackages+=" mesa-tegra-dri" else - _dri_drivers+=",nouveau" + [ ! -z "$_dri_drivers" ] && _dri_drivers+="," + _dri_drivers+="nouveau" fi # transitional dummy packages subpackages+=" mesa-nouveau-dri" @@ -146,6 +151,9 @@ else configure_args+=" -Dgallium-vdpau=false -Dgallium-va=false -Dgallium-xvmc=false" fi +[ ! -z "$_vulkan_drivers" ] && _vulkan_drivers=" -Dvulkan-drivers=$_vulkan_drivers" +[ ! -z "$_dri_drivers" ] && _dri_drivers=" -Ddri-drivers=$_dri_drivers" + configure_args+=" ${_gallium_drivers} ${_vulkan_drivers} ${_dri_drivers}" if [ "$_have_vulkan" ]; then @@ -180,7 +188,7 @@ post_configure() { } post_install() { - vlicense docs/license.html + vlicense docs/license.rst case "$XBPS_TARGET_MACHINE" in i686*) vsed -e 's#/usr/lib/#/usr/lib32/#g' \