From 37cc6a7839e37b686817f1bd2676fdbecab0c23f Mon Sep 17 00:00:00 2001
From: Oliver Behnke <oliver.behnke@aei.mpg.de>
Date: Thu, 5 Mar 2020 11:34:39 +0000
Subject: [PATCH] Fix up Freetype's configure (and remove cruft)

---
 build.sh | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/build.sh b/build.sh
index 46455ea..6afec9e 100755
--- a/build.sh
+++ b/build.sh
@@ -521,21 +521,15 @@ build_freetype_mingw()
 
     echo "Patching Freetype2..." | tee -a $LOGFILE
     cd $ROOT/3rdparty/freetype2/builds || failure
-    # patch: deactivating invocation of apinames (would run win32 binary on linux host)
+    # patch: deactivating invocation of apinames (would run windows binary on linux host)
     patch < $ROOT/patches/freetype2.exports.mk.patch >> $LOGFILE 2>&1 || failure
     echo "Building Freetype2 (this may take a while)..." | tee -a $LOGFILE
     cd $ROOT/3rdparty/freetype2 || failure
     chmod +x autogen.sh >> $LOGFILE 2>&1 || failure
     ./autogen.sh >> $LOGFILE 2>&1 || failure
     chmod +x configure >> $LOGFILE 2>&1 || failure
-    if [ -f "$PREFIX/$TARGET_HOST/bin/$TARGET_HOST-freetype-config" ]; then
-        FT_CONFIG="$PREFIX/$TARGET_HOST/bin/$TARGET_HOST-freetype-config"
-        export FT_CONFIG
-        echo "Cross-compile FT_CONFIG: $FT_CONFIG" >> $LOGFILE
-    fi
     cd $ROOT/build/freetype2 || failure
-    # note: freetype (or sdl?) probably doesn't need *no* configure when static -> ansi build, see readme!
-    $ROOT/3rdparty/freetype2/configure --host=$TARGET_HOST --build=$BUILD_HOST --prefix=$PREFIX --enable-shared=no --enable-static=yes --without-png --without-zlib --without-bzip2 >> $LOGFILE 2>&1 || failure
+    $ROOT/3rdparty/freetype2/configure --host=$TARGET_HOST --build=$BUILD_HOST --prefix=$PREFIX --enable-freetype-config --enable-shared=no --enable-static=yes --without-png --without-zlib --without-bzip2 >> $LOGFILE 2>&1 || failure
     make >> $LOGFILE 2>&1 || failure
     make install >> $LOGFILE 2>&1 || failure
     echo "Successfully built and installed Freetype2!" | tee -a $LOGFILE
-- 
GitLab