From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 0A0731382C5 for ; Mon, 7 May 2018 07:03:20 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 219E7E0845; Mon, 7 May 2018 07:03:19 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D5368E0845 for ; Mon, 7 May 2018 07:03:18 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E2713335C74 for ; Mon, 7 May 2018 07:03:16 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E61D93E for ; Mon, 7 May 2018 07:03:14 +0000 (UTC) From: "Lars Wendler" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Lars Wendler" Message-ID: <1525676583.de097e37dfa73706c033420fc8bdd147d2975788.polynomial-c@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: games-engines/scummvm/files/, games-engines/scummvm/ X-VCS-Repository: repo/gentoo X-VCS-Files: games-engines/scummvm/files/scummvm-2.0.0-freetype_pkgconfig.patch games-engines/scummvm/scummvm-2.0.0.ebuild X-VCS-Directories: games-engines/scummvm/ games-engines/scummvm/files/ X-VCS-Committer: polynomial-c X-VCS-Committer-Name: Lars Wendler X-VCS-Revision: de097e37dfa73706c033420fc8bdd147d2975788 X-VCS-Branch: master Date: Mon, 7 May 2018 07:03:14 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 64d1b888-8662-405e-994b-dc5a8c891e25 X-Archives-Hash: 4eadcd4a1ffd3a5c640586d4cdd5b6fe commit: de097e37dfa73706c033420fc8bdd147d2975788 Author: Lars Wendler gentoo org> AuthorDate: Mon May 7 07:03:03 2018 +0000 Commit: Lars Wendler gentoo org> CommitDate: Mon May 7 07:03:03 2018 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=de097e37 games-engines/scummvm: Added improved freetype_pkgconfig patch which should be ready for upstream inclusion. Bug: https://bugs.gentoo.org/655032 Package-Manager: Portage-2.3.36, Repoman-2.3.9 .../files/scummvm-2.0.0-freetype_pkgconfig.patch | 117 +++++++++++++++------ games-engines/scummvm/scummvm-2.0.0.ebuild | 1 + 2 files changed, 84 insertions(+), 34 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 index 669cffc945c..ca5c5e89271 100644 --- a/games-engines/scummvm/files/scummvm-2.0.0-freetype_pkgconfig.patch +++ b/games-engines/scummvm/files/scummvm-2.0.0-freetype_pkgconfig.patch @@ -1,50 +1,99 @@ -From 86c7fd67e5ab2e721de8493d162d7605b1b08823 Mon Sep 17 00:00:00 2001 +From 48a3f5bcba1837517e3d9d029ebe5e8fbd3f0966 Mon Sep 17 00:00:00 2001 From: Lars Wendler -Date: Sun, 6 May 2018 10:22:48 +0200 -Subject: [PATCH] Use pkg-config to find freetype if freetype-config is not - available +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 | 17 +++++++++++------ - 1 file changed, 11 insertions(+), 6 deletions(-) + configure | 56 ++++++++++++++++++++++++++++++++++++------------------- + 1 file changed, 37 insertions(+), 19 deletions(-) diff --git a/configure b/configure -index 8e2a387acc..e3c15a9a2a 100755 +index 8e2a387acc..210951e343 100755 --- a/configure +++ b/configure -@@ -4674,7 +4674,13 @@ if test "$_freetype2" != "no"; then - find_freetypeconfig - - if test -z "$_freetypeconfig"; then +@@ -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 -+ if pkg-config --exists freetype2; then -+ FREETYPE2_LIBS=`pkg-config --libs freetype2` -+ FREETYPE2_CFLAGS=`pkg-config --cflags freetype2` -+ _freetype2=yes -+ else -+ _freetype2=no -+ fi ++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. -@@ -4714,13 +4720,12 @@ EOF +- # 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 - cc_check_clean ++ 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 -- -- if test "$_freetype2" = "yes"; then -- append_var LIBS "$FREETYPE2_LIBS" -- append_var INCLUDES "$FREETYPE2_CFLAGS" -- fi - fi - -+ if test "$_freetype2" = "yes"; then -+ append_var LIBS "$FREETYPE2_LIBS" -+ append_var INCLUDES "$FREETYPE2_CFLAGS" + 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 - echocheck "FreeType2" +@@ -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 diff --git a/games-engines/scummvm/scummvm-2.0.0.ebuild b/games-engines/scummvm/scummvm-2.0.0.ebuild index 0df104f23aa..b4df47b76af 100644 --- a/games-engines/scummvm/scummvm-2.0.0.ebuild +++ b/games-engines/scummvm/scummvm-2.0.0.ebuild @@ -30,6 +30,7 @@ RDEPEND=">=media-libs/libsdl2-2.0.0[sound,joystick,video] fluidsynth? ( media-sound/fluidsynth )" DEPEND="${RDEPEND} app-arch/xz-utils + truetype? ( virtual/pkgconfig ) x86? ( dev-lang/nasm )" S="${WORKDIR}/${P/_/}"