| 1 | # Copyright 1999-2007 Gentoo Foundation |
1 | # Copyright 1999-2007 Gentoo Foundation |
| 2 | # Distributed under the terms of the GNU General Public License v2 |
2 | # Distributed under the terms of the GNU General Public License v2 |
| 3 | # $Header: /var/cvsroot/gentoo-x86/eclass/php-ext-source-r2.eclass,v 1.1 2010/10/06 08:25:51 olemarkus Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/php-ext-source-r2.eclass,v 1.2 2010/10/06 19:58:45 olemarkus Exp $ |
| 4 | # |
4 | # |
| 5 | # Author: Tal Peer <coredumb@gentoo.org> |
5 | # Author: Tal Peer <coredumb@gentoo.org> |
| 6 | # Author: Stuart Herbert <stuart@gentoo.org> |
6 | # Author: Stuart Herbert <stuart@gentoo.org> |
| 7 | # Author: Luca Longinotti <chtekk@gentoo.org> |
7 | # Author: Luca Longinotti <chtekk@gentoo.org> |
| 8 | # Author: Jakub Moc <jakub@gentoo.org> (documentation) |
8 | # Author: Jakub Moc <jakub@gentoo.org> (documentation) |
| … | |
… | |
| 60 | # @ECLASS-VARIABLE: USE_PHP |
60 | # @ECLASS-VARIABLE: USE_PHP |
| 61 | # @DESCRIPTION: |
61 | # @DESCRIPTION: |
| 62 | # Lists the PHP slots compatibile the extension is compatibile with |
62 | # Lists the PHP slots compatibile the extension is compatibile with |
| 63 | [[ -z "$USE_PHP" ]] && USE_PHP="php5-2 php5-3" |
63 | [[ -z "$USE_PHP" ]] && USE_PHP="php5-2 php5-3" |
| 64 | |
64 | |
|
|
65 | #Make sure at least one target is installed. Abuses USE dependencies. |
| 65 | for target in $USE_PHP; do |
66 | for target in $USE_PHP; do |
| 66 | IUSE="${IUSE} php_targets_$target" |
67 | IUSE="${IUSE} php_targets_$target" |
| 67 | done |
|
|
| 68 | |
|
|
| 69 | #Make sure at least one target is installed. Abuses USE dependencies. |
|
|
| 70 | for target in $USE_PHP; do |
|
|
| 71 | target=${target/+} |
68 | target=${target/+} |
| 72 | SELFDEPEND="$SELFDEPEND =$CATEGORY/$PF[php_targets_$target]" |
69 | SELFDEPEND="$SELFDEPEND =$CATEGORY/$PF[php_targets_$target]" |
| 73 | slot=${target/php} |
70 | slot=${target/php} |
| 74 | slot=${slot/-/.} |
71 | slot=${slot/-/.} |
|
|
72 | PHPDEPEND="$PHPDEPEND |
| 75 | PHPDEPEND="$PHPDEPEND php_target_$target? ( dev-lang/php:${slot} )" |
73 | php_targets_$target? ( dev-lang/php:${slot} )" |
| 76 | done |
74 | done |
| 77 | |
75 | |
| 78 | RDEPEND="${RDEPEND} |
76 | RDEPEND="${RDEPEND} |
| 79 | || ( $SELFDEPEND ) |
77 | || ( $SELFDEPEND ) |
| 80 | $PHPDEPEND" |
78 | $PHPDEPEND" |