summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wendler <polynomial-c@gentoo.org>2018-05-04 09:55:43 +0200
committerLars Wendler <polynomial-c@gentoo.org>2018-05-04 09:55:43 +0200
commit180acb7085490a0c57e180eb72e6b2520022df66 (patch)
tree708e199f1c1b3ceab22f214a0a2cff3114136571 /media-libs/sdl-ttf
parentdev-libs/openssl: remove unused patch (diff)
downloadgentoo-180acb7085490a0c57e180eb72e6b2520022df66.tar.gz
gentoo-180acb7085490a0c57e180eb72e6b2520022df66.tar.bz2
gentoo-180acb7085490a0c57e180eb72e6b2520022df66.zip
media-libs/sdl-ttf: Use pkg-config to search for freetype.
Closes: https://bugs.gentoo.org/654758 Package-Manager: Portage-2.3.35, Repoman-2.3.9
Diffstat (limited to 'media-libs/sdl-ttf')
-rw-r--r--media-libs/sdl-ttf/files/sdl-ttf-2.0.11-freetype_pkgconfig.patch46
-rw-r--r--media-libs/sdl-ttf/files/sdl-ttf-2.0.11-underlink.patch4
-rw-r--r--media-libs/sdl-ttf/sdl-ttf-2.0.11-r1.ebuild30
3 files changed, 66 insertions, 14 deletions
diff --git a/media-libs/sdl-ttf/files/sdl-ttf-2.0.11-freetype_pkgconfig.patch b/media-libs/sdl-ttf/files/sdl-ttf-2.0.11-freetype_pkgconfig.patch
new file mode 100644
index 00000000000..02b06356190
--- /dev/null
+++ b/media-libs/sdl-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
diff --git a/media-libs/sdl-ttf/files/sdl-ttf-2.0.11-underlink.patch b/media-libs/sdl-ttf/files/sdl-ttf-2.0.11-underlink.patch
index 136589ec7f1..7bd3a3993bb 100644
--- a/media-libs/sdl-ttf/files/sdl-ttf-2.0.11-underlink.patch
+++ b/media-libs/sdl-ttf/files/sdl-ttf-2.0.11-underlink.patch
@@ -1,5 +1,5 @@
---- Makefile.am.old 2011-05-17 17:17:18.972003301 +0200
-+++ Makefile.am 2011-05-17 17:18:38.281983708 +0200
+--- a/Makefile.am
++++ b/Makefile.am
@@ -33,6 +33,7 @@
-release $(LT_RELEASE) \
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
diff --git a/media-libs/sdl-ttf/sdl-ttf-2.0.11-r1.ebuild b/media-libs/sdl-ttf/sdl-ttf-2.0.11-r1.ebuild
index 2f74af33495..e72a1d47b82 100644
--- a/media-libs/sdl-ttf/sdl-ttf-2.0.11-r1.ebuild
+++ b/media-libs/sdl-ttf/sdl-ttf-2.0.11-r1.ebuild
@@ -1,8 +1,8 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-EAPI=5
-inherit autotools eutils multilib-minimal
+EAPI=6
+inherit autotools multilib-minimal
MY_P="${P/sdl-/SDL_}"
DESCRIPTION="library that allows you to use TrueType fonts in SDL applications"
@@ -22,23 +22,29 @@ DEPEND="${RDEPEND}"
S=${WORKDIR}/${MY_P}
+PATCHES=(
+ "${FILESDIR}"/${P}-underlink.patch
+ "${FILESDIR}"/${P}-freetype_pkgconfig.patch
+)
+
src_prepare() {
- epatch "${FILESDIR}"/${P}-underlink.patch
+ default
+ mv configure.{in,ac} || die
eautoreconf
}
multilib_src_configure() {
- ECONF_SOURCE="${S}" econf \
- --disable-dependency-tracking \
- $(use_enable static-libs static) \
+ local myeconfargs=(
+ --disable-dependency-tracking
+ $(use_enable static-libs static)
$(use_with X x)
-}
-
-multilib_src_install() {
- emake DESTDIR="${D}" install
+ )
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
}
multilib_src_install_all() {
dodoc CHANGES README
- use static-libs || prune_libtool_files --all
+ if ! use static-libs ; then
+ find "${ED}" \( -name '*.a' -o -name '*.la' \) -delete || die
+ fi
}