From 350661ff6ebcde53e2fc02a678eef9405b952c53 Mon Sep 17 00:00:00 2001 From: Michael Grzeschik Date: Mon, 26 Nov 2018 13:45:21 +0100 Subject: sdl2: version bump to 2.0.9 Update to 2.0.9 and remove already mainlined patch. Signed-off-by: Michael Grzeschik Signed-off-by: Michael Olbrich --- .../0001-sdl-2.0.8-add-egl-cflags-to-test.patch | 55 --------- ...MSDRM-find-available-card-if-called-witho.patch | 129 --------------------- patches/SDL2-2.0.8/autogen.sh | 3 - patches/SDL2-2.0.8/series | 5 - .../0001-sdl-2.0.8-add-egl-cflags-to-test.patch | 55 +++++++++ patches/SDL2-2.0.9/autogen.sh | 3 + patches/SDL2-2.0.9/series | 4 + .../0001-sdl-2.0.8-tests-configure-opengl.patch | 44 ------- patches/SDL2_test-2.0.8/autogen.sh | 4 - patches/SDL2_test-2.0.8/series | 4 - .../0001-sdl-2.0.8-tests-configure-opengl.patch | 44 +++++++ patches/SDL2_test-2.0.9/autogen.sh | 4 + patches/SDL2_test-2.0.9/series | 4 + 13 files changed, 114 insertions(+), 244 deletions(-) delete mode 100644 patches/SDL2-2.0.8/0001-sdl-2.0.8-add-egl-cflags-to-test.patch delete mode 100644 patches/SDL2-2.0.8/0002-sdl-2.0.8-KMSDRM-find-available-card-if-called-witho.patch delete mode 100755 patches/SDL2-2.0.8/autogen.sh delete mode 100644 patches/SDL2-2.0.8/series create mode 100644 patches/SDL2-2.0.9/0001-sdl-2.0.8-add-egl-cflags-to-test.patch create mode 100755 patches/SDL2-2.0.9/autogen.sh create mode 100644 patches/SDL2-2.0.9/series delete mode 100644 patches/SDL2_test-2.0.8/0001-sdl-2.0.8-tests-configure-opengl.patch delete mode 100755 patches/SDL2_test-2.0.8/autogen.sh delete mode 100644 patches/SDL2_test-2.0.8/series create mode 100644 patches/SDL2_test-2.0.9/0001-sdl-2.0.8-tests-configure-opengl.patch create mode 100755 patches/SDL2_test-2.0.9/autogen.sh create mode 100644 patches/SDL2_test-2.0.9/series (limited to 'patches') diff --git a/patches/SDL2-2.0.8/0001-sdl-2.0.8-add-egl-cflags-to-test.patch b/patches/SDL2-2.0.8/0001-sdl-2.0.8-add-egl-cflags-to-test.patch deleted file mode 100644 index c86d48e5a..000000000 --- a/patches/SDL2-2.0.8/0001-sdl-2.0.8-add-egl-cflags-to-test.patch +++ /dev/null @@ -1,55 +0,0 @@ -From: Sergey Zhuravlevich -Date: Mon, 16 Jul 2018 12:03:42 +0200 -Subject: [PATCH] sdl-2.0.8: add egl-cflags to test - -- also call aclocal to expand PKG_CHECK_MODULES - -Signed-off-by: Sergey Zhuravlevich -Signed-off-by: Michael Grzeschik ---- - autogen.sh | 2 +- - configure.in | 11 +++++++++++ - 2 files changed, 12 insertions(+), 1 deletion(-) - -diff --git a/autogen.sh b/autogen.sh -index 9edfb8a7d913..2f1e2ef3d419 100755 ---- a/autogen.sh -+++ b/autogen.sh -@@ -8,7 +8,7 @@ test -z "$srcdir" && srcdir=. - cd "$srcdir" - - # Regenerate configuration files --cat acinclude/* >aclocal.m4 -+aclocal - found=false - for autoconf in autoconf autoconf259 autoconf-2.59 - do if which $autoconf >/dev/null 2>&1; then $autoconf && found=true; break; fi -diff --git a/configure.in b/configure.in -index 1c7e79338a88..06e37a1b7f98 100644 ---- a/configure.in -+++ b/configure.in -@@ -2335,6 +2335,14 @@ dnl Find OpenGL ES - CheckOpenGLESX11() - { - if test x$enable_video = xyes -a x$enable_video_opengles = xyes; then -+ PKG_CHECK_MODULES(EGL, [egl], [have_egl="yes"], [have_egl="no"]) -+ -+ save_CFLAGS="$CFLAGS" -+ if test x$have_egl = xyes; then -+ CFLAGS="$save_CFLAGS $EGL_CFLAGS" -+ EXTRA_CFLAGS="$EXTRA_CFLAGS $EGL_CFLAGS" -+ fi -+ - AC_MSG_CHECKING(for EGL support) - video_opengl_egl=no - AC_TRY_COMPILE([ -@@ -2347,6 +2355,9 @@ CheckOpenGLESX11() - video_opengl_egl=yes - ]) - AC_MSG_RESULT($video_opengl_egl) -+ -+ CFLAGS="$save_CFLAGS" -+ - if test x$video_opengl_egl = xyes; then - AC_DEFINE(SDL_VIDEO_OPENGL_EGL, 1, [ ]) - fi diff --git a/patches/SDL2-2.0.8/0002-sdl-2.0.8-KMSDRM-find-available-card-if-called-witho.patch b/patches/SDL2-2.0.8/0002-sdl-2.0.8-KMSDRM-find-available-card-if-called-witho.patch deleted file mode 100644 index e889f87ae..000000000 --- a/patches/SDL2-2.0.8/0002-sdl-2.0.8-KMSDRM-find-available-card-if-called-witho.patch +++ /dev/null @@ -1,129 +0,0 @@ -From 212c7c68ec228a1058f39497d18c65e9312d00df Mon Sep 17 00:00:00 2001 -From: Michael Grzeschik -Date: Thu, 12 Jul 2018 13:48:54 +0200 -Subject: [PATCH] sdl-2.0.8: KMSDRM: find available card if called without - index - -Signed-off-by: Michael Grzeschik ---- - src/video/kmsdrm/SDL_kmsdrmvideo.c | 84 ++++++++++++++++++++++++++++-- - 1 file changed, 80 insertions(+), 4 deletions(-) - -diff --git a/src/video/kmsdrm/SDL_kmsdrmvideo.c b/src/video/kmsdrm/SDL_kmsdrmvideo.c -index 7855eeddb..f63c91b0a 100644 ---- a/src/video/kmsdrm/SDL_kmsdrmvideo.c -+++ b/src/video/kmsdrm/SDL_kmsdrmvideo.c -@@ -41,15 +41,22 @@ - #include "SDL_kmsdrmopengles.h" - #include "SDL_kmsdrmmouse.h" - #include "SDL_kmsdrmdyn.h" -+#include -+#include -+#include - --#define KMSDRM_DRI_CARD_0 "/dev/dri/card0" -+#define KMSDRM_DRI_PATH "/dev/dri/" - - static int --KMSDRM_Available(void) -+check_modestting(int devindex) - { - int available = 0; -+ char device[512]; -+ int drm_fd; -+ -+ sprintf(device, "%scard%d", KMSDRM_DRI_PATH, devindex); - -- int drm_fd = open(KMSDRM_DRI_CARD_0, O_RDWR | O_CLOEXEC); -+ drm_fd = open(device, O_RDWR | O_CLOEXEC); - if (drm_fd >= 0) { - if (SDL_KMSDRM_LoadSymbols()) { - drmModeRes *resources = KMSDRM_drmModeGetResources(drm_fd); -@@ -65,6 +72,72 @@ KMSDRM_Available(void) - return available; - } - -+static int get_dricount(void) -+{ -+ int devcount = 0; -+ struct dirent *res; -+ struct stat sb; -+ DIR *folder; -+ -+ if (!(stat(KMSDRM_DRI_PATH, &sb) == 0 -+ && S_ISDIR(sb.st_mode))) { -+ printf("The path %s cannot be opened or is not available\n", -+ KMSDRM_DRI_PATH); -+ return 0; -+ } -+ -+ if (access(KMSDRM_DRI_PATH, F_OK) == -1) { -+ printf("The path %s cannot be opened\n", -+ KMSDRM_DRI_PATH); -+ return 0; -+ } -+ -+ folder = opendir(KMSDRM_DRI_PATH); -+ if (!folder) -+ return 0; -+ -+ while ((res = readdir(folder))) { -+ if (res->d_type == DT_CHR) -+ devcount++; -+ } -+ -+ closedir(folder); -+ -+ return devcount; -+} -+ -+static int -+get_driindex(void) -+{ -+ int i = 0; -+ int available = 0; -+ int devcount = get_dricount(); -+ -+ for (i = 0; i < devcount; i++) { -+ if (check_modestting(i)) { -+ available = 1; -+ break; -+ } -+ } -+ -+ if (available) -+ return i; -+ -+ return -ENOENT; -+} -+ -+static int -+KMSDRM_Available(void) -+{ -+ int ret = -ENOENT; -+ -+ ret = get_driindex(); -+ if (ret >= 0) -+ return 1; -+ -+ return ret; -+} -+ - static void - KMSDRM_Destroy(SDL_VideoDevice * device) - { -@@ -83,7 +156,10 @@ KMSDRM_Create(int devindex) - SDL_VideoDevice *device; - SDL_VideoData *vdata; - -- if (devindex < 0 || devindex > 99) { -+ if (!devindex || devindex > 99) -+ devindex = get_driindex(); -+ -+ if (devindex < 0) { - SDL_SetError("devindex (%d) must be between 0 and 99.\n", devindex); - return NULL; - } --- -2.18.0 - diff --git a/patches/SDL2-2.0.8/autogen.sh b/patches/SDL2-2.0.8/autogen.sh deleted file mode 100755 index a430a4eb7..000000000 --- a/patches/SDL2-2.0.8/autogen.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -./autogen.sh diff --git a/patches/SDL2-2.0.8/series b/patches/SDL2-2.0.8/series deleted file mode 100644 index e4e931f38..000000000 --- a/patches/SDL2-2.0.8/series +++ /dev/null @@ -1,5 +0,0 @@ -# generated by git-ptx-patches -#tag:base --start-number 1 -0001-sdl-2.0.8-add-egl-cflags-to-test.patch -0002-sdl-2.0.8-KMSDRM-find-available-card-if-called-witho.patch -# b803bb470cfcfd4d04f208304b9fd212 - git-ptx-patches magic diff --git a/patches/SDL2-2.0.9/0001-sdl-2.0.8-add-egl-cflags-to-test.patch b/patches/SDL2-2.0.9/0001-sdl-2.0.8-add-egl-cflags-to-test.patch new file mode 100644 index 000000000..573499644 --- /dev/null +++ b/patches/SDL2-2.0.9/0001-sdl-2.0.8-add-egl-cflags-to-test.patch @@ -0,0 +1,55 @@ +From: Sergey Zhuravlevich +Date: Mon, 16 Jul 2018 12:03:42 +0200 +Subject: [PATCH] sdl-2.0.8: add egl-cflags to test + +- also call aclocal to expand PKG_CHECK_MODULES + +Signed-off-by: Sergey Zhuravlevich +Signed-off-by: Michael Grzeschik +--- + autogen.sh | 2 +- + configure.in | 11 +++++++++++ + 2 files changed, 12 insertions(+), 1 deletion(-) + +diff --git a/autogen.sh b/autogen.sh +index 9edfb8a7d913..2f1e2ef3d419 100755 +--- a/autogen.sh ++++ b/autogen.sh +@@ -8,7 +8,7 @@ test -z "$srcdir" && srcdir=. + cd "$srcdir" + + # Regenerate configuration files +-cat acinclude/* >aclocal.m4 ++aclocal + found=false + for autoconf in autoconf autoconf259 autoconf-2.59 + do if which $autoconf >/dev/null 2>&1; then $autoconf && found=true; break; fi +diff --git a/configure.in b/configure.in +index ae866ff0c55c..23d4ee2d8fad 100644 +--- a/configure.in ++++ b/configure.in +@@ -2349,6 +2349,14 @@ dnl Find OpenGL ES + CheckOpenGLESX11() + { + if test x$enable_video = xyes -a x$enable_video_opengles = xyes; then ++ PKG_CHECK_MODULES(EGL, [egl], [have_egl="yes"], [have_egl="no"]) ++ ++ save_CFLAGS="$CFLAGS" ++ if test x$have_egl = xyes; then ++ CFLAGS="$save_CFLAGS $EGL_CFLAGS" ++ EXTRA_CFLAGS="$EXTRA_CFLAGS $EGL_CFLAGS" ++ fi ++ + AC_MSG_CHECKING(for EGL support) + video_opengl_egl=no + AC_TRY_COMPILE([ +@@ -2361,6 +2369,9 @@ CheckOpenGLESX11() + video_opengl_egl=yes + ]) + AC_MSG_RESULT($video_opengl_egl) ++ ++ CFLAGS="$save_CFLAGS" ++ + if test x$video_opengl_egl = xyes; then + AC_DEFINE(SDL_VIDEO_OPENGL_EGL, 1, [ ]) + fi diff --git a/patches/SDL2-2.0.9/autogen.sh b/patches/SDL2-2.0.9/autogen.sh new file mode 100755 index 000000000..a430a4eb7 --- /dev/null +++ b/patches/SDL2-2.0.9/autogen.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +./autogen.sh diff --git a/patches/SDL2-2.0.9/series b/patches/SDL2-2.0.9/series new file mode 100644 index 000000000..3693c2785 --- /dev/null +++ b/patches/SDL2-2.0.9/series @@ -0,0 +1,4 @@ +# generated by git-ptx-patches +#tag:base --start-number 1 +0001-sdl-2.0.8-add-egl-cflags-to-test.patch +# 57d72a951bd7f961008ad5274d82876a - git-ptx-patches magic diff --git a/patches/SDL2_test-2.0.8/0001-sdl-2.0.8-tests-configure-opengl.patch b/patches/SDL2_test-2.0.8/0001-sdl-2.0.8-tests-configure-opengl.patch deleted file mode 100644 index 8be0b1a89..000000000 --- a/patches/SDL2_test-2.0.8/0001-sdl-2.0.8-tests-configure-opengl.patch +++ /dev/null @@ -1,44 +0,0 @@ -From: Jaret Cantu -Date: Tue, 16 Jan 2018 12:16:16 -0500 -Subject: [PATCH] sdl-2.0.8: tests: configure opengl - - Allow OpenGL to be configured manually - - The autodetection uses the presence of a header file which - SDL2 always installs, regardless of whether or not OpenGL was - enabled. This causes the SDL2 tests to use OpenGL when SDL2 - itself was not configured for it. - - Configure certain tests not to build, depending on the - configuration. Tests which require OpenGL development files - will fail when no OpenGL is detected (which should be obvious, - but it apparently wasn't for whoever designed this). ---- - test/configure.in | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/test/configure.in b/test/configure.in -index fd3f3022bc2e..8ae15159b8f8 100644 ---- a/test/configure.in -+++ b/test/configure.in -@@ -115,6 +115,12 @@ if test x$have_x = xyes; then - fi - fi - -+dnl Check to see if OpenGL support is desired -+AC_ARG_ENABLE(opengl, -+AC_HELP_STRING([--enable-opengl], [include OpenGL support [[default=yes]]]), -+ , enable_opengl=yes) -+ -+if test x$enable_opengl = xyes; then - dnl Check for OpenGL - AC_MSG_CHECKING(for OpenGL support) - have_opengl=no -@@ -125,6 +131,7 @@ AC_TRY_COMPILE([ - have_opengl=yes - ]) - AC_MSG_RESULT($have_opengl) -+fi - - dnl Check for OpenGL ES - AC_MSG_CHECKING(for OpenGL ES support) diff --git a/patches/SDL2_test-2.0.8/autogen.sh b/patches/SDL2_test-2.0.8/autogen.sh deleted file mode 100755 index 1e5af6e71..000000000 --- a/patches/SDL2_test-2.0.8/autogen.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -./autogen.sh - diff --git a/patches/SDL2_test-2.0.8/series b/patches/SDL2_test-2.0.8/series deleted file mode 100644 index 7064d2850..000000000 --- a/patches/SDL2_test-2.0.8/series +++ /dev/null @@ -1,4 +0,0 @@ -# generated by git-ptx-patches -#tag:base --start-number 1 -0001-sdl-2.0.8-tests-configure-opengl.patch -# c71c8697191f98668c86bc2215feebce - git-ptx-patches magic diff --git a/patches/SDL2_test-2.0.9/0001-sdl-2.0.8-tests-configure-opengl.patch b/patches/SDL2_test-2.0.9/0001-sdl-2.0.8-tests-configure-opengl.patch new file mode 100644 index 000000000..8be0b1a89 --- /dev/null +++ b/patches/SDL2_test-2.0.9/0001-sdl-2.0.8-tests-configure-opengl.patch @@ -0,0 +1,44 @@ +From: Jaret Cantu +Date: Tue, 16 Jan 2018 12:16:16 -0500 +Subject: [PATCH] sdl-2.0.8: tests: configure opengl + + Allow OpenGL to be configured manually + + The autodetection uses the presence of a header file which + SDL2 always installs, regardless of whether or not OpenGL was + enabled. This causes the SDL2 tests to use OpenGL when SDL2 + itself was not configured for it. + + Configure certain tests not to build, depending on the + configuration. Tests which require OpenGL development files + will fail when no OpenGL is detected (which should be obvious, + but it apparently wasn't for whoever designed this). +--- + test/configure.in | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/test/configure.in b/test/configure.in +index fd3f3022bc2e..8ae15159b8f8 100644 +--- a/test/configure.in ++++ b/test/configure.in +@@ -115,6 +115,12 @@ if test x$have_x = xyes; then + fi + fi + ++dnl Check to see if OpenGL support is desired ++AC_ARG_ENABLE(opengl, ++AC_HELP_STRING([--enable-opengl], [include OpenGL support [[default=yes]]]), ++ , enable_opengl=yes) ++ ++if test x$enable_opengl = xyes; then + dnl Check for OpenGL + AC_MSG_CHECKING(for OpenGL support) + have_opengl=no +@@ -125,6 +131,7 @@ AC_TRY_COMPILE([ + have_opengl=yes + ]) + AC_MSG_RESULT($have_opengl) ++fi + + dnl Check for OpenGL ES + AC_MSG_CHECKING(for OpenGL ES support) diff --git a/patches/SDL2_test-2.0.9/autogen.sh b/patches/SDL2_test-2.0.9/autogen.sh new file mode 100755 index 000000000..1e5af6e71 --- /dev/null +++ b/patches/SDL2_test-2.0.9/autogen.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +./autogen.sh + diff --git a/patches/SDL2_test-2.0.9/series b/patches/SDL2_test-2.0.9/series new file mode 100644 index 000000000..7064d2850 --- /dev/null +++ b/patches/SDL2_test-2.0.9/series @@ -0,0 +1,4 @@ +# generated by git-ptx-patches +#tag:base --start-number 1 +0001-sdl-2.0.8-tests-configure-opengl.patch +# c71c8697191f98668c86bc2215feebce - git-ptx-patches magic -- cgit v1.2.3