Re: [OE-core] [PATCH v5 1/2] libsdl2: Fix build failure when using mesa 19.2.1

2019-10-29 Thread Alistair Francis
On Fri, Oct 25, 2019 at 11:51 PM Alistair Francis
 wrote:
>
> Signed-off-by: Alistair Francis 

Ping!

Alistair

> ---
> v5:
>  - Backport upstream fix
>
>  ...DL-fails-to-compile-with-Mesa-Master.patch | 41 +++
>  .../libsdl2/libsdl2_2.0.10.bb |  1 +
>  2 files changed, 42 insertions(+)
>  create mode 100644 
> meta/recipes-graphics/libsdl2/libsdl2/0002-Fixed-bug-4797-SDL-fails-to-compile-with-Mesa-Master.patch
>
> 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 00..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 @@
> +# HG changeset patch
> +# User Sylvain Becker 
> +# Date 1570898876 -7200
> +#  Sat Oct 12 18:47:56 2019 +0200
> +# Node ID 369b01006eb2f6fd563f7c315d29ae3fe503c432
> +# Parent  4cbaffd0083b8cd17070dbd9d4ab1ce0fa9fca2d
> +Fixed bug 4797 - SDL fails to compile with Mesa Master (thanks Michael 
> Olbrich!)
> +
> +fix building with Mesa 19.2
> +
> +With Mesa 19.2 building fails with:
> +
> +/include/GLES/gl.h:63:25: error: conflicting types for 'GLsizeiptr'
> +
> +The same type is defined in include/SDL_opengl.h for OpenGL and the two
> +headers should not be included at the same time.
> +This was just never noticed because the same header guard '__gl_h_' was
> +used. This was changed in Mesa. The result is this error.
> +
> +Fix this the same way GLES2 already handles this: Don't include the GLES
> +header when the OpenGL header was already included.
> +(https://hg.libsdl.org/SDL/rev/a60b3c292f0f)
> +
> +Upstream-Status: Backport [https://hg.libsdl.org/SDL/rev/369b01006eb2]
> +Signed-off-by: Alistair Francis 
> +
> +diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c
> +--- a/src/video/SDL_video.c
>  b/src/video/SDL_video.c
> +@@ -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/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"
>  SRC_URI = "http://www.libsdl.org/release/SDL2-${PV}.tar.gz \
> file://more-gen-depends.patch \
> 
> file://0001-Fixed-bug-4538-validate-image-size-when-loading-BMP-.patch \
> +   
> file://0002-Fixed-bug-4797-SDL-fails-to-compile-with-Mesa-Master.patch \
>  "
>
>  S = "${WORKDIR}/SDL2-${PV}"
> --
> 2.23.0
>
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v5 1/2] libsdl2: Fix build failure when using mesa 19.2.1

2019-10-25 Thread Alistair Francis
Signed-off-by: Alistair Francis 
---
v5:
 - Backport upstream fix

 ...DL-fails-to-compile-with-Mesa-Master.patch | 41 +++
 .../libsdl2/libsdl2_2.0.10.bb |  1 +
 2 files changed, 42 insertions(+)
 create mode 100644 
meta/recipes-graphics/libsdl2/libsdl2/0002-Fixed-bug-4797-SDL-fails-to-compile-with-Mesa-Master.patch

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 00..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 @@
+# HG changeset patch
+# User Sylvain Becker 
+# Date 1570898876 -7200
+#  Sat Oct 12 18:47:56 2019 +0200
+# Node ID 369b01006eb2f6fd563f7c315d29ae3fe503c432
+# Parent  4cbaffd0083b8cd17070dbd9d4ab1ce0fa9fca2d
+Fixed bug 4797 - SDL fails to compile with Mesa Master (thanks Michael 
Olbrich!)
+
+fix building with Mesa 19.2
+
+With Mesa 19.2 building fails with:
+
+/include/GLES/gl.h:63:25: error: conflicting types for 'GLsizeiptr'
+
+The same type is defined in include/SDL_opengl.h for OpenGL and the two
+headers should not be included at the same time.
+This was just never noticed because the same header guard '__gl_h_' was
+used. This was changed in Mesa. The result is this error.
+
+Fix this the same way GLES2 already handles this: Don't include the GLES
+header when the OpenGL header was already included.
+(https://hg.libsdl.org/SDL/rev/a60b3c292f0f)
+
+Upstream-Status: Backport [https://hg.libsdl.org/SDL/rev/369b01006eb2]
+Signed-off-by: Alistair Francis 
+
+diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c
+--- a/src/video/SDL_video.c
 b/src/video/SDL_video.c
+@@ -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/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"
 SRC_URI = "http://www.libsdl.org/release/SDL2-${PV}.tar.gz \
file://more-gen-depends.patch \

file://0001-Fixed-bug-4538-validate-image-size-when-loading-BMP-.patch \
+   
file://0002-Fixed-bug-4797-SDL-fails-to-compile-with-Mesa-Master.patch \
 "
 
 S = "${WORKDIR}/SDL2-${PV}"
-- 
2.23.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core