1 |
commit: 180acb7085490a0c57e180eb72e6b2520022df66 |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri May 4 07:55:43 2018 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri May 4 07:55:43 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=180acb70 |
7 |
|
8 |
media-libs/sdl-ttf: Use pkg-config to search for freetype. |
9 |
|
10 |
Closes: 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 |
.../sdl-ttf/files/sdl-ttf-2.0.11-underlink.patch | 4 +- |
15 |
media-libs/sdl-ttf/sdl-ttf-2.0.11-r1.ebuild | 30 ++++++++------ |
16 |
3 files changed, 66 insertions(+), 14 deletions(-) |
17 |
|
18 |
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 |
19 |
new file mode 100644 |
20 |
index 00000000000..02b06356190 |
21 |
--- /dev/null |
22 |
+++ b/media-libs/sdl-ttf/files/sdl-ttf-2.0.11-freetype_pkgconfig.patch |
23 |
@@ -0,0 +1,46 @@ |
24 |
+https://bugs.gentoo.org/654758 |
25 |
+ |
26 |
+--- SDL_ttf-2.0.11/configure.in |
27 |
++++ SDL_ttf-2.0.11/configure.in |
28 |
+@@ -64,6 +64,7 @@ |
29 |
+ ;; |
30 |
+ esac |
31 |
+ |
32 |
++PKG_PROG_PKG_CONFIG |
33 |
+ |
34 |
+ dnl Check for iconv (character conversion library; see iconv.m4) |
35 |
+ dnl This isn't available on many systems |
36 |
+@@ -94,6 +95,17 @@ |
37 |
+ dnl |
38 |
+ dnl Get the cflags and libraries from the freetype-config script |
39 |
+ dnl |
40 |
++PKG_CHECK_MODULES( |
41 |
++ FREETYPE2, |
42 |
++ freetype2, |
43 |
++ [ |
44 |
++ ft_found=yes |
45 |
++ CFLAGS="$CFLAGS $FREETYPE2_CFLAGS" |
46 |
++ LIBS="$LIBS $FREETYPE2_LIBS" |
47 |
++ ], |
48 |
++ ft_found=no |
49 |
++) |
50 |
++ |
51 |
+ AC_ARG_WITH(freetype-prefix,[ --with-freetype-prefix=PFX Prefix where FREETYPE is |
52 |
+ installed (optional)], |
53 |
+ freetype_prefix="$withval", freetype_prefix="") |
54 |
+@@ -101,6 +113,7 @@ |
55 |
+ where FREETYPE is installed (optional)], |
56 |
+ freetype_exec_prefix="$withval", freetype_exec_prefix="") |
57 |
+ |
58 |
++if test "x$ft_found" != "xyes" ; then |
59 |
+ if test x$freetype_exec_prefix != x ; then |
60 |
+ freetype_args="$freetype_args --exec-prefix=$freetype_exec_prefix" |
61 |
+ if test x${FREETYPE_CONFIG+set} != xset ; then |
62 |
+@@ -123,6 +136,7 @@ |
63 |
+ CFLAGS="$CFLAGS `$FREETYPE_CONFIG $freetypeconf_args --cflags`" |
64 |
+ LIBS="$LIBS `$FREETYPE_CONFIG $freetypeconf_args --libs`" |
65 |
+ fi |
66 |
++fi |
67 |
+ |
68 |
+ dnl Check for SDL |
69 |
+ SDL_VERSION=1.2.4 |
70 |
|
71 |
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 |
72 |
index 136589ec7f1..7bd3a3993bb 100644 |
73 |
--- a/media-libs/sdl-ttf/files/sdl-ttf-2.0.11-underlink.patch |
74 |
+++ b/media-libs/sdl-ttf/files/sdl-ttf-2.0.11-underlink.patch |
75 |
@@ -1,5 +1,5 @@ |
76 |
---- Makefile.am.old 2011-05-17 17:17:18.972003301 +0200 |
77 |
-+++ Makefile.am 2011-05-17 17:18:38.281983708 +0200 |
78 |
+--- a/Makefile.am |
79 |
++++ b/Makefile.am |
80 |
@@ -33,6 +33,7 @@ |
81 |
-release $(LT_RELEASE) \ |
82 |
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) |
83 |
|
84 |
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 |
85 |
index 2f74af33495..e72a1d47b82 100644 |
86 |
--- a/media-libs/sdl-ttf/sdl-ttf-2.0.11-r1.ebuild |
87 |
+++ b/media-libs/sdl-ttf/sdl-ttf-2.0.11-r1.ebuild |
88 |
@@ -1,8 +1,8 @@ |
89 |
-# Copyright 1999-2017 Gentoo Foundation |
90 |
+# Copyright 1999-2018 Gentoo Foundation |
91 |
# Distributed under the terms of the GNU General Public License v2 |
92 |
|
93 |
-EAPI=5 |
94 |
-inherit autotools eutils multilib-minimal |
95 |
+EAPI=6 |
96 |
+inherit autotools multilib-minimal |
97 |
|
98 |
MY_P="${P/sdl-/SDL_}" |
99 |
DESCRIPTION="library that allows you to use TrueType fonts in SDL applications" |
100 |
@@ -22,23 +22,29 @@ DEPEND="${RDEPEND}" |
101 |
|
102 |
S=${WORKDIR}/${MY_P} |
103 |
|
104 |
+PATCHES=( |
105 |
+ "${FILESDIR}"/${P}-underlink.patch |
106 |
+ "${FILESDIR}"/${P}-freetype_pkgconfig.patch |
107 |
+) |
108 |
+ |
109 |
src_prepare() { |
110 |
- epatch "${FILESDIR}"/${P}-underlink.patch |
111 |
+ default |
112 |
+ mv configure.{in,ac} || die |
113 |
eautoreconf |
114 |
} |
115 |
|
116 |
multilib_src_configure() { |
117 |
- ECONF_SOURCE="${S}" econf \ |
118 |
- --disable-dependency-tracking \ |
119 |
- $(use_enable static-libs static) \ |
120 |
+ local myeconfargs=( |
121 |
+ --disable-dependency-tracking |
122 |
+ $(use_enable static-libs static) |
123 |
$(use_with X x) |
124 |
-} |
125 |
- |
126 |
-multilib_src_install() { |
127 |
- emake DESTDIR="${D}" install |
128 |
+ ) |
129 |
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" |
130 |
} |
131 |
|
132 |
multilib_src_install_all() { |
133 |
dodoc CHANGES README |
134 |
- use static-libs || prune_libtool_files --all |
135 |
+ if ! use static-libs ; then |
136 |
+ find "${ED}" \( -name '*.a' -o -name '*.la' \) -delete || die |
137 |
+ fi |
138 |
} |