summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-graphics/libsdl2/libsdl2/0001-Fixed-bug-4538-validate-image-size-when-loading-BMP-.patch34
-rw-r--r--meta/recipes-graphics/libsdl2/libsdl2/0001-configure-check-for-build-dir-when-building-version-.patch53
-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.12.bb (renamed from meta/recipes-graphics/libsdl2/libsdl2_2.0.10.bb)15
4 files changed, 9 insertions, 134 deletions
diff --git a/meta/recipes-graphics/libsdl2/libsdl2/0001-Fixed-bug-4538-validate-image-size-when-loading-BMP-.patch b/meta/recipes-graphics/libsdl2/libsdl2/0001-Fixed-bug-4538-validate-image-size-when-loading-BMP-.patch
deleted file mode 100644
index 674decccbb..0000000000
--- a/meta/recipes-graphics/libsdl2/libsdl2/0001-Fixed-bug-4538-validate-image-size-when-loading-BMP-.patch
+++ /dev/null
@@ -1,34 +0,0 @@
1From 85138c1ec673e05263ae666baf61f79384daf7e0 Mon Sep 17 00:00:00 2001
2From: Sam Lantinga <slouken@libsdl.org>
3Date: Tue, 30 Jul 2019 11:00:00 -0700
4Subject: [PATCH] Fixed bug 4538 - validate image size when loading BMP files
5
6Upstream-Status: Backport
7[https://hg.libsdl.org/SDL/rev/e7ba650a643a]
8
9CVE: CVE-2019-13616
10
11Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
12---
13 src/video/SDL_bmp.c | 5 +++++
14 1 file changed, 5 insertions(+)
15
16diff --git a/src/video/SDL_bmp.c b/src/video/SDL_bmp.c
17index 0b68918..a06b0c9 100644
18--- a/src/video/SDL_bmp.c
19+++ b/src/video/SDL_bmp.c
20@@ -226,6 +226,11 @@ SDL_LoadBMP_RW(SDL_RWops * src, int freesrc)
21 SDL_RWseek(src, (biSize - headerSize), RW_SEEK_CUR);
22 }
23 }
24+ if (biWidth <= 0 || biHeight == 0) {
25+ SDL_SetError("BMP file with bad dimensions (%dx%d)", biWidth, biHeight);
26+ was_error = SDL_TRUE;
27+ goto done;
28+ }
29 if (biHeight < 0) {
30 topDown = SDL_TRUE;
31 biHeight = -biHeight;
32--
332.7.4
34
diff --git a/meta/recipes-graphics/libsdl2/libsdl2/0001-configure-check-for-build-dir-when-building-version-.patch b/meta/recipes-graphics/libsdl2/libsdl2/0001-configure-check-for-build-dir-when-building-version-.patch
deleted file mode 100644
index b383bd6548..0000000000
--- a/meta/recipes-graphics/libsdl2/libsdl2/0001-configure-check-for-build-dir-when-building-version-.patch
+++ /dev/null
@@ -1,53 +0,0 @@
1# HG changeset patch
2# User Anuj Mittal <am.devel@gmail.com>
3# Date 1573631462 -10800
4# Node ID 1fb1880d5edfc7c5a370846e13f90b260263627c
5# Parent 007002587d5d34d781c2b628c05e992e0ac5f52d
6configure: check for build dir when building version res (fix bug #4858)
7Fixes a race where we try to build version res file in build directory
8before it has even been created. Prevents errors like:
9
10/bin/bash ../SDL2-2.0.10/build-scripts/updaterev.sh
11/bin/bash ../SDL2-2.0.10/build-scripts/mkinstalldirs build
12mkdir -p -- build
13x86_64-pokysdk-mingw32-windres --include-dir=/home/pokybuild/yocto-worker/meta-mingw/build/build/tmp/work/x86_64-nativesdk-mingw32-pokysdk-mingw32/nativesdk-libsdl2/2.0.10-r0/recipe-sysroot/opt/poky/3.0/sysroots/x86_64-pokysdk-mingw32/usr/include ../SDL2-2.0.10/src/main/windows/version.rc build/version.o
14x86_64-pokysdk-mingw32-windres: build/version.o: No such file or directory
15Makefile:692: recipe for target 'build/version.o' failed
16make: *** [build/version.o] Error 1
17make: *** Waiting for unfinished jobs....
18touch build/.created
19WARNING: exit code 1 from a shell command.
20
21Extension of fix:
22https://hg.libsdl.org/SDL/rev/99d8b18acf8a
23
24Upstream-Status: Backport
25Signed-off-by: Anuj Mittal <am.devel@gmail.com>
26---
27 configure.ac | 2 +-
28 1 file changed, 1 insertion(+), 1 deletion(-)
29
30diff -r 007002587d5d -r 1fb1880d5edf configure
31--- a/configure Tue Nov 12 17:24:37 2019 -0500
32+++ b/configure Wed Nov 13 10:51:02 2019 +0300
33@@ -25493,7 +25493,7 @@
34 VERSION_DEPENDS=`echo $VERSION_SOURCES`
35 VERSION_OBJECTS=`echo "$VERSION_OBJECTS" | sed 's,[^ ]*/\([^ ]*\)\.rc,$(objects)/\1.o,g'`
36 VERSION_DEPENDS=`echo "$VERSION_DEPENDS" | sed "s,\\([^ ]*\\)/\\([^ ]*\\)\\.rc,\\\\
37-\\$(objects)/\\2.o: \\1/\\2.rc\\\\
38+\\$(objects)/\\2.o: \\1/\\2.rc \\$(objects)/.created\\\\
39 \\$(WINDRES) \\$< \\$@,g"`
40
41 SDLMAIN_OBJECTS=`echo $SDLMAIN_SOURCES`
42diff -r 007002587d5d -r 1fb1880d5edf configure.ac
43--- a/configure.ac Tue Nov 12 17:24:37 2019 -0500
44+++ b/configure.ac Wed Nov 13 10:51:02 2019 +0300
45@@ -4177,7 +4177,7 @@
46 VERSION_DEPENDS=`echo $VERSION_SOURCES`
47 VERSION_OBJECTS=`echo "$VERSION_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.rc,$(objects)/\1.o,g'`
48 VERSION_DEPENDS=`echo "$VERSION_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.rc,\\\\
49-\\$(objects)/\\2.o: \\1/\\2.rc\\\\
50+\\$(objects)/\\2.o: \\1/\\2.rc \\$(objects)/.created\\\\
51 \\$(WINDRES) \\$< \\$@,g"`
52
53 SDLMAIN_OBJECTS=`echo $SDLMAIN_SOURCES`
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
deleted file mode 100644
index 8f5b6a0cef..0000000000
--- a/meta/recipes-graphics/libsdl2/libsdl2/0002-Fixed-bug-4797-SDL-fails-to-compile-with-Mesa-Master.patch
+++ /dev/null
@@ -1,41 +0,0 @@
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.12.bb
index 413f53476a..c1c941e452 100644
--- a/meta/recipes-graphics/libsdl2/libsdl2_2.0.10.bb
+++ b/meta/recipes-graphics/libsdl2/libsdl2_2.0.12.bb
@@ -8,21 +8,22 @@ BUGTRACKER = "http://bugzilla.libsdl.org/"
8SECTION = "libs" 8SECTION = "libs"
9 9
10LICENSE = "Zlib" 10LICENSE = "Zlib"
11LIC_FILES_CHKSUM = "file://COPYING.txt;md5=504a9454ceb89fd75a2583473b11409e" 11LIC_FILES_CHKSUM = "file://COPYING.txt;md5=2d4af6adb4d89aad0cdedbcc18c9a32f"
12
13# arm-neon adds MIT license
14LICENSE_append = " ${@bb.utils.contains('PACKAGECONFIG', 'arm-neon', '& MIT', '', d)}"
15LIC_FILES_CHKSUM_append = " ${@bb.utils.contains('PACKAGECONFIG', 'arm-neon', 'file://src/video/arm/pixman-arm-neon-asm.h;md5=9a9cc1e51abbf1da58f4d9528ec9d49b;beginline=1;endline=24', '', d)}"
12 16
13PROVIDES = "virtual/libsdl2" 17PROVIDES = "virtual/libsdl2"
14 18
15SRC_URI = "http://www.libsdl.org/release/SDL2-${PV}.tar.gz \ 19SRC_URI = "http://www.libsdl.org/release/SDL2-${PV}.tar.gz \
16 file://more-gen-depends.patch \ 20 file://more-gen-depends.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 \
19 file://0001-configure-check-for-build-dir-when-building-version-.patch \
20" 21"
21 22
22S = "${WORKDIR}/SDL2-${PV}" 23S = "${WORKDIR}/SDL2-${PV}"
23 24
24SRC_URI[md5sum] = "5a2114f2a6f348bdab5bf52b994811db" 25SRC_URI[md5sum] = "783b6f2df8ff02b19bb5ce492b99c8ff"
25SRC_URI[sha256sum] = "b4656c13a1f0d0023ae2f4a9cf08ec92fffb464e0f24238337784159b8b91d57" 26SRC_URI[sha256sum] = "349268f695c02efbc9b9148a70b85e58cefbbf704abd3e91be654db7f1e2c863"
26 27
27inherit autotools lib_package binconfig-disabled pkgconfig 28inherit autotools lib_package binconfig-disabled pkgconfig
28 29
@@ -50,8 +51,10 @@ PACKAGECONFIG ??= " \
50 ${PACKAGECONFIG_GL} \ 51 ${PACKAGECONFIG_GL} \
51 ${@bb.utils.filter('DISTRO_FEATURES', 'alsa directfb pulseaudio x11', d)} \ 52 ${@bb.utils.filter('DISTRO_FEATURES', 'alsa directfb pulseaudio x11', d)} \
52 ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland gles2', '', d)} \ 53 ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland gles2', '', d)} \
54 ${@bb.utils.contains("TUNE_FEATURES", "neon","arm-neon","",d)} \
53" 55"
54PACKAGECONFIG[alsa] = "--enable-alsa --disable-alsatest,--disable-alsa,alsa-lib," 56PACKAGECONFIG[alsa] = "--enable-alsa --disable-alsatest,--disable-alsa,alsa-lib,"
57PACKAGECONFIG[arm-neon] = "--enable-arm-neon,--disable-arm-neon"
55PACKAGECONFIG[directfb] = "--enable-video-directfb,--disable-video-directfb,directfb" 58PACKAGECONFIG[directfb] = "--enable-video-directfb,--disable-video-directfb,directfb"
56PACKAGECONFIG[gles2] = "--enable-video-opengles,--disable-video-opengles,virtual/libgles2" 59PACKAGECONFIG[gles2] = "--enable-video-opengles,--disable-video-opengles,virtual/libgles2"
57PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack" 60PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack"