Merge pull request #1 from tito/ttf_and_sdlttf
add script to build freetype and sdlttf
This commit is contained in:
commit
1914cfa079
2 changed files with 54 additions and 0 deletions
26
build_freetype.sh
Executable file
26
build_freetype.sh
Executable file
|
@ -0,0 +1,26 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -x
|
||||||
|
|
||||||
|
FT_VERSION=2.4.8
|
||||||
|
SDKVER=5.0
|
||||||
|
DEVROOT=/Developer/Platforms/iPhoneOS.platform/Developer
|
||||||
|
SDKROOT=$DEVROOT/SDKs/iPhoneOS$SDKVER.sdk
|
||||||
|
|
||||||
|
if [ ! -d freetype-$FT_VERSION ]; then
|
||||||
|
curl -L http://download.savannah.gnu.org/releases/freetype/freetype-$FT_VERSION.tar.bz2 > freetype-$FT_VERSION.tar.bz2
|
||||||
|
tar xjf freetype-$FT_VERSION.tar.bz2
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f freetype-$FT_VERSION/libfreetype-arm7.a ]; then
|
||||||
|
exit 0;
|
||||||
|
fi
|
||||||
|
|
||||||
|
# lib not found, compile it
|
||||||
|
pushd .
|
||||||
|
cd freetype-$FT_VERSION
|
||||||
|
./configure --prefix=/usr/local/iphone --host=arm-apple-darwin --enable-static=yes --enable-shared=no CC=$DEVROOT/usr/bin/arm-apple-darwin10-llvm-gcc-4.2 AR=$DEVROOT/usr/bin/ar LDFLAGS="-isysroot $SDKROOT -miphoneos-version-min=$SDKVER" CFLAGS="-O2 -miphoneos-version-min=$SDKVER -isysroot $SDKROOT"
|
||||||
|
make clean
|
||||||
|
make
|
||||||
|
cp objs/.libs/libfreetype.a libfreetype-arm7.a
|
||||||
|
|
28
build_sdlttf.sh
Executable file
28
build_sdlttf.sh
Executable file
|
@ -0,0 +1,28 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -x
|
||||||
|
|
||||||
|
SDLTTF_VERSION=2.0.10
|
||||||
|
SDKVER=5.0
|
||||||
|
DEVROOT=/Developer/Platforms/iPhoneOS.platform/Developer
|
||||||
|
SDKROOT=$DEVROOT/SDKs/iPhoneOS$SDKVER.sdk
|
||||||
|
|
||||||
|
if [ ! -d SDL_ttf-$SDLTTF_VERSION ]; then
|
||||||
|
curl -L http://www.libsdl.org/projects/SDL_ttf/release/SDL_ttf-$SDLTTF_VERSION.tar.gz > SDL_ttf-$SDLTTF_VERSION.tar.gz
|
||||||
|
tar xzf SDL_ttf-$SDLTTF_VERSION.tar.gz
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f SDL_ttf-$SDLTTF_VERSION/libSDL_ttf-arm7.a ]; then
|
||||||
|
exit 0;
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
cd SDL_ttf-2.0.10
|
||||||
|
rm libSDL_ttf.la
|
||||||
|
./configure --prefix=/usr/local/iphone --host=arm-apple-darwin \
|
||||||
|
--enable-static=yes --enable-shared=no \
|
||||||
|
--without-x \
|
||||||
|
CC=$DEVROOT/usr/bin/arm-apple-darwin10-llvm-gcc-4.2 AR=$DEVROOT/usr/bin/ar LDFLAGS="-isysroot $SDKROOT -miphoneos-version-min=$SDKVER" CFLAGS="-O2 -miphoneos-version-min=$SDKVER -isysroot $SDKROOT"
|
||||||
|
make clean
|
||||||
|
make libSDL_ttf.la
|
||||||
|
cp .libs/libSDL_ttf.a libSDL_ttf-arm7.a
|
Loading…
Reference in a new issue