summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/libsdl2
diff options
context:
space:
mode:
authorAlistair Francis <alistair.francis@wdc.com>2019-10-25 14:46:04 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-10-31 16:09:34 +0000
commitf3c32efa9baf4ea9e62f885db9995da8c3afd0c5 (patch)
tree83a4e36d351500015239638dcf06849d6c9c234b /meta/recipes-graphics/libsdl2
parentefea2749d28e641af6eceff90e10ccabb341ee64 (diff)
downloadpoky-f3c32efa9baf4ea9e62f885db9995da8c3afd0c5.tar.gz
libsdl2: Fix build failure when using mesa 19.2.1
(From OE-Core rev: e5dfed5771f3e988feb1b8744d191ffd742ad2fc) Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-graphics/libsdl2')
-rw-r--r--meta/recipes-graphics/libsdl2/libsdl2/0002-Fixed-bug-4797-SDL-fails-to-compile-with-Mesa-Master.patch41
-rw-r--r--meta/recipes-graphics/libsdl2/libsdl2_2.0.10.bb1
2 files changed, 42 insertions, 0 deletions
diff --git a/meta/recipes-graphics/libsdl2/libsdl2/0002-Fixed-bug-4797-SDL-fails-to-compile-with-Mesa-Master.patch b/meta/recipes-graphics/libsdl2/libsdl2/0002-Fixed-bug-4797-SDL-fails-to-compile-with-Mesa-Master.patch
new file mode 100644
index 0000000000..8f5b6a0cef
--- /dev/null
+++ b/meta/recipes-graphics/libsdl2/libsdl2/0002-Fixed-bug-4797-SDL-fails-to-compile-with-Mesa-Master.patch
@@ -0,0 +1,41 @@
1# HG changeset patch
2# User Sylvain Becker <sylvain.becker@gmail.com>
3# Date 1570898876 -7200
4# Sat Oct 12 18:47:56 2019 +0200
5# Node ID 369b01006eb2f6fd563f7c315d29ae3fe503c432
6# Parent 4cbaffd0083b8cd17070dbd9d4ab1ce0fa9fca2d
7Fixed bug 4797 - SDL fails to compile with Mesa Master (thanks Michael Olbrich!)
8
9fix building with Mesa 19.2
10
11With Mesa 19.2 building fails with:
12
13/include/GLES/gl.h:63:25: error: conflicting types for 'GLsizeiptr'
14
15The same type is defined in include/SDL_opengl.h for OpenGL and the two
16headers should not be included at the same time.
17This was just never noticed because the same header guard '__gl_h_' was
18used. This was changed in Mesa. The result is this error.
19
20Fix this the same way GLES2 already handles this: Don't include the GLES
21header when the OpenGL header was already included.
22(https://hg.libsdl.org/SDL/rev/a60b3c292f0f)
23
24Upstream-Status: Backport [https://hg.libsdl.org/SDL/rev/369b01006eb2]
25Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
26
27diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c
28--- a/src/video/SDL_video.c
29+++ b/src/video/SDL_video.c
30@@ -37,9 +37,9 @@
31 #include "SDL_opengl.h"
32 #endif /* SDL_VIDEO_OPENGL */
33
34-#if SDL_VIDEO_OPENGL_ES
35+#if SDL_VIDEO_OPENGL_ES && !SDL_VIDEO_OPENGL
36 #include "SDL_opengles.h"
37-#endif /* SDL_VIDEO_OPENGL_ES */
38+#endif /* SDL_VIDEO_OPENGL_ES && !SDL_VIDEO_OPENGL */
39
40 /* GL and GLES2 headers conflict on Linux 32 bits */
41 #if SDL_VIDEO_OPENGL_ES2 && !SDL_VIDEO_OPENGL
diff --git a/meta/recipes-graphics/libsdl2/libsdl2_2.0.10.bb b/meta/recipes-graphics/libsdl2/libsdl2_2.0.10.bb
index cdc8650e17..862abe1d54 100644
--- a/meta/recipes-graphics/libsdl2/libsdl2_2.0.10.bb
+++ b/meta/recipes-graphics/libsdl2/libsdl2_2.0.10.bb
@@ -15,6 +15,7 @@ PROVIDES = "virtual/libsdl2"
15SRC_URI = "http://www.libsdl.org/release/SDL2-${PV}.tar.gz \ 15SRC_URI = "http://www.libsdl.org/release/SDL2-${PV}.tar.gz \
16 file://more-gen-depends.patch \ 16 file://more-gen-depends.patch \
17 file://0001-Fixed-bug-4538-validate-image-size-when-loading-BMP-.patch \ 17 file://0001-Fixed-bug-4538-validate-image-size-when-loading-BMP-.patch \
18 file://0002-Fixed-bug-4797-SDL-fails-to-compile-with-Mesa-Master.patch \
18" 19"
19 20
20S = "${WORKDIR}/SDL2-${PV}" 21S = "${WORKDIR}/SDL2-${PV}"