From: Lars Wendler Date: Mon, 7 May 2018 21:01:12 +0000 (+0200) Subject: x11-libs/fltk: Use pkg-config to find freetype X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=42938eb5ccb07d39b4dcce0b6e04e30899e9925c;p=gentoo.git x11-libs/fltk: Use pkg-config to find freetype Bug: https://bugs.gentoo.org/654752 Package-Manager: Portage-2.3.36, Repoman-2.3.9 --- diff --git a/x11-libs/fltk/files/fltk-1.3.4-freetype_pkgconfig.patch b/x11-libs/fltk/files/fltk-1.3.4-freetype_pkgconfig.patch new file mode 100644 index 000000000000..70183412229b --- /dev/null +++ b/x11-libs/fltk/files/fltk-1.3.4-freetype_pkgconfig.patch @@ -0,0 +1,33 @@ +--- fltk-1.3.4/configure.ac ++++ fltk-1.3.4/configure.ac +@@ -1005,13 +1005,13 @@ + AC_ARG_ENABLE(xft, [ --enable-xft turn on Xft support [[default=yes]]]) + + xft_found=no +- if test x$enable_xft != xno; then +- AC_PATH_PROG(FTCONFIG, freetype-config) +- +- if test "x$FTCONFIG" != x; then +- CPPFLAGS="`$FTCONFIG --cflags` $CPPFLAGS" +- CFLAGS="`$FTCONFIG --cflags` $CFLAGS" +- CXXFLAGS="`$FTCONFIG --cflags` $CXXFLAGS" ++ AS_IF([test x$enable_xft != xno], [ ++ PKG_PROG_PKG_CONFIG ++ PKG_CHECK_MODULES(FREETYPE, freetype2, [ ++ CPPFLAGS="$FREETYPE_CFLAGS $CPPFLAGS" ++ CFLAGS="$FREETYPE_CFLAGS $CFLAGS" ++ CXXFLAGS="$FREETYPE_CFLAGS $CXXFLAGS" ++ ],AC_MSG_ERROR([No freetype found])) + + AC_CHECK_LIB(fontconfig, FcPatternCreate) + AC_CHECK_HEADER(X11/Xft/Xft.h, +@@ -1019,8 +1019,7 @@ + [AC_DEFINE(USE_XFT) + LIBS="-lXft $LIBS" + xft_found=yes] )) +- fi +- fi ++ ]) + + dnl Issue a warning message if Xft was not found, abort configure + dnl if Xft was requested explicitly (but not found) diff --git a/x11-libs/fltk/fltk-1.3.4.ebuild b/x11-libs/fltk/fltk-1.3.4.ebuild index b1786d70018e..4c20b2501ec8 100644 --- a/x11-libs/fltk/fltk-1.3.4.ebuild +++ b/x11-libs/fltk/fltk-1.3.4.ebuild @@ -33,6 +33,7 @@ RDEPEND=" " DEPEND=" ${RDEPEND} + virtual/pkgconfig x11-proto/xextproto doc? ( app-doc/doxygen ) xinerama? ( x11-proto/xineramaproto ) @@ -56,6 +57,7 @@ PATCHES=( "${FILESDIR}"/${PN}-1.3.3-makefile-dirs.patch "${FILESDIR}"/${PN}-1.3.3-visibility.patch "${FILESDIR}"/${PN}-1.3.4-conf-tests.patch + "${FILESDIR}"/${PN}-1.3.4-freetype_pkgconfig.patch ) src_prepare() {