--- /Volumes/localhorst/usr/portage/dev-lang/php/php-5.2.4_p20070914.ebuild 2007-09-15 01:06:03 +0400 +++ dev-lang/php/php-5.2.4_p20070914.ebuild 2007-10-09 12:27:52 +0400 @@ -2,11 +2,13 @@ # Distributed under the terms of the GNU General Public License v2 # $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 $ +EAPI="prefix" + CGI_SAPI_USE="discard-path force-cgi-redirect" APACHE2_SAPI_USE="concurrentmodphp threads" IUSE="cli cgi ${CGI_SAPI_USE} ${APACHE2_SAPI_USE} fastbuild" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~x86-macos" # NOTE: Portage doesn't support setting PROVIDE based on the USE flags # that have been enabled, so we have to PROVIDE everything for now @@ -226,7 +228,7 @@ fi if [[ ${build_apache2} = 1 ]] ; then - my_conf="${my_conf} --with-apxs2=/usr/sbin/apxs2" + my_conf="${my_conf} --with-apxs2=$EPREFIX/usr/sbin/apxs2" # Threaded Apache2 support if use threads ; then @@ -338,7 +340,7 @@ cp sapi/cgi/php-cgi php-cgi || die "Unable to copy CGI SAPI" ;; apache2) - my_conf="${my_conf} --disable-cli --with-apxs2=/usr/sbin/apxs2" + my_conf="${my_conf} --disable-cli --with-apxs2=$EPREFIX/usr/sbin/apxs2" php5_2-sapi_src_compile ;; esac @@ -351,7 +353,7 @@ src_install() { php_determine_sapis - destdir=/usr/$(get_libdir)/php5 + destdir=$EPREFIX/usr/$(get_libdir)/php5 # Let the eclass do the common work php5_2-sapi_src_install @@ -390,7 +392,7 @@ doins "${FILESDIR}/php5-ldvs" # Redefine the extension dir to have the modphp suffix - PHPEXTDIR="`"${D}/${destdir}/bin/php-config" --extension-dir`-versioned" + PHPEXTDIR="`"${ED}/${destdir}/bin/php-config" --extension-dir`-versioned" else einfo "Installing Apache${APACHE_VERSION} config file for PHP5 (70_mod_php5.conf)" insinto ${APACHE_MODULES_CONFDIR} @@ -403,7 +405,7 @@ # Install env.d files newenvd "${FILESDIR}/20php5-envd" "20php5" - sed -e "s|/lib/|/$(get_libdir)/|g" -i "${D}/etc/env.d/20php5" + sed -e "s|/lib/|/$(get_libdir)/|g" -i "${ED}/etc/env.d/20php5" } pkg_postinst() { @@ -420,7 +422,7 @@ # Update Apache2 to use mod_php if use apache2 ; then - "${ROOT}/usr/sbin/php-select" -t apache2 php5 > /dev/null 2>&1 + "${EROOT}/usr/sbin/php-select" -t apache2 php5 > /dev/null 2>&1 exitStatus=$? if [[ ${exitStatus} == 2 ]] ; then php-select apache2 php5 @@ -436,14 +438,14 @@ # Create the symlinks for php-cli if use cli || phpconfutils_usecheck cli ; then - "${ROOT}/usr/sbin/php-select" -t php php5 > /dev/null 2>&1 + "${EROOT}/usr/sbin/php-select" -t php php5 > /dev/null 2>&1 exitStatus=$? if [[ ${exitStatus} == 5 ]] ; then php-select php php5 elif [[ ${exitStatus} == 4 ]] ; then ewarn - ewarn "/usr/bin/php links to a different version of PHP." - ewarn "To make /usr/bin/php point to PHP v5, use php-select:" + ewarn "$EPREFIX/usr/bin/php links to a different version of PHP." + ewarn "To make $EPREFIX/usr/bin/php point to PHP v5, use php-select:" ewarn ewarn " php-select php php5" ewarn @@ -452,14 +454,14 @@ # Create the symlinks for php-cgi if use cgi ; then - "${ROOT}/usr/sbin/php-select" -t php-cgi php5 > /dev/null 2>&1 + "${EROOT}/usr/sbin/php-select" -t php-cgi php5 > /dev/null 2>&1 exitStatus=$? if [[ ${exitStatus} == 5 ]] ; then php-select php-cgi php5 elif [[ ${exitStatus} == 4 ]] ; then ewarn - ewarn "/usr/bin/php-cgi links to a different version of PHP." - ewarn "To make /usr/bin/php-cgi point to PHP v5, use php-select:" + ewarn "$EPREFIX/usr/bin/php-cgi links to a different version of PHP." + ewarn "To make $EPREFIX/usr/bin/php-cgi point to PHP v5, use php-select:" ewarn ewarn " php-select php-cgi php5" ewarn @@ -467,13 +469,13 @@ fi # Create the symlinks for php-devel - "${ROOT}/usr/sbin/php-select" -t php-devel php5 > /dev/null 2>&1 + "${EROOT}/usr/sbin/php-select" -t php-devel php5 > /dev/null 2>&1 exitStatus=$? if [[ $exitStatus == 5 ]] ; then php-select php-devel php5 elif [[ $exitStatus == 4 ]] ; then ewarn - ewarn "/usr/bin/php-config and/or /usr/bin/phpize are linked to a" + ewarn "$EPREFIX/usr/bin/php-config and/or $EPREFIX/usr/bin/phpize are linked to a" ewarn "different version of PHP. To make them point to PHP v5, use" ewarn "php-select:" ewarn