1 |
commit: 71ef0a9d7feaa6bc13c22a33267a1bd496d98e8d |
2 |
Author: Brian Evans <grknight <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri May 4 21:03:32 2018 +0000 |
4 |
Commit: Brian Evans <grknight <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri May 4 21:03:32 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=71ef0a9d |
7 |
|
8 |
dev-lang/php: Fix building with freetype 2.9.1 by using pkgconfig |
9 |
|
10 |
Closes: https://bugs.gentoo.org/654794 |
11 |
Package-Manager: Portage-2.3.36, Repoman-2.3.9 |
12 |
|
13 |
dev-lang/php/files/php-freetype-2.9.1.patch | 231 ++++++++++++++++++++++++++++ |
14 |
dev-lang/php/php-5.6.35-r1.ebuild | 1 + |
15 |
dev-lang/php/php-5.6.36.ebuild | 1 + |
16 |
dev-lang/php/php-7.0.29.ebuild | 1 + |
17 |
dev-lang/php/php-7.0.30.ebuild | 1 + |
18 |
dev-lang/php/php-7.1.16.ebuild | 1 + |
19 |
dev-lang/php/php-7.1.17.ebuild | 1 + |
20 |
dev-lang/php/php-7.2.5.ebuild | 1 + |
21 |
8 files changed, 238 insertions(+) |
22 |
|
23 |
diff --git a/dev-lang/php/files/php-freetype-2.9.1.patch b/dev-lang/php/files/php-freetype-2.9.1.patch |
24 |
new file mode 100644 |
25 |
index 00000000000..3ddf8d1154d |
26 |
--- /dev/null |
27 |
+++ b/dev-lang/php/files/php-freetype-2.9.1.patch |
28 |
@@ -0,0 +1,231 @@ |
29 |
+--- a/ext/gd/config.m4 2018-04-24 11:09:54.000000000 -0400 |
30 |
++++ b/ext/gd/config.m4 2018-05-04 15:18:49.867283889 -0400 |
31 |
+@@ -186,21 +186,35 @@ |
32 |
+ AC_DEFUN([PHP_GD_FREETYPE2],[ |
33 |
+ if test "$PHP_FREETYPE_DIR" != "no"; then |
34 |
+ |
35 |
+- for i in $PHP_FREETYPE_DIR /usr/local /usr; do |
36 |
+- if test -f "$i/bin/freetype-config"; then |
37 |
+- FREETYPE2_DIR=$i |
38 |
+- FREETYPE2_CONFIG="$i/bin/freetype-config" |
39 |
+- break |
40 |
++ AC_PATH_PROG(PKG_CONFIG, pkg-config, no) |
41 |
++ AC_MSG_CHECKING(for freetype2) |
42 |
++ |
43 |
++ if test -x "$PKG_CONFIG" && $PKG_CONFIG --exists freetype2 ; then |
44 |
++ |
45 |
++ FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags freetype2` |
46 |
++ FREETYPE2_LIBS=`$PKG_CONFIG --libs freetype2` |
47 |
++ FREETYPE2_VERSION=`$PKG_CONFIG --modversion freetype2` |
48 |
++ |
49 |
++ AC_MSG_RESULT(from pkgconfig: version $FREETYPE2_VERSION found) |
50 |
++ else |
51 |
++ |
52 |
++ for i in $PHP_FREETYPE_DIR /usr/local /usr; do |
53 |
++ if test -f "$i/bin/freetype-config"; then |
54 |
++ FREETYPE2_DIR=$i |
55 |
++ FREETYPE2_CONFIG="$i/bin/freetype-config" |
56 |
++ break |
57 |
++ fi |
58 |
++ done |
59 |
++ |
60 |
++ if test -z "$FREETYPE2_DIR"; then |
61 |
++ AC_MSG_ERROR([freetype-config not found.]) |
62 |
+ fi |
63 |
+- done |
64 |
+ |
65 |
+- if test -z "$FREETYPE2_DIR"; then |
66 |
+- AC_MSG_ERROR([freetype-config not found.]) |
67 |
++ FREETYPE2_CFLAGS=`$FREETYPE2_CONFIG --cflags` |
68 |
++ FREETYPE2_LIBS=`$FREETYPE2_CONFIG --libs` |
69 |
++ AC_MSG_RESULT(found via freetype-config) |
70 |
+ fi |
71 |
+ |
72 |
+- FREETYPE2_CFLAGS=`$FREETYPE2_CONFIG --cflags` |
73 |
+- FREETYPE2_LIBS=`$FREETYPE2_CONFIG --libs` |
74 |
+- |
75 |
+ PHP_EVAL_INCLINE($FREETYPE2_CFLAGS) |
76 |
+ PHP_EVAL_LIBLINE($FREETYPE2_LIBS, GD_SHARED_LIBADD) |
77 |
+ AC_DEFINE(HAVE_LIBFREETYPE,1,[ ]) |
78 |
+--- a/configure 2018-04-24 11:10:05.000000000 -0400 |
79 |
++++ b/configure 2018-05-04 15:18:45.626367913 -0400 |
80 |
+@@ -34348,21 +34348,78 @@ |
81 |
+ |
82 |
+ if test "$PHP_FREETYPE_DIR" != "no"; then |
83 |
+ |
84 |
+- for i in $PHP_FREETYPE_DIR /usr/local /usr; do |
85 |
+- if test -f "$i/bin/freetype-config"; then |
86 |
+- FREETYPE2_DIR=$i |
87 |
+- FREETYPE2_CONFIG="$i/bin/freetype-config" |
88 |
+- break |
89 |
++ # Extract the first word of "pkg-config", so it can be a program name with args. |
90 |
++set dummy pkg-config; ac_word=$2 |
91 |
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
92 |
++$as_echo_n "checking for $ac_word... " >&6; } |
93 |
++if ${ac_cv_path_PKG_CONFIG+:} false; then : |
94 |
++ $as_echo_n "(cached) " >&6 |
95 |
++else |
96 |
++ case $PKG_CONFIG in |
97 |
++ [\\/]* | ?:[\\/]*) |
98 |
++ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. |
99 |
++ ;; |
100 |
++ *) |
101 |
++ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
102 |
++for as_dir in $PATH |
103 |
++do |
104 |
++ IFS=$as_save_IFS |
105 |
++ test -z "$as_dir" && as_dir=. |
106 |
++ for ac_exec_ext in '' $ac_executable_extensions; do |
107 |
++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
108 |
++ ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" |
109 |
++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
110 |
++ break 2 |
111 |
++ fi |
112 |
++done |
113 |
++ done |
114 |
++IFS=$as_save_IFS |
115 |
++ |
116 |
++ test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" |
117 |
++ ;; |
118 |
++esac |
119 |
++fi |
120 |
++PKG_CONFIG=$ac_cv_path_PKG_CONFIG |
121 |
++if test -n "$PKG_CONFIG"; then |
122 |
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 |
123 |
++$as_echo "$PKG_CONFIG" >&6; } |
124 |
++else |
125 |
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
126 |
++$as_echo "no" >&6; } |
127 |
++fi |
128 |
++ |
129 |
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype2" >&5 |
130 |
++$as_echo_n "checking for freetype2... " >&6; } |
131 |
++ |
132 |
++ |
133 |
++ if test -x "$PKG_CONFIG" && $PKG_CONFIG --exists freetype2 ; then |
134 |
++ |
135 |
++ FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags freetype2` |
136 |
++ FREETYPE2_LIBS=`$PKG_CONFIG --libs freetype2` |
137 |
++ FREETYPE2_VERSION=`$PKG_CONFIG --modversion freetype2` |
138 |
++ |
139 |
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: from pkgconfig: version $FREETYPE2_VERSION found" >&5 |
140 |
++$as_echo "from pkgconfig: version $FREETYPE2_VERSION found" >&6; } |
141 |
++ else |
142 |
++ |
143 |
++ for i in $PHP_FREETYPE_DIR /usr/local /usr; do |
144 |
++ if test -f "$i/bin/freetype-config"; then |
145 |
++ FREETYPE2_DIR=$i |
146 |
++ FREETYPE2_CONFIG="$i/bin/freetype-config" |
147 |
++ break |
148 |
++ fi |
149 |
++ done |
150 |
++ |
151 |
++ if test -z "$FREETYPE2_DIR"; then |
152 |
++ as_fn_error $? "freetype-config not found." "$LINENO" 5 |
153 |
+ fi |
154 |
+- done |
155 |
+ |
156 |
+- if test -z "$FREETYPE2_DIR"; then |
157 |
+- as_fn_error $? "freetype-config not found." "$LINENO" 5 |
158 |
++ FREETYPE2_CFLAGS=`$FREETYPE2_CONFIG --cflags` |
159 |
++ FREETYPE2_LIBS=`$FREETYPE2_CONFIG --libs` |
160 |
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: found via freetype-config" >&5 |
161 |
++$as_echo "found via freetype-config" >&6; } |
162 |
+ fi |
163 |
+ |
164 |
+- FREETYPE2_CFLAGS=`$FREETYPE2_CONFIG --cflags` |
165 |
+- FREETYPE2_LIBS=`$FREETYPE2_CONFIG --libs` |
166 |
+- |
167 |
+ |
168 |
+ for ac_i in $FREETYPE2_CFLAGS; do |
169 |
+ case $ac_i in |
170 |
+@@ -36019,21 +36076,78 @@ |
171 |
+ |
172 |
+ if test "$PHP_FREETYPE_DIR" != "no"; then |
173 |
+ |
174 |
+- for i in $PHP_FREETYPE_DIR /usr/local /usr; do |
175 |
+- if test -f "$i/bin/freetype-config"; then |
176 |
+- FREETYPE2_DIR=$i |
177 |
+- FREETYPE2_CONFIG="$i/bin/freetype-config" |
178 |
+- break |
179 |
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype2" >&5 |
180 |
++$as_echo_n "checking for freetype2... " >&6; } |
181 |
++ # Extract the first word of "pkg-config", so it can be a program name with args. |
182 |
++set dummy pkg-config; ac_word=$2 |
183 |
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
184 |
++$as_echo_n "checking for $ac_word... " >&6; } |
185 |
++if ${ac_cv_path_PKG_CONFIG+:} false; then : |
186 |
++ $as_echo_n "(cached) " >&6 |
187 |
++else |
188 |
++ case $PKG_CONFIG in |
189 |
++ [\\/]* | ?:[\\/]*) |
190 |
++ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. |
191 |
++ ;; |
192 |
++ *) |
193 |
++ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
194 |
++for as_dir in $PATH |
195 |
++do |
196 |
++ IFS=$as_save_IFS |
197 |
++ test -z "$as_dir" && as_dir=. |
198 |
++ for ac_exec_ext in '' $ac_executable_extensions; do |
199 |
++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
200 |
++ ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" |
201 |
++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
202 |
++ break 2 |
203 |
++ fi |
204 |
++done |
205 |
++ done |
206 |
++IFS=$as_save_IFS |
207 |
++ |
208 |
++ test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" |
209 |
++ ;; |
210 |
++esac |
211 |
++fi |
212 |
++PKG_CONFIG=$ac_cv_path_PKG_CONFIG |
213 |
++if test -n "$PKG_CONFIG"; then |
214 |
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 |
215 |
++$as_echo "$PKG_CONFIG" >&6; } |
216 |
++else |
217 |
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
218 |
++$as_echo "no" >&6; } |
219 |
++fi |
220 |
++ |
221 |
++ |
222 |
++ |
223 |
++ if test -x "$PKG_CONFIG" && $PKG_CONFIG --exists freetype2 ; then |
224 |
++ |
225 |
++ FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags freetype2` |
226 |
++ FREETYPE2_LIBS=`$PKG_CONFIG --libs freetype2` |
227 |
++ FREETYPE2_VERSION=`$PKG_CONFIG --modversion freetype2` |
228 |
++ |
229 |
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: from pkgconfig: version $FREETYPE_VERSON found" >&5 |
230 |
++$as_echo "from pkgconfig: version $FREETYPE_VERSON found" >&6; } |
231 |
++ else |
232 |
++ |
233 |
++ for i in $PHP_FREETYPE_DIR /usr/local /usr; do |
234 |
++ if test -f "$i/bin/freetype-config"; then |
235 |
++ FREETYPE2_DIR=$i |
236 |
++ FREETYPE2_CONFIG="$i/bin/freetype-config" |
237 |
++ break |
238 |
++ fi |
239 |
++ done |
240 |
++ |
241 |
++ if test -z "$FREETYPE2_DIR"; then |
242 |
++ as_fn_error $? "freetype-config not found." "$LINENO" 5 |
243 |
+ fi |
244 |
+- done |
245 |
+ |
246 |
+- if test -z "$FREETYPE2_DIR"; then |
247 |
+- as_fn_error $? "freetype-config not found." "$LINENO" 5 |
248 |
++ FREETYPE2_CFLAGS=`$FREETYPE2_CONFIG --cflags` |
249 |
++ FREETYPE2_LIBS=`$FREETYPE2_CONFIG --libs` |
250 |
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: found via freetype-config" >&5 |
251 |
++$as_echo "found via freetype-config" >&6; } |
252 |
+ fi |
253 |
+ |
254 |
+- FREETYPE2_CFLAGS=`$FREETYPE2_CONFIG --cflags` |
255 |
+- FREETYPE2_LIBS=`$FREETYPE2_CONFIG --libs` |
256 |
+- |
257 |
+ |
258 |
+ for ac_i in $FREETYPE2_CFLAGS; do |
259 |
+ case $ac_i in |
260 |
|
261 |
diff --git a/dev-lang/php/php-5.6.35-r1.ebuild b/dev-lang/php/php-5.6.35-r1.ebuild |
262 |
index 8f87fde7f25..e5d5dafb0a8 100644 |
263 |
--- a/dev-lang/php/php-5.6.35-r1.ebuild |
264 |
+++ b/dev-lang/php/php-5.6.35-r1.ebuild |
265 |
@@ -232,6 +232,7 @@ php_set_ini_dir() { |
266 |
|
267 |
src_prepare() { |
268 |
eapply "${FILESDIR}/php-${SLOT}-no-bison-warnings.patch" |
269 |
+ eapply "${FILESDIR}/php-freetype-2.9.1.patch" |
270 |
|
271 |
# Change PHP branding |
272 |
# Get the alpha/beta/rc version |
273 |
|
274 |
diff --git a/dev-lang/php/php-5.6.36.ebuild b/dev-lang/php/php-5.6.36.ebuild |
275 |
index 97094f855af..fbcbe63b2d1 100644 |
276 |
--- a/dev-lang/php/php-5.6.36.ebuild |
277 |
+++ b/dev-lang/php/php-5.6.36.ebuild |
278 |
@@ -233,6 +233,7 @@ php_set_ini_dir() { |
279 |
src_prepare() { |
280 |
eapply "${FILESDIR}/php-${SLOT}-no-bison-warnings.patch" |
281 |
eapply "${FILESDIR}/5.6-mbstring-oniguruma-6.8.patch" |
282 |
+ eapply "${FILESDIR}/php-freetype-2.9.1.patch" |
283 |
|
284 |
# Change PHP branding |
285 |
# Get the alpha/beta/rc version |
286 |
|
287 |
diff --git a/dev-lang/php/php-7.0.29.ebuild b/dev-lang/php/php-7.0.29.ebuild |
288 |
index f0c6303f1cb..1ad39e6fafc 100644 |
289 |
--- a/dev-lang/php/php-7.0.29.ebuild |
290 |
+++ b/dev-lang/php/php-7.0.29.ebuild |
291 |
@@ -168,6 +168,7 @@ PATCHES=( |
292 |
# hopefully upstream will include the same version check fixes in upcoming releases |
293 |
# patch added 20180429 |
294 |
"${FILESDIR}/libressl-compatibility.patch" |
295 |
+ "${FILESDIR}/php-freetype-2.9.1.patch" |
296 |
) |
297 |
|
298 |
PHP_MV="$(get_major_version)" |
299 |
|
300 |
diff --git a/dev-lang/php/php-7.0.30.ebuild b/dev-lang/php/php-7.0.30.ebuild |
301 |
index 8de4204d1c0..5a851d1f41e 100644 |
302 |
--- a/dev-lang/php/php-7.0.30.ebuild |
303 |
+++ b/dev-lang/php/php-7.0.30.ebuild |
304 |
@@ -168,6 +168,7 @@ PATCHES=( |
305 |
# hopefully upstream will include the same version check fixes in upcoming releases |
306 |
# patch added 20180429 |
307 |
"${FILESDIR}/libressl-compatibility.patch" |
308 |
+ "${FILESDIR}/php-freetype-2.9.1.patch" |
309 |
) |
310 |
|
311 |
PHP_MV="$(get_major_version)" |
312 |
|
313 |
diff --git a/dev-lang/php/php-7.1.16.ebuild b/dev-lang/php/php-7.1.16.ebuild |
314 |
index 0075b8f5bd7..7dbfde0cd8b 100644 |
315 |
--- a/dev-lang/php/php-7.1.16.ebuild |
316 |
+++ b/dev-lang/php/php-7.1.16.ebuild |
317 |
@@ -150,6 +150,7 @@ PATCHES=( |
318 |
# hopefully upstream will include the same version check fixes in upcoming releases |
319 |
# patch added 20180429 |
320 |
"${FILESDIR}/libressl-compatibility.patch" |
321 |
+ "${FILESDIR}/php-freetype-2.9.1.patch" |
322 |
) |
323 |
|
324 |
PHP_MV="$(get_major_version)" |
325 |
|
326 |
diff --git a/dev-lang/php/php-7.1.17.ebuild b/dev-lang/php/php-7.1.17.ebuild |
327 |
index fcd553f3148..39336570acb 100644 |
328 |
--- a/dev-lang/php/php-7.1.17.ebuild |
329 |
+++ b/dev-lang/php/php-7.1.17.ebuild |
330 |
@@ -148,6 +148,7 @@ PATCHES=( |
331 |
# hopefully upstream will include the same version check fixes in upcoming releases |
332 |
# patch added 20180429 |
333 |
"${FILESDIR}/libressl-compatibility.patch" |
334 |
+ "${FILESDIR}/php-freetype-2.9.1.patch" |
335 |
) |
336 |
|
337 |
PHP_MV="$(get_major_version)" |
338 |
|
339 |
diff --git a/dev-lang/php/php-7.2.5.ebuild b/dev-lang/php/php-7.2.5.ebuild |
340 |
index 558d91754f3..f781eb4d803 100644 |
341 |
--- a/dev-lang/php/php-7.2.5.ebuild |
342 |
+++ b/dev-lang/php/php-7.2.5.ebuild |
343 |
@@ -153,6 +153,7 @@ PATCHES=( |
344 |
# hopefully upstream will include the same version check fixes in upcoming releases |
345 |
# patch added 20180429 |
346 |
"${FILESDIR}/libressl-compatibility.patch" |
347 |
+ "${FILESDIR}/php-freetype-2.9.1.patch" |
348 |
) |
349 |
|
350 |
PHP_MV="$(get_major_version)" |