/[gentoo-x86]/eclass/php-ext-source-r2.eclass
Gentoo

Diff of /eclass/php-ext-source-r2.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.4 Revision 1.5
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.4 2010/11/02 21:46:05 olemarkus Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/php-ext-source-r2.eclass,v 1.5 2010/11/03 22:47:19 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)
14# @BLURB: A unified interface for compiling and installing standalone PHP extensions. 14# @BLURB: A unified interface for compiling and installing standalone PHP extensions.
15# @DESCRIPTION: 15# @DESCRIPTION:
16# This eclass provides a unified interface for compiling and installing standalone 16# This eclass provides a unified interface for compiling and installing standalone
17# PHP extensions (modules). 17# PHP extensions (modules).
18 18
19inherit flag-o-matic autotools depend.php 19inherit flag-o-matic autotools
20 20
21EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_install 21EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_install
22 22
23# @ECLASS-VARIABLE: PHP_EXT_NAME 23# @ECLASS-VARIABLE: PHP_EXT_NAME
24# @DESCRIPTION: 24# @DESCRIPTION:
195 PHPCLI="/usr/${libdir}/${1}/bin/php" 195 PHPCLI="/usr/${libdir}/${1}/bin/php"
196 PHPCGI="/usr/${libdir}/${1}/bin/php-cgi" 196 PHPCGI="/usr/${libdir}/${1}/bin/php-cgi"
197 PHP_PKG="$(best_version =dev-lang/php-${1:3}*)" 197 PHP_PKG="$(best_version =dev-lang/php-${1:3}*)"
198 PHPPREFIX="/usr/${libdir}/${slot}" 198 PHPPREFIX="/usr/${libdir}/${slot}"
199 EXT_DIR="$(${PHPCONFIG} --extension-dir 2>/dev/null)" 199 EXT_DIR="$(${PHPCONFIG} --extension-dir 2>/dev/null)"
200 PHP_CURRENTSLOT=${1:3}
200 201
201 S="${WORKDIR}/${1}" 202 S="${WORKDIR}/${1}"
202 cd "${S}" 203 cd "${S}"
203} 204}
204 205
249 250
250php-ext-source-r2_addextension() { 251php-ext-source-r2_addextension() {
251 if [[ "${PHP_EXT_ZENDEXT}" = "yes" ]] ; then 252 if [[ "${PHP_EXT_ZENDEXT}" = "yes" ]] ; then
252 # We need the full path for ZendEngine extensions 253 # We need the full path for ZendEngine extensions
253 # and we need to check for debugging enabled! 254 # and we need to check for debugging enabled!
254 if has_zts ; then 255 if has_version "dev-lang/php:${PHP_CURRENTSLOT}[threads]" ; then
255 if has_debug ; then 256 if has_version "dev-lang/php:${PHP_CURRENTSLOT}[debug]" ; then
256 ext_type="zend_extension_debug_ts" 257 ext_type="zend_extension_debug_ts"
257 else 258 else
258 ext_type="zend_extension_ts" 259 ext_type="zend_extension_ts"
259 fi 260 fi
260 ext_file="${EXT_DIR}/${1}" 261 ext_file="${EXT_DIR}/${1}"
261 else 262 else
262 if has_debug ; then 263 if has_version "dev-lang/php:${PHP_CURRENTSLOT}[debug]"; then
263 ext_type="zend_extension_debug" 264 ext_type="zend_extension_debug"
264 else 265 else
265 ext_type="zend_extension" 266 ext_type="zend_extension"
266 fi 267 fi
267 ext_file="${EXT_DIR}/${1}" 268 ext_file="${EXT_DIR}/${1}"

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

  ViewVC Help
Powered by ViewVC 1.1.20