1 |
-----BEGIN PGP SIGNED MESSAGE----- |
2 |
Hash: SHA1 |
3 |
|
4 |
Hi Donnie! |
5 |
|
6 |
Thanks for the input |
7 |
|
8 |
On 06/10/10 20:06, Donnie Berkholz wrote: |
9 |
> On 13:41 Sun 03 Oct , Ole Markus With wrote: |
10 |
>> The eclasses have mostly been revised by me, and I do not have that much |
11 |
>> experience writing eclasses/ebuilds, so any comments are highly appreciated. |
12 |
> |
13 |
>> php-ext-pecl-r2_src_install() { |
14 |
>> php-ext-source-r2_src_install |
15 |
>> |
16 |
>> for doc in ${DOCS} "${WORKDIR}"/package.xml CREDITS ; do |
17 |
>> [[ -s ${doc} ]] && dodoc ${doc} |
18 |
>> done |
19 |
>> |
20 |
>> if has examples ${IUSE} && use examples ; then |
21 |
>> insinto /usr/share/doc/${CATEGORY}/${PF}/examples |
22 |
>> doins -r examples/* |
23 |
>> fi |
24 |
>> } |
25 |
> |
26 |
> Do you want to die if this stuff fails? |
27 |
> |
28 |
|
29 |
Sure. |
30 |
|
31 |
>> # @FUNCTION: php-ext-pecl-r2_src_test |
32 |
>> # @DESCRIPTION: |
33 |
>> # Takes care of running any tests delivered with the PECL package. |
34 |
>> # Testing is somewhat standardized across pecl extensions through phpize's |
35 |
>> # run-tests.php - unfortunatly there are some quirks we need to work around |
36 |
>> php-ext-pecl-r2_src_test() { |
37 |
>> |
38 |
>> for slot in `php_get_slots`; do |
39 |
>> NO_INTERACTION="yes" emake test |
40 |
>> done |
41 |
> |
42 |
> emake doesn't die on failure. |
43 |
> |
44 |
|
45 |
Will add die here then. |
46 |
|
47 |
>> for target in $USE_PHP; do |
48 |
>> IUSE="${IUSE} php_targets_$target" |
49 |
>> done |
50 |
>> |
51 |
>> #Make sure at least one target is installed. Abuses USE dependencies. |
52 |
>> for target in $USE_PHP; do |
53 |
>> target=${target/+} |
54 |
>> SELFDEPEND="$SELFDEPEND =$CATEGORY/$PF[php_targets_$target]" |
55 |
>> slot=${target/php} |
56 |
>> slot=${slot/-/.} |
57 |
>> PHPDEPEND="$PHPDEPEND php_target_$target? ( dev-lang/php:${slot} )" |
58 |
>> done |
59 |
> |
60 |
> Why do you iterate over the same list twice? You can just add one more |
61 |
> line to the second one and do it all in the same loop. |
62 |
> |
63 |
|
64 |
I can certainly merge these loops. No particular reason for having two |
65 |
loops. |
66 |
|
67 |
>> RDEPEND="${RDEPEND} |
68 |
>> || ( $SELFDEPEND ) |
69 |
>> $PHPDEPEND" |
70 |
> |
71 |
> Is that || valid syntax if only one token is in SELFDEPEND? Is it |
72 |
> possible for an ebuild to use this eclass without setting USE_PHP? |
73 |
> |
74 |
|
75 |
|
76 |
When I have tested this, nothing has complained by having only one atom |
77 |
inside || ( ). It may not make much sense semantically, but it works. |
78 |
Naturally, it could be that other package managers doesn't like this |
79 |
syntax, and if so, there should be no problem to do add a test for |
80 |
whether $USE_PHP contains either 1 or >=2 words. |
81 |
|
82 |
The eclass sets a default value for $USE_PHP if unset somewhere in the |
83 |
top of the eclass. Most ebuilds will not set USE_PHP. |
84 |
|
85 |
|
86 |
Thanks for your time reviewing this eclass. |
87 |
|
88 |
- -- |
89 |
Ole Markus |
90 |
-----BEGIN PGP SIGNATURE----- |
91 |
Version: GnuPG v2.0.15 (GNU/Linux) |
92 |
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ |
93 |
|
94 |
iQEcBAEBAgAGBQJMrM+nAAoJEGurSuXEqSv1Ho4IAK/wUnSdYX3fLQJ7zhm6iamG |
95 |
Sx00/XWnmk/6T6skzlxI4HaTWc4mp1zBNQndni3WtGai/d60FeKw0uMmN6ynk19o |
96 |
vcg8zWmaUlgva5U91jz8ryiKgTv5xngWCb7SqH67Ce1GthAhPsapyK7DTRkCYwyx |
97 |
mJIW4YlJ4+fVV8OONG1y7UGIjcdvTkXHFr1at6tITkK72kgxgBQDVWRfZAdVomBr |
98 |
5hdVkRDEht8So9ov2TPPOrmBoKHpE5LmJPTPm9GDNHN+J7W24iWornArtQ8xbfPT |
99 |
RPTgsBZxkCrxwEpNiiEKteVioZb/I/5gfPFbW9a5hZt6ScMQAbBf+pulplQxkEw= |
100 |
=mQiJ |
101 |
-----END PGP SIGNATURE----- |