diff options
author | Willem Jan Palenstijn | 2017-10-28 19:20:06 +0200 |
---|---|---|
committer | Willem Jan Palenstijn | 2017-10-29 00:05:51 +0200 |
commit | a416c989801cfc803f74dfb6f0e770bb6f4d87fc (patch) | |
tree | 02bd1928a88968f3da6d9965a712cd6c91525603 | |
parent | 0bcaf623aa262d0524109b411106db114d327356 (diff) | |
download | scummvm-rg350-a416c989801cfc803f74dfb6f0e770bb6f4d87fc.tar.gz scummvm-rg350-a416c989801cfc803f74dfb6f0e770bb6f4d87fc.tar.bz2 scummvm-rg350-a416c989801cfc803f74dfb6f0e770bb6f4d87fc.zip |
CONFIGURE: Handle freetype-config SYSROOT duplication in prefix
Since version 2.3.12, freetype-config adds SYSROOT to all paths.
If we pass a --prefix that already includes SYSROOT, this will return
a duplicate SYSROOT. This patch detects that and adjusts prefix
accordingly.
-rwxr-xr-x | configure | 15 |
1 files changed, 13 insertions, 2 deletions
@@ -4615,8 +4615,19 @@ if test "$_freetype2" != "no"; then if test -z "$_freetypeconfig"; then _freetype2=no else - FREETYPE2_LIBS=`$_freetypeconfig --prefix="$_freetypepath" --libs` - FREETYPE2_CFLAGS=`$_freetypeconfig --prefix="$_freetypepath" --cflags` + # Since 2.3.12, freetype-config prepends $SYSROOT to everything. + # This means we can't pass it a --prefix that includes $SYSROOT. + freetypeprefix="$_freetypepath" + if test -n "$SYSROOT" -a "$SYSROOT" != "/"; then + teststring=VeryImplausibleSysrootX1Y2Z3 + if ( env SYSROOT=/$teststring "$_freetypeconfig" --cflags | grep $teststring 2> /dev/null > /dev/null ); then + echo "Adapting FreeType prefix to SYSROOT" >> "$TMPLOG" + freetypeprefix="${freetypeprefix##$SYSROOT}" + fi + fi + + FREETYPE2_LIBS=`$_freetypeconfig --prefix="$freetypeprefix" --libs` + FREETYPE2_CFLAGS=`$_freetypeconfig --prefix="$freetypeprefix" --cflags` if test "$_freetype2" = "auto"; then _freetype2=no |