1
0
forked from 0ad/0ad

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.
This commit is contained in:
historic_bruno 2013-11-11 01:19:55 +00:00
parent 45a7f577d3
commit 29ef5f3ce9
2 changed files with 15 additions and 1 deletions

View File

@ -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

View File

@ -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 */