changeset 1309:66d3e04b22e6

graphics/mesa: upgrade to 21.2.5
author David Demelier <markand@malikania.fr>
date Fri, 19 Nov 2021 21:45:27 +0100
parents 7c81bdc2541b
children e22e50e381d0
files graphics/mesa/disable-tls.patch graphics/mesa/mesa.sh graphics/mesa/mesa.sha1 graphics/mesa/musl.patch
diffstat 4 files changed, 36 insertions(+), 64 deletions(-) [+]
line wrap: on
line diff
--- a/graphics/mesa/disable-tls.patch	Thu Nov 18 19:56:17 2021 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
---- meson.build.orig	2019-04-04 20:35:20.833929949 +0200
-+++ meson.build	2019-04-04 20:35:25.313806744 +0200
-@@ -343,7 +343,6 @@
-   endif
- endif
- 
--pre_args += '-DGLX_USE_TLS'
- 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')
--- a/graphics/mesa/mesa.sh	Thu Nov 18 19:56:17 2021 +0100
+++ b/graphics/mesa/mesa.sh	Fri Nov 19 21:45:27 2021 +0100
@@ -16,44 +16,41 @@
 #
 
 PKGNAME=mesa
-PKGVERSION=18.3.5
+PKGVERSION=21.2.5
 PKGREVISION=1
-PKGLICENSE="CUSTOM"
+PKGLICENSE="Custom"
 PKGSUMMARY="opensource OpenGL implementation"
+PKGWWW="https://www.mesa3d.org"
 PKGDOWNLOAD="https://mesa.freedesktop.org/archive/$PKGNAME-$PKGVERSION.tar.xz"
 PKGDEPENDS="meson:build"
-PKGOPTIONS="DRI DRM EGL GALLIUM GLVND LLVM PLATFORMS SELINUX VULKAN WAYLAND X"
+PKGOPTIONS="DRI EGL GALLIUM GLVND LLVM PLATFORMS SELINUX VULKAN WAYLAND X"
 
 : ${CC:=clang}
 : ${CFLAGS:=-O2}
 : ${CXX:=clang++}
 : ${CXXFLAGS:=-O2}
 : ${LDFLAGS:=}
-: ${DRI:=i965 r100 r200 nouveau}                        # driver list or "no"
-: ${DRM:=yes}
+: ${DRI:=yes}           # Select: list|yes, no
 : ${EGL:=yes}
-: ${GALLIUM:=i915 radeonsi r300 r600 virgl swrast}      # driver list or "no"
+: ${GALLIUM:=yes}       # Select: list|yes, no
 : ${GLVND:=no}
 : ${LLVM:=yes}
 : ${SELINUX:=no}
-: ${VULKAN:=intel amd}                                  # driver list or "no"
+: ${VULKAN:=yes}        # Select: list|yes, no
 : ${WAYLAND:=yes}
 : ${X:=yes}
 
 # Convert user options separated by spaces to comma.
 with_platforms=""
-with_dri_drivers=""
-with_gallium_drivers=""
-with_vulkan_drivers=""
 
-if [ "$DRM" = "yes" ]; then
-	PKGDEPENDS="libdrm $PKGDEPENDS"
-	with_platforms="drm"
-fi
-
-if [ "$DRI" != "no" ]; then
-	with_dri_drivers=$(echo $DRI | sed -e "s/ /,/g")
-fi
+case "$DRI" in
+"yes")
+        with_dri_drivers="auto" ;;
+"no")
+        with_dri_drivers="" ;;
+*)
+	with_dri_drivers="$(echo $DRI | sed -e "s/ /,/g")" ;;
+esac
 
 if [ "$EGL" = "yes" ]; then
 	with_egl="-D egl=true"
@@ -61,9 +58,14 @@
 	with_egl="-D egl=false"
 fi
 
-if [ "$GALLIUM" != "no" ]; then
-	with_gallium_drivers=$(echo $GALLIUM | sed -e "s/ /,/g")
-fi
+case "$GALLIUM" in
+"yes")
+        with_gallium_drivers="auto" ;;
+"no")
+        with_gallium_drivers="" ;;
+*)
+	with_gallium_drivers="$(echo $GALLIUM | sed -e "s/ /,/g")"
+esac
 
 if [ "$GLVND" = "yes" ]; then
 	with_glvnd="-D glvnd=true"
@@ -78,13 +80,18 @@
 	with_llvm="-D llvm=false"
 fi
 
-if [ "$VULKAN" != "no" ]; then
-	with_vulkan_drivers=$(echo $VULKAN | sed -e "s/ /,/g")
-fi
+case "$VULKAN" in
+"yes")
+        with_vulkan_drivers="auto" ;;
+"no")
+	with_vulkan_drivers="$(echo $VULKAN | sed -e "s/ /,/g")" ;;
+*)
+        with_vulkan_drivers="" ;;
+esac
 
 if [ "$WAYLAND" = "yes" ]; then
 	PKGDEPENDS="wayland wayland-protocols $PKGDEPENDS"
-	with_platforms="wayland,$with_platforms"
+	with_platforms="wayland $with_platforms"
 fi
 
 if [ "$X" = "yes" ]; then
@@ -95,7 +102,7 @@
 	            libxshmfence
 	            libxxf86vm
 	            $PKGDEPENDS"
-	with_platforms="x11,$with_platforms"
+	with_platforms="x11 $with_platforms"
 	with_dri="-D dri3=true"
 	with_glx="-D glx=dri"
 else
@@ -106,12 +113,9 @@
 build()
 {
 	rm -rf $PKGNAME-$PKGVERSION
-	tar xvf $PKGNAME-$PKGVERSION.tar.xz
+	tar -xvf $PKGNAME-$PKGVERSION.tar.xz
 	cd $PKGNAME-$PKGVERSION
 
-	patch -p0 < ../disable-tls.patch
-	# https://git.alpinelinux.org/aports/plain/main/mesa/musl-fix-includes.patch
-	patch -p1 < ../musl.patch
 	CC="$CC" \
 	CFLAGS="$CFLAGS" \
 	CXX="$CXX" \
@@ -122,8 +126,7 @@
 		--buildtype release \
 		--default-library shared \
 		-D libdir=lib \
-		-D bpm=true \
-		-D platforms="$with_platforms" \
+                -D platforms="$(echo ${with_platforms% *} | tr " " ",")" \
 		-D dri-drivers="$with_dri_drivers" \
 		-D gallium-drivers="$with_gallium_drivers" \
 		-D vulkan-drivers="$with_vulkan_drivers" \
--- a/graphics/mesa/mesa.sha1	Thu Nov 18 19:56:17 2021 +0100
+++ b/graphics/mesa/mesa.sha1	Fri Nov 19 21:45:27 2021 +0100
@@ -1,1 +1,1 @@
-5ee4dfa398948d9b6c89e844c426b16e4f4b8aaf  mesa-18.3.5.tar.xz
+fb1364574b93b7550541ba23b35002a3fcae3516  mesa-21.2.5.tar.xz
--- a/graphics/mesa/musl.patch	Thu Nov 18 19:56:17 2021 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
---- a/src/util/rand_xor.c
-+++ b/src/util/rand_xor.c
-@@ -24,6 +24,8 @@
- 
- #if defined(__linux__)
- #include <sys/file.h>
-+#include <sys/types.h>
-+#include <sys/stat.h>
- #include <unistd.h>
- #include <fcntl.h>
- #else
---- ./src/gallium/winsys/svga/drm/vmw_screen.h.orig
-+++ ./src/gallium/winsys/svga/drm/vmw_screen.h
-@@ -34,7 +34,7 @@
- #ifndef VMW_SCREEN_H_
- #define VMW_SCREEN_H_
- 
--
-+#include <sys/stat.h>
- #include "pipe/p_compiler.h"
- #include "pipe/p_state.h"