1
0
forked from 0ad/0ad

Removes SDL1 from OS X libraries build script

This was SVN commit r15848.
This commit is contained in:
historic_bruno 2014-10-06 01:05:46 +00:00
parent a028027f75
commit 0b0184af1d
2 changed files with 1 additions and 49 deletions

View File

@ -24,8 +24,6 @@ ZLIB_VERSION="zlib-1.2.8"
CURL_VERSION="curl-7.32.0"
ICONV_VERSION="libiconv-1.14"
XML2_VERSION="libxml2-2.9.1"
# * SDL 1.2.15+ required for Lion support
SDL_VERSION="SDL-1.2.15"
SDL2_VERSION="SDL2-2.0.3"
BOOST_VERSION="boost_1_52_0"
# * wxWidgets 2.9+ is necessary for 64-bit OS X build w/ OpenGL support
@ -265,40 +263,6 @@ popd > /dev/null
# --------------------------------------------------------------
echo -e "Building SDL..."
LIB_VERSION="${SDL_VERSION}"
LIB_ARCHIVE="$LIB_VERSION.tar.gz"
LIB_DIRECTORY=$LIB_VERSION
LIB_URL="http://www.libsdl.org/release/"
mkdir -p sdl
pushd sdl > /dev/null
if [[ "$force_rebuild" = "true" ]] || [[ ! -e .already-built ]] || [[ .already-built -ot $LIB_DIRECTORY ]]
then
INSTALL_DIR="$(pwd)"
rm -f .already-built
download_lib $LIB_URL $LIB_ARCHIVE
rm -rf $LIB_DIRECTORY bin include lib share
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
(patch -p0 -i ../../patches/sdl-mavericks-quartz-fix.diff && ./configure CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" LDFLAGS="$LDFLAGS" --prefix="$INSTALL_DIR" --disable-video-x11 --without-x --enable-shared=no && make $JOBS && make install) || die "SDL build failed"
popd
touch .already-built
else
already_built
fi
popd > /dev/null
# --------------------------------------------------------------
echo -e "Building SDL2..."
LIB_VERSION="${SDL2_VERSION}"
@ -322,7 +286,7 @@ then
# We don't want SDL2 to pull in system iconv, force it to detect ours with flags.
# Don't use X11 - we don't need it and Mountain Lion removed it
(./configure CPPFLAGS="-I${ICONV_DIR}/include" CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" LDFLAGS="$LDFLAGS -L${ICONV_DIR}/lib" --prefix="$INSTALL_DIR" --disable-video-x11 --without-x --enable-shared=no && make $JOBS && make install) || die "SDL build failed"
(./configure CPPFLAGS="-I${ICONV_DIR}/include" CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" LDFLAGS="$LDFLAGS -L${ICONV_DIR}/lib" --prefix="$INSTALL_DIR" --disable-video-x11 --without-x --enable-shared=no && make $JOBS && make install) || die "SDL2 build failed"
popd
touch .already-built
else

View File

@ -1,12 +0,0 @@
--- 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 */