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