From b7fe72d412bd58f510694944a02f4487d6b23f8e Mon Sep 17 00:00:00 2001 From: Thomas BERNARD Date: Thu, 10 Dec 2020 23:34:07 +0100 Subject: [PATCH] Patch to build SDL2 with OS X 10.9 SDK --- 3rdparty/Makefile | 1 + 3rdparty/SDL2-NSOSVersion.patch | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 3rdparty/SDL2-NSOSVersion.patch diff --git a/3rdparty/Makefile b/3rdparty/Makefile index 3f233c1b..10fcea6c 100644 --- a/3rdparty/Makefile +++ b/3rdparty/Makefile @@ -55,6 +55,7 @@ SDL2 = SDL2-$(SDL2VER) SDL2ARCH = $(SDL2).tar.gz SDL2URL = https://www.libsdl.org/release/$(SDL2ARCH) SDL2SHA256 = 349268f695c02efbc9b9148a70b85e58cefbbf704abd3e91be654db7f1e2c863 +SDL2PATCHES = SDL2-NSOSVersion.patch SDL2DEVEL = SDL2-devel-$(SDL2VER)-mingw.tar.gz SDL2DEVELURL = https://www.libsdl.org/release/$(SDL2DEVEL) SDL2DEVELPATCH = SDL2-devel.patch diff --git a/3rdparty/SDL2-NSOSVersion.patch b/3rdparty/SDL2-NSOSVersion.patch new file mode 100644 index 00000000..ca985302 --- /dev/null +++ b/3rdparty/SDL2-NSOSVersion.patch @@ -0,0 +1,16 @@ +--- SDL2-2.0.12.orig/src/video/cocoa/SDL_cocoawindow.m 2020-03-11 02:36:18.000000000 +0100 ++++ SDL2-2.0.12/src/video/cocoa/SDL_cocoawindow.m 2020-12-10 23:14:27.000000000 +0100 +@@ -1813,6 +1813,13 @@ + This is no longer needed as of Mac OS X 10.15, according to bug 4822. + */ + NSProcessInfo *processInfo = [NSProcessInfo processInfo]; ++#if MAC_OS_X_VERSION_MAX_ALLOWED < 101000 /* NSOperatingSystemVersion added in the 10.10 SDK */ ++ typedef struct { ++ NSInteger majorVersion; ++ NSInteger minorVersion; ++ NSInteger patchVersion; ++ } NSOperatingSystemVersion; ++#endif + NSOperatingSystemVersion version = { 10, 15, 0 }; + if (![processInfo respondsToSelector:@selector(isOperatingSystemAtLeastVersion:)] || + ![processInfo isOperatingSystemAtLeastVersion:version]) {