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/freetype-$FT_VERSION.tar.bz2 ]; then
|
2012-03-08 20:45:55 +01:00
|
|
|
try curl -L http://download.savannah.gnu.org/releases/freetype/freetype-$FT_VERSION.tar.bz2 > $CACHEROOT/freetype-$FT_VERSION.tar.bz2
|
2012-03-11 22:26:33 +01:00
|
|
|
fi
|
|
|
|
if [ ! -d $TMPROOT/freetype-$FT_VERSION ]; then
|
|
|
|
try rm -rf $TMPROOT/freetype-$FT_VERSION
|
2012-03-08 20:45:55 +01:00
|
|
|
try tar xjf $CACHEROOT/freetype-$FT_VERSION.tar.bz2
|
|
|
|
try mv freetype-$FT_VERSION $TMPROOT
|
2011-11-30 20:01:00 +01:00
|
|
|
fi
|
|
|
|
|
2012-03-08 20:45:55 +01:00
|
|
|
if [ -f $TMPROOT/freetype-$FT_VERSION/libfreetype-arm7.a ]; then
|
2011-11-30 20:01:00 +01:00
|
|
|
exit 0;
|
|
|
|
fi
|
|
|
|
|
|
|
|
# lib not found, compile it
|
2012-03-08 20:45:55 +01:00
|
|
|
pushd $TMPROOT/freetype-$FT_VERSION
|
2012-03-11 17:23:15 +01:00
|
|
|
try ./configure --prefix=/usr/local/iphone \
|
2011-12-06 11:42:37 +01:00
|
|
|
--host=arm-apple-darwin \
|
|
|
|
--enable-static=yes \
|
|
|
|
--enable-shared=no \
|
2011-12-06 12:08:47 +01:00
|
|
|
CC="$ARM_CC" AR="$ARM_AR" \
|
|
|
|
LDFLAGS="$ARM_LDFLAGS" CFLAGS="$ARM_CFLAGS"
|
2012-03-11 17:23:15 +01:00
|
|
|
try make clean
|
|
|
|
try make
|
2011-11-30 20:01:00 +01:00
|
|
|
|
2011-12-01 17:41:27 +01:00
|
|
|
# copy to buildroot
|
|
|
|
cp objs/.libs/libfreetype.a $BUILDROOT/lib/libfreetype.a
|
|
|
|
cp -a include $BUILDROOT/include/freetype
|
2011-12-06 11:42:37 +01:00
|
|
|
|
|
|
|
popd
|