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