commit:     f2696d9b14822e6c76b792b1981ef9c7c06c6eb5
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Mon May  7 21:16:33 2018 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Mon May  7 21:16:48 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f2696d9b

media-libs/ming: Use pkg-config to find freetype

Bug: https://bugs.gentoo.org/654828
Package-Manager: Portage-2.3.36, Repoman-2.3.9

 .../ming/files/ming-0.4.8-freetype_pkgconfig.patch | 47 ++++++++++++++++++++++
 media-libs/ming/ming-0.4.8-r1.ebuild               |  8 +++-
 2 files changed, 53 insertions(+), 2 deletions(-)

diff --git a/media-libs/ming/files/ming-0.4.8-freetype_pkgconfig.patch 
b/media-libs/ming/files/ming-0.4.8-freetype_pkgconfig.patch
new file mode 100644
index 00000000000..5c2de7554d4
--- /dev/null
+++ b/media-libs/ming/files/ming-0.4.8-freetype_pkgconfig.patch
@@ -0,0 +1,47 @@
+From ef3719d39e8bb7e96c6ec57d60261f1516353460 Mon Sep 17 00:00:00 2001
+From: Lars Wendler <[email protected]>
+Date: Fri, 4 May 2018 17:40:04 +0200
+Subject: [PATCH] Use pkg-config to find freetype
+
+As of freetype-2.9.1 the freetype-config script has been deprecated and
+is no longer shipped by default.
+---
+ configure.in | 22 ++--------------------
+ 1 file changed, 2 insertions(+), 20 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index 95943a0b..f1685c26 100644
+--- a/configure.in
++++ b/configure.in
+@@ -257,26 +257,8 @@ freetype_support=yes)
+ 
+ if test "$freetype_support" = "yes"; then
+       dnl Check for the freetype library
+-      AC_ARG_WITH(freetype-config, [  --with-freetype-config=PROG   Use 
FreeType configuration program PROG], freetype_config=$withval, 
freetype_config=yes)
+-      if test "$freetype_config" = "yes"; then 
+-              AC_PATH_PROG(ft_config,freetype-config,no)
+-              if test "$ft_config" = "no"; then
+-                      echo "To compile ming please install freetype:"
+-                      echo " as .deb user: sudo apt-get install libfreetype6 
libfreetype6-dev"
+-                      echo ""
+-                      echo "or disable the freetype configuration option:"
+-                      echo " --disable-freetype"
+-                      AC_MSG_ERROR([Could not detect freetype-config!])
+-              fi
+-      else
+-              ft_config="$freetype_config"
+-      fi
+-
+-      FREETYPE_CFLAGS="`$ft_config --cflags`"
+-      FREETYPE_LIBS="`$ft_config --libs`"
+-
+-      AC_SUBST(FREETYPE_LIBS)
+-      AC_SUBST(FREETYPE_CFLAGS)
++      PKG_PROG_PKG_CONFIG
++      PKG_CHECK_MODULES(FREETYPE, freetype2,, AC_MSG_ERROR([Could not find 
freetype]))
+ fi
+ 
+ dnl Check for the ungif or gif (new or old) libraries
+-- 
+2.17.0
+

diff --git a/media-libs/ming/ming-0.4.8-r1.ebuild 
b/media-libs/ming/ming-0.4.8-r1.ebuild
index 8015aff99bf..eba066b8448 100644
--- a/media-libs/ming/ming-0.4.8-r1.ebuild
+++ b/media-libs/ming/ming-0.4.8-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -28,13 +28,17 @@ RDEPEND="perl? ( dev-lang/perl:= )
        !media-libs/libswf"
 DEPEND="${RDEPEND}
        sys-devel/flex
+       virtual/pkgconfig
        virtual/yacc"
 PDEPEND="php? ( dev-php/ming-php )"
 
 REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
 S=${WORKDIR}/${P//./_}
 
-PATCHES=( "${FILESDIR}"/${PN}-0.4.8-CVE-2017-8782.patch )
+PATCHES=(
+       "${FILESDIR}"/${PN}-0.4.8-CVE-2017-8782.patch
+       "${FILESDIR}"/${PN}-0.4.8-freetype_pkgconfig.patch
+)
 
 # Tests only work when the package is tested on a system
 # which does not presently have any version of ming installed.

Reply via email to