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
|
|
|
|
2012-11-23 21:30:32 +01:00
|
|
|
if [ ! -f $CACHEROOT/freetype-$FT_VERSION.tar.gz ]; then
|
2013-02-28 18:48:51 +01:00
|
|
|
try curl -L http://downloads.sourceforge.net/project/freetype/freetype2/$FT_VERSION/freetype-$FT_VERSION.tar.gz > $CACHEROOT/freetype-$FT_VERSION.tar.gz
|
2012-03-11 22:26:33 +01:00
|
|
|
fi
|
|
|
|
if [ ! -d $TMPROOT/freetype-$FT_VERSION ]; then
|
|
|
|
try rm -rf $TMPROOT/freetype-$FT_VERSION
|
2012-11-23 21:30:32 +01:00
|
|
|
try tar xvf $CACHEROOT/freetype-$FT_VERSION.tar.gz
|
2012-03-08 20:45:55 +01:00
|
|
|
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-11-21 00:12:42 +01:00
|
|
|
try ./configure --prefix=$DESTROOT \
|
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
|
2012-11-21 00:12:42 +01:00
|
|
|
try make install
|
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
|