commit:     3ea81b205878724228f404290b70f6e21195025a
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 25 14:06:48 2018 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Mon Jun 25 14:07:03 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3ea81b20

games-roguelike/scourge: Replaced freetype-config with pkg-config

Closes: https://bugs.gentoo.org/655374
Package-Manager: Portage-2.3.40, Repoman-2.3.9

 .../files/scourge-0.21.1-freetype_pkgconfig.patch  | 34 ++++++++++++++++++++++
 games-roguelike/scourge/scourge-0.21.1-r1.ebuild   | 16 ++++++----
 2 files changed, 44 insertions(+), 6 deletions(-)

diff --git 
a/games-roguelike/scourge/files/scourge-0.21.1-freetype_pkgconfig.patch 
b/games-roguelike/scourge/files/scourge-0.21.1-freetype_pkgconfig.patch
new file mode 100644
index 00000000000..d41ee1a4443
--- /dev/null
+++ b/games-roguelike/scourge/files/scourge-0.21.1-freetype_pkgconfig.patch
@@ -0,0 +1,34 @@
+Index: scourge/configure.in
+===================================================================
+--- scourge/configure.in       (revision 3411)
++++ scourge/configure.in       (working copy)
+@@ -56,6 +56,7 @@
+ # Set up binreloc (for a relocatable autopackage file)
+ AM_BINRELOC
+ 
++PKG_PROG_PKG_CONFIG
+ dnl --------------------------------------------------------------------------
+ dnl General options
+ dnl --------------------------------------------------------------------------
+@@ -413,19 +414,9 @@
+   FREETYPE_LIBS=`/sw/lib/freetype2/bin/freetype-config --libs`
+   have_FREETYPE=yes
+ else
+-AC_MSG_CHECKING([for freetype-config library])
+-
+-AC_PATH_PROG(FREETYPE, freetype-config, no)
+-
+-if test "$FREETYPE" = "no"; then
+-  AC_MSG_ERROR(Cannot find freetype2: Is freetype-config in path?)
+-  have_FREETYPE=no
+-else
+-  FREETYPE_CFLAGS=`freetype-config --cflags`
+-  FREETYPE_LIBS=`freetype-config --libs`
+-  have_FREETYPE=yes
++  PKG_CHECK_MODULES(FREETYPE, freetype2, have_FREETYPE=yes, 
++    AC_MSG_ERROR(Cannot find freetype2))
+ fi
+-fi
+ 
+ LIBS="$saved_LIBS"
+ TR_LIBS="$TR_LIBS $FREETYPE_LIBS"

diff --git a/games-roguelike/scourge/scourge-0.21.1-r1.ebuild 
b/games-roguelike/scourge/scourge-0.21.1-r1.ebuild
index 6f23afbb419..5eeec7c5231 100644
--- a/games-roguelike/scourge/scourge-0.21.1-r1.ebuild
+++ b/games-roguelike/scourge/scourge-0.21.1-r1.ebuild
@@ -1,8 +1,8 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
-inherit autotools eutils wxwidgets
+inherit autotools desktop wxwidgets
 
 DESCRIPTION="A graphical rogue-like adventure game"
 HOMEPAGE="https://sourceforge.net/projects/scourge/";
@@ -25,14 +25,16 @@ RDEPEND="
        virtual/opengl
        virtual/glu"
 DEPEND="${RDEPEND}
-       sys-devel/gettext"
+       sys-devel/gettext
+       virtual/pkgconfig"
 
-S=${WORKDIR}/${PN}
+S="${WORKDIR}/${PN}"
 
 PATCHES=(
        "${FILESDIR}"/${P}-gcc47.patch
        "${FILESDIR}"/${P}-gcc6.patch
        "${FILESDIR}"/${P}-automake-1.13.patch
+       "${FILESDIR}"/${P}-freetype_pkgconfig.patch
 )
 
 src_prepare() {
@@ -50,9 +52,11 @@ src_prepare() {
 }
 
 src_configure() {
-       econf \
-               --with-data-dir=/usr/share/${PN} \
+       local myeconfargs=(
+               --with-data-dir=/usr/share/${PN}
                --localedir=/usr/share/locale
+       )
+       econf "${myeconfargs[@]}"
 }
 
 src_install() {

Reply via email to