kivy-ios/tools/build-freetype.sh

35 lines
935 B
Bash
Raw Normal View History

#!/bin/bash
. $(dirname $0)/environment.sh
if [ ! -f $CACHEROOT/freetype-$FT_VERSION.tar.gz ]; then
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
try tar xvf $CACHEROOT/freetype-$FT_VERSION.tar.gz
try mv freetype-$FT_VERSION $TMPROOT
fi
if [ -f $TMPROOT/freetype-$FT_VERSION/libfreetype-arm7.a ]; then
exit 0;
fi
# lib not found, compile it
pushd $TMPROOT/freetype-$FT_VERSION
try ./configure --prefix=$DESTROOT \
2011-12-06 11:42:37 +01:00
--host=arm-apple-darwin \
--enable-static=yes \
--enable-shared=no \
CC="$ARM_CC" AR="$ARM_AR" \
LDFLAGS="$ARM_LDFLAGS" CFLAGS="$ARM_CFLAGS"
try make clean
try make
try make install
# 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