On 13:41 Sun 03 Oct     , Ole Markus With wrote:
> The eclasses have mostly been revised by me, and I do not have that much
> experience writing eclasses/ebuilds, so any comments are highly appreciated.

> php-ext-pecl-r2_src_install() {
>       php-ext-source-r2_src_install
> 
>       for doc in ${DOCS} "${WORKDIR}"/package.xml CREDITS ; do
>               [[ -s ${doc} ]] && dodoc ${doc}
>       done
> 
>       if has examples ${IUSE} && use examples ; then
>               insinto /usr/share/doc/${CATEGORY}/${PF}/examples
>               doins -r examples/*
>       fi
> }

Do you want to die if this stuff fails?

> # @FUNCTION: php-ext-pecl-r2_src_test
> # @DESCRIPTION:
> # Takes care of running any tests delivered with the PECL package.
> # Testing is somewhat standardized across pecl extensions through phpize's
> # run-tests.php - unfortunatly there are some quirks we need to work around
> php-ext-pecl-r2_src_test() {
>               
>       for slot in `php_get_slots`; do
>               NO_INTERACTION="yes" emake test
>       done

emake doesn't die on failure.

> for target in $USE_PHP; do
>       IUSE="${IUSE} php_targets_$target"
> done
> 
> #Make sure at least one target is installed. Abuses USE dependencies.
> for target in $USE_PHP; do
>       target=${target/+}
>       SELFDEPEND="$SELFDEPEND =$CATEGORY/$PF[php_targets_$target]"
>       slot=${target/php}
>       slot=${slot/-/.}
>       PHPDEPEND="$PHPDEPEND php_target_$target? ( dev-lang/php:${slot} )"
> done

Why do you iterate over the same list twice? You can just add one more 
line to the second one and do it all in the same loop.

> RDEPEND="${RDEPEND} 
>       || ( $SELFDEPEND )
>       $PHPDEPEND"

Is that || valid syntax if only one token is in SELFDEPEND? Is it 
possible for an ebuild to use this eclass without setting USE_PHP?

-- 
Thanks,
Donnie

Donnie Berkholz
Sr. Developer, Gentoo Linux
Blog: http://dberkholz.wordpress.com

Attachment: pgpJJDphXIOwu.pgp
Description: PGP signature

Reply via email to