The function require_php_cgi() doesn't work correctly. It checks if you have php version 4 installed, and then sets PHP_VERSION if it is compiled with the cgi use flag. But if you have both php4 and php5 installed and php4 doesn't have the cgi use flag. It'll go in the first if block, see it doesnt have the use flag, and then stop and the function will die because it never checks php5.
Can you test the patch below, please: Index: depend.php.eclass =================================================================== RCS file: /var/cvsroot/gentoo-x86/eclass/depend.php.eclass,v retrieving revision 1.8 diff -u -B -r1.8 depend.php.eclass --- depend.php.eclass 1 Jan 2006 01:14:59 -0000 1.8 +++ depend.php.eclass 21 Jan 2006 07:53:01 -0000 @@ -381,16 +381,22 @@ # detect which PHP version installed if has_version '=dev-lang/php-4*' ; then + PHP_PACKAGE_FOUND=1 pkg="`best_version '=dev-lang/php-4*'`" if built_with_use =${pkg} cgi ; then PHP_VERSION=4 fi - elif has_version '=dev-lang/php-5*' ; then + fi + + if has_version '=dev-lang/php-5*' ; then + PHP_PACKAGE_FOUND=1 pkg="`best_version '=dev-lang/php-5*'`" if built_with_use =${pkg} cgi ; then PHP_VERSION=5 fi - else + fi + + if [[ -z ${PHP_PACKAGE_FOUND} ]]; then die "Unable to find an installed dev-lang/php package" fi
Patch has been reviewed by Jakub Moc <jakub@gentoo.org> and committed to CVS.