Skip to content

Commit

Permalink
Merge branch 'jb37662' into 'nemo'
Browse files Browse the repository at this point in the history
[sdl] Add upstream patch to not force X11 in EGL. Contributes to JB#37662

See merge request mer-core/libsdl!6
  • Loading branch information
mlehtima committed May 3, 2019
2 parents fe56efc + ce454be commit 4f424e2
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
51 changes: 51 additions & 0 deletions rpm/sdl2-dont-force-x11-egl.patch
@@ -0,0 +1,51 @@
From b580d9c4e3661083e9644d5b98ecab70832fd1ac Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" <icculus@icculus.org>
Date: Wed, 5 Dec 2018 16:53:15 -0500
Subject: [PATCH] egl: Don't force X11 support when testing for EGL.

Fixes building Wayland support on embedded systems without X11.

(TODO: maybe move the EGL test out of the X11 tests at some point, too.)
---
configure | 1 +
configure.in | 1 +
src/video/wayland/SDL_waylandvideo.h | 2 +-
3 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/configure b/configure
index 4f0ffbd83..e4f8e924e 100755
--- a/configure
+++ b/configure
@@ -21814,6 +21814,7 @@ $as_echo_n "checking for EGL support... " >&6; }

#define LINUX
#define EGL_API_FB
+ #define MESA_EGL_NO_X11_HEADERS
#include <EGL/egl.h>
#include <EGL/eglext.h>

diff --git a/configure.in b/configure.in
index fbe0583d4..95bef6269 100644
--- a/configure.in
+++ b/configure.in
@@ -2354,6 +2354,7 @@ CheckOpenGLESX11()
AC_TRY_COMPILE([
#define LINUX
#define EGL_API_FB
+ #define MESA_EGL_NO_X11_HEADERS
#include <EGL/egl.h>
#include <EGL/eglext.h>
],[
diff --git a/src/video/wayland/SDL_waylandvideo.h b/src/video/wayland/SDL_waylandvideo.h
index d173b28e5..0a7c31087 100644
--- a/src/video/wayland/SDL_waylandvideo.h
+++ b/src/video/wayland/SDL_waylandvideo.h
@@ -33,7 +33,7 @@
!!! FIXME: in Ubuntu 18.04 (and other distros).
*/

-
+#define MESA_EGL_NO_X11_HEADERS
#include <EGL/egl.h>
#include "wayland-util.h"

2 changes: 2 additions & 0 deletions rpm/sdl2.spec
Expand Up @@ -19,6 +19,7 @@ BuildRequires: pkgconfig(libpulse-simple)

Patch0: sdl2-disable-clipboard.patch
Patch1: sdl2-add-support-for-orientation-in-wayland.patch
Patch2: sdl2-dont-force-x11-egl.patch

%description
This is the Simple DirectMedia Layer, a generic API that provides low
Expand All @@ -43,6 +44,7 @@ to develop SDL applications.
%setup -q -n %{name}-%{version}/%{name}
%patch0 -p1
%patch1 -p1
%patch2 -p1

%build
%configure CFLAGS='-std=c99' --disable-video-x11 --enable-video-wayland --enable-pulseaudio
Expand Down

0 comments on commit 4f424e2

Please sign in to comment.