-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Donnie!
Thanks for the input
On 06/10/10 20:06, Donnie Berkholz wrote:
> 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?
>
Sure.
>> # @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.
>
Will add die here then.
>> 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.
>
I can certainly merge these loops. No particular reason for having two
loops.
>> 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?
>
When I have tested this, nothing has complained by having only one atom
inside || ( ). It may not make much sense semantically, but it works.
Naturally, it could be that other package managers doesn't like this
syntax, and if so, there should be no problem to do add a test for
whether $USE_PHP contains either 1 or >=2 words.
The eclass sets a default value for $USE_PHP if unset somewhere in the
top of the eclass. Most ebuilds will not set USE_PHP.
Thanks for your time reviewing this eclass.
- --
Ole Markus
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.15 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQEcBAEBAgAGBQJMrM+nAAoJEGurSuXEqSv1Ho4IAK/wUnSdYX3fLQJ7zhm6iamG
Sx00/XWnmk/6T6skzlxI4HaTWc4mp1zBNQndni3WtGai/d60FeKw0uMmN6ynk19o
vcg8zWmaUlgva5U91jz8ryiKgTv5xngWCb7SqH67Ce1GthAhPsapyK7DTRkCYwyx
mJIW4YlJ4+fVV8OONG1y7UGIjcdvTkXHFr1at6tITkK72kgxgBQDVWRfZAdVomBr
5hdVkRDEht8So9ov2TPPOrmBoKHpE5LmJPTPm9GDNHN+J7W24iWornArtQ8xbfPT
RPTgsBZxkCrxwEpNiiEKteVioZb/I/5gfPFbW9a5hZt6ScMQAbBf+pulplQxkEw=
=mQiJ
-----END PGP SIGNATURE-----