1 |
hoffie 07/11/09 22:44:31 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: php-5.2.5.ebuild |
5 |
Log: |
6 |
bump to php-5.2.5 |
7 |
(Portage version: 2.1.3.19) |
8 |
|
9 |
Revision Changes Path |
10 |
1.205 dev-lang/php/ChangeLog |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/php/ChangeLog?rev=1.205&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/php/ChangeLog?rev=1.205&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/php/ChangeLog?r1=1.204&r2=1.205 |
15 |
|
16 |
Index: ChangeLog |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/dev-lang/php/ChangeLog,v |
19 |
retrieving revision 1.204 |
20 |
retrieving revision 1.205 |
21 |
diff -u -r1.204 -r1.205 |
22 |
--- ChangeLog 3 Nov 2007 18:11:02 -0000 1.204 |
23 |
+++ ChangeLog 9 Nov 2007 22:44:30 -0000 1.205 |
24 |
@@ -1,6 +1,13 @@ |
25 |
# ChangeLog for dev-lang/php |
26 |
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 |
27 |
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/ChangeLog,v 1.204 2007/11/03 18:11:02 hoffie Exp $ |
28 |
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/ChangeLog,v 1.205 2007/11/09 22:44:30 hoffie Exp $ |
29 |
+ |
30 |
+*php-5.2.5 (09 Nov 2007) |
31 |
+ |
32 |
+ 09 Nov 2007; Christian Hoffmann <hoffie@g.o> +php-5.2.5.ebuild: |
33 |
+ bump to php-5.2.5, http://www.php.net/ChangeLog-5.php#5.2.5 |
34 |
+ Gentoo-wise improvements: zero or very little expected test failures, depending |
35 |
+ on the USE flags |
36 |
|
37 |
03 Nov 2007; Christian Hoffmann <hoffie@g.o> -php-5.1.6-r11.ebuild: |
38 |
removing php-5.1* |
39 |
|
40 |
|
41 |
|
42 |
1.1 dev-lang/php/php-5.2.5.ebuild |
43 |
|
44 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/php/php-5.2.5.ebuild?rev=1.1&view=markup |
45 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/php/php-5.2.5.ebuild?rev=1.1&content-type=text/plain |
46 |
|
47 |
Index: php-5.2.5.ebuild |
48 |
=================================================================== |
49 |
# Copyright 1999-2007 Gentoo Foundation |
50 |
# Distributed under the terms of the GNU General Public License v2 |
51 |
# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/php-5.2.5.ebuild,v 1.1 2007/11/09 22:44:30 hoffie Exp $ |
52 |
|
53 |
CGI_SAPI_USE="discard-path force-cgi-redirect" |
54 |
APACHE2_SAPI_USE="concurrentmodphp threads" |
55 |
IUSE="cli cgi ${CGI_SAPI_USE} ${APACHE2_SAPI_USE} fastbuild" |
56 |
|
57 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd" |
58 |
|
59 |
# NOTE: Portage doesn't support setting PROVIDE based on the USE flags |
60 |
# that have been enabled, so we have to PROVIDE everything for now |
61 |
# and hope for the best |
62 |
PROVIDE="virtual/php virtual/httpd-php" |
63 |
|
64 |
# php package settings |
65 |
SLOT="5" |
66 |
MY_PHP_PV="${PV}" |
67 |
MY_PHP_P="php-${MY_PHP_PV}" |
68 |
PHP_PACKAGE="1" |
69 |
|
70 |
# php patch settings, general |
71 |
PHP_PATCHSET_REV="0" |
72 |
SUHOSIN_PATCH="suhosin-patch-5.2.4_p20070914-0.9.6.2-gentoo-r1.patch.gz" |
73 |
MULTILIB_PATCH="${MY_PHP_PV}/opt/multilib-search-path.patch" |
74 |
# php patch settings, ebuild specific |
75 |
FASTBUILD_PATCH="${MY_PHP_PV}/opt/fastbuild.patch" |
76 |
CONCURRENTMODPHP_PATCH="${MY_PHP_PV}/opt/concurrent_apache_modules.patch" |
77 |
|
78 |
inherit versionator php5_2-sapi apache-module |
79 |
|
80 |
DESCRIPTION="The PHP language runtime engine: CLI, CGI and Apache2 SAPIs." |
81 |
|
82 |
DEPEND="app-admin/php-toolkit" |
83 |
RDEPEND="${DEPEND}" |
84 |
|
85 |
want_apache |
86 |
|
87 |
pkg_setup() { |
88 |
PHPCONFUTILS_AUTO_USE="" |
89 |
|
90 |
# Make sure the user has specified at least one SAPI |
91 |
einfo "Determining SAPI(s) to build" |
92 |
phpconfutils_require_any " Enabled SAPI:" " Disabled SAPI:" cli cgi apache2 |
93 |
|
94 |
# Threaded Apache2 support |
95 |
if use apache2 ; then |
96 |
if [[ "${APACHE_VERSION}" != "0" ]] ; then |
97 |
if ! use threads ; then |
98 |
APACHE2_SAFE_MPMS="itk peruser prefork" |
99 |
else |
100 |
APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker" |
101 |
fi |
102 |
|
103 |
ewarn |
104 |
ewarn "If this package fails with a fatal error about Apache2 not having" |
105 |
ewarn "been compiled with a compatible MPM, this is normally because you" |
106 |
ewarn "need to toggle the 'threads' USE flag." |
107 |
ewarn |
108 |
ewarn "If 'threads' is off, try switching it on." |
109 |
ewarn "If 'threads' is on, try switching it off." |
110 |
ewarn |
111 |
|
112 |
apache-module_pkg_setup |
113 |
fi |
114 |
fi |
115 |
|
116 |
# Concurrent PHP Apache2 modules support |
117 |
if use apache2 ; then |
118 |
if [[ "${APACHE_VERSION}" != "0" ]] ; then |
119 |
if use concurrentmodphp ; then |
120 |
ewarn |
121 |
ewarn "'concurrentmodphp' makes it possible to load multiple, differently" |
122 |
ewarn "versioned mod_php's into the same Apache instance. This is done with" |
123 |
ewarn "a few linker tricks and workarounds, and is not guaranteed to always" |
124 |
ewarn "work correctly, so use it at your own risk. Especially, do not use" |
125 |
ewarn "this in conjunction with PHP modules (PECL, ...) other than the ones" |
126 |
ewarn "you may find in the Portage tree or the PHP Overlay!" |
127 |
ewarn "This is an experimental feature, so please rebuild PHP" |
128 |
ewarn "without the 'concurrentmodphp' USE flag if you experience" |
129 |
ewarn "any problems, and then reproduce any bugs before filing" |
130 |
ewarn "them in Gentoo's Bugzilla or bugs.php.net." |
131 |
ewarn "If you have conclusive evidence that a bug directly" |
132 |
ewarn "derives from 'concurrentmodphp', please file a bug in" |
133 |
ewarn "Gentoo's Bugzilla only." |
134 |
ewarn |
135 |
ebeep 5 |
136 |
fi |
137 |
fi |
138 |
fi |
139 |
|
140 |
# fastbuild support |
141 |
if use fastbuild ; then |
142 |
ewarn |
143 |
ewarn "'fastbuild' attempts to build all SAPIs in a single pass." |
144 |
ewarn "This is an experimental feature, so please rebuild PHP" |
145 |
ewarn "without the 'fastbuild' USE flag if you experience" |
146 |
ewarn "any problems, and then reproduce any bugs before filing" |
147 |
ewarn "them in Gentoo's Bugzilla or bugs.php.net." |
148 |
ewarn "If you have conclusive evidence that a bug directly" |
149 |
ewarn "derives from 'fastbuild', please file a bug in" |
150 |
ewarn "Gentoo's Bugzilla only." |
151 |
ewarn |
152 |
fi |
153 |
|
154 |
php5_2-sapi_pkg_setup |
155 |
} |
156 |
|
157 |
php_determine_sapis() { |
158 |
# holds the list of sapis that we want to build |
159 |
PHPSAPIS= |
160 |
|
161 |
if use cli || phpconfutils_usecheck cli ; then |
162 |
PHPSAPIS="${PHPSAPIS} cli" |
163 |
fi |
164 |
|
165 |
if use cgi ; then |
166 |
PHPSAPIS="${PHPSAPIS} cgi" |
167 |
fi |
168 |
|
169 |
# note - apache SAPI comes after the simpler cli/cgi sapis |
170 |
if use apache2 ; then |
171 |
if [[ "${APACHE_VERSION}" != "0" ]] ; then |
172 |
PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}" |
173 |
fi |
174 |
fi |
175 |
} |
176 |
|
177 |
src_unpack() { |
178 |
if [[ "${PHP_PACKAGE}" == 1 ]] ; then |
179 |
unpack ${A} |
180 |
fi |
181 |
|
182 |
cd "${S}" |
183 |
|
184 |
# Concurrent PHP Apache2 modules support |
185 |
if use apache2 ; then |
186 |
if [[ "${APACHE_VERSION}" != "0" ]] ; then |
187 |
if use concurrentmodphp ; then |
188 |
if [[ -n "${CONCURRENTMODPHP_PATCH}" ]] && [[ -f "${WORKDIR}/${CONCURRENTMODPHP_PATCH}" ]] ; then |
189 |
epatch "${WORKDIR}/${CONCURRENTMODPHP_PATCH}" |
190 |
else |
191 |
ewarn "There is no concurrent mod_php patch available for this PHP release yet!" |
192 |
fi |
193 |
fi |
194 |
fi |
195 |
fi |
196 |
|
197 |
# fastbuild support |
198 |
if use fastbuild ; then |
199 |
if [[ -n "${FASTBUILD_PATCH}" ]] && [[ -f "${WORKDIR}/${FASTBUILD_PATCH}" ]] ; then |
200 |
epatch "${WORKDIR}/${FASTBUILD_PATCH}" |
201 |
else |
202 |
ewarn "There is no fastbuild patch available for this PHP release yet!" |
203 |
fi |
204 |
fi |
205 |
|
206 |
# Now let the eclass do the rest and regenerate the configure |
207 |
php5_2-sapi_src_unpack |
208 |
|
209 |
# Fix Makefile.global:test to consider the CGI SAPI if present |
210 |
if use cgi ; then |
211 |
sed -e "s|test \! -z \"\$(top_builddir)/php-cli\" \&\& test -x \"\$(top_builddir)/php-cli\"|test \! -z \"\$(top_builddir)/php-cli\" \&\& test -x \"\$(top_builddir)/php-cli\" \&\& test \! -z \"\$(top_builddir)/php-cgi\" \&\& test -x \"\$(top_builddir)/php-cgi\"|g" -i Makefile.global |
212 |
sed -e "s|TEST_PHP_EXECUTABLE=\"\$(top_builddir)/php-cli\"|TEST_PHP_EXECUTABLE=\"\$(top_builddir)/php-cli\" TEST_PHP_CGI_EXECUTABLE=\"\$(top_builddir)/php-cgi\"|g" -i Makefile.global |
213 |
fi |
214 |
|
215 |
# try to fix some test cases which fail because of sandbox otherwise |
216 |
sed -e 's:/no/such/:.\0:' -i ext/standard/tests/file/005_error.phpt \ |
217 |
ext/standard/tests/file/006_error.phpt \ |
218 |
ext/standard/tests/file/touch.phpt |
219 |
|
220 |
|
221 |
# REMOVING BROKEN TESTS: |
222 |
# removing this test as it has been broken for ages and is not easily |
223 |
# fixable (depends on a lot of factors) |
224 |
rm ext/standard/tests/general_functions/phpinfo.phpt |
225 |
|
226 |
# never worked properly, no easy fix |
227 |
rm ext/iconv/tests/bug16069.phpt ext/iconv/tests/iconv_stream_filter.phpt |
228 |
} |
229 |
|
230 |
src_compile() { |
231 |
if use fastbuild && [[ -n "${FASTBUILD_PATCH}" ]] ; then |
232 |
src_compile_fastbuild |
233 |
else |
234 |
src_compile_normal |
235 |
fi |
236 |
} |
237 |
|
238 |
src_compile_fastbuild() { |
239 |
php_determine_sapis |
240 |
|
241 |
build_cli=0 |
242 |
build_cgi=0 |
243 |
build_apache2=0 |
244 |
my_conf="" |
245 |
|
246 |
for x in ${PHPSAPIS} ; do |
247 |
case ${x} in |
248 |
cli) |
249 |
build_cli=1 |
250 |
;; |
251 |
cgi) |
252 |
build_cgi=1 |
253 |
;; |
254 |
apache2) |
255 |
build_apache2=1 |
256 |
;; |
257 |
esac |
258 |
done |
259 |
|
260 |
if [[ ${build_cli} = 1 ]] ; then |
261 |
my_conf="${my_conf} --enable-cli" |
262 |
else |
263 |
my_conf="${my_conf} --disable-cli" |
264 |
fi |
265 |
|
266 |
if [[ ${build_cgi} = 1 ]] ; then |
267 |
my_conf="${my_conf} --enable-cgi --enable-fastcgi" |
268 |
phpconfutils_extension_enable "discard-path" "discard-path" 0 |
269 |
phpconfutils_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0 |
270 |
else |
271 |
my_conf="${my_conf} --disable-cgi" |
272 |
fi |
273 |
|
274 |
if [[ ${build_apache2} = 1 ]] ; then |
275 |
my_conf="${my_conf} --with-apxs2=/usr/sbin/apxs2" |
276 |
|
277 |
# Threaded Apache2 support |
278 |
if use threads ; then |
279 |
my_conf="${my_conf} --enable-maintainer-zts" |
280 |
ewarn "Enabling ZTS for Apache2 MPM" |
281 |
fi |
282 |
|
283 |
# Concurrent PHP Apache2 modules support |
284 |
if use concurrentmodphp ; then |
285 |
append-ldflags "-Wl,--version-script=${FILESDIR}/php5-ldvs" |
286 |
fi |
287 |
fi |
288 |
|
289 |
# Now we know what we are building, build it |
290 |
php5_2-sapi_src_compile |
291 |
|
292 |
# To keep the separate php.ini files for each SAPI, we change the |
293 |
# build-defs.h and recompile |
294 |
|
295 |
if [[ ${build_cli} = 1 ]] ; then |
296 |
einfo |
297 |
einfo "Building CLI SAPI" |
298 |
einfo |
299 |
|
300 |
sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cli-php5"|g;' -i main/build-defs.h |
301 |
sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cli-php5/ext-active"|g;' -i main/build-defs.h |
302 |
for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do |
303 |
[[ -f ${x} ]] && rm -f ${x} |
304 |
done |
305 |
make sapi/cli/php || die "Unable to make CLI SAPI" |
306 |
cp sapi/cli/php php-cli || die "Unable to copy CLI SAPI" |
307 |
fi |
308 |
|
309 |
if [[ ${build_cgi} = 1 ]] ; then |
310 |
einfo |
311 |
einfo "Building CGI SAPI" |
312 |
einfo |
313 |
|
314 |
sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cgi-php5"|g;' -i main/build-defs.h |
315 |
sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cgi-php5/ext-active"|g;' -i main/build-defs.h |
316 |
for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do |
317 |
[[ -f ${x} ]] && rm -f ${x} |
318 |
done |
319 |
make sapi/cgi/php-cgi || die "Unable to make CGI SAPI" |
320 |
cp sapi/cgi/php-cgi php-cgi || die "Unable to copy CGI SAPI" |
321 |
fi |
322 |
|
323 |
if [[ ${build_apache2} = 1 ]] ; then |
324 |
einfo |
325 |
einfo "Building apache${APACHE_VERSION} SAPI" |
326 |
einfo |
327 |
|
328 |
sed -e "s|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH \"/etc/php/apache${APACHE_VERSION}-php5\"|g;" -i main/build-defs.h |
329 |
sed -e "s|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR \"/etc/php/apache${APACHE_VERSION}-php5/ext-active\"|g;" -i main/build-defs.h |
330 |
for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do |
331 |
[[ -f ${x} ]] && rm -f ${x} |
332 |
done |
333 |
make || die "Unable to make apache${APACHE_VERSION} SAPI" |
334 |
fi |
335 |
} |
336 |
|
337 |
src_compile_normal() { |
338 |
php_determine_sapis |
339 |
|
340 |
CLEAN_REQUIRED=0 |
341 |
my_conf="" |
342 |
|
343 |
# Support the Apache2 extras, they must be set globally for all |
344 |
# SAPIs to work correctly, especially for external PHP extensions |
345 |
if use apache2 ; then |
346 |
if [[ "${APACHE_VERSION}" != "0" ]] ; then |
347 |
# Concurrent PHP Apache2 modules support |
348 |
if use concurrentmodphp ; then |
349 |
append-ldflags "-Wl,--version-script=${FILESDIR}/php5-ldvs" |
350 |
fi |
351 |
fi |
352 |
fi |
353 |
|
354 |
for x in ${PHPSAPIS} ; do |
355 |
# Support the Apache2 extras, they must be set globally for all |
356 |
# SAPIs to work correctly, especially for external PHP extensions |
357 |
if use apache2 ; then |
358 |
if [[ "${APACHE_VERSION}" != "0" ]] ; then |
359 |
# Threaded Apache2 support |
360 |
if use threads ; then |
361 |
my_conf="${my_conf} --enable-maintainer-zts" |
362 |
ewarn "Enabling ZTS for Apache2 MPM" |
363 |
fi |
364 |
fi |
365 |
fi |
366 |
|
367 |
if [[ "${CLEAN_REQUIRED}" = 1 ]] ; then |
368 |
make clean |
369 |
fi |
370 |
|
371 |
PHPSAPI="${x}" |
372 |
|
373 |
case ${x} in |
374 |
cli) |
375 |
my_conf="${my_conf} --enable-cli --disable-cgi" |
376 |
php5_2-sapi_src_compile |
377 |
cp sapi/cli/php php-cli || die "Unable to copy CLI SAPI" |
378 |
;; |
379 |
cgi) |
380 |
my_conf="${my_conf} --disable-cli --enable-cgi --enable-fastcgi" |
381 |
phpconfutils_extension_enable "discard-path" "discard-path" 0 |
382 |
phpconfutils_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0 |
383 |
php5_2-sapi_src_compile |
384 |
cp sapi/cgi/php-cgi php-cgi || die "Unable to copy CGI SAPI" |
385 |
;; |
386 |
apache2) |
387 |
my_conf="${my_conf} --disable-cli --with-apxs2=/usr/sbin/apxs2" |
388 |
php5_2-sapi_src_compile |
389 |
;; |
390 |
esac |
391 |
|
392 |
CLEAN_REQUIRED=1 |
393 |
my_conf="" |
394 |
done |
395 |
} |
396 |
|
397 |
src_install() { |
398 |
php_determine_sapis |
399 |
|
400 |
destdir=/usr/$(get_libdir)/php5 |
401 |
|
402 |
# Let the eclass do the common work |
403 |
php5_2-sapi_src_install |
404 |
|
405 |
einfo |
406 |
einfo "Installing SAPI(s) ${PHPSAPIS}" |
407 |
einfo |
408 |
|
409 |
for x in ${PHPSAPIS} ; do |
410 |
|
411 |
PHPSAPI="${x}" |
412 |
|
413 |
case ${x} in |
414 |
cli) |
415 |
einfo "Installing CLI SAPI" |
416 |
into ${destdir} |
417 |
newbin php-cli php || die "Unable to install ${x} sapi" |
418 |
php5_2-sapi_install_ini |
419 |
;; |
420 |
cgi) |
421 |
einfo "Installing CGI SAPI" |
422 |
into ${destdir} |
423 |
dobin php-cgi || die "Unable to install ${x} sapi" |
424 |
php5_2-sapi_install_ini |
425 |
;; |
426 |
apache2) |
427 |
einfo "Installing Apache${APACHE_VERSION} SAPI" |
428 |
make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI" |
429 |
if use concurrentmodphp ; then |
430 |
einfo "Installing Apache${APACHE_VERSION} config file for PHP5-concurrent (70_mod_php5_concurr.conf)" |
431 |
insinto ${APACHE_MODULES_CONFDIR} |
432 |
newins "${FILESDIR}/70_mod_php5_concurr.conf-apache2" "70_mod_php5_concurr.conf" |
433 |
|
434 |
# Put the ld version script in the right place so it's always accessible |
435 |
insinto "/var/lib/php-pkg/${CATEGORY}/${PN}-${PVR}/" |
436 |
doins "${FILESDIR}/php5-ldvs" |
437 |
|
438 |
# Redefine the extension dir to have the modphp suffix |
439 |
PHPEXTDIR="`"${D}/${destdir}/bin/php-config" --extension-dir`-versioned" |
440 |
else |
441 |
einfo "Installing Apache${APACHE_VERSION} config file for PHP5 (70_mod_php5.conf)" |
442 |
insinto ${APACHE_MODULES_CONFDIR} |
443 |
newins "${FILESDIR}/70_mod_php5.conf-apache2" "70_mod_php5.conf" |
444 |
fi |
445 |
php5_2-sapi_install_ini |
446 |
;; |
447 |
esac |
448 |
done |
449 |
|
450 |
# Install env.d files |
451 |
newenvd "${FILESDIR}/20php5-envd" "20php5" |
452 |
sed -e "s|/lib/|/$(get_libdir)/|g" -i "${D}/etc/env.d/20php5" |
453 |
} |
454 |
|
455 |
pkg_postinst() { |
456 |
# Output some general info to the user |
457 |
if use apache2 ; then |
458 |
APACHE2_MOD_DEFINE="PHP5" |
459 |
if use concurrentmodphp ; then |
460 |
APACHE2_MOD_CONF="70_mod_php5_concurr" |
461 |
else |
462 |
APACHE2_MOD_CONF="70_mod_php5" |
463 |
fi |
464 |
apache-module_pkg_postinst |
465 |
fi |
466 |
|
467 |
# Update Apache2 to use mod_php |
468 |
if use apache2 ; then |
469 |
"${ROOT}/usr/sbin/php-select" -t apache2 php5 > /dev/null 2>&1 |
470 |
exitStatus=$? |
471 |
if [[ ${exitStatus} == 2 ]] ; then |
472 |
php-select apache2 php5 |
473 |
elif [[ ${exitStatus} == 4 ]] ; then |
474 |
ewarn |
475 |
ewarn "Apache2 is configured to load a different version of PHP." |
476 |
ewarn "To make Apache2 use PHP v5, use php-select:" |
477 |
ewarn |
478 |
ewarn " php-select apache2 php5" |
479 |
ewarn |
480 |
fi |
481 |
fi |
482 |
|
483 |
# Create the symlinks for php-cli |
484 |
if use cli || phpconfutils_usecheck cli ; then |
485 |
"${ROOT}/usr/sbin/php-select" -t php php5 > /dev/null 2>&1 |
486 |
exitStatus=$? |
487 |
if [[ ${exitStatus} == 5 ]] ; then |
488 |
php-select php php5 |
489 |
elif [[ ${exitStatus} == 4 ]] ; then |
490 |
ewarn |
491 |
ewarn "/usr/bin/php links to a different version of PHP." |
492 |
ewarn "To make /usr/bin/php point to PHP v5, use php-select:" |
493 |
ewarn |
494 |
ewarn " php-select php php5" |
495 |
ewarn |
496 |
fi |
497 |
fi |
498 |
|
499 |
# Create the symlinks for php-cgi |
500 |
if use cgi ; then |
501 |
"${ROOT}/usr/sbin/php-select" -t php-cgi php5 > /dev/null 2>&1 |
502 |
exitStatus=$? |
503 |
if [[ ${exitStatus} == 5 ]] ; then |
504 |
php-select php-cgi php5 |
505 |
elif [[ ${exitStatus} == 4 ]] ; then |
506 |
ewarn |
507 |
ewarn "/usr/bin/php-cgi links to a different version of PHP." |
508 |
ewarn "To make /usr/bin/php-cgi point to PHP v5, use php-select:" |
509 |
ewarn |
510 |
ewarn " php-select php-cgi php5" |
511 |
ewarn |
512 |
fi |
513 |
fi |
514 |
|
515 |
# Create the symlinks for php-devel |
516 |
"${ROOT}/usr/sbin/php-select" -t php-devel php5 > /dev/null 2>&1 |
517 |
exitStatus=$? |
518 |
if [[ $exitStatus == 5 ]] ; then |
519 |
php-select php-devel php5 |
520 |
elif [[ $exitStatus == 4 ]] ; then |
521 |
ewarn |
522 |
ewarn "/usr/bin/php-config and/or /usr/bin/phpize are linked to a" |
523 |
ewarn "different version of PHP. To make them point to PHP v5, use" |
524 |
ewarn "php-select:" |
525 |
ewarn |
526 |
ewarn " php-select php-devel php5" |
527 |
ewarn |
528 |
fi |
529 |
|
530 |
php5_2-sapi_pkg_postinst |
531 |
} |
532 |
|
533 |
src_test() { |
534 |
vecho ">>> Test phase [test]: ${CATEGORY}/${PF}" |
535 |
if ! use cli; then |
536 |
einfo "Skipping tests as PHP was built without CLI support" |
537 |
return |
538 |
fi |
539 |
REPORT_EXIT_STATUS=1 TEST_PHP_EXECUTABLE=./sapi/cli/php \ |
540 |
TEST_PHP_CGI_EXECUTABLE=./sapi/cgi/php-cgi ./sapi/cli/php -n ./run-tests.php -n |
541 |
if [[ $? != 0 ]] ; then |
542 |
eerror "Some tests failed!" |
543 |
fi |
544 |
} |
545 |
|
546 |
|
547 |
|
548 |
-- |
549 |
gentoo-commits@g.o mailing list |