From 8daecb33b9061ae6a51daac7adaea4ffecc916c9 Mon Sep 17 00:00:00 2001 From: Yuka Date: Sat, 23 Oct 2021 13:32:39 +0200 Subject: [PATCH] mesa: update musl patches (#141970) Also remove a patch that was upstreamed --- pkgs/development/libraries/mesa/default.nix | 22 ++++++++++++------- .../libraries/mesa/missing-includes.patch | 22 ------------------- 2 files changed, 14 insertions(+), 30 deletions(-) delete mode 100644 pkgs/development/libraries/mesa/missing-includes.patch diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix index eb4c3ee89570..83deac7e247b 100644 --- a/pkgs/development/libraries/mesa/default.nix +++ b/pkgs/development/libraries/mesa/default.nix @@ -54,16 +54,22 @@ self = stdenv.mkDerivation { # revive ./dricore-gallium.patch when it gets ported (from Ubuntu), as it saved # ~35 MB in $drivers; watch https://launchpad.net/ubuntu/+source/mesa/+changelog patches = [ - ./missing-includes.patch # dev_t needs sys/stat.h, time_t needs time.h, etc.-- fixes build w/musl + # fixes pkgsMusl.mesa build + (fetchpatch { + url = "https://raw.githubusercontent.com/void-linux/void-packages/b9f58f303ae23754c95d5d1fe87a98b5a2d8f271/srcpkgs/mesa/patches/musl.patch"; + sha256 = "sha256-Jyl7ILLhn8hBJG7afnEjE8H56Wz/1bxkvlqfrXK5U7I="; + }) + (fetchpatch { + url = "https://raw.githubusercontent.com/void-linux/void-packages/b9f58f303ae23754c95d5d1fe87a98b5a2d8f271/srcpkgs/mesa/patches/musl-endian.patch"; + sha256 = "sha256-eRc91qCaFlVzrxFrNUPpAHd1gsqKsLCCN0IW8pBQcqk="; + }) + (fetchpatch { + url = "https://raw.githubusercontent.com/void-linux/void-packages/b9f58f303ae23754c95d5d1fe87a98b5a2d8f271/srcpkgs/mesa/patches/musl-stacksize.patch"; + sha256 = "sha256-bEp0AWddsw1Pc3rxdKN8fsrX4x2TQEzMUa5afhLXGsg="; + }) + ./opencl.patch ./disk_cache-include-dri-driver-path-in-cache-key.patch - # Fix `-Werror=int-conversion` pthread warnings on musl. - # TODO: Remove when https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6121 is merged and available - (fetchpatch { - name = "nine_debug-Make-tid-more-type-correct"; - url = "https://gitlab.freedesktop.org/mesa/mesa/commit/aebbf819df6d1e.patch"; - sha256 = "17248hyzg43d73c86p077m4lv1pkncaycr3l27hwv9k4ija9zl8q"; - }) ] ++ optionals (stdenv.isDarwin && stdenv.isAarch64) [ # Fix aarch64-darwin build, remove when upstreaam supports it out of the box. # See: https://gitlab.freedesktop.org/mesa/mesa/-/issues/1020 diff --git a/pkgs/development/libraries/mesa/missing-includes.patch b/pkgs/development/libraries/mesa/missing-includes.patch deleted file mode 100644 index c17d54908553..000000000000 --- a/pkgs/development/libraries/mesa/missing-includes.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- ./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 - #include "pipe/p_compiler.h" - #include "pipe/p_state.h" - ---- a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h -+++ b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h -@@ -28,6 +28,8 @@ - #ifndef RADV_AMDGPU_WINSYS_H - #define RADV_AMDGPU_WINSYS_H - -+#include -+ - #include - #include - #include "util/list.h"