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.4_p20070914.ebuild,v 1.2 2007/09/14 21:04:37 mr_bones_ Exp $ |
3 |
# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/php-5.2.4_p20070914.ebuild,v 1.2 2007/09/14 21:04:37 mr_bones_ 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="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~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 226-232
Link Here
|
226 |
fi |
228 |
fi |
227 |
|
229 |
|
228 |
if [[ ${build_apache2} = 1 ]] ; then |
230 |
if [[ ${build_apache2} = 1 ]] ; then |
229 |
my_conf="${my_conf} --with-apxs2=/usr/sbin/apxs2" |
231 |
my_conf="${my_conf} --with-apxs2=$EPREFIX/usr/sbin/apxs2" |
230 |
|
232 |
|
231 |
# Threaded Apache2 support |
233 |
# Threaded Apache2 support |
232 |
if use threads ; then |
234 |
if use threads ; then |
Lines 338-344
Link Here
|
338 |
cp sapi/cgi/php-cgi php-cgi || die "Unable to copy CGI SAPI" |
340 |
cp sapi/cgi/php-cgi php-cgi || die "Unable to copy CGI SAPI" |
339 |
;; |
341 |
;; |
340 |
apache2) |
342 |
apache2) |
341 |
my_conf="${my_conf} --disable-cli --with-apxs2=/usr/sbin/apxs2" |
343 |
my_conf="${my_conf} --disable-cli --with-apxs2=$EPREFIX/usr/sbin/apxs2" |
342 |
php5_2-sapi_src_compile |
344 |
php5_2-sapi_src_compile |
343 |
;; |
345 |
;; |
344 |
esac |
346 |
esac |
Lines 351-357
Link Here
|
351 |
src_install() { |
353 |
src_install() { |
352 |
php_determine_sapis |
354 |
php_determine_sapis |
353 |
|
355 |
|
354 |
destdir=/usr/$(get_libdir)/php5 |
356 |
destdir=$EPREFIX/usr/$(get_libdir)/php5 |
355 |
|
357 |
|
356 |
# Let the eclass do the common work |
358 |
# Let the eclass do the common work |
357 |
php5_2-sapi_src_install |
359 |
php5_2-sapi_src_install |
Lines 390-396
Link Here
|
390 |
doins "${FILESDIR}/php5-ldvs" |
392 |
doins "${FILESDIR}/php5-ldvs" |
391 |
|
393 |
|
392 |
# Redefine the extension dir to have the modphp suffix |
394 |
# Redefine the extension dir to have the modphp suffix |
393 |
PHPEXTDIR="`"${D}/${destdir}/bin/php-config" --extension-dir`-versioned" |
395 |
PHPEXTDIR="`"${ED}/${destdir}/bin/php-config" --extension-dir`-versioned" |
394 |
else |
396 |
else |
395 |
einfo "Installing Apache${APACHE_VERSION} config file for PHP5 (70_mod_php5.conf)" |
397 |
einfo "Installing Apache${APACHE_VERSION} config file for PHP5 (70_mod_php5.conf)" |
396 |
insinto ${APACHE_MODULES_CONFDIR} |
398 |
insinto ${APACHE_MODULES_CONFDIR} |
Lines 403-409
Link Here
|
403 |
|
405 |
|
404 |
# Install env.d files |
406 |
# Install env.d files |
405 |
newenvd "${FILESDIR}/20php5-envd" "20php5" |
407 |
newenvd "${FILESDIR}/20php5-envd" "20php5" |
406 |
sed -e "s|/lib/|/$(get_libdir)/|g" -i "${D}/etc/env.d/20php5" |
408 |
sed -e "s|/lib/|/$(get_libdir)/|g" -i "${ED}/etc/env.d/20php5" |
407 |
} |
409 |
} |
408 |
|
410 |
|
409 |
pkg_postinst() { |
411 |
pkg_postinst() { |
Lines 420-426
Link Here
|
420 |
|
422 |
|
421 |
# Update Apache2 to use mod_php |
423 |
# Update Apache2 to use mod_php |
422 |
if use apache2 ; then |
424 |
if use apache2 ; then |
423 |
"${ROOT}/usr/sbin/php-select" -t apache2 php5 > /dev/null 2>&1 |
425 |
"${EROOT}/usr/sbin/php-select" -t apache2 php5 > /dev/null 2>&1 |
424 |
exitStatus=$? |
426 |
exitStatus=$? |
425 |
if [[ ${exitStatus} == 2 ]] ; then |
427 |
if [[ ${exitStatus} == 2 ]] ; then |
426 |
php-select apache2 php5 |
428 |
php-select apache2 php5 |
Lines 436-449
Link Here
|
436 |
|
438 |
|
437 |
# Create the symlinks for php-cli |
439 |
# Create the symlinks for php-cli |
438 |
if use cli || phpconfutils_usecheck cli ; then |
440 |
if use cli || phpconfutils_usecheck cli ; then |
439 |
"${ROOT}/usr/sbin/php-select" -t php php5 > /dev/null 2>&1 |
441 |
"${EROOT}/usr/sbin/php-select" -t php php5 > /dev/null 2>&1 |
440 |
exitStatus=$? |
442 |
exitStatus=$? |
441 |
if [[ ${exitStatus} == 5 ]] ; then |
443 |
if [[ ${exitStatus} == 5 ]] ; then |
442 |
php-select php php5 |
444 |
php-select php php5 |
443 |
elif [[ ${exitStatus} == 4 ]] ; then |
445 |
elif [[ ${exitStatus} == 4 ]] ; then |
444 |
ewarn |
446 |
ewarn |
445 |
ewarn "/usr/bin/php links to a different version of PHP." |
447 |
ewarn "$EPREFIX/usr/bin/php links to a different version of PHP." |
446 |
ewarn "To make /usr/bin/php point to PHP v5, use php-select:" |
448 |
ewarn "To make $EPREFIX/usr/bin/php point to PHP v5, use php-select:" |
447 |
ewarn |
449 |
ewarn |
448 |
ewarn " php-select php php5" |
450 |
ewarn " php-select php php5" |
449 |
ewarn |
451 |
ewarn |
Lines 452-465
Link Here
|
452 |
|
454 |
|
453 |
# Create the symlinks for php-cgi |
455 |
# Create the symlinks for php-cgi |
454 |
if use cgi ; then |
456 |
if use cgi ; then |
455 |
"${ROOT}/usr/sbin/php-select" -t php-cgi php5 > /dev/null 2>&1 |
457 |
"${EROOT}/usr/sbin/php-select" -t php-cgi php5 > /dev/null 2>&1 |
456 |
exitStatus=$? |
458 |
exitStatus=$? |
457 |
if [[ ${exitStatus} == 5 ]] ; then |
459 |
if [[ ${exitStatus} == 5 ]] ; then |
458 |
php-select php-cgi php5 |
460 |
php-select php-cgi php5 |
459 |
elif [[ ${exitStatus} == 4 ]] ; then |
461 |
elif [[ ${exitStatus} == 4 ]] ; then |
460 |
ewarn |
462 |
ewarn |
461 |
ewarn "/usr/bin/php-cgi links to a different version of PHP." |
463 |
ewarn "$EPREFIX/usr/bin/php-cgi links to a different version of PHP." |
462 |
ewarn "To make /usr/bin/php-cgi point to PHP v5, use php-select:" |
464 |
ewarn "To make $EPREFIX/usr/bin/php-cgi point to PHP v5, use php-select:" |
463 |
ewarn |
465 |
ewarn |
464 |
ewarn " php-select php-cgi php5" |
466 |
ewarn " php-select php-cgi php5" |
465 |
ewarn |
467 |
ewarn |
Lines 467-479
Link Here
|
467 |
fi |
469 |
fi |
468 |
|
470 |
|
469 |
# Create the symlinks for php-devel |
471 |
# Create the symlinks for php-devel |
470 |
"${ROOT}/usr/sbin/php-select" -t php-devel php5 > /dev/null 2>&1 |
472 |
"${EROOT}/usr/sbin/php-select" -t php-devel php5 > /dev/null 2>&1 |
471 |
exitStatus=$? |
473 |
exitStatus=$? |
472 |
if [[ $exitStatus == 5 ]] ; then |
474 |
if [[ $exitStatus == 5 ]] ; then |
473 |
php-select php-devel php5 |
475 |
php-select php-devel php5 |
474 |
elif [[ $exitStatus == 4 ]] ; then |
476 |
elif [[ $exitStatus == 4 ]] ; then |
475 |
ewarn |
477 |
ewarn |
476 |
ewarn "/usr/bin/php-config and/or /usr/bin/phpize are linked to a" |
478 |
ewarn "$EPREFIX/usr/bin/php-config and/or $EPREFIX/usr/bin/phpize are linked to a" |
477 |
ewarn "different version of PHP. To make them point to PHP v5, use" |
479 |
ewarn "different version of PHP. To make them point to PHP v5, use" |
478 |
ewarn "php-select:" |
480 |
ewarn "php-select:" |
479 |
ewarn |
481 |
ewarn |