1 |
commit: 364e0decedaf1e8990bc88be05545544e15f5f6e |
2 |
Author: Brian Evans <grknight <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jan 23 16:29:57 2020 +0000 |
4 |
Commit: Brian Evans <grknight <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jan 23 16:29:57 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=364e0dec |
7 |
|
8 |
dev-lang/php: Drop 7.1 slot |
9 |
|
10 |
Signed-off-by: Brian Evans <grknight <AT> gentoo.org> |
11 |
|
12 |
dev-lang/php/Manifest | 1 - |
13 |
.../files/php-7.1.25-intl-use-icu-namespace.patch | 379 ----------- |
14 |
dev-lang/php/php-7.1.33.ebuild | 739 --------------------- |
15 |
profiles/package.mask | 6 - |
16 |
4 files changed, 1125 deletions(-) |
17 |
|
18 |
diff --git a/dev-lang/php/Manifest b/dev-lang/php/Manifest |
19 |
index ca57a2a8c75..921365da2df 100644 |
20 |
--- a/dev-lang/php/Manifest |
21 |
+++ b/dev-lang/php/Manifest |
22 |
@@ -1,4 +1,3 @@ |
23 |
-DIST php-7.1.33.tar.xz 12370228 BLAKE2B 610f501c1729ca3f5fa6f104b9f229046cf1e497f2fdc1194b80b4a5f9ca7f799dc6a458de34dd7a87976b7252ba2f548a8d689e4b2a45c025f1807ab8489f12 SHA512 ed37a79e3402c767f20e55c1cbe27957cc78240eafc719fffccd7d29ae10a45112aa0f29082f56133cd9c25f2750e9e57246d95b4f38d766f49bd29d1397eb1d |
24 |
DIST php-7.2.26.tar.xz 12309176 BLAKE2B 2208aee696fc2aed50b4f08f2dd7ca0f70d9913c22091687f6c694a343e4b5fd5e1f0d0b6b127fe0c00c5611cb60e627c2257a1fad9bff6e9fc8bb921e1eb57d SHA512 457e3420120135e311a22cd11529d5a3efc5885af4f298196f403093141801619d4dcdb38d6a4a5f8d9dcfa619688d8fdf33fea4a30e2d885e987b739a268f12 |
25 |
DIST php-7.2.27.tar.xz 12307512 BLAKE2B 8d51a1a88c718ba9ef683e190f9ed80b46fccfc7b237d9175f5db3012a3d4ae8f698dbe6b2b8f233121be6d08e28bdb1062a357dd6ae2df5228a7e56c8604807 SHA512 02416e2bdfcd47ef660c7403ca25c7358c2f9a685b1dee6a2a95c52d1b1178666f9fa0bb32dc070cfd09febb5c44ecdb70116546142369d7ead4432634dc38c5 |
26 |
DIST php-7.3.13.tar.xz 12102012 BLAKE2B 32a346470ea0d0a3db873ae94b5e4dcc650c25e24db244ea94417f092e0458a0825cb99e9c3429000ee5cbd50120824d9bd2a58a7ed2ada1f39c6d7c41b2ba08 SHA512 d0624b3b841fed49d9cea56b17e7c8c7abf8e6572832b6f86c98f48c23f86690c310b460eae27a6fcd41fbfbc2e8a4b56f6bfb0c738fa1db36ce3795454d7798 |
27 |
|
28 |
diff --git a/dev-lang/php/files/php-7.1.25-intl-use-icu-namespace.patch b/dev-lang/php/files/php-7.1.25-intl-use-icu-namespace.patch |
29 |
deleted file mode 100644 |
30 |
index 5a1cc472f10..00000000000 |
31 |
--- a/dev-lang/php/files/php-7.1.25-intl-use-icu-namespace.patch |
32 |
+++ /dev/null |
33 |
@@ -1,379 +0,0 @@ |
34 |
-Based on the following upstream commits: |
35 |
- |
36 |
-https://github.com/php/php-src/commit/8d35a423838eb462cd39ee535c5d003073cc5f22 |
37 |
-https://github.com/php/php-src/commit/d8200e48857aeaf09f7127751efc5632ef7660a7 |
38 |
-https://github.com/php/php-src/commit/9a8e7b571896f39f83cb000fdb7c466b6d328d52 |
39 |
- |
40 |
---- a/ext/intl/breakiterator/breakiterator_class.cpp |
41 |
-+++ b/ext/intl/breakiterator/breakiterator_class.cpp |
42 |
-@@ -38,6 +38,7 @@ extern "C" { |
43 |
- } |
44 |
- |
45 |
- using PHP::CodePointBreakIterator; |
46 |
-+using icu::RuleBasedBreakIterator; |
47 |
- |
48 |
- /* {{{ Global variables */ |
49 |
- zend_class_entry *BreakIterator_ce_ptr; |
50 |
---- a/ext/intl/breakiterator/breakiterator_class.h |
51 |
-+++ b/ext/intl/breakiterator/breakiterator_class.h |
52 |
-@@ -26,6 +26,8 @@ |
53 |
- |
54 |
- #ifndef USE_BREAKITERATOR_POINTER |
55 |
- typedef void BreakIterator; |
56 |
-+#else |
57 |
-+using icu::BreakIterator; |
58 |
- #endif |
59 |
- |
60 |
- typedef struct { |
61 |
---- a/ext/intl/breakiterator/breakiterator_methods.cpp |
62 |
-+++ b/ext/intl/breakiterator/breakiterator_methods.cpp |
63 |
-@@ -32,6 +32,8 @@ extern "C" { |
64 |
- } |
65 |
- |
66 |
- using PHP::CodePointBreakIterator; |
67 |
-+using icu::BreakIterator; |
68 |
-+using icu::Locale; |
69 |
- |
70 |
- U_CFUNC PHP_METHOD(BreakIterator, __construct) |
71 |
- { |
72 |
---- a/ext/intl/breakiterator/codepointiterator_internal.cpp |
73 |
-+++ b/ext/intl/breakiterator/codepointiterator_internal.cpp |
74 |
-@@ -33,6 +33,8 @@ typedef union { |
75 |
- |
76 |
- using namespace PHP; |
77 |
- |
78 |
-+using icu::UCharCharacterIterator; |
79 |
-+ |
80 |
- UOBJECT_DEFINE_RTTI_IMPLEMENTATION(CodePointBreakIterator); |
81 |
- |
82 |
- CodePointBreakIterator::CodePointBreakIterator() |
83 |
---- a/ext/intl/breakiterator/codepointiterator_internal.h |
84 |
-+++ b/ext/intl/breakiterator/codepointiterator_internal.h |
85 |
-@@ -18,8 +18,11 @@ |
86 |
- #define CODEPOINTITERATOR_INTERNAL_H |
87 |
- |
88 |
- #include <unicode/brkiter.h> |
89 |
-+#include <unicode/unistr.h> |
90 |
- |
91 |
--using U_ICU_NAMESPACE::BreakIterator; |
92 |
-+using icu::BreakIterator; |
93 |
-+using icu::CharacterIterator; |
94 |
-+using icu::UnicodeString; |
95 |
- |
96 |
- namespace PHP { |
97 |
- |
98 |
---- a/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp |
99 |
-+++ b/ext/intl/breakiterator/rulebasedbreakiterator_methods.cpp |
100 |
-@@ -26,6 +26,9 @@ extern "C" { |
101 |
- #include "../intl_convertcpp.h" |
102 |
- #include "../intl_common.h" |
103 |
- |
104 |
-+using icu::RuleBasedBreakIterator; |
105 |
-+using icu::Locale; |
106 |
-+ |
107 |
- static inline RuleBasedBreakIterator *fetch_rbbi(BreakIterator_object *bio) { |
108 |
- return (RuleBasedBreakIterator*)bio->biter; |
109 |
- } |
110 |
---- a/ext/intl/calendar/calendar_class.cpp |
111 |
-+++ b/ext/intl/calendar/calendar_class.cpp |
112 |
-@@ -34,6 +34,9 @@ extern "C" { |
113 |
- #include <assert.h> |
114 |
- } |
115 |
- |
116 |
-+using icu::GregorianCalendar; |
117 |
-+using icu::Locale; |
118 |
-+ |
119 |
- /* {{{ Global variables */ |
120 |
- zend_class_entry *Calendar_ce_ptr; |
121 |
- zend_class_entry *GregorianCalendar_ce_ptr; |
122 |
---- a/ext/intl/calendar/calendar_class.h |
123 |
-+++ b/ext/intl/calendar/calendar_class.h |
124 |
-@@ -26,6 +26,8 @@ |
125 |
- |
126 |
- #ifndef USE_CALENDAR_POINTER |
127 |
- typedef void Calendar; |
128 |
-+#else |
129 |
-+using icu::Calendar; |
130 |
- #endif |
131 |
- |
132 |
- typedef struct { |
133 |
---- a/ext/intl/calendar/calendar_methods.cpp |
134 |
-+++ b/ext/intl/calendar/calendar_methods.cpp |
135 |
-@@ -40,6 +40,8 @@ extern "C" { |
136 |
- } |
137 |
- #include "../common/common_enum.h" |
138 |
- |
139 |
-+using icu::Locale; |
140 |
-+ |
141 |
- U_CFUNC PHP_METHOD(IntlCalendar, __construct) |
142 |
- { |
143 |
- zend_throw_exception( NULL, |
144 |
---- a/ext/intl/calendar/gregoriancalendar_methods.cpp |
145 |
-+++ b/ext/intl/calendar/gregoriancalendar_methods.cpp |
146 |
-@@ -23,6 +23,8 @@ |
147 |
- #include <unicode/locid.h> |
148 |
- #include <unicode/calendar.h> |
149 |
- #include <unicode/gregocal.h> |
150 |
-+#include <unicode/ustring.h> |
151 |
-+ |
152 |
- extern "C" { |
153 |
- #include "../php_intl.h" |
154 |
- #include "../intl_common.h" |
155 |
-@@ -34,6 +36,11 @@ extern "C" { |
156 |
- #include "zend_exceptions.h" |
157 |
- } |
158 |
- |
159 |
-+using icu::GregorianCalendar; |
160 |
-+using icu::Locale; |
161 |
-+using icu::UnicodeString; |
162 |
-+using icu::StringPiece; |
163 |
-+ |
164 |
- static inline GregorianCalendar *fetch_greg(Calendar_object *co) { |
165 |
- return (GregorianCalendar*)co->ucal; |
166 |
- } |
167 |
---- a/ext/intl/common/common_date.cpp |
168 |
-+++ b/ext/intl/common/common_date.cpp |
169 |
-@@ -25,6 +25,9 @@ extern "C" { |
170 |
- #include <ext/date/php_date.h> |
171 |
- } |
172 |
- |
173 |
-+using icu::TimeZone; |
174 |
-+using icu::UnicodeString; |
175 |
-+ |
176 |
- #ifndef INFINITY |
177 |
- #define INFINITY (DBL_MAX+DBL_MAX) |
178 |
- #endif |
179 |
---- a/ext/intl/common/common_date.h |
180 |
-+++ b/ext/intl/common/common_date.h |
181 |
-@@ -28,6 +28,8 @@ U_CDECL_END |
182 |
- |
183 |
- #include <unicode/timezone.h> |
184 |
- |
185 |
-+using icu::TimeZone; |
186 |
-+ |
187 |
- U_CFUNC TimeZone *timezone_convert_datetimezone(int type, void *object, int is_datetime, intl_error *outside_error, const char *func); |
188 |
- U_CFUNC int intl_datetime_decompose(zval *z, double *millis, TimeZone **tz, |
189 |
- intl_error *err, const char *func); |
190 |
---- a/ext/intl/common/common_enum.h |
191 |
-+++ b/ext/intl/common/common_enum.h |
192 |
-@@ -75,6 +75,7 @@ U_CFUNC zval *zoi_with_current_get_current_data(zend_object_iterator *iter); |
193 |
- U_CFUNC void zoi_with_current_invalidate_current(zend_object_iterator *iter); |
194 |
- |
195 |
- #ifdef __cplusplus |
196 |
-+using icu::StringEnumeration; |
197 |
- U_CFUNC void IntlIterator_from_StringEnumeration(StringEnumeration *se, zval *object); |
198 |
- #endif |
199 |
- |
200 |
---- a/ext/intl/converter/converter.c |
201 |
-+++ b/ext/intl/converter/converter.c |
202 |
-@@ -18,6 +18,8 @@ |
203 |
- #include "zend_exceptions.h" |
204 |
- |
205 |
- #include <unicode/utypes.h> |
206 |
-+#include <unicode/utf8.h> |
207 |
-+#include <unicode/utf16.h> |
208 |
- #include <unicode/ucnv.h> |
209 |
- #include <unicode/ustring.h> |
210 |
- |
211 |
---- a/ext/intl/dateformat/dateformat_format_object.cpp |
212 |
-+++ b/ext/intl/dateformat/dateformat_format_object.cpp |
213 |
-@@ -33,6 +33,12 @@ extern "C" { |
214 |
- #include "../common/common_date.h" |
215 |
- } |
216 |
- |
217 |
-+using icu::Locale; |
218 |
-+using icu::DateFormat; |
219 |
-+using icu::GregorianCalendar; |
220 |
-+using icu::StringPiece; |
221 |
-+using icu::SimpleDateFormat; |
222 |
-+ |
223 |
- static const DateFormat::EStyle valid_styles[] = { |
224 |
- DateFormat::kNone, |
225 |
- DateFormat::kFull, |
226 |
---- a/ext/intl/dateformat/dateformat_helpers.cpp |
227 |
-+++ b/ext/intl/dateformat/dateformat_helpers.cpp |
228 |
-@@ -28,6 +28,8 @@ extern "C" { |
229 |
- #include "../calendar/calendar_class.h" |
230 |
- } |
231 |
- |
232 |
-+using icu::GregorianCalendar; |
233 |
-+ |
234 |
- int datefmt_process_calendar_arg(zval* calendar_zv, |
235 |
- Locale const& locale, |
236 |
- const char *func_name, |
237 |
---- a/ext/intl/dateformat/dateformat_helpers.h |
238 |
-+++ b/ext/intl/dateformat/dateformat_helpers.h |
239 |
-@@ -22,11 +22,16 @@ |
240 |
- #endif |
241 |
- |
242 |
- #include <unicode/calendar.h> |
243 |
-+#include <unicode/datefmt.h> |
244 |
- |
245 |
- extern "C" { |
246 |
- #include "../php_intl.h" |
247 |
- } |
248 |
- |
249 |
-+using icu::Locale; |
250 |
-+using icu::Calendar; |
251 |
-+using icu::DateFormat; |
252 |
-+ |
253 |
- int datefmt_process_calendar_arg(zval* calendar_zv, |
254 |
- Locale const& locale, |
255 |
- const char *func_name, |
256 |
---- a/ext/intl/grapheme/grapheme_string.c |
257 |
-+++ b/ext/intl/grapheme/grapheme_string.c |
258 |
-@@ -24,6 +24,7 @@ |
259 |
- #include "grapheme_util.h" |
260 |
- |
261 |
- #include <unicode/utypes.h> |
262 |
-+#include <unicode/utf8.h> |
263 |
- #include <unicode/ucol.h> |
264 |
- #include <unicode/ustring.h> |
265 |
- #include <unicode/ubrk.h> |
266 |
-@@ -835,10 +836,10 @@ PHP_FUNCTION(grapheme_extract) |
267 |
- pstr = str + start; |
268 |
- |
269 |
- /* just in case pstr points in the middle of a character, move forward to the start of the next char */ |
270 |
-- if ( !UTF8_IS_SINGLE(*pstr) && !U8_IS_LEAD(*pstr) ) { |
271 |
-- char *str_end = str + str_len; |
272 |
-+ if ( !U8_IS_SINGLE(*pstr) && !U8_IS_LEAD(*pstr) ) { |
273 |
-+ unsigned char *str_end = str + str_len; |
274 |
- |
275 |
-- while ( !UTF8_IS_SINGLE(*pstr) && !U8_IS_LEAD(*pstr) ) { |
276 |
-+ while ( !U8_IS_SINGLE(*pstr) && !U8_IS_LEAD(*pstr) ) { |
277 |
- pstr++; |
278 |
- if ( pstr >= str_end ) { |
279 |
- intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, |
280 |
---- a/ext/intl/intl_convertcpp.h |
281 |
-+++ b/ext/intl/intl_convertcpp.h |
282 |
-@@ -26,6 +26,8 @@ |
283 |
- #include <unicode/unistr.h> |
284 |
- #include <zend_types.h> |
285 |
- |
286 |
-+using icu::UnicodeString; |
287 |
-+ |
288 |
- int intl_stringFromChar(UnicodeString &ret, char *str, size_t str_len, UErrorCode *status); |
289 |
- |
290 |
- zend_string* intl_charFromString(const UnicodeString &from, UErrorCode *status); |
291 |
---- a/ext/intl/msgformat/msgformat_helpers.cpp |
292 |
-+++ b/ext/intl/msgformat/msgformat_helpers.cpp |
293 |
-@@ -78,6 +78,16 @@ MessageFormatAdapter::getMessagePattern(MessageFormat* m) { |
294 |
- #endif |
295 |
- U_NAMESPACE_END |
296 |
- |
297 |
-+using icu::Formattable; |
298 |
-+using icu::Format; |
299 |
-+using icu::DateFormat; |
300 |
-+using icu::MessageFormat; |
301 |
-+#ifdef HAS_MESSAGE_PATTERN |
302 |
-+using icu::MessagePattern; |
303 |
-+#endif |
304 |
-+using icu::MessageFormatAdapter; |
305 |
-+using icu::FieldPosition; |
306 |
-+ |
307 |
- U_CFUNC int32_t umsg_format_arg_count(UMessageFormat *fmt) |
308 |
- { |
309 |
- int32_t fmt_count = 0; |
310 |
-@@ -229,15 +239,16 @@ static HashTable *umsg_parse_format(MessageFormatter_object *mfo, |
311 |
- UnicodeString typeString = mp.getSubstring(type_part); |
312 |
- /* This is all based on the rules in the docs for MessageFormat |
313 |
- * @see http://icu-project.org/apiref/icu4c/classMessageFormat.html */ |
314 |
-- if (typeString == "number") { |
315 |
-+#define ASCII_LITERAL(s) UNICODE_STRING(s, sizeof(s)-1) |
316 |
-+ if (typeString == ASCII_LITERAL("number")) { |
317 |
- MessagePattern::Part style_part = mp.getPart(i + 1); /* Not advancing i */ |
318 |
- if (style_part.getType() == UMSGPAT_PART_TYPE_ARG_STYLE) { |
319 |
- UnicodeString styleString = mp.getSubstring(style_part); |
320 |
-- if (styleString == "integer") { |
321 |
-+ if (styleString == ASCII_LITERAL("integer")) { |
322 |
- type = Formattable::kInt64; |
323 |
-- } else if (styleString == "currency") { |
324 |
-+ } else if (styleString == ASCII_LITERAL("currency")) { |
325 |
- type = Formattable::kDouble; |
326 |
-- } else if (styleString == "percent") { |
327 |
-+ } else if (styleString == ASCII_LITERAL("percent")) { |
328 |
- type = Formattable::kDouble; |
329 |
- } else { /* some style invalid/unknown to us */ |
330 |
- type = Formattable::kDouble; |
331 |
-@@ -245,12 +256,13 @@ static HashTable *umsg_parse_format(MessageFormatter_object *mfo, |
332 |
- } else { // if missing style, part, make it a double |
333 |
- type = Formattable::kDouble; |
334 |
- } |
335 |
-- } else if ((typeString == "date") || (typeString == "time")) { |
336 |
-+ } else if ((typeString == ASCII_LITERAL("date")) || (typeString == ASCII_LITERAL("time"))) { |
337 |
- type = Formattable::kDate; |
338 |
-- } else if ((typeString == "spellout") || (typeString == "ordinal") |
339 |
-- || (typeString == "duration")) { |
340 |
-+ } else if ((typeString == ASCII_LITERAL("spellout")) || (typeString == ASCII_LITERAL("ordinal")) |
341 |
-+ || (typeString == ASCII_LITERAL("duration"))) { |
342 |
- type = Formattable::kDouble; |
343 |
- } |
344 |
-+#undef ASCII_LITERAL |
345 |
- } else { |
346 |
- /* If there's no UMSGPAT_PART_TYPE_ARG_TYPE right after a |
347 |
- * UMSGPAT_ARG_TYPE_SIMPLE argument, then the pattern |
348 |
---- a/ext/intl/normalizer/normalizer_normalize.c |
349 |
-+++ b/ext/intl/normalizer/normalizer_normalize.c |
350 |
-@@ -24,6 +24,7 @@ |
351 |
- #include "normalizer_class.h" |
352 |
- #include "normalizer_normalize.h" |
353 |
- #include "intl_convert.h" |
354 |
-+#include <unicode/utf8.h> |
355 |
- |
356 |
- /* {{{ proto string Normalizer::normalize( string $input [, string $form = FORM_C] ) |
357 |
- * Normalize a string. }}} */ |
358 |
---- a/ext/intl/timezone/timezone_class.cpp |
359 |
-+++ b/ext/intl/timezone/timezone_class.cpp |
360 |
-@@ -37,6 +37,8 @@ extern "C" { |
361 |
- #include <ext/date/php_date.h> |
362 |
- } |
363 |
- |
364 |
-+using icu::Calendar; |
365 |
-+ |
366 |
- /* {{{ Global variables */ |
367 |
- U_CDECL_BEGIN |
368 |
- zend_class_entry *TimeZone_ce_ptr = NULL; |
369 |
---- a/ext/intl/timezone/timezone_class.h |
370 |
-+++ b/ext/intl/timezone/timezone_class.h |
371 |
-@@ -29,6 +29,8 @@ |
372 |
- |
373 |
- #ifndef USE_TIMEZONE_POINTER |
374 |
- typedef void TimeZone; |
375 |
-+#else |
376 |
-+using icu::TimeZone; |
377 |
- #endif |
378 |
- |
379 |
- typedef struct { |
380 |
---- a/ext/intl/timezone/timezone_methods.cpp |
381 |
-+++ b/ext/intl/timezone/timezone_methods.cpp |
382 |
-@@ -23,6 +23,7 @@ |
383 |
- #include <unicode/locid.h> |
384 |
- #include <unicode/timezone.h> |
385 |
- #include <unicode/ustring.h> |
386 |
-+#include <unicode/calendar.h> |
387 |
- #include "intl_convertcpp.h" |
388 |
- |
389 |
- #include "../common/common_date.h" |
390 |
-@@ -37,6 +38,9 @@ extern "C" { |
391 |
- } |
392 |
- #include "common/common_enum.h" |
393 |
- |
394 |
-+using icu::Locale; |
395 |
-+using icu::Calendar; |
396 |
-+ |
397 |
- U_CFUNC PHP_METHOD(IntlTimeZone, __construct) |
398 |
- { |
399 |
- zend_throw_exception( NULL, |
400 |
---- a/ext/intl/uchar/uchar.c |
401 |
-+++ b/ext/intl/uchar/uchar.c |
402 |
-@@ -3,6 +3,7 @@ |
403 |
- #include "intl_convert.h" |
404 |
- |
405 |
- #include <unicode/uchar.h> |
406 |
-+#include <unicode/utf8.h> |
407 |
- |
408 |
- #define IC_METHOD(mname) PHP_METHOD(IntlChar, mname) |
409 |
- |
410 |
--- |
411 |
-2.19.2 |
412 |
- |
413 |
|
414 |
diff --git a/dev-lang/php/php-7.1.33.ebuild b/dev-lang/php/php-7.1.33.ebuild |
415 |
deleted file mode 100644 |
416 |
index 7ab761dd6e1..00000000000 |
417 |
--- a/dev-lang/php/php-7.1.33.ebuild |
418 |
+++ /dev/null |
419 |
@@ -1,739 +0,0 @@ |
420 |
-# Copyright 1999-2019 Gentoo Authors |
421 |
-# Distributed under the terms of the GNU General Public License v2 |
422 |
- |
423 |
-EAPI="7" |
424 |
- |
425 |
-inherit flag-o-matic systemd autotools |
426 |
- |
427 |
-DESCRIPTION="The PHP language runtime engine" |
428 |
-HOMEPAGE="https://php.net/" |
429 |
-SRC_URI="https://php.net/distributions/${P}.tar.xz" |
430 |
- |
431 |
-LICENSE="PHP-3.01 |
432 |
- BSD |
433 |
- Zend-2.0 |
434 |
- bcmath? ( LGPL-2.1+ ) |
435 |
- fpm? ( BSD-2 ) |
436 |
- gd? ( gd ) |
437 |
- unicode? ( BSD-2 LGPL-2.1 )" |
438 |
- |
439 |
-SLOT="$(ver_cut 1-2)" |
440 |
-KEYWORDS="~alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" |
441 |
- |
442 |
-# We can build the following SAPIs in the given order |
443 |
-SAPIS="embed cli cgi fpm apache2 phpdbg" |
444 |
- |
445 |
-# SAPIs and SAPI-specific USE flags (cli SAPI is default on): |
446 |
-IUSE="${IUSE} |
447 |
- ${SAPIS/cli/+cli} |
448 |
- threads" |
449 |
- |
450 |
-IUSE="${IUSE} acl bcmath berkdb bzip2 calendar cdb cjk |
451 |
- coverage crypt +ctype curl debug |
452 |
- enchant exif +fileinfo +filter firebird |
453 |
- +flatfile ftp gd gdbm gmp +hash +iconv imap inifile |
454 |
- intl iodbc ipv6 +json kerberos ldap ldap-sasl libedit libressl |
455 |
- mhash mssql mysql mysqli nls |
456 |
- oci8-instant-client odbc +opcache pcntl pdo +phar +posix postgres qdbm |
457 |
- readline recode selinux +session session-mm sharedmem |
458 |
- +simplexml snmp soap sockets spell sqlite ssl |
459 |
- sysvipc systemd test tidy +tokenizer truetype unicode wddx webp |
460 |
- +xml xmlreader xmlwriter xmlrpc xpm xslt zip zlib" |
461 |
- |
462 |
-# The supported (that is, autodetected) versions of BDB are listed in |
463 |
-# the ./configure script. Other versions *work*, but we need to stick to |
464 |
-# the ones that can be detected to avoid a repeat of bug #564824. |
465 |
-COMMON_DEPEND=" |
466 |
- >=app-eselect/eselect-php-0.9.1[apache2?,fpm?] |
467 |
- >=dev-libs/libpcre-8.32[unicode] |
468 |
- fpm? ( acl? ( sys-apps/acl ) ) |
469 |
- apache2? ( www-servers/apache[apache2_modules_unixd(+),threads=] ) |
470 |
- berkdb? ( || ( sys-libs/db:5.3 |
471 |
- sys-libs/db:5.1 |
472 |
- sys-libs/db:4.8 |
473 |
- sys-libs/db:4.7 |
474 |
- sys-libs/db:4.6 |
475 |
- sys-libs/db:4.5 ) ) |
476 |
- bzip2? ( app-arch/bzip2:0= ) |
477 |
- cdb? ( || ( dev-db/cdb dev-db/tinycdb ) ) |
478 |
- coverage? ( dev-util/lcov ) |
479 |
- crypt? ( >=dev-libs/libmcrypt-2.4 ) |
480 |
- curl? ( >=net-misc/curl-7.10.5 ) |
481 |
- enchant? ( <app-text/enchant-2.0:0 ) |
482 |
- firebird? ( dev-db/firebird ) |
483 |
- gd? ( virtual/jpeg:0 media-libs/libpng:0= sys-libs/zlib ) |
484 |
- gdbm? ( >=sys-libs/gdbm-1.8.0:0= ) |
485 |
- gmp? ( dev-libs/gmp:0= ) |
486 |
- iconv? ( virtual/libiconv ) |
487 |
- imap? ( >=virtual/imap-c-client-2[kerberos=,ssl=] ) |
488 |
- intl? ( dev-libs/icu:= ) |
489 |
- iodbc? ( dev-db/libiodbc ) |
490 |
- kerberos? ( virtual/krb5 ) |
491 |
- ldap? ( >=net-nds/openldap-1.2.11 ) |
492 |
- ldap-sasl? ( dev-libs/cyrus-sasl >=net-nds/openldap-1.2.11 ) |
493 |
- libedit? ( || ( sys-freebsd/freebsd-lib dev-libs/libedit ) ) |
494 |
- mssql? ( dev-db/freetds[mssql] ) |
495 |
- nls? ( sys-devel/gettext ) |
496 |
- oci8-instant-client? ( dev-db/oracle-instantclient-basic ) |
497 |
- odbc? ( >=dev-db/unixODBC-1.8.13 ) |
498 |
- postgres? ( dev-db/postgresql:* ) |
499 |
- qdbm? ( dev-db/qdbm ) |
500 |
- readline? ( sys-libs/readline:0= ) |
501 |
- recode? ( app-text/recode ) |
502 |
- session-mm? ( dev-libs/mm ) |
503 |
- simplexml? ( >=dev-libs/libxml2-2.6.8 ) |
504 |
- snmp? ( >=net-analyzer/net-snmp-5.2 ) |
505 |
- soap? ( >=dev-libs/libxml2-2.6.8 ) |
506 |
- spell? ( >=app-text/aspell-0.50 ) |
507 |
- sqlite? ( >=dev-db/sqlite-3.7.6.3 ) |
508 |
- ssl? ( |
509 |
- !libressl? ( dev-libs/openssl:0= ) |
510 |
- libressl? ( dev-libs/libressl:0= ) |
511 |
- ) |
512 |
- tidy? ( || ( app-text/tidy-html5 app-text/htmltidy ) ) |
513 |
- truetype? ( =media-libs/freetype-2* ) |
514 |
- unicode? ( dev-libs/oniguruma:= ) |
515 |
- wddx? ( >=dev-libs/libxml2-2.6.8 ) |
516 |
- webp? ( media-libs/libwebp:0= ) |
517 |
- xml? ( >=dev-libs/libxml2-2.6.8 ) |
518 |
- xmlrpc? ( >=dev-libs/libxml2-2.6.8 virtual/libiconv ) |
519 |
- xmlreader? ( >=dev-libs/libxml2-2.6.8 ) |
520 |
- xmlwriter? ( >=dev-libs/libxml2-2.6.8 ) |
521 |
- xpm? ( x11-libs/libXpm ) |
522 |
- xslt? ( dev-libs/libxslt >=dev-libs/libxml2-2.6.8 ) |
523 |
- zip? ( sys-libs/zlib:0= ) |
524 |
- zlib? ( sys-libs/zlib:0= ) |
525 |
-" |
526 |
- |
527 |
-RDEPEND="${COMMON_DEPEND} |
528 |
- virtual/mta |
529 |
- fpm? ( |
530 |
- selinux? ( sec-policy/selinux-phpfpm ) |
531 |
- systemd? ( sys-apps/systemd ) )" |
532 |
- |
533 |
-# Bison isn't actually needed when building from a release tarball |
534 |
-# However, the configure script will warn if it's absent or if you |
535 |
-# have an incompatible version installed. See bug 593278. |
536 |
-DEPEND="${COMMON_DEPEND} |
537 |
- app-arch/xz-utils |
538 |
- >=sys-devel/bison-3.0.1" |
539 |
- |
540 |
-BDEPEND="virtual/pkgconfig" |
541 |
- |
542 |
-# Without USE=readline or libedit, the interactive "php -a" CLI will hang. |
543 |
-REQUIRED_USE=" |
544 |
- || ( cli cgi fpm apache2 embed phpdbg ) |
545 |
- cli? ( ^^ ( readline libedit ) ) |
546 |
- truetype? ( gd zlib ) |
547 |
- webp? ( gd zlib ) |
548 |
- cjk? ( gd zlib ) |
549 |
- exif? ( gd zlib ) |
550 |
- xpm? ( gd zlib ) |
551 |
- gd? ( zlib ) |
552 |
- simplexml? ( xml ) |
553 |
- soap? ( xml ) |
554 |
- wddx? ( xml ) |
555 |
- xmlrpc? ( || ( xml iconv ) ) |
556 |
- xmlreader? ( xml ) |
557 |
- xslt? ( xml ) |
558 |
- ldap-sasl? ( ldap ) |
559 |
- mhash? ( hash ) |
560 |
- phar? ( hash ) |
561 |
- qdbm? ( !gdbm ) |
562 |
- readline? ( !libedit ) |
563 |
- recode? ( !imap !mysqli !mysql ) |
564 |
- session-mm? ( session !threads ) |
565 |
- mysql? ( hash || ( mysqli pdo ) ) |
566 |
- mysqli? ( hash ) |
567 |
-" |
568 |
- |
569 |
-RESTRICT="!test? ( test )" |
570 |
- |
571 |
-PATCHES=( |
572 |
- "${FILESDIR}/php-freetype-2.9.1.patch" |
573 |
- "${FILESDIR}/php-7.1.25-intl-use-icu-namespace.patch" |
574 |
-) |
575 |
- |
576 |
-PHP_MV="$(ver_cut 1)" |
577 |
- |
578 |
-php_install_ini() { |
579 |
- local phpsapi="${1}" |
580 |
- |
581 |
- # work out where we are installing the ini file |
582 |
- php_set_ini_dir "${phpsapi}" |
583 |
- |
584 |
- # Always install the production INI file, bug 611214. |
585 |
- local phpinisrc="php.ini-production-${phpsapi}" |
586 |
- cp php.ini-production "${phpinisrc}" || die |
587 |
- |
588 |
- # default to /tmp for save_path, bug #282768 |
589 |
- sed -e 's|^;session.save_path .*$|session.save_path = "'"${EPREFIX}"'/tmp"|g' -i "${phpinisrc}" || die |
590 |
- |
591 |
- # Set the extension dir |
592 |
- sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" \ |
593 |
- -i "${phpinisrc}" || die |
594 |
- |
595 |
- # Set the include path to point to where we want to find PEAR packages |
596 |
- sed -e 's|^;include_path = ".:/php/includes".*|include_path = ".:'"${EPREFIX}"'/usr/share/php'${PHP_MV}':'"${EPREFIX}"'/usr/share/php"|' -i "${phpinisrc}" || die |
597 |
- |
598 |
- dodir "${PHP_INI_DIR#${EPREFIX}}" |
599 |
- insinto "${PHP_INI_DIR#${EPREFIX}}" |
600 |
- newins "${phpinisrc}" php.ini |
601 |
- |
602 |
- elog "Installing php.ini for ${phpsapi} into ${PHP_INI_DIR#${EPREFIX}}" |
603 |
- elog |
604 |
- |
605 |
- dodir "${PHP_EXT_INI_DIR#${EPREFIX}}" |
606 |
- dodir "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}" |
607 |
- |
608 |
- if use opcache; then |
609 |
- elog "Adding opcache to $PHP_EXT_INI_DIR" |
610 |
- echo "zend_extension=${PHP_DESTDIR}/$(get_libdir)/opcache.so" >> \ |
611 |
- "${D}/${PHP_EXT_INI_DIR}"/opcache.ini |
612 |
- dosym "${PHP_EXT_INI_DIR#${EPREFIX}}/opcache.ini" \ |
613 |
- "${PHP_EXT_INI_DIR_ACTIVE#${EPREFIX}}/opcache.ini" |
614 |
- fi |
615 |
- |
616 |
- # SAPI-specific handling |
617 |
- if [[ "${sapi}" == "fpm" ]] ; then |
618 |
- einfo "Installing FPM config files php-fpm.conf and www.conf" |
619 |
- insinto "${PHP_INI_DIR#${EPREFIX}}" |
620 |
- doins sapi/fpm/php-fpm.conf |
621 |
- insinto "${PHP_INI_DIR#${EPREFIX}}/fpm.d" |
622 |
- doins sapi/fpm/www.conf |
623 |
- fi |
624 |
- |
625 |
- dodoc php.ini-{development,production} |
626 |
-} |
627 |
- |
628 |
-php_set_ini_dir() { |
629 |
- PHP_INI_DIR="${EPREFIX}/etc/php/${1}-php${SLOT}" |
630 |
- PHP_EXT_INI_DIR="${PHP_INI_DIR}/ext" |
631 |
- PHP_EXT_INI_DIR_ACTIVE="${PHP_INI_DIR}/ext-active" |
632 |
-} |
633 |
- |
634 |
-src_prepare() { |
635 |
- default |
636 |
- |
637 |
- # In php-7.x, the FPM pool configuration files have been split off |
638 |
- # of the main config. By default the pool config files go in |
639 |
- # e.g. /etc/php-fpm.d, which isn't slotted. So here we move the |
640 |
- # include directory to a subdirectory "fpm.d" of $PHP_INI_DIR. Later |
641 |
- # we'll install the pool configuration file "www.conf" there. |
642 |
- php_set_ini_dir fpm |
643 |
- sed -i "s~^include=.*$~include=${PHP_INI_DIR}/fpm.d/*.conf~" \ |
644 |
- sapi/fpm/php-fpm.conf.in \ |
645 |
- || die 'failed to move the include directory in php-fpm.conf' |
646 |
- |
647 |
- # Bug 669566 - necessary so that build tools are updated for commands like pecl |
648 |
- # Force rebuilding aclocal.m4 |
649 |
- rm -f aclocal.m4 || die "failed to remove aclocal.m4 in src_prepare" |
650 |
- eautoreconf |
651 |
-} |
652 |
- |
653 |
-src_configure() { |
654 |
- addpredict /usr/share/snmp/mibs/.index #nowarn |
655 |
- addpredict /var/lib/net-snmp/mib_indexes #nowarn |
656 |
- |
657 |
- PHP_DESTDIR="${EPREFIX}/usr/$(get_libdir)/php${SLOT}" |
658 |
- |
659 |
- # The php-fpm config file wants localstatedir to be ${EPREFIX}/var |
660 |
- # and not the Gentoo default ${EPREFIX}/var/lib. See bug 572002. |
661 |
- local our_conf=( |
662 |
- --prefix="${PHP_DESTDIR}" |
663 |
- --mandir="${PHP_DESTDIR}/man" |
664 |
- --infodir="${PHP_DESTDIR}/info" |
665 |
- --libdir="${PHP_DESTDIR}/lib" |
666 |
- --with-libdir="$(get_libdir)" |
667 |
- --localstatedir="${EPREFIX}/var" |
668 |
- --without-pear |
669 |
- $(use_enable threads maintainer-zts) |
670 |
- ) |
671 |
- |
672 |
- our_conf+=( |
673 |
- $(use_enable bcmath bcmath) |
674 |
- $(use_with bzip2 bz2 "${EPREFIX}/usr") |
675 |
- $(use_enable calendar calendar) |
676 |
- $(use_enable coverage gcov) |
677 |
- $(use_enable ctype ctype) |
678 |
- $(use_with curl curl "${EPREFIX}/usr") |
679 |
- $(use_enable xml dom) |
680 |
- $(use_with enchant enchant "${EPREFIX}/usr") |
681 |
- $(use_enable exif exif) |
682 |
- $(use_enable fileinfo fileinfo) |
683 |
- $(use_enable filter filter) |
684 |
- $(use_enable ftp ftp) |
685 |
- $(use_with nls gettext "${EPREFIX}/usr") |
686 |
- $(use_with gmp gmp "${EPREFIX}/usr") |
687 |
- $(use_enable hash hash) |
688 |
- $(use_with mhash mhash "${EPREFIX}/usr") |
689 |
- $(use_with iconv iconv \ |
690 |
- $(use elibc_glibc || use elibc_musl || use elibc_FreeBSD || echo "${EPREFIX}/usr")) |
691 |
- $(use_enable intl intl) |
692 |
- $(use_enable ipv6 ipv6) |
693 |
- $(use_enable json json) |
694 |
- $(use_with kerberos kerberos "${EPREFIX}/usr") |
695 |
- $(use_enable xml libxml) |
696 |
- $(use_with xml libxml-dir "${EPREFIX}/usr") |
697 |
- $(use_enable unicode mbstring) |
698 |
- $(use_with crypt mcrypt "${EPREFIX}/usr") |
699 |
- $(use_with unicode onig "${EPREFIX}/usr") |
700 |
- $(use_with ssl openssl "${EPREFIX}/usr") |
701 |
- $(use_with ssl openssl-dir "${EPREFIX}/usr") |
702 |
- $(use_enable pcntl pcntl) |
703 |
- $(use_enable phar phar) |
704 |
- $(use_enable pdo pdo) |
705 |
- $(use_enable opcache opcache) |
706 |
- $(use_with postgres pgsql "${EPREFIX}/usr") |
707 |
- $(use_enable posix posix) |
708 |
- $(use_with spell pspell "${EPREFIX}/usr") |
709 |
- $(use_with recode recode "${EPREFIX}/usr") |
710 |
- $(use_enable simplexml simplexml) |
711 |
- $(use_enable sharedmem shmop) |
712 |
- $(use_with snmp snmp "${EPREFIX}/usr") |
713 |
- $(use_enable soap soap) |
714 |
- $(use_enable sockets sockets) |
715 |
- $(use_with sqlite sqlite3 "${EPREFIX}/usr") |
716 |
- $(use_enable sysvipc sysvmsg) |
717 |
- $(use_enable sysvipc sysvsem) |
718 |
- $(use_enable sysvipc sysvshm) |
719 |
- $(use_with tidy tidy "${EPREFIX}/usr") |
720 |
- $(use_enable tokenizer tokenizer) |
721 |
- $(use_enable wddx wddx) |
722 |
- $(use_enable xml xml) |
723 |
- $(use_enable xmlreader xmlreader) |
724 |
- $(use_enable xmlwriter xmlwriter) |
725 |
- $(use_with xmlrpc xmlrpc) |
726 |
- $(use_with xslt xsl "${EPREFIX}/usr") |
727 |
- $(use_enable zip zip) |
728 |
- $(use_with zlib zlib "${EPREFIX}/usr") |
729 |
- $(use_enable debug debug) |
730 |
- ) |
731 |
- |
732 |
- # DBA support |
733 |
- if use cdb || use berkdb || use flatfile || use gdbm || use inifile \ |
734 |
- || use qdbm ; then |
735 |
- our_conf+=( "--enable-dba${shared}" ) |
736 |
- fi |
737 |
- |
738 |
- # DBA drivers support |
739 |
- our_conf+=( |
740 |
- $(use_with cdb cdb) |
741 |
- $(use_with berkdb db4 "${EPREFIX}/usr") |
742 |
- $(use_enable flatfile flatfile) |
743 |
- $(use_with gdbm gdbm "${EPREFIX}/usr") |
744 |
- $(use_enable inifile inifile) |
745 |
- $(use_with qdbm qdbm "${EPREFIX}/usr") |
746 |
- ) |
747 |
- |
748 |
- # Support for the GD graphics library |
749 |
- our_conf+=( |
750 |
- $(use_with truetype freetype-dir "${EPREFIX}/usr") |
751 |
- $(use_enable cjk gd-jis-conv) |
752 |
- $(use_with gd jpeg-dir "${EPREFIX}/usr") |
753 |
- $(use_with gd png-dir "${EPREFIX}/usr") |
754 |
- $(use_with xpm xpm-dir "${EPREFIX}/usr") |
755 |
- ) |
756 |
- if use webp; then |
757 |
- our_conf+=( --with-webp-dir="${EPREFIX}/usr" ) |
758 |
- fi |
759 |
- # enable gd last, so configure can pick up the previous settings |
760 |
- our_conf+=( $(use_with gd gd) ) |
761 |
- |
762 |
- # IMAP support |
763 |
- if use imap ; then |
764 |
- our_conf+=( |
765 |
- $(use_with imap imap "${EPREFIX}/usr") |
766 |
- $(use_with ssl imap-ssl "${EPREFIX}/usr") |
767 |
- ) |
768 |
- fi |
769 |
- |
770 |
- # Interbase/firebird support |
771 |
- our_conf+=( $(use_with firebird interbase "${EPREFIX}/usr") ) |
772 |
- |
773 |
- # LDAP support |
774 |
- if use ldap ; then |
775 |
- our_conf+=( |
776 |
- $(use_with ldap ldap "${EPREFIX}/usr") |
777 |
- $(use_with ldap-sasl ldap-sasl "${EPREFIX}/usr") |
778 |
- ) |
779 |
- fi |
780 |
- |
781 |
- # MySQL support |
782 |
- local mysqllib="mysqlnd" |
783 |
- local mysqlilib="mysqlnd" |
784 |
- |
785 |
- our_conf+=( $(use_with mysqli mysqli "${mysqlilib}") ) |
786 |
- |
787 |
- local mysqlsock="${EPREFIX}/var/run/mysqld/mysqld.sock" |
788 |
- if use mysql || use mysqli ; then |
789 |
- our_conf+=( $(use_with mysql mysql-sock "${mysqlsock}") ) |
790 |
- fi |
791 |
- |
792 |
- # ODBC support |
793 |
- our_conf+=( |
794 |
- $(use_with odbc unixODBC "${EPREFIX}/usr") |
795 |
- $(use_with iodbc iodbc "${EPREFIX}/usr") |
796 |
- ) |
797 |
- |
798 |
- # Oracle support |
799 |
- our_conf+=( $(use_with oci8-instant-client oci8) ) |
800 |
- |
801 |
- # PDO support |
802 |
- if use pdo ; then |
803 |
- our_conf+=( |
804 |
- $(use_with mssql pdo-dblib "${EPREFIX}/usr") |
805 |
- $(use_with mysql pdo-mysql "${mysqllib}") |
806 |
- $(use_with postgres pdo-pgsql) |
807 |
- $(use_with sqlite pdo-sqlite "${EPREFIX}/usr") |
808 |
- $(use_with firebird pdo-firebird "${EPREFIX}/usr") |
809 |
- $(use_with odbc pdo-odbc "unixODBC,${EPREFIX}/usr") |
810 |
- $(use_with oci8-instant-client pdo-oci) |
811 |
- ) |
812 |
- fi |
813 |
- |
814 |
- # readline/libedit support |
815 |
- our_conf+=( |
816 |
- $(use_with readline readline "${EPREFIX}/usr") |
817 |
- $(use_with libedit libedit "${EPREFIX}/usr") |
818 |
- ) |
819 |
- |
820 |
- # Session support |
821 |
- if use session ; then |
822 |
- our_conf+=( $(use_with session-mm mm "${EPREFIX}/usr") ) |
823 |
- else |
824 |
- our_conf+=( $(use_enable session session) ) |
825 |
- fi |
826 |
- |
827 |
- # Use pic for shared modules such as apache2's mod_php |
828 |
- our_conf+=( --with-pic ) |
829 |
- |
830 |
- # we use the system copy of pcre |
831 |
- # --with-pcre-regex affects ext/pcre |
832 |
- # --with-pcre-dir affects ext/filter and ext/zip |
833 |
- our_conf+=( |
834 |
- --with-pcre-regex="${EPREFIX}/usr" |
835 |
- --with-pcre-dir="${EPREFIX}/usr" |
836 |
- ) |
837 |
- |
838 |
- # Catch CFLAGS problems |
839 |
- # Fixes bug #14067. |
840 |
- # Changed order to run it in reverse for bug #32022 and #12021. |
841 |
- replace-cpu-flags "k6*" "i586" |
842 |
- |
843 |
- # Cache the ./configure test results between SAPIs. |
844 |
- our_conf+=( --cache-file="${T}/config.cache" ) |
845 |
- |
846 |
- # Support user-passed configuration parameters |
847 |
- our_conf+=( ${EXTRA_ECONF:-} ) |
848 |
- |
849 |
- # Support the Apache2 extras, they must be set globally for all |
850 |
- # SAPIs to work correctly, especially for external PHP extensions |
851 |
- |
852 |
- mkdir -p "${WORKDIR}/sapis-build" || die |
853 |
- for one_sapi in $SAPIS ; do |
854 |
- use "${one_sapi}" || continue |
855 |
- php_set_ini_dir "${one_sapi}" |
856 |
- |
857 |
- # The BUILD_DIR variable is used to determine where to output |
858 |
- # the files that autotools creates. This was all originally |
859 |
- # based on the autotools-utils eclass. |
860 |
- BUILD_DIR="${WORKDIR}/sapis-build/${one_sapi}" |
861 |
- cp -a "${S}" "${BUILD_DIR}" || die |
862 |
- cd "${BUILD_DIR}" || die |
863 |
- |
864 |
- local sapi_conf=( |
865 |
- --with-config-file-path="${PHP_INI_DIR}" |
866 |
- --with-config-file-scan-dir="${PHP_EXT_INI_DIR_ACTIVE}" |
867 |
- ) |
868 |
- |
869 |
- for sapi in $SAPIS ; do |
870 |
- case "$sapi" in |
871 |
- cli|cgi|embed|fpm|phpdbg) |
872 |
- if [[ "${one_sapi}" == "${sapi}" ]] ; then |
873 |
- sapi_conf+=( "--enable-${sapi}" ) |
874 |
- if [[ "fpm" == "${sapi}" ]] ; then |
875 |
- sapi_conf+=( |
876 |
- $(use_with acl fpm-acl) |
877 |
- $(use_with systemd fpm-systemd) |
878 |
- ) |
879 |
- fi |
880 |
- else |
881 |
- sapi_conf+=( "--disable-${sapi}" ) |
882 |
- fi |
883 |
- ;; |
884 |
- |
885 |
- apache2) |
886 |
- if [[ "${one_sapi}" == "${sapi}" ]] ; then |
887 |
- sapi_conf+=( --with-apxs2="${EPREFIX}/usr/bin/apxs" ) |
888 |
- else |
889 |
- sapi_conf+=( --without-apxs2 ) |
890 |
- fi |
891 |
- ;; |
892 |
- esac |
893 |
- done |
894 |
- |
895 |
- # Construct the $myeconfargs array by concatenating $our_conf |
896 |
- # (the common args) and $sapi_conf (the SAPI-specific args). |
897 |
- local myeconfargs=( "${our_conf[@]}" ) |
898 |
- myeconfargs+=( "${sapi_conf[@]}" ) |
899 |
- |
900 |
- pushd "${BUILD_DIR}" > /dev/null || die |
901 |
- econf "${myeconfargs[@]}" |
902 |
- popd > /dev/null || die |
903 |
- done |
904 |
-} |
905 |
- |
906 |
-src_compile() { |
907 |
- # snmp seems to run during src_compile, too (bug #324739) |
908 |
- addpredict /usr/share/snmp/mibs/.index #nowarn |
909 |
- addpredict /var/lib/net-snmp/mib_indexes #nowarn |
910 |
- |
911 |
- for sapi in ${SAPIS} ; do |
912 |
- if use "${sapi}"; then |
913 |
- cd "${WORKDIR}/sapis-build/$sapi" || \ |
914 |
- die "Failed to change dir to ${WORKDIR}/sapis-build/$1" |
915 |
- emake |
916 |
- fi |
917 |
- done |
918 |
-} |
919 |
- |
920 |
-src_install() { |
921 |
- # see bug #324739 for what happens when we don't have that |
922 |
- addpredict /usr/share/snmp/mibs/.index #nowarn |
923 |
- |
924 |
- # grab the first SAPI that got built and install common files from there |
925 |
- local first_sapi="" |
926 |
- for sapi in $SAPIS ; do |
927 |
- if use $sapi ; then |
928 |
- first_sapi=$sapi |
929 |
- break |
930 |
- fi |
931 |
- done |
932 |
- |
933 |
- # Makefile forgets to create this before trying to write to it... |
934 |
- dodir "${PHP_DESTDIR#${EPREFIX}}/bin" |
935 |
- |
936 |
- # Install php environment (without any sapis) |
937 |
- cd "${WORKDIR}/sapis-build/$first_sapi" || die |
938 |
- emake INSTALL_ROOT="${D}" \ |
939 |
- install-build install-headers install-programs |
940 |
- |
941 |
- local extension_dir="$("${ED}/${PHP_DESTDIR#${EPREFIX}}/bin/php-config" --extension-dir)" |
942 |
- |
943 |
- # Create the directory where we'll put version-specific php scripts |
944 |
- keepdir "/usr/share/php${PHP_MV}" |
945 |
- |
946 |
- local sapi="", file="" |
947 |
- local sapi_list="" |
948 |
- |
949 |
- for sapi in ${SAPIS}; do |
950 |
- if use "${sapi}" ; then |
951 |
- einfo "Installing SAPI: ${sapi}" |
952 |
- cd "${WORKDIR}/sapis-build/${sapi}" || die |
953 |
- |
954 |
- if [[ "${sapi}" == "apache2" ]] ; then |
955 |
- # We're specifically not using emake install-sapi as libtool |
956 |
- # may cause unnecessary relink failures (see bug #351266) |
957 |
- insinto "${PHP_DESTDIR#${EPREFIX}}/apache2/" |
958 |
- newins ".libs/libphp${PHP_MV}$(get_libname)" \ |
959 |
- "libphp${PHP_MV}$(get_libname)" |
960 |
- keepdir "/usr/$(get_libdir)/apache2/modules" |
961 |
- else |
962 |
- # needed each time, php_install_ini would reset it |
963 |
- local dest="${PHP_DESTDIR#${EPREFIX}}" |
964 |
- into "${dest}" |
965 |
- case "$sapi" in |
966 |
- cli) |
967 |
- source="sapi/cli/php" |
968 |
- ;; |
969 |
- cgi) |
970 |
- source="sapi/cgi/php-cgi" |
971 |
- ;; |
972 |
- fpm) |
973 |
- source="sapi/fpm/php-fpm" |
974 |
- ;; |
975 |
- embed) |
976 |
- source="libs/libphp${PHP_MV}$(get_libname)" |
977 |
- ;; |
978 |
- phpdbg) |
979 |
- source="sapi/phpdbg/phpdbg" |
980 |
- ;; |
981 |
- *) |
982 |
- die "unhandled sapi in src_install" |
983 |
- ;; |
984 |
- esac |
985 |
- |
986 |
- if [[ "${source}" == *"$(get_libname)" ]]; then |
987 |
- dolib.so "${source}" |
988 |
- else |
989 |
- dobin "${source}" |
990 |
- local name="$(basename ${source})" |
991 |
- dosym "${dest}/bin/${name}" "/usr/bin/${name}${SLOT}" |
992 |
- fi |
993 |
- fi |
994 |
- |
995 |
- php_install_ini "${sapi}" |
996 |
- |
997 |
- # construct correct SAPI string for php-config |
998 |
- # thanks to ferringb for the bash voodoo |
999 |
- if [[ "${sapi}" == "apache2" ]]; then |
1000 |
- sapi_list="${sapi_list:+${sapi_list} }apache2handler" |
1001 |
- else |
1002 |
- sapi_list="${sapi_list:+${sapi_list} }${sapi}" |
1003 |
- fi |
1004 |
- fi |
1005 |
- done |
1006 |
- |
1007 |
- # Installing opcache module |
1008 |
- if use opcache ; then |
1009 |
- into "${PHP_DESTDIR#${EPREFIX}}" |
1010 |
- dolib.so "modules/opcache$(get_libname)" |
1011 |
- fi |
1012 |
- |
1013 |
- # Install env.d files |
1014 |
- newenvd "${FILESDIR}/20php5-envd" "20php${SLOT}" |
1015 |
- sed -e "s|/lib/|/$(get_libdir)/|g" -i "${ED}/etc/env.d/20php${SLOT}" || die |
1016 |
- sed -e "s|php5|php${SLOT}|g" -i "${ED}/etc/env.d/20php${SLOT}" || die |
1017 |
- |
1018 |
- # set php-config variable correctly (bug #278439) |
1019 |
- sed -e "s:^\(php_sapis=\)\".*\"$:\1\"${sapi_list}\":" -i \ |
1020 |
- "${ED}/usr/$(get_libdir)/php${SLOT}/bin/php-config" || die |
1021 |
- |
1022 |
- if use fpm ; then |
1023 |
- if use systemd; then |
1024 |
- systemd_newunit "${FILESDIR}/php-fpm_at.service" \ |
1025 |
- "php-fpm@${SLOT}.service" |
1026 |
- else |
1027 |
- systemd_newunit "${FILESDIR}/php-fpm_at-simple.service" \ |
1028 |
- "php-fpm@${SLOT}.service" |
1029 |
- fi |
1030 |
- fi |
1031 |
-} |
1032 |
- |
1033 |
-src_test() { |
1034 |
- echo ">>> Test phase [test]: ${CATEGORY}/${PF}" |
1035 |
- PHP_BIN="${WORKDIR}/sapis-build/cli/sapi/cli/php" |
1036 |
- if [[ ! -x "${PHP_BIN}" ]] ; then |
1037 |
- ewarn "Test phase requires USE=cli, skipping" |
1038 |
- return |
1039 |
- else |
1040 |
- export TEST_PHP_EXECUTABLE="${PHP_BIN}" |
1041 |
- fi |
1042 |
- |
1043 |
- if [[ -x "${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi" ]] ; then |
1044 |
- export TEST_PHP_CGI_EXECUTABLE="${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi" |
1045 |
- fi |
1046 |
- |
1047 |
- if [[ -x "${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg" ]] ; then |
1048 |
- export TEST_PHPDBG_EXECUTABLE="${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg" |
1049 |
- fi |
1050 |
- |
1051 |
- REPORT_EXIT_STATUS=1 "${TEST_PHP_EXECUTABLE}" -n -d \ |
1052 |
- "session.save_path=${T}" \ |
1053 |
- "${WORKDIR}/sapis-build/cli/run-tests.php" -n -q -d \ |
1054 |
- "session.save_path=${T}" |
1055 |
- |
1056 |
- for name in ${EXPECTED_TEST_FAILURES}; do |
1057 |
- mv "${name}.out" "${name}.out.orig" 2>/dev/null || die |
1058 |
- done |
1059 |
- |
1060 |
- local failed="$(find -name '*.out')" |
1061 |
- if [[ ${failed} != "" ]] ; then |
1062 |
- ewarn "The following test cases failed unexpectedly:" |
1063 |
- for name in ${failed}; do |
1064 |
- ewarn " ${name/.out/}" |
1065 |
- done |
1066 |
- else |
1067 |
- einfo "No unexpected test failures, all fine" |
1068 |
- fi |
1069 |
- |
1070 |
- if [[ ${PHP_SHOW_UNEXPECTED_TEST_PASS} == "1" ]] ; then |
1071 |
- local passed="" |
1072 |
- for name in ${EXPECTED_TEST_FAILURES}; do |
1073 |
- [[ -f "${name}.diff" ]] && continue |
1074 |
- passed="${passed} ${name}" |
1075 |
- done |
1076 |
- if [[ ${passed} != "" ]] ; then |
1077 |
- einfo "The following test cases passed unexpectedly:" |
1078 |
- for name in ${passed}; do |
1079 |
- ewarn " ${passed}" |
1080 |
- done |
1081 |
- else |
1082 |
- einfo "None of the known-to-fail tests passed, all fine" |
1083 |
- fi |
1084 |
- fi |
1085 |
-} |
1086 |
- |
1087 |
-pkg_postinst() { |
1088 |
- # Output some general info to the user |
1089 |
- if use apache2 ; then |
1090 |
- elog |
1091 |
- elog "To enable PHP in apache, you will need to add \"-D PHP\" to" |
1092 |
- elog "your apache2 command. OpenRC users can append that string to" |
1093 |
- elog "APACHE2_OPTS in /etc/conf.d/apache2." |
1094 |
- elog |
1095 |
- elog "The apache module configuration file 70_mod_php.conf is" |
1096 |
- elog "provided (and maintained) by eselect-php." |
1097 |
- elog |
1098 |
- fi |
1099 |
- |
1100 |
- # Create the symlinks for php |
1101 |
- for m in ${SAPIS}; do |
1102 |
- [[ ${m} == 'embed' ]] && continue; |
1103 |
- if use $m ; then |
1104 |
- local ci=$(eselect php show $m) |
1105 |
- if [[ -z $ci ]]; then |
1106 |
- eselect php set $m php${SLOT} || die |
1107 |
- einfo "Switched ${m} to use php:${SLOT}" |
1108 |
- einfo |
1109 |
- elif [[ $ci != "php${SLOT}" ]] ; then |
1110 |
- elog "To switch $m to use php:${SLOT}, run" |
1111 |
- elog " eselect php set $m php${SLOT}" |
1112 |
- elog |
1113 |
- fi |
1114 |
- fi |
1115 |
- done |
1116 |
- |
1117 |
- # Remove dead symlinks for SAPIs that were just disabled. For |
1118 |
- # example, if the user has the cgi SAPI enabled, then he has an |
1119 |
- # eselect-php symlink for it. If he later reinstalls PHP with |
1120 |
- # USE="-cgi", that symlink will break. This call to eselect is |
1121 |
- # supposed to remove that dead link per bug 572436. |
1122 |
- eselect php cleanup || die |
1123 |
- |
1124 |
- if ! has "php${SLOT/./-}" ${PHP_TARGETS}; then |
1125 |
- elog "To build extensions for this version of PHP, you will need to" |
1126 |
- elog "add php${SLOT/./-} to your PHP_TARGETS USE_EXPAND variable." |
1127 |
- elog |
1128 |
- fi |
1129 |
- |
1130 |
- # Warn about the removal of PHP_INI_VERSION if the user has it set. |
1131 |
- if [[ -n "${PHP_INI_VERSION}" ]]; then |
1132 |
- ewarn 'The PHP_INI_VERSION variable has been phased out. You may' |
1133 |
- ewarn 'remove it from your configuration at your convenience. See' |
1134 |
- ewarn |
1135 |
- ewarn ' https://bugs.gentoo.org/611214' |
1136 |
- ewarn |
1137 |
- ewarn 'for more information.' |
1138 |
- fi |
1139 |
- |
1140 |
- elog "For details on how version slotting works, please see" |
1141 |
- elog "the wiki:" |
1142 |
- elog |
1143 |
- elog " https://wiki.gentoo.org/wiki/PHP" |
1144 |
- elog |
1145 |
-} |
1146 |
- |
1147 |
-pkg_postrm() { |
1148 |
- # This serves two purposes. First, if we have just removed the last |
1149 |
- # installed version of PHP, then this will remove any dead symlinks |
1150 |
- # belonging to eselect-php. Second, if a user upgrades slots from |
1151 |
- # (say) 5.6 to 7.0 and depcleans the old slot, then this will update |
1152 |
- # his existing symlinks to point to the new 7.0 installation. The |
1153 |
- # latter is bug 432962. |
1154 |
- # |
1155 |
- # Note: the eselect-php package may not be installed at this point, |
1156 |
- # so we can't die() if this command fails. |
1157 |
- eselect php cleanup |
1158 |
-} |
1159 |
|
1160 |
diff --git a/profiles/package.mask b/profiles/package.mask |
1161 |
index 08ea2d77ee7..ce060cdc478 100644 |
1162 |
--- a/profiles/package.mask |
1163 |
+++ b/profiles/package.mask |
1164 |
@@ -672,12 +672,6 @@ sci-libs/naga |
1165 |
sci-libs/spooles |
1166 |
sci-libs/vecmath-objectclub |
1167 |
|
1168 |
-# Brian Evans <grknight@g.o> (2019-12-19) |
1169 |
-# PHP 7.1 is end of life and has security issues Bug 703326 |
1170 |
-# Associated packages are not ready for new versions tracked in bug 702110 |
1171 |
-# Removal in 30 days |
1172 |
-dev-lang/php:7.1 |
1173 |
- |
1174 |
# Tomáš Mózes <hydrapolic@g.o> (2019-12-19) |
1175 |
# Needs more testing. |
1176 |
=app-emulation/xen-4.13.0 |