From e5401692560b95eb922b43e16a198a92775d5996 Mon Sep 17 00:00:00 2001 From: Lars Wendler Date: Mon, 25 Jun 2018 15:06:39 +0200 Subject: games-strategy/asc: Replaced freetype-config with pkg-config Closes: https://bugs.gentoo.org/657998 Package-Manager: Portage-2.3.40, Repoman-2.3.9 --- games-strategy/asc/asc-2.6.0.0-r2.ebuild | 23 +++++++++++++----- .../asc/files/asc-2.6.0.0-freetype_pkgconfig.patch | 28 ++++++++++++++++++++++ 2 files changed, 45 insertions(+), 6 deletions(-) create mode 100644 games-strategy/asc/files/asc-2.6.0.0-freetype_pkgconfig.patch (limited to 'games-strategy') diff --git a/games-strategy/asc/asc-2.6.0.0-r2.ebuild b/games-strategy/asc/asc-2.6.0.0-r2.ebuild index 9f44b9d7d539..6f17949ef838 100644 --- a/games-strategy/asc/asc-2.6.0.0-r2.ebuild +++ b/games-strategy/asc/asc-2.6.0.0-r2.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2017 Gentoo Foundation +# Copyright 1999-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 EAPI=6 WX_GTK_VER=3.0 -inherit eutils toolchain-funcs flag-o-matic wxwidgets +inherit autotools toolchain-funcs flag-o-matic wxwidgets DESCRIPTION="turn based strategy game designed in the tradition of the Battle Isle series" HOMEPAGE="http://www.asc-hq.org/" @@ -37,7 +37,10 @@ DEPEND="${RDEPEND} dev-lang/perl virtual/pkgconfig" -PATCHES=( "${FILESDIR}/"/${P}-gcc6-nothrow-in-dtors.patch ) +PATCHES=( + "${FILESDIR}/"/${P}-gcc6-nothrow-in-dtors.patch + "${FILESDIR}/"/${P}-freetype_pkgconfig.patch #657998 +) src_unpack() { local f @@ -53,6 +56,12 @@ src_unpack() { done } +src_prepare() { + default + # required for freetype_pkgconfig patch + eautoreconf +} + src_configure() { need-wxwidgets unicode # Added --disable-paraguitest for bugs 26402 and 4488 @@ -61,10 +70,12 @@ src_configure() { if [[ $(gcc-major-version) -eq 4 ]] ; then replace-flags -O3 -O2 fi - econf \ - --disable-paraguitest \ - --disable-paragui \ + local myeconfargs=( + --disable-paraguitest + --disable-paragui --datadir="/usr/share" + ) + econf "${myeconfargs[@]}" } src_install() { diff --git a/games-strategy/asc/files/asc-2.6.0.0-freetype_pkgconfig.patch b/games-strategy/asc/files/asc-2.6.0.0-freetype_pkgconfig.patch new file mode 100644 index 000000000000..a07cd2f86274 --- /dev/null +++ b/games-strategy/asc/files/asc-2.6.0.0-freetype_pkgconfig.patch @@ -0,0 +1,28 @@ +https://bugs.gentoo.org/657998 + +--- asc-2.6.0.0/configure.ac ++++ asc-2.6.0.0/configure.ac +@@ -401,22 +401,7 @@ + FREETYPE_CFLAGS="`$ac_cv_path_freetype_config --cflags`" + FREETYPE_LIBS="`$ac_cv_path_freetype_config --libs`" + else +- AC_CHECK_LIB(freetype,FT_Init_FreeType,have_freetype=yes) +- AC_CHECK_HEADER(ft2build.h,have_ft2build=yes) +- if test "$have_ft2build" != "yes"; then +- have_freetype="no" +- elif test "$have_freetype" = "yes"; then +- FREETYPE_LIBS="-lfreetype" +- ft2inc="no" +- AC_MSG_CHECKING(freetype2 include directory) +- if test -d /usr/local/include/freetype2; then +- ft2inc="/usr/local/include/freetype2" +- elif test -d /usr/include/freetype2; then +- ft2inc="/usr/include/freetype2" +- fi +- AC_MSG_RESULT($ft2inc) +- FREETYPE_CFLAGS="-I$ft2inc" +- fi ++ PKG_CHECK_MODULES(FREETYPE, freetype2, have_freetype=yes) + fi + + if test x$have_freetype = xno; then -- cgit v1.2.3-18-g5258