summaryrefslogtreecommitdiff
path: root/games-engines/scummvm/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /games-engines/scummvm/files
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'games-engines/scummvm/files')
-rw-r--r--games-engines/scummvm/files/scummvm-2.0.0-freetype_pkgconfig.patch99
1 files changed, 99 insertions, 0 deletions
diff --git a/games-engines/scummvm/files/scummvm-2.0.0-freetype_pkgconfig.patch b/games-engines/scummvm/files/scummvm-2.0.0-freetype_pkgconfig.patch
new file mode 100644
index 000000000000..ca5c5e892710
--- /dev/null
+++ b/games-engines/scummvm/files/scummvm-2.0.0-freetype_pkgconfig.patch
@@ -0,0 +1,99 @@
+From 48a3f5bcba1837517e3d9d029ebe5e8fbd3f0966 Mon Sep 17 00:00:00 2001
+From: Lars Wendler <polynomial-c@gentoo.org>
+Date: Sun, 6 May 2018 20:55:29 +0200
+Subject: [PATCH] Prefer pkg-config over freetype-config if possible
+
+As of freetype-2.9.1 the freetype-config script no longer gets installed
+by default.
+---
+ configure | 56 ++++++++++++++++++++++++++++++++++++-------------------
+ 1 file changed, 37 insertions(+), 19 deletions(-)
+
+diff --git a/configure b/configure
+index 8e2a387acc..210951e343 100755
+--- a/configure
++++ b/configure
+@@ -204,6 +204,7 @@ _sparklepath=
+ _sdlconfig=sdl2-config
+ _libcurlconfig=curl-config
+ _freetypeconfig=freetype-config
++_freetype_found="false"
+ _sdlpath="$PATH"
+ _freetypepath="$PATH"
+ _libcurlpath="$PATH"
+@@ -4668,28 +4669,45 @@ echo "$_libunity"
+ #
+ # Check for FreeType2 to be present
+ #
+-if test "$_freetype2" != "no"; then
+-
+- # Look for the freetype-config script
+- find_freetypeconfig
+-
+- if test -z "$_freetypeconfig"; then
+- _freetype2=no
++find_freetype() {
++ # Wrapper function which tries to find freetype
++ # either by callimg freetype-config or by using
++ # pkg-config.
++ # As of freetype-2.9.1 the freetype-config file
++ # no longer gets installed by default.
++
++ if pkg-config --exists freetype2; then
++ FREETYPE2_LIBS=`pkg-config --libs freetype2`
++ FREETYPE2_CFLAGS=`pkg-config --cflags freetype2`
++ FREETYPE2_STATIC_LIBS=`pkg-config --static --libs freetype2`
++ _freetype_found="true"
+ else
+- # 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}"
++ # Look for the freetype-config script
++ find_freetypeconfig
++ if test -n "$_freetypeconfig"; then
++ # 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`
++ FREETYPE2_STATIC_LIBS=`$_freetypeconfig --prefix="$freetypeprefix" --static --libs 2>/dev/null`
++ _freetype_found="true"
+ fi
++ fi
++}
+
+- FREETYPE2_LIBS=`$_freetypeconfig --prefix="$freetypeprefix" --libs`
+- FREETYPE2_CFLAGS=`$_freetypeconfig --prefix="$freetypeprefix" --cflags`
+-
++if test "$_freetype2" != "no"; then
++ find_freetype
++ if test $_freetype_found != true; then
++ _freetype2=no
++ else
+ if test "$_freetype2" = "auto"; then
+ _freetype2=no
+
+@@ -4709,7 +4727,7 @@ EOF
+ # required flags for static linking. We abuse this to detect
+ # FreeType2 builds which are static themselves.
+ if test "$_freetype2" != "yes"; then
+- FREETYPE2_LIBS=`$_freetypeconfig --prefix="$_freetypepath" --static --libs 2>/dev/null`
++ FREETYPE2_LIBS="$FREETYPE2_STATIC_LIBS"
+ cc_check_no_clean $FREETYPE2_CFLAGS $FREETYPE2_LIBS && _freetype2=yes
+ fi
+ cc_check_clean
+--
+2.17.0
+