From 29ef5f3ce9ee19f1bbcaf6c9bc53dbb43b53df32 Mon Sep 17 00:00:00 2001 From: historic_bruno Date: Mon, 11 Nov 2013 01:19:55 +0000 Subject: [PATCH] Adds patch for SDL 1.2 build on OS X 10.9 (Mavericks), CGDirectPaletteRef was deprecated and has now been removed. See https://bugzilla.libsdl.org/show_bug.cgi?id=2085 This was SVN commit r14141. --- libraries/osx/build-osx-libs.sh | 4 +++- libraries/osx/patches/sdl-mavericks-quartz-fix.diff | 12 ++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 libraries/osx/patches/sdl-mavericks-quartz-fix.diff diff --git a/libraries/osx/build-osx-libs.sh b/libraries/osx/build-osx-libs.sh index 1589b93664..9384032314 100755 --- a/libraries/osx/build-osx-libs.sh +++ b/libraries/osx/build-osx-libs.sh @@ -269,8 +269,10 @@ then tar -xf $LIB_ARCHIVE pushd $LIB_DIRECTORY + + # patch SDL to fix Mavericks build (fixed upstream, see https://bugzilla.libsdl.org/show_bug.cgi?id=2085 ) # Don't use X11 - we don't need it and Mountain Lion removed it - (./configure CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" LDFLAGS="$LDFLAGS" --prefix="$INSTALL_DIR" --without-x --enable-shared=no && make $JOBS && make install) || die "SDL build failed" + (patch -p0 -i ../../patches/sdl-mavericks-quartz-fix.diff && ./configure CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" LDFLAGS="$LDFLAGS" --prefix="$INSTALL_DIR" --without-x --enable-shared=no && make $JOBS && make install) || die "SDL build failed" popd touch .already-built else diff --git a/libraries/osx/patches/sdl-mavericks-quartz-fix.diff b/libraries/osx/patches/sdl-mavericks-quartz-fix.diff new file mode 100644 index 0000000000..a46f2c542f --- /dev/null +++ b/libraries/osx/patches/sdl-mavericks-quartz-fix.diff @@ -0,0 +1,12 @@ +--- src/video/quartz/SDL_QuartzVideo.h 2012-01-19 01:30:06.000000000 -0500 ++++ src/video/quartz/SDL_QuartzVideo.h 2013-11-10 19:51:27.000000000 -0500 +@@ -91,7 +91,9 @@ + CGDirectDisplayID display; /* 0 == main display (only support single display) */ + const void *mode; /* current mode of the display */ + const void *save_mode; /* original mode of the display */ ++#if (MAC_OS_X_VERSION_MIN_REQUIRED < 1070) + CGDirectPaletteRef palette; /* palette of an 8-bit display */ ++#endif + NSOpenGLContext *gl_context; /* OpenGL rendering context */ + NSGraphicsContext *nsgfx_context; /* Cocoa graphics context */ + Uint32 width, height, bpp; /* frequently used data about the display */