summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wendler <polynomial-c@gentoo.org>2018-05-04 10:03:27 +0200
committerLars Wendler <polynomial-c@gentoo.org>2018-05-04 10:03:27 +0200
commit295794b0417fabcc378298894d1720939695a767 (patch)
tree3fdca9440712cd8934ca3b54589e1be67290abed /media-libs/sdl2-ttf/files
parentmedia-libs/sdl2-ttf: Removed old. (diff)
downloadgentoo-295794b0417fabcc378298894d1720939695a767.tar.gz
gentoo-295794b0417fabcc378298894d1720939695a767.tar.bz2
gentoo-295794b0417fabcc378298894d1720939695a767.zip
media-libs/sdl2-ttf: Use pkg-config to search for freetype.
Bug: https://bugs.gentoo.org/654758 Package-Manager: Portage-2.3.35, Repoman-2.3.9
Diffstat (limited to 'media-libs/sdl2-ttf/files')
-rw-r--r--media-libs/sdl2-ttf/files/sdl-ttf-2.0.11-freetype_pkgconfig.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/media-libs/sdl2-ttf/files/sdl-ttf-2.0.11-freetype_pkgconfig.patch b/media-libs/sdl2-ttf/files/sdl-ttf-2.0.11-freetype_pkgconfig.patch
new file mode 100644
index 000000000000..02b06356190e
--- /dev/null
+++ b/media-libs/sdl2-ttf/files/sdl-ttf-2.0.11-freetype_pkgconfig.patch
@@ -0,0 +1,46 @@
+https://bugs.gentoo.org/654758
+
+--- SDL_ttf-2.0.11/configure.in
++++ SDL_ttf-2.0.11/configure.in
+@@ -64,6 +64,7 @@
+ ;;
+ esac
+
++PKG_PROG_PKG_CONFIG
+
+ dnl Check for iconv (character conversion library; see iconv.m4)
+ dnl This isn't available on many systems
+@@ -94,6 +95,17 @@
+ dnl
+ dnl Get the cflags and libraries from the freetype-config script
+ dnl
++PKG_CHECK_MODULES(
++ FREETYPE2,
++ freetype2,
++ [
++ ft_found=yes
++ CFLAGS="$CFLAGS $FREETYPE2_CFLAGS"
++ LIBS="$LIBS $FREETYPE2_LIBS"
++ ],
++ ft_found=no
++)
++
+ AC_ARG_WITH(freetype-prefix,[ --with-freetype-prefix=PFX Prefix where FREETYPE is
+ installed (optional)],
+ freetype_prefix="$withval", freetype_prefix="")
+@@ -101,6 +113,7 @@
+ where FREETYPE is installed (optional)],
+ freetype_exec_prefix="$withval", freetype_exec_prefix="")
+
++if test "x$ft_found" != "xyes" ; then
+ if test x$freetype_exec_prefix != x ; then
+ freetype_args="$freetype_args --exec-prefix=$freetype_exec_prefix"
+ if test x${FREETYPE_CONFIG+set} != xset ; then
+@@ -123,6 +136,7 @@
+ CFLAGS="$CFLAGS `$FREETYPE_CONFIG $freetypeconf_args --cflags`"
+ LIBS="$LIBS `$FREETYPE_CONFIG $freetypeconf_args --libs`"
+ fi
++fi
+
+ dnl Check for SDL
+ SDL_VERSION=1.2.4