From 7ee2c1dd919755e92b6c36aa3034418de933a1f8 Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Thu, 27 Mar 2014 10:32:16 -0400 Subject: [PATCH] Add private fontconfig It seems cairo-perf-trace has problems with fontconfig >= 2.9.0, so to work around this, build our own private fontconfig. --- setup.sh | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/setup.sh b/setup.sh index f4abd9c..8c6e343 100755 --- a/setup.sh +++ b/setup.sh @@ -3,6 +3,8 @@ export CFLAGS="-O2 -g" export CC=gcc export CAIRO_VERSION=1.12.16 +# NOTE: cairo-script stuff has problems with newer fontconfig: +export FONTCONFIG_VERSION=2.8.0 export MAKEOPTS=-j2 # setup build environment @@ -10,7 +12,7 @@ export MAKEOPTS=-j2 export PREFIX=`pwd`/tmp export LD_LIBRARY_PATH=$PREFIX/pixman/lib:$PREFIX/cairo/lib export LD_RUN_PATH=$PREFIX/pixman/lib:$PREFIX/cairo/lib -export PKG_CONFIG_PATH=$PREFIX/pixman/lib/pkgconfig:$PREFIX/cairo/lib/pkgconfig +export PKG_CONFIG_PATH=$PREFIX/pixman/lib/pkgconfig:$PREFIX/cairo/lib/pkgconfig:$PREFIX/fontconfig/lib/pkgconfig if [ ! -d "$PREFIX" ]; then mkdir $PREFIX @@ -18,6 +20,13 @@ fi # clone repositories +if [ ! -d "fontconfig" ]; then + git clone git://anongit.freedesktop.org/fontconfig + pushd fontconfig + git checkout $FONTCONFIG_VERSION + popd +fi + if [ ! -d "pixman" ]; then git clone git://anongit.freedesktop.org/pixman fi @@ -29,7 +38,21 @@ if [ ! -d "cairo" ]; then popd fi -# configure and build pixman and cairo +# configure and build fontconfig, pixman and cairo + +if [ ! -f "fontconfig/configure" ]; then + echo "Configuring fontconfig..." + pushd fontconfig + ./autogen.sh --prefix=$PREFIX/fontconfig || exit 1 + popd +fi + +if [ ! -d "tmp/fontconfig" ]; then + echo "Compiling fontconfig..." + pushd fontconfig + make $MAKEOPTS install || exit 1 + popd +fi if [ ! -f "pixman/configure" ]; then echo "Configuring pixman..."