2011-11-30 20:01:00 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
2012-03-08 20:45:55 +01:00
|
|
|
. $(dirname $0)/environment.sh
|
2011-11-30 20:01:00 +01:00
|
|
|
|
2011-12-06 11:42:37 +01:00
|
|
|
if [ ! -f $CACHEROOT/SDL_ttf-$SDLTTF_VERSION.tar.gz ]; then
|
2012-03-08 20:45:55 +01:00
|
|
|
try curl -L http://www.libsdl.org/projects/SDL_ttf/release/SDL_ttf-$SDLTTF_VERSION.tar.gz > $CACHEROOT/SDL_ttf-$SDLTTF_VERSION.tar.gz
|
2012-03-11 22:26:33 +01:00
|
|
|
fi
|
|
|
|
if [ ! -d $TMPROOT/SDL_ttf-$SDLTTF_VERSION ]; then
|
|
|
|
try rm -rf $TMPROOT/SDL_ttf-$SDLTTF_VERSION
|
2012-03-08 20:45:55 +01:00
|
|
|
try tar xzf $CACHEROOT/SDL_ttf-$SDLTTF_VERSION.tar.gz
|
|
|
|
try mv SDL_ttf-$SDLTTF_VERSION $TMPROOT
|
2011-11-30 20:01:00 +01:00
|
|
|
fi
|
|
|
|
|
2012-03-08 20:45:55 +01:00
|
|
|
if [ ! -f $TMPROOT/SDL_ttf-$SDLTTF_VERSION/.libs/libSDL_ttf.a ]; then
|
|
|
|
pushd $TMPROOT/SDL_ttf-$SDLTTF_VERSION
|
2012-02-25 15:51:34 +01:00
|
|
|
rm libSDL_ttf.la
|
|
|
|
./configure --prefix=/usr/local/iphone \
|
|
|
|
--host=arm-apple-darwin \
|
|
|
|
--enable-static=yes \
|
|
|
|
--enable-shared=no \
|
|
|
|
--without-x \
|
|
|
|
CC="$ARM_CC" AR="$ARM_AR" \
|
|
|
|
LDFLAGS="$ARM_LDFLAGS" CFLAGS="$ARM_CFLAGS"
|
|
|
|
make clean
|
|
|
|
make libSDL_ttf.la
|
|
|
|
popd
|
2011-11-30 20:01:00 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
2011-12-01 17:41:27 +01:00
|
|
|
# copy to buildroot
|
2012-03-08 20:45:55 +01:00
|
|
|
cp $TMPROOT/SDL_ttf-$SDLTTF_VERSION/.libs/libSDL_ttf.a $BUILDROOT/lib/libSDL_ttf.a
|
|
|
|
cp -a $TMPROOT/SDL_ttf-$SDLTTF_VERSION/SDL_ttf.h $BUILDROOT/include
|