Lines 2-12
Link Here
|
2 |
# Distributed under the terms of the GNU General Public License v2 |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/php-5.2.8-r2.ebuild,v 1.8 2009/02/01 10:39:52 klausman Exp $ |
3 |
# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/php-5.2.8-r2.ebuild,v 1.8 2009/02/01 10:39:52 klausman Exp $ |
4 |
|
4 |
|
|
|
5 |
EAPI="prefix" |
6 |
|
5 |
CGI_SAPI_USE="discard-path force-cgi-redirect" |
7 |
CGI_SAPI_USE="discard-path force-cgi-redirect" |
6 |
APACHE2_SAPI_USE="concurrentmodphp threads" |
8 |
APACHE2_SAPI_USE="concurrentmodphp threads" |
7 |
IUSE="cli cgi ${CGI_SAPI_USE} ${APACHE2_SAPI_USE} fastbuild" |
9 |
IUSE="cli cgi ${CGI_SAPI_USE} ${APACHE2_SAPI_USE} fastbuild" |
8 |
|
10 |
|
9 |
KEYWORDS="alpha amd64 ~arm hppa ~ia64 ppc ppc64 ~s390 ~sh sparc x86 ~x86-fbsd" |
11 |
KEYWORDS="~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~x86-macos" |
10 |
|
12 |
|
11 |
# NOTE: Portage doesn't support setting PROVIDE based on the USE flags |
13 |
# NOTE: Portage doesn't support setting PROVIDE based on the USE flags |
12 |
# that have been enabled, so we have to PROVIDE everything for now |
14 |
# that have been enabled, so we have to PROVIDE everything for now |
Lines 263-269
Link Here
|
263 |
fi |
265 |
fi |
264 |
|
266 |
|
265 |
if [[ ${build_apache2} = 1 ]] ; then |
267 |
if [[ ${build_apache2} = 1 ]] ; then |
266 |
my_conf="${my_conf} --with-apxs2=/usr/sbin/apxs2" |
268 |
my_conf="${my_conf} --with-apxs2="${EPREFIX}"/usr/sbin/apxs2" |
267 |
|
269 |
|
268 |
# Threaded Apache2 support |
270 |
# Threaded Apache2 support |
269 |
if use threads ; then |
271 |
if use threads ; then |
Lines 381-387
Link Here
|
381 |
cp sapi/cgi/php-cgi php-cgi || die "Unable to copy CGI SAPI" |
383 |
cp sapi/cgi/php-cgi php-cgi || die "Unable to copy CGI SAPI" |
382 |
;; |
384 |
;; |
383 |
apache2) |
385 |
apache2) |
384 |
my_conf="${my_conf} --disable-cli --with-apxs2=/usr/sbin/apxs2" |
386 |
my_conf="${my_conf} --disable-cli --with-apxs2="${EPREFIX}"/usr/sbin/apxs2" |
385 |
php5_2-sapi_src_compile |
387 |
php5_2-sapi_src_compile |
386 |
;; |
388 |
;; |
387 |
esac |
389 |
esac |
Lines 425-431
Link Here
|
425 |
make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI" |
427 |
make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI" |
426 |
if use concurrentmodphp ; then |
428 |
if use concurrentmodphp ; then |
427 |
einfo "Installing Apache${APACHE_VERSION} config file for PHP5-concurrent (70_mod_php5_concurr.conf)" |
429 |
einfo "Installing Apache${APACHE_VERSION} config file for PHP5-concurrent (70_mod_php5_concurr.conf)" |
428 |
insinto ${APACHE_MODULES_CONFDIR} |
430 |
insinto ${APACHE_MODULES_CONFDIR#${EPREFIX}} |
429 |
newins "${FILESDIR}/70_mod_php5_concurr.conf-apache2-r1" "70_mod_php5_concurr.conf" |
431 |
newins "${FILESDIR}/70_mod_php5_concurr.conf-apache2-r1" "70_mod_php5_concurr.conf" |
430 |
|
432 |
|
431 |
# Put the ld version script in the right place so it's always accessible |
433 |
# Put the ld version script in the right place so it's always accessible |
Lines 433-442
Link Here
|
433 |
doins "${FILESDIR}/php5-ldvs" |
435 |
doins "${FILESDIR}/php5-ldvs" |
434 |
|
436 |
|
435 |
# Redefine the extension dir to have the modphp suffix |
437 |
# Redefine the extension dir to have the modphp suffix |
436 |
PHPEXTDIR="`"${D}/${destdir}/bin/php-config" --extension-dir`-versioned" |
438 |
PHPEXTDIR="`"${ED}/${destdir}/bin/php-config" --extension-dir`-versioned" |
437 |
else |
439 |
else |
438 |
einfo "Installing Apache${APACHE_VERSION} config file for PHP5 (70_mod_php5.conf)" |
440 |
einfo "Installing Apache${APACHE_VERSION} config file for PHP5 (70_mod_php5.conf)" |
439 |
insinto ${APACHE_MODULES_CONFDIR} |
441 |
insinto ${APACHE_MODULES_CONFDIR#${EPREFIX}} |
440 |
newins "${FILESDIR}/70_mod_php5.conf-apache2-r1" "70_mod_php5.conf" |
442 |
newins "${FILESDIR}/70_mod_php5.conf-apache2-r1" "70_mod_php5.conf" |
441 |
fi |
443 |
fi |
442 |
php5_2-sapi_install_ini |
444 |
php5_2-sapi_install_ini |
Lines 446-452
Link Here
|
446 |
|
448 |
|
447 |
# Install env.d files |
449 |
# Install env.d files |
448 |
newenvd "${FILESDIR}/20php5-envd" "20php5" |
450 |
newenvd "${FILESDIR}/20php5-envd" "20php5" |
449 |
sed -e "s|/lib/|/$(get_libdir)/|g" -i "${D}/etc/env.d/20php5" |
451 |
sed -e "s|/lib/|/$(get_libdir)/|g" -i "${ED}/etc/env.d/20php5" |
450 |
} |
452 |
} |
451 |
|
453 |
|
452 |
pkg_postinst() { |
454 |
pkg_postinst() { |
Lines 463-469
Link Here
|
463 |
|
465 |
|
464 |
# Update Apache2 to use mod_php |
466 |
# Update Apache2 to use mod_php |
465 |
if use apache2 ; then |
467 |
if use apache2 ; then |
466 |
"${ROOT}/usr/sbin/php-select" -t apache2 php5 > /dev/null 2>&1 |
468 |
"${EROOT}/usr/sbin/php-select" -t apache2 php5 > /dev/null 2>&1 |
467 |
exitStatus=$? |
469 |
exitStatus=$? |
468 |
if [[ ${exitStatus} == 2 ]] ; then |
470 |
if [[ ${exitStatus} == 2 ]] ; then |
469 |
php-select apache2 php5 |
471 |
php-select apache2 php5 |
Lines 479-492
Link Here
|
479 |
|
481 |
|
480 |
# Create the symlinks for php-cli |
482 |
# Create the symlinks for php-cli |
481 |
if use cli || phpconfutils_usecheck cli ; then |
483 |
if use cli || phpconfutils_usecheck cli ; then |
482 |
"${ROOT}/usr/sbin/php-select" -t php php5 > /dev/null 2>&1 |
484 |
"${EROOT}/usr/sbin/php-select" -t php php5 > /dev/null 2>&1 |
483 |
exitStatus=$? |
485 |
exitStatus=$? |
484 |
if [[ ${exitStatus} == 5 ]] ; then |
486 |
if [[ ${exitStatus} == 5 ]] ; then |
485 |
php-select php php5 |
487 |
php-select php php5 |
486 |
elif [[ ${exitStatus} == 4 ]] ; then |
488 |
elif [[ ${exitStatus} == 4 ]] ; then |
487 |
ewarn |
489 |
ewarn |
488 |
ewarn "/usr/bin/php links to a different version of PHP." |
490 |
ewarn "${EPREFIX}/usr/bin/php links to a different version of PHP." |
489 |
ewarn "To make /usr/bin/php point to PHP v5, use php-select:" |
491 |
ewarn "To make ${EPREFIX}/usr/bin/php point to PHP v5, use php-select:" |
490 |
ewarn |
492 |
ewarn |
491 |
ewarn " php-select php php5" |
493 |
ewarn " php-select php php5" |
492 |
ewarn |
494 |
ewarn |
Lines 495-508
Link Here
|
495 |
|
497 |
|
496 |
# Create the symlinks for php-cgi |
498 |
# Create the symlinks for php-cgi |
497 |
if use cgi ; then |
499 |
if use cgi ; then |
498 |
"${ROOT}/usr/sbin/php-select" -t php-cgi php5 > /dev/null 2>&1 |
500 |
"${EROOT}/usr/sbin/php-select" -t php-cgi php5 > /dev/null 2>&1 |
499 |
exitStatus=$? |
501 |
exitStatus=$? |
500 |
if [[ ${exitStatus} == 5 ]] ; then |
502 |
if [[ ${exitStatus} == 5 ]] ; then |
501 |
php-select php-cgi php5 |
503 |
php-select php-cgi php5 |
502 |
elif [[ ${exitStatus} == 4 ]] ; then |
504 |
elif [[ ${exitStatus} == 4 ]] ; then |
503 |
ewarn |
505 |
ewarn |
504 |
ewarn "/usr/bin/php-cgi links to a different version of PHP." |
506 |
ewarn "${EPREFIX}/usr/bin/php-cgi links to a different version of PHP." |
505 |
ewarn "To make /usr/bin/php-cgi point to PHP v5, use php-select:" |
507 |
ewarn "To make ${EPREFIX}/usr/bin/php-cgi point to PHP v5, use php-select:" |
506 |
ewarn |
508 |
ewarn |
507 |
ewarn " php-select php-cgi php5" |
509 |
ewarn " php-select php-cgi php5" |
508 |
ewarn |
510 |
ewarn |
Lines 510-522
Link Here
|
510 |
fi |
512 |
fi |
511 |
|
513 |
|
512 |
# Create the symlinks for php-devel |
514 |
# Create the symlinks for php-devel |
513 |
"${ROOT}/usr/sbin/php-select" -t php-devel php5 > /dev/null 2>&1 |
515 |
"${EROOT}/usr/sbin/php-select" -t php-devel php5 > /dev/null 2>&1 |
514 |
exitStatus=$? |
516 |
exitStatus=$? |
515 |
if [[ $exitStatus == 5 ]] ; then |
517 |
if [[ $exitStatus == 5 ]] ; then |
516 |
php-select php-devel php5 |
518 |
php-select php-devel php5 |
517 |
elif [[ $exitStatus == 4 ]] ; then |
519 |
elif [[ $exitStatus == 4 ]] ; then |
518 |
ewarn |
520 |
ewarn |
519 |
ewarn "/usr/bin/php-config and/or /usr/bin/phpize are linked to a" |
521 |
ewarn "${EPREFIX}/usr/bin/php-config and/or ${EPREFIX}/usr/bin/phpize are linked to a" |
520 |
ewarn "different version of PHP. To make them point to PHP v5, use" |
522 |
ewarn "different version of PHP. To make them point to PHP v5, use" |
521 |
ewarn "php-select:" |
523 |
ewarn "php-select:" |
522 |
ewarn |
524 |
ewarn |