From c43626131222b7b62d8cb6f5fe90c072d440df26 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Tue, 15 Oct 2019 18:09:14 +0200 Subject: 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. --- gnu/packages/patches/sdl2-mesa-compat.patch | 21 +++++++++++++++++++++ gnu/packages/sdl.scm | 1 + 2 files changed, 22 insertions(+) create mode 100644 gnu/packages/patches/sdl2-mesa-compat.patch (limited to 'gnu/packages') diff --git a/gnu/packages/patches/sdl2-mesa-compat.patch b/gnu/packages/patches/sdl2-mesa-compat.patch new file mode 100644 index 0000000000..8182e582e7 --- /dev/null +++ b/gnu/packages/patches/sdl2-mesa-compat.patch @@ -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 + diff --git a/gnu/packages/sdl.scm b/gnu/packages/sdl.scm index 6093405c43..235353f617 100644 --- a/gnu/packages/sdl.scm +++ b/gnu/packages/sdl.scm @@ -114,6 +114,7 @@ joystick, and graphics hardware.") (uri (string-append "https://libsdl.org/release/SDL2-" version ".tar.gz")) + (patches (search-patches "sdl2-mesa-compat.patch")) (sha256 (base32 "0mqxp6w5jhbq6y1j690g9r3gpzwjxh4czaglw8x05l7hl49nqrdl")))) -- cgit v1.2.3