summary refs log tree commit diff
path: root/pkgs/development/libraries/SDL2/default.nix
diff options
context:
space:
mode:
authorTad Fisher <tadfisher@gmail.com>2019-10-09 20:41:59 +0200
committerVladimír Čunát <v@cunat.cz>2019-10-09 20:41:59 +0200
commitc0c69261dfdfe581f880d4eb3fd0f3aad7ce0715 (patch)
treecf3193730450a7ebe2bf794c7af9157ec212e71d /pkgs/development/libraries/SDL2/default.nix
parentf22e7f5de004195fb1398ab9605bfc93a7aa6412 (diff)
downloadnixpkgs-c0c69261dfdfe581f880d4eb3fd0f3aad7ce0715.tar
nixpkgs-c0c69261dfdfe581f880d4eb3fd0f3aad7ce0715.tar.gz
nixpkgs-c0c69261dfdfe581f880d4eb3fd0f3aad7ce0715.tar.bz2
nixpkgs-c0c69261dfdfe581f880d4eb3fd0f3aad7ce0715.tar.lz
nixpkgs-c0c69261dfdfe581f880d4eb3fd0f3aad7ce0715.tar.xz
nixpkgs-c0c69261dfdfe581f880d4eb3fd0f3aad7ce0715.tar.zst
nixpkgs-c0c69261dfdfe581f880d4eb3fd0f3aad7ce0715.zip
SDL2: patch build with mesa 19.2
Diffstat (limited to 'pkgs/development/libraries/SDL2/default.nix')
-rw-r--r--pkgs/development/libraries/SDL2/default.nix7
1 files changed, 7 insertions, 0 deletions
diff --git a/pkgs/development/libraries/SDL2/default.nix b/pkgs/development/libraries/SDL2/default.nix
index 37e38e03b8c..8fe6bbe6113 100644
--- a/pkgs/development/libraries/SDL2/default.nix
+++ b/pkgs/development/libraries/SDL2/default.nix
@@ -36,6 +36,13 @@ stdenv.mkDerivation rec {
 
   patches = [ ./find-headers.patch ];
 
+  # Fix with mesa 19.2: https://bugzilla.libsdl.org/show_bug.cgi?id=4797
+  postPatch = ''
+    substituteInPlace include/SDL_opengl_glext.h \
+      --replace "typedef ptrdiff_t GLsizeiptr;" "typedef signed long int khronos_ssize_t; typedef khronos_ssize_t GLsizeiptr;" \
+      --replace "typedef ptrdiff_t GLintptr;" "typedef signed long int khronos_intptr_t; typedef khronos_intptr_t GLintptr;"
+  '';
+
   nativeBuildInputs = [ pkgconfig ];
 
   propagatedBuildInputs = dlopenPropagatedBuildInputs;