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