| 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.6 2010/12/27 22:19:51 darkside Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/php-ext-source-r2.eclass,v 1.7 2011/01/09 00:05:10 robbat2 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) |
| … | |
… | |
| 59 | |
59 | |
| 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 | |
|
|
65 | # @ECLASS-VARIABLE: PHP_EXT_OPTIONAL_USE |
|
|
66 | # @DESCRIPTION: |
|
|
67 | # If set, this is the USE flag that the PHP dependencies are behind |
|
|
68 | # Most commonly set as PHP_EXT_OPTIONAL_USE=php to get the dependencies behind |
|
|
69 | # USE=php. |
| 64 | |
70 | |
| 65 | #Make sure at least one target is installed. Abuses USE dependencies. |
71 | #Make sure at least one target is installed. Abuses USE dependencies. |
| 66 | for target in ${USE_PHP}; do |
72 | for target in ${USE_PHP}; do |
| 67 | IUSE="${IUSE} php_targets_${target}" |
73 | IUSE="${IUSE} php_targets_${target}" |
| 68 | target=${target/+} |
74 | target=${target/+} |
| … | |
… | |
| 72 | PHPDEPEND="${PHPDEPEND} |
78 | PHPDEPEND="${PHPDEPEND} |
| 73 | php_targets_${target}? ( dev-lang/php:${slot} )" |
79 | php_targets_${target}? ( dev-lang/php:${slot} )" |
| 74 | done |
80 | done |
| 75 | |
81 | |
| 76 | RDEPEND="${RDEPEND} |
82 | RDEPEND="${RDEPEND} |
|
|
83 | ${PHP_EXT_OPTIONAL_USE}${PHP_EXT_OPTIONAL_USE:+? ( } |
| 77 | || ( ${SELFDEPEND} ) |
84 | || ( ${SELFDEPEND} ) |
| 78 | ${PHPDEPEND}" |
85 | ${PHPDEPEND} |
|
|
86 | ${PHP_EXT_OPTIONAL_USE:+ )}" |
| 79 | |
87 | |
| 80 | |
88 | |
| 81 | # @FUNCTION: php-ext-source-r2_src_unpack |
89 | # @FUNCTION: php-ext-source-r2_src_unpack |
| 82 | # @DESCRIPTION: |
90 | # @DESCRIPTION: |
| 83 | # runs standard src_unpack + _phpize |
91 | # runs standard src_unpack + _phpize |