/[gentoo-x86]/eclass/depend.php.eclass
Gentoo

Diff of /eclass/depend.php.eclass

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

Revision 1.24 Revision 1.25
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/depend.php.eclass,v 1.24 2008/02/11 20:47:35 armin76 Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/depend.php.eclass,v 1.25 2008/02/26 16:26:08 armin76 Exp $
4 4
5# Author: Stuart Herbert <stuart@gentoo.org> 5# Author: Stuart Herbert <stuart@gentoo.org>
6# Author: Luca Longinotti <chtekk@gentoo.org> 6# Author: Luca Longinotti <chtekk@gentoo.org>
7# Author: Jakub Moc <jakub@gentoo.org> (documentation) 7# Author: Jakub Moc <jakub@gentoo.org> (documentation)
8 8
169# @DESCRIPTION: 169# @DESCRIPTION:
170# Call this function from your pkg_setup, src_compile, src_install etc. if you 170# Call this function from your pkg_setup, src_compile, src_install etc. if you
171# need to know which PHP version is being used and where the PHP binaries/data 171# need to know which PHP version is being used and where the PHP binaries/data
172# are installed. 172# are installed.
173has_php() { 173has_php() {
174 # If PHP_PKG is already set, then we have remembered our PHP settings
175 # from last time
176 if [[ -n ${PHP_PKG} ]] ; then
177 return
178 fi
179
180 if [[ -z ${PHP_VERSION} ]] ; then
181 # Detect which PHP version we have installed 174 # Detect which PHP version we have installed
182 if has_version '=dev-lang/php-5*' ; then 175 if has_version '=dev-lang/php-5*' ; then
183 PHP_VERSION="5" 176 PHP_VERSION="5"
184 elif has_version '=dev-lang/php-4*' ; then 177 elif has_version '=dev-lang/php-4*' ; then
185 PHP_VERSION="4" 178 PHP_VERSION="4"
186 else 179 else
187 die "Unable to find an installed dev-lang/php package" 180 die "Unable to find an installed dev-lang/php package"
188 fi
189 fi 181 fi
190 182
191 # If we get here, then PHP_VERSION tells us which version of PHP we 183 # If we get here, then PHP_VERSION tells us which version of PHP we
192 # want to use 184 # want to use
193 uses_php${PHP_VERSION} 185 uses_php${PHP_VERSION}

Legend:
Removed from v.1.24  
changed lines
  Added in v.1.25

  ViewVC Help
Powered by ViewVC 1.1.20