commit:     56e0c700f0c0aa406e84d7dd300557c0eb3c4a3d
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Thu May 10 20:16:05 2018 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Thu May 10 20:16:22 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=56e0c700

x11-misc/xfe: Use pkg-cofing to find freetype and xft.

Closes: https://bugs.gentoo.org/514800
Package-Manager: Portage-2.3.36, Repoman-2.3.9

 ...e-1.42-use_pkgconfig_for_freetype_and_xft.patch | 57 ++++++++++++++++++++++
 x11-misc/xfe/xfe-1.42.ebuild                       | 16 +++---
 2 files changed, 66 insertions(+), 7 deletions(-)

diff --git 
a/x11-misc/xfe/files/xfe-1.42-use_pkgconfig_for_freetype_and_xft.patch 
b/x11-misc/xfe/files/xfe-1.42-use_pkgconfig_for_freetype_and_xft.patch
new file mode 100644
index 00000000000..1394f59abc2
--- /dev/null
+++ b/x11-misc/xfe/files/xfe-1.42-use_pkgconfig_for_freetype_and_xft.patch
@@ -0,0 +1,57 @@
+--- xfe-1.42/configure.ac
++++ xfe-1.42/configure.ac
+@@ -29,6 +29,7 @@
+ AC_PROG_INSTALL
+ AC_PROG_LN_S
+ AC_PROG_MAKE_SET
++PKG_PROG_PKG_CONFIG
+ 
+ 
+ # Internationalization
+@@ -109,16 +110,13 @@
+       
+       echo "checking whether FOX was compiled with Xft support... yes"
+ 
+-      # Check for FreeType2 headers
+-      freetype_config=''
+-      AC_CHECK_PROGS(freetype_config,freetype-config,)
+-      if test -n "$freetype_config"; then
+-        freetype_cflags=`$freetype_config --cflags`
+-        freetype_libs=`$freetype_config --libs`
+-        LIBS="$LIBS $freetype_libs"
+-        CPPFLAGS="$freetype_cflags $CPPFLAGS"
+-      fi
+-      
AC_CHECK_HEADER(config/ftheader.h,,[AC_CHECK_HEADER(freetype/config/ftheader.h,,AC_MSG_ERROR("ftheader.h
 not found"))])
++      # Check for FreeType2
++      PKG_CHECK_MODULES(FREETYPE, freetype2, [
++              freetype_cflags="$FREETYPE_CFLAGS"
++              freetype_libs="$FREETYPE_LIBS"
++              LIBS="$LIBS $freetype_libs"
++              CPPFLAGS="$freetype_cflags $CPPFLAGS"
++      ], AC_MSG_ERROR("freetype not found"))
+ 
+       # Check for Xft headers
+       xft_config=''
+@@ -131,15 +129,13 @@
+         CXXFLAGS="${CXXFLAGS} -DHAVE_XFT_H"
+       else
+               # On some systems (e.g. Fedora) xft-config is deprecated and 
pkg-config should be used instead
+-              pkg_config=''
+-              AC_CHECK_PROGS(pkg_config,pkg-config,)
+-              if test -n "$pkg_config"; then
+-                xft_cflags=`$pkg_config --cflags xft`
+-                xft_libs=`$pkg_config --libs xft`
+-                LIBS="$LIBS $xft_libs"
+-                CPPFLAGS="$xft_cflags $CPPFLAGS"
+-                CXXFLAGS="${CXXFLAGS} -DHAVE_XFT_H"
+-              fi
++              PKG_CHECK_MODULES(XFT, xft, [
++                      xft_cflags="$XFT_CFLAGS"
++                      xft_libs="$XFT_LIBS"
++                      LIBS="$LIBS $xft_libs"
++                      CPPFLAGS="$xft_cflags $CPPFLAGS"
++                      CXXFLAGS="$CXXFLAGS -DHAVE_XFT_H"
++              ], AC_MSG_ERROR("Xft not found"))
+       fi
+       AC_CHECK_HEADER(X11/Xft/Xft.h,,AC_MSG_ERROR("Xft.h not found"))
+ 

diff --git a/x11-misc/xfe/xfe-1.42.ebuild b/x11-misc/xfe/xfe-1.42.ebuild
index df2bd089efc..dd6e5a79a2d 100644
--- a/x11-misc/xfe/xfe-1.42.ebuild
+++ b/x11-misc/xfe/xfe-1.42.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
@@ -36,6 +36,8 @@ DEPEND="
 
 DOCS=( AUTHORS BUGS ChangeLog README TODO )
 
+PATCHES=( "${FILESDIR}/${PN}-1.42-use_pkgconfig_for_freetype_and_xft.patch" )
+
 src_prepare() {
        default
 
@@ -62,15 +64,15 @@ src_prepare() {
                -e 's|AM_CONFIG_HEADER|AC_CONFIG_HEADERS|g' \
                configure.ac || die
 
-       eapply_user
-
        eautoreconf
 }
 
 src_configure() {
-       econf \
-               $(use_enable debug) \
-               $(use_enable nls) \
-               $(use_enable startup-notification sn) \
+       local myeconfargs=(
+               $(use_enable debug)
+               $(use_enable nls)
+               $(use_enable startup-notification sn)
                --enable-minimalflags
+       )
+       econf "${myeconfargs[@]}"
 }

Reply via email to