1 |
hoffie 08/05/05 21:01:17 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: php-5.2.6-r1.ebuild |
5 |
Log: |
6 |
using official suhosin for version 5.2.6 now, fixing bug 212679 (ext/ldap build failure with --as-needed, thanks to Peter Volkov) |
7 |
(Portage version: 2.1.5_rc6) |
8 |
|
9 |
Revision Changes Path |
10 |
1.269 dev-lang/php/ChangeLog |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/php/ChangeLog?rev=1.269&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/php/ChangeLog?rev=1.269&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/php/ChangeLog?r1=1.268&r2=1.269 |
15 |
|
16 |
Index: ChangeLog |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/dev-lang/php/ChangeLog,v |
19 |
retrieving revision 1.268 |
20 |
retrieving revision 1.269 |
21 |
diff -u -r1.268 -r1.269 |
22 |
--- ChangeLog 1 May 2008 17:08:15 -0000 1.268 |
23 |
+++ ChangeLog 5 May 2008 21:01:17 -0000 1.269 |
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.268 2008/05/01 17:08:15 hoffie Exp $ |
28 |
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/ChangeLog,v 1.269 2008/05/05 21:01:17 hoffie Exp $ |
29 |
+ |
30 |
+*php-5.2.6-r1 (05 May 2008) |
31 |
+ |
32 |
+ 05 May 2008; Christian Hoffmann <hoffie@g.o> +php-5.2.6-r1.ebuild: |
33 |
+ using official suhosin for version 5.2.6 now, adding patch to fix bug |
34 |
+ 212679 (ext/ldap build failure with --as-needed, thanks to Peter Volkov) |
35 |
|
36 |
01 May 2008; Christian Hoffmann <hoffie@g.o> |
37 |
-php-4.4.8_pre20070816.ebuild: |
38 |
|
39 |
|
40 |
|
41 |
1.1 dev-lang/php/php-5.2.6-r1.ebuild |
42 |
|
43 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/php/php-5.2.6-r1.ebuild?rev=1.1&view=markup |
44 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-lang/php/php-5.2.6-r1.ebuild?rev=1.1&content-type=text/plain |
45 |
|
46 |
Index: php-5.2.6-r1.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-r1.ebuild,v 1.1 2008/05/05 21:01:17 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="1" |
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 |
# Now let the eclass do the rest and regenerate the configure |
199 |
php5_2-sapi_src_unpack |
200 |
|
201 |
# Fix Makefile.global:test to consider the CGI SAPI if present |
202 |
if use cgi ; then |
203 |
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 |
204 |
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 |
205 |
fi |
206 |
|
207 |
# try to fix some test cases which fail because of sandbox otherwise |
208 |
sed -e 's:/no/such/:.\0:' -i ext/standard/tests/file/005_error.phpt \ |
209 |
ext/standard/tests/file/006_error.phpt \ |
210 |
ext/standard/tests/file/touch.phpt |
211 |
|
212 |
# Workaround for autoconf-2.62 behaviour change, bug 217392 |
213 |
sed -re 's:(#ifdef HAVE_CONFIG_H.*):#define _GNU_SOURCE\n\1:' -i ext/posix/posix.c |
214 |
|
215 |
# REMOVING BROKEN TESTS: |
216 |
# removing this test as it has been broken for ages and is not easily |
217 |
# fixable (depends on a lot of factors) |
218 |
rm ext/standard/tests/general_functions/phpinfo.phpt |
219 |
|
220 |
# never worked properly, no easy fix |
221 |
rm ext/iconv/tests/bug16069.phpt ext/iconv/tests/iconv_stream_filter.phpt |
222 |
|
223 |
# needs write access to /tmp and others |
224 |
rm ext/session/tests/session_save_path_variation5.phpt |
225 |
|
226 |
# sandbox-related (sandbox checks for permissions before even looking |
227 |
# at the fs, but the tests expect "No such file or directory" |
228 |
sed -e 's:/blah:./bla:' -i \ |
229 |
ext/session/tests/session_save_path_variation{2,3}.phpt |
230 |
|
231 |
# these tests behave differently with suhosin enabled, adapting them... |
232 |
use suhosin && sed -e 's:File(\.\./):File(..):g' -i \ |
233 |
ext/standard/tests/file/open_basedir*{.inc,.phpt} |
234 |
} |
235 |
|
236 |
src_compile() { |
237 |
if use fastbuild && [[ -n "${FASTBUILD_PATCH}" ]] ; then |
238 |
src_compile_fastbuild |
239 |
else |
240 |
src_compile_normal |
241 |
fi |
242 |
} |
243 |
|
244 |
src_compile_fastbuild() { |
245 |
php_determine_sapis |
246 |
|
247 |
build_cli=0 |
248 |
build_cgi=0 |
249 |
build_apache2=0 |
250 |
my_conf="" |
251 |
|
252 |
for x in ${PHPSAPIS} ; do |
253 |
case ${x} in |
254 |
cli) |
255 |
build_cli=1 |
256 |
;; |
257 |
cgi) |
258 |
build_cgi=1 |
259 |
;; |
260 |
apache2) |
261 |
build_apache2=1 |
262 |
;; |
263 |
esac |
264 |
done |
265 |
|
266 |
if [[ ${build_cli} = 1 ]] ; then |
267 |
my_conf="${my_conf} --enable-cli" |
268 |
else |
269 |
my_conf="${my_conf} --disable-cli" |
270 |
fi |
271 |
|
272 |
if [[ ${build_cgi} = 1 ]] ; then |
273 |
my_conf="${my_conf} --enable-cgi --enable-fastcgi" |
274 |
phpconfutils_extension_enable "discard-path" "discard-path" 0 |
275 |
phpconfutils_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0 |
276 |
else |
277 |
my_conf="${my_conf} --disable-cgi" |
278 |
fi |
279 |
|
280 |
if [[ ${build_apache2} = 1 ]] ; then |
281 |
my_conf="${my_conf} --with-apxs2=/usr/sbin/apxs2" |
282 |
|
283 |
# Threaded Apache2 support |
284 |
if use threads ; then |
285 |
my_conf="${my_conf} --enable-maintainer-zts" |
286 |
ewarn "Enabling ZTS for Apache2 MPM" |
287 |
fi |
288 |
|
289 |
# Concurrent PHP Apache2 modules support |
290 |
if use concurrentmodphp ; then |
291 |
append-ldflags "-Wl,--version-script=${FILESDIR}/php5-ldvs" |
292 |
fi |
293 |
fi |
294 |
|
295 |
# Now we know what we are building, build it |
296 |
php5_2-sapi_src_compile |
297 |
|
298 |
# To keep the separate php.ini files for each SAPI, we change the |
299 |
# build-defs.h and recompile |
300 |
|
301 |
if [[ ${build_cli} = 1 ]] ; then |
302 |
einfo |
303 |
einfo "Building CLI SAPI" |
304 |
einfo |
305 |
|
306 |
sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cli-php5"|g;' -i main/build-defs.h |
307 |
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 |
308 |
for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do |
309 |
[[ -f ${x} ]] && rm -f ${x} |
310 |
done |
311 |
make sapi/cli/php || die "Unable to make CLI SAPI" |
312 |
cp sapi/cli/php php-cli || die "Unable to copy CLI SAPI" |
313 |
fi |
314 |
|
315 |
if [[ ${build_cgi} = 1 ]] ; then |
316 |
einfo |
317 |
einfo "Building CGI SAPI" |
318 |
einfo |
319 |
|
320 |
sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cgi-php5"|g;' -i main/build-defs.h |
321 |
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 |
322 |
for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do |
323 |
[[ -f ${x} ]] && rm -f ${x} |
324 |
done |
325 |
make sapi/cgi/php-cgi || die "Unable to make CGI SAPI" |
326 |
cp sapi/cgi/php-cgi php-cgi || die "Unable to copy CGI SAPI" |
327 |
fi |
328 |
|
329 |
if [[ ${build_apache2} = 1 ]] ; then |
330 |
einfo |
331 |
einfo "Building apache${APACHE_VERSION} SAPI" |
332 |
einfo |
333 |
|
334 |
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 |
335 |
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 |
336 |
for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do |
337 |
[[ -f ${x} ]] && rm -f ${x} |
338 |
done |
339 |
make || die "Unable to make apache${APACHE_VERSION} SAPI" |
340 |
fi |
341 |
} |
342 |
|
343 |
src_compile_normal() { |
344 |
php_determine_sapis |
345 |
|
346 |
CLEAN_REQUIRED=0 |
347 |
my_conf="" |
348 |
|
349 |
# Support the Apache2 extras, they must be set globally for all |
350 |
# SAPIs to work correctly, especially for external PHP extensions |
351 |
if use apache2 ; then |
352 |
# Concurrent PHP Apache2 modules support |
353 |
if use concurrentmodphp ; then |
354 |
append-ldflags "-Wl,--version-script=${FILESDIR}/php5-ldvs" |
355 |
fi |
356 |
fi |
357 |
|
358 |
for x in ${PHPSAPIS} ; do |
359 |
# Support the Apache2 extras, they must be set globally for all |
360 |
# SAPIs to work correctly, especially for external PHP extensions |
361 |
if use apache2 ; then |
362 |
# Threaded Apache2 support |
363 |
if use threads ; then |
364 |
my_conf="${my_conf} --enable-maintainer-zts" |
365 |
ewarn "Enabling ZTS for Apache2 MPM" |
366 |
fi |
367 |
fi |
368 |
|
369 |
if [[ "${CLEAN_REQUIRED}" = 1 ]] ; then |
370 |
make clean |
371 |
fi |
372 |
|
373 |
PHPSAPI="${x}" |
374 |
|
375 |
case ${x} in |
376 |
cli) |
377 |
my_conf="${my_conf} --enable-cli --disable-cgi" |
378 |
php5_2-sapi_src_compile |
379 |
cp sapi/cli/php php-cli || die "Unable to copy CLI SAPI" |
380 |
;; |
381 |
cgi) |
382 |
my_conf="${my_conf} --disable-cli --enable-cgi --enable-fastcgi" |
383 |
phpconfutils_extension_enable "discard-path" "discard-path" 0 |
384 |
phpconfutils_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0 |
385 |
php5_2-sapi_src_compile |
386 |
cp sapi/cgi/php-cgi php-cgi || die "Unable to copy CGI SAPI" |
387 |
;; |
388 |
apache2) |
389 |
my_conf="${my_conf} --disable-cli --with-apxs2=/usr/sbin/apxs2" |
390 |
php5_2-sapi_src_compile |
391 |
;; |
392 |
esac |
393 |
|
394 |
CLEAN_REQUIRED=1 |
395 |
my_conf="" |
396 |
done |
397 |
} |
398 |
|
399 |
src_install() { |
400 |
php_determine_sapis |
401 |
|
402 |
destdir=/usr/$(get_libdir)/php5 |
403 |
|
404 |
# Let the eclass do the common work |
405 |
php5_2-sapi_src_install |
406 |
|
407 |
einfo |
408 |
einfo "Installing SAPI(s) ${PHPSAPIS}" |
409 |
einfo |
410 |
|
411 |
for x in ${PHPSAPIS} ; do |
412 |
|
413 |
PHPSAPI="${x}" |
414 |
|
415 |
case ${x} in |
416 |
cli) |
417 |
einfo "Installing CLI SAPI" |
418 |
into ${destdir} |
419 |
newbin php-cli php || die "Unable to install ${x} sapi" |
420 |
php5_2-sapi_install_ini |
421 |
;; |
422 |
cgi) |
423 |
einfo "Installing CGI SAPI" |
424 |
into ${destdir} |
425 |
dobin php-cgi || die "Unable to install ${x} sapi" |
426 |
php5_2-sapi_install_ini |
427 |
;; |
428 |
apache2) |
429 |
einfo "Installing Apache${APACHE_VERSION} SAPI" |
430 |
make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI" |
431 |
if use concurrentmodphp ; then |
432 |
einfo "Installing Apache${APACHE_VERSION} config file for PHP5-concurrent (70_mod_php5_concurr.conf)" |
433 |
insinto ${APACHE_MODULES_CONFDIR} |
434 |
newins "${FILESDIR}/70_mod_php5_concurr.conf-apache2" "70_mod_php5_concurr.conf" |
435 |
|
436 |
# Put the ld version script in the right place so it's always accessible |
437 |
insinto "/var/lib/php-pkg/${CATEGORY}/${PN}-${PVR}/" |
438 |
doins "${FILESDIR}/php5-ldvs" |
439 |
|
440 |
# Redefine the extension dir to have the modphp suffix |
441 |
PHPEXTDIR="`"${D}/${destdir}/bin/php-config" --extension-dir`-versioned" |
442 |
else |
443 |
einfo "Installing Apache${APACHE_VERSION} config file for PHP5 (70_mod_php5.conf)" |
444 |
insinto ${APACHE_MODULES_CONFDIR} |
445 |
newins "${FILESDIR}/70_mod_php5.conf-apache2" "70_mod_php5.conf" |
446 |
fi |
447 |
php5_2-sapi_install_ini |
448 |
;; |
449 |
esac |
450 |
done |
451 |
|
452 |
# Install env.d files |
453 |
newenvd "${FILESDIR}/20php5-envd" "20php5" |
454 |
sed -e "s|/lib/|/$(get_libdir)/|g" -i "${D}/etc/env.d/20php5" |
455 |
} |
456 |
|
457 |
pkg_postinst() { |
458 |
# Output some general info to the user |
459 |
if use apache2 ; then |
460 |
APACHE2_MOD_DEFINE="PHP5" |
461 |
if use concurrentmodphp ; then |
462 |
APACHE2_MOD_CONF="70_mod_php5_concurr" |
463 |
else |
464 |
APACHE2_MOD_CONF="70_mod_php5" |
465 |
fi |
466 |
apache-module_pkg_postinst |
467 |
fi |
468 |
|
469 |
# Update Apache2 to use mod_php |
470 |
if use apache2 ; then |
471 |
"${ROOT}/usr/sbin/php-select" -t apache2 php5 > /dev/null 2>&1 |
472 |
exitStatus=$? |
473 |
if [[ ${exitStatus} == 2 ]] ; then |
474 |
php-select apache2 php5 |
475 |
elif [[ ${exitStatus} == 4 ]] ; then |
476 |
ewarn |
477 |
ewarn "Apache2 is configured to load a different version of PHP." |
478 |
ewarn "To make Apache2 use PHP v5, use php-select:" |
479 |
ewarn |
480 |
ewarn " php-select apache2 php5" |
481 |
ewarn |
482 |
fi |
483 |
fi |
484 |
|
485 |
# Create the symlinks for php-cli |
486 |
if use cli || phpconfutils_usecheck cli ; then |
487 |
"${ROOT}/usr/sbin/php-select" -t php php5 > /dev/null 2>&1 |
488 |
exitStatus=$? |
489 |
if [[ ${exitStatus} == 5 ]] ; then |
490 |
php-select php php5 |
491 |
elif [[ ${exitStatus} == 4 ]] ; then |
492 |
ewarn |
493 |
ewarn "/usr/bin/php links to a different version of PHP." |
494 |
ewarn "To make /usr/bin/php point to PHP v5, use php-select:" |
495 |
ewarn |
496 |
ewarn " php-select php php5" |
497 |
ewarn |
498 |
fi |
499 |
fi |
500 |
|
501 |
# Create the symlinks for php-cgi |
502 |
if use cgi ; then |
503 |
"${ROOT}/usr/sbin/php-select" -t php-cgi php5 > /dev/null 2>&1 |
504 |
exitStatus=$? |
505 |
if [[ ${exitStatus} == 5 ]] ; then |
506 |
php-select php-cgi php5 |
507 |
elif [[ ${exitStatus} == 4 ]] ; then |
508 |
ewarn |
509 |
ewarn "/usr/bin/php-cgi links to a different version of PHP." |
510 |
ewarn "To make /usr/bin/php-cgi point to PHP v5, use php-select:" |
511 |
ewarn |
512 |
ewarn " php-select php-cgi php5" |
513 |
ewarn |
514 |
fi |
515 |
fi |
516 |
|
517 |
# Create the symlinks for php-devel |
518 |
"${ROOT}/usr/sbin/php-select" -t php-devel php5 > /dev/null 2>&1 |
519 |
exitStatus=$? |
520 |
if [[ $exitStatus == 5 ]] ; then |
521 |
php-select php-devel php5 |
522 |
elif [[ $exitStatus == 4 ]] ; then |
523 |
ewarn |
524 |
ewarn "/usr/bin/php-config and/or /usr/bin/phpize are linked to a" |
525 |
ewarn "different version of PHP. To make them point to PHP v5, use" |
526 |
ewarn "php-select:" |
527 |
ewarn |
528 |
ewarn " php-select php-devel php5" |
529 |
ewarn |
530 |
fi |
531 |
|
532 |
php5_2-sapi_pkg_postinst |
533 |
} |
534 |
|
535 |
src_test() { |
536 |
vecho ">>> Test phase [test]: ${CATEGORY}/${PF}" |
537 |
if [[ ! -x "${S}"/php-cli ]]; then |
538 |
ewarn "Running the php test suite requires USE=cli" |
539 |
return |
540 |
fi |
541 |
|
542 |
export TEST_PHP_EXECUTABLE="${S}"/php-cli |
543 |
if [[ -x "${S}"/php-cgi ]]; then |
544 |
export TEST_PHP_CGI_EXECUTABLE="${S}"/php-cgi |
545 |
fi |
546 |
REPORT_EXIT_STATUS=1 "${S}"/php-cli -n "${S}"/run-tests.php -n |
547 |
|
548 |
if [[ $? != 0 ]] ; then |
549 |
eerror "Not all tests were successful!" |
550 |
fi |
551 |
} |
552 |
|
553 |
|
554 |
|
555 |
-- |
556 |
gentoo-commits@l.g.o mailing list |