| 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.5 2010/11/03 22:47:19 olemarkus Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/php-ext-source-r2.eclass,v 1.6 2010/12/27 22:19:51 darkside 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) |
| … | |
… | |
| 67 | IUSE="${IUSE} php_targets_${target}" |
67 | IUSE="${IUSE} php_targets_${target}" |
| 68 | target=${target/+} |
68 | target=${target/+} |
| 69 | SELFDEPEND="${SELFDEPEND} =${CATEGORY}/${PF}[php_targets_${target}]" |
69 | SELFDEPEND="${SELFDEPEND} =${CATEGORY}/${PF}[php_targets_${target}]" |
| 70 | slot=${target/php} |
70 | slot=${target/php} |
| 71 | slot=${slot/-/.} |
71 | slot=${slot/-/.} |
| 72 | PHPDEPEND="${PHPDEPEND} |
72 | PHPDEPEND="${PHPDEPEND} |
| 73 | php_targets_${target}? ( dev-lang/php:${slot} )" |
73 | php_targets_${target}? ( dev-lang/php:${slot} )" |
| 74 | done |
74 | done |
| 75 | |
75 | |
| 76 | RDEPEND="${RDEPEND} |
76 | RDEPEND="${RDEPEND} |
| 77 | || ( ${SELFDEPEND} ) |
77 | || ( ${SELFDEPEND} ) |
| 78 | ${PHPDEPEND}" |
78 | ${PHPDEPEND}" |
| 79 | |
79 | |
| 80 | |
80 | |
| 81 | # @FUNCTION: php-ext-source-r2_src_unpack |
81 | # @FUNCTION: php-ext-source-r2_src_unpack |
| … | |
… | |
| 83 | # runs standard src_unpack + _phpize |
83 | # runs standard src_unpack + _phpize |
| 84 | # |
84 | # |
| 85 | # @VARIABLE: PHP_EXT_SKIP_PHPIZE |
85 | # @VARIABLE: PHP_EXT_SKIP_PHPIZE |
| 86 | # @DESCRIPTION: |
86 | # @DESCRIPTION: |
| 87 | # phpize will be run by default for all ebuilds that use |
87 | # phpize will be run by default for all ebuilds that use |
| 88 | # php-ext-source-r1_src_unpack |
88 | # php-ext-source-r2_src_unpack |
| 89 | # Set PHP_EXT_SKIP_PHPIZE="yes" in your ebuild if you do not want to run phpize. |
89 | # Set PHP_EXT_SKIP_PHPIZE="yes" in your ebuild if you do not want to run phpize. |
| 90 | php-ext-source-r2_src_unpack() { |
90 | php-ext-source-r2_src_unpack() { |
| 91 | unpack ${A} |
91 | unpack ${A} |
| 92 | local slot orig_s="$S" |
92 | local slot orig_s="$S" |
| 93 | for slot in $(php_get_slots); do |
93 | for slot in $(php_get_slots); do |
| … | |
… | |
| 114 | ${PHPIZE} |
114 | ${PHPIZE} |
| 115 | # force run of libtoolize and regeneration of related autotools |
115 | # force run of libtoolize and regeneration of related autotools |
| 116 | # files (bug 220519) |
116 | # files (bug 220519) |
| 117 | rm aclocal.m4 |
117 | rm aclocal.m4 |
| 118 | eautoreconf |
118 | eautoreconf |
| 119 | fi |
119 | fi |
| 120 | } |
120 | } |
| 121 | |
121 | |
| 122 | # @FUNCTION: php-ext-source-r2_src_configure |
122 | # @FUNCTION: php-ext-source-r2_src_configure |
| 123 | # @DESCRIPTION: |
123 | # @DESCRIPTION: |
| 124 | # Takes care of standard configure for PHP extensions (modules). |
124 | # Takes care of standard configure for PHP extensions (modules). |
| … | |
… | |
| 143 | php-ext-source-r2_src_compile() { |
143 | php-ext-source-r2_src_compile() { |
| 144 | # net-snmp creates this file #324739 |
144 | # net-snmp creates this file #324739 |
| 145 | addpredict /usr/share/snmp/mibs/.index |
145 | addpredict /usr/share/snmp/mibs/.index |
| 146 | # shm extension createss a semaphore file #173574 |
146 | # shm extension createss a semaphore file #173574 |
| 147 | addpredict /session_mm_cli0.sem |
147 | addpredict /session_mm_cli0.sem |
| 148 | local slot |
148 | local slot |
| 149 | for slot in $(php_get_slots); do |
149 | for slot in $(php_get_slots); do |
| 150 | php_init_slot_env ${slot} |
150 | php_init_slot_env ${slot} |
| 151 | emake || die "Unable to make code" |
151 | emake || die "Unable to make code" |
| 152 | |
152 | |
| 153 | done |
153 | done |
| … | |
… | |
| 221 | # @FUNCTION: php-ext-source-r2_createinifiles |
221 | # @FUNCTION: php-ext-source-r2_createinifiles |
| 222 | # @DESCRIPTION: |
222 | # @DESCRIPTION: |
| 223 | # Builds ini files for every enabled slot and SAPI |
223 | # Builds ini files for every enabled slot and SAPI |
| 224 | php-ext-source-r2_createinifiles() { |
224 | php-ext-source-r2_createinifiles() { |
| 225 | local slot |
225 | local slot |
| 226 | for slot in $(php_get_slots); do |
226 | for slot in $(php_get_slots); do |
| 227 | php_init_slot_env ${slot} |
227 | php_init_slot_env ${slot} |
| 228 | # Pull in the PHP settings |
228 | # Pull in the PHP settings |
| 229 | |
229 | |
| 230 | # Build the list of <ext>.ini files to edit/add to |
230 | # Build the list of <ext>.ini files to edit/add to |
| 231 | php-ext-source-r2_buildinilist ${slot} |
231 | php-ext-source-r2_buildinilist ${slot} |