Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/sdl2-ttf/files/, media-libs/sdl2-ttf/
Date: Fri, 04 May 2018 08:03:45
Message-Id: 1525421007.295794b0417fabcc378298894d1720939695a767.polynomial-c@gentoo
1 commit: 295794b0417fabcc378298894d1720939695a767
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Fri May 4 08:03:27 2018 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Fri May 4 08:03:27 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=295794b0
7
8 media-libs/sdl2-ttf: Use pkg-config to search for freetype.
9
10 Bug: https://bugs.gentoo.org/654758
11 Package-Manager: Portage-2.3.35, Repoman-2.3.9
12
13 .../files/sdl-ttf-2.0.11-freetype_pkgconfig.patch | 46 ++++++++++++++++++++++
14 media-libs/sdl2-ttf/sdl2-ttf-2.0.14.ebuild | 30 +++++++++-----
15 2 files changed, 67 insertions(+), 9 deletions(-)
16
17 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
18 new file mode 100644
19 index 00000000000..02b06356190
20 --- /dev/null
21 +++ b/media-libs/sdl2-ttf/files/sdl-ttf-2.0.11-freetype_pkgconfig.patch
22 @@ -0,0 +1,46 @@
23 +https://bugs.gentoo.org/654758
24 +
25 +--- SDL_ttf-2.0.11/configure.in
26 ++++ SDL_ttf-2.0.11/configure.in
27 +@@ -64,6 +64,7 @@
28 + ;;
29 + esac
30 +
31 ++PKG_PROG_PKG_CONFIG
32 +
33 + dnl Check for iconv (character conversion library; see iconv.m4)
34 + dnl This isn't available on many systems
35 +@@ -94,6 +95,17 @@
36 + dnl
37 + dnl Get the cflags and libraries from the freetype-config script
38 + dnl
39 ++PKG_CHECK_MODULES(
40 ++ FREETYPE2,
41 ++ freetype2,
42 ++ [
43 ++ ft_found=yes
44 ++ CFLAGS="$CFLAGS $FREETYPE2_CFLAGS"
45 ++ LIBS="$LIBS $FREETYPE2_LIBS"
46 ++ ],
47 ++ ft_found=no
48 ++)
49 ++
50 + AC_ARG_WITH(freetype-prefix,[ --with-freetype-prefix=PFX Prefix where FREETYPE is
51 + installed (optional)],
52 + freetype_prefix="$withval", freetype_prefix="")
53 +@@ -101,6 +113,7 @@
54 + where FREETYPE is installed (optional)],
55 + freetype_exec_prefix="$withval", freetype_exec_prefix="")
56 +
57 ++if test "x$ft_found" != "xyes" ; then
58 + if test x$freetype_exec_prefix != x ; then
59 + freetype_args="$freetype_args --exec-prefix=$freetype_exec_prefix"
60 + if test x${FREETYPE_CONFIG+set} != xset ; then
61 +@@ -123,6 +136,7 @@
62 + CFLAGS="$CFLAGS `$FREETYPE_CONFIG $freetypeconf_args --cflags`"
63 + LIBS="$LIBS `$FREETYPE_CONFIG $freetypeconf_args --libs`"
64 + fi
65 ++fi
66 +
67 + dnl Check for SDL
68 + SDL_VERSION=1.2.4
69
70 diff --git a/media-libs/sdl2-ttf/sdl2-ttf-2.0.14.ebuild b/media-libs/sdl2-ttf/sdl2-ttf-2.0.14.ebuild
71 index 85642e257de..2e741425b72 100644
72 --- a/media-libs/sdl2-ttf/sdl2-ttf-2.0.14.ebuild
73 +++ b/media-libs/sdl2-ttf/sdl2-ttf-2.0.14.ebuild
74 @@ -1,10 +1,10 @@
75 -# Copyright 1999-2015 Gentoo Foundation
76 +# Copyright 1999-2018 Gentoo Foundation
77 # Distributed under the terms of the GNU General Public License v2
78
79 -EAPI=5
80 -inherit eutils multilib-minimal
81 +EAPI=6
82 +inherit autotools multilib-minimal
83
84 -MY_P=SDL2_ttf-${PV}
85 +MY_P="SDL2_ttf-${PV}"
86 DESCRIPTION="library that allows you to use TrueType fonts in SDL applications"
87 HOMEPAGE="http://www.libsdl.org/projects/SDL_ttf/"
88 SRC_URI="http://www.libsdl.org/projects/SDL_ttf/release/${MY_P}.tar.gz"
89 @@ -18,17 +18,29 @@ RDEPEND="X? ( >=x11-libs/libXt-1.1.4[${MULTILIB_USEDEP}] )
90 >=media-libs/libsdl2-2.0.1-r1[${MULTILIB_USEDEP}]
91 >=media-libs/freetype-2.5.0.1[${MULTILIB_USEDEP}]
92 virtual/opengl[${MULTILIB_USEDEP}]"
93 -DEPEND=${RDEPEND}
94 +DEPEND="${RDEPEND}"
95
96 -S=${WORKDIR}/${MY_P}
97 +S="${WORKDIR}/${MY_P}"
98 +
99 +PATCHES=(
100 + "${FILESDIR}/sdl-ttf-2.0.11-freetype_pkgconfig.patch"
101 +)
102 +
103 +src_prepare() {
104 + default
105 + mv configure.{in,ac} || die
106 + eautoreconf
107 +}
108
109 multilib_src_configure() {
110 - ECONF_SOURCE="${S}" econf \
111 - $(use_enable static-libs static) \
112 + local myeconfargs=(
113 + $(use_enable static-libs static)
114 $(use_with X x)
115 + )
116 + ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
117 }
118
119 multilib_src_install_all() {
120 dodoc {CHANGES,README}.txt
121 - prune_libtool_files
122 + find "${ED}" -name '*.la' -delete || die
123 }