mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-12 22:26:40 -05:00
gnu: sdl2: Fix build on 32-bit architectures.
* gnu/packages/patches/sdl2-mesa-compat.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/sdl.scm (sdl2)[source](patches): New field.
This commit is contained in:
parent
2737c7fe8a
commit
c436261312
3 changed files with 23 additions and 0 deletions
|
@ -1314,6 +1314,7 @@ dist_patch_DATA = \
|
||||||
%D%/packages/patches/scotch-build-parallelism.patch \
|
%D%/packages/patches/scotch-build-parallelism.patch \
|
||||||
%D%/packages/patches/scotch-integer-declarations.patch \
|
%D%/packages/patches/scotch-integer-declarations.patch \
|
||||||
%D%/packages/patches/sdl-libx11-1.6.patch \
|
%D%/packages/patches/sdl-libx11-1.6.patch \
|
||||||
|
%D%/packages/patches/sdl2-mesa-compat.patch \
|
||||||
%D%/packages/patches/seq24-rename-mutex.patch \
|
%D%/packages/patches/seq24-rename-mutex.patch \
|
||||||
%D%/packages/patches/sharutils-CVE-2018-1000097.patch \
|
%D%/packages/patches/sharutils-CVE-2018-1000097.patch \
|
||||||
%D%/packages/patches/shishi-fix-libgcrypt-detection.patch \
|
%D%/packages/patches/shishi-fix-libgcrypt-detection.patch \
|
||||||
|
|
21
gnu/packages/patches/sdl2-mesa-compat.patch
Normal file
21
gnu/packages/patches/sdl2-mesa-compat.patch
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
Do not include GLES header when OpenGL headers are already included.
|
||||||
|
|
||||||
|
Taken from upstream:
|
||||||
|
https://hg.libsdl.org/SDL/rev/369b01006eb2
|
||||||
|
|
||||||
|
diff -r 4cbaffd0083b -r 369b01006eb2 src/video/SDL_video.c
|
||||||
|
--- a/src/video/SDL_video.c Fri Oct 11 06:18:24 2019 +0200
|
||||||
|
+++ b/src/video/SDL_video.c Sat Oct 12 18:47:56 2019 +0200
|
||||||
|
@@ -37,9 +37,9 @@
|
||||||
|
#include "SDL_opengl.h"
|
||||||
|
#endif /* SDL_VIDEO_OPENGL */
|
||||||
|
|
||||||
|
-#if SDL_VIDEO_OPENGL_ES
|
||||||
|
+#if SDL_VIDEO_OPENGL_ES && !SDL_VIDEO_OPENGL
|
||||||
|
#include "SDL_opengles.h"
|
||||||
|
-#endif /* SDL_VIDEO_OPENGL_ES */
|
||||||
|
+#endif /* SDL_VIDEO_OPENGL_ES && !SDL_VIDEO_OPENGL */
|
||||||
|
|
||||||
|
/* GL and GLES2 headers conflict on Linux 32 bits */
|
||||||
|
#if SDL_VIDEO_OPENGL_ES2 && !SDL_VIDEO_OPENGL
|
||||||
|
|
|
@ -114,6 +114,7 @@ (define-public sdl2
|
||||||
(uri
|
(uri
|
||||||
(string-append "https://libsdl.org/release/SDL2-"
|
(string-append "https://libsdl.org/release/SDL2-"
|
||||||
version ".tar.gz"))
|
version ".tar.gz"))
|
||||||
|
(patches (search-patches "sdl2-mesa-compat.patch"))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"0mqxp6w5jhbq6y1j690g9r3gpzwjxh4czaglw8x05l7hl49nqrdl"))))
|
"0mqxp6w5jhbq6y1j690g9r3gpzwjxh4czaglw8x05l7hl49nqrdl"))))
|
||||||
|
|
Loading…
Reference in a new issue