/[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.22 Revision 1.23
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.22 2007/12/24 12:29:36 armin76 Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/depend.php.eclass,v 1.23 2008/01/06 19:30:24 swegener 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
9# @ECLASS: depend.php.eclass 9# @ECLASS: depend.php.eclass
10# @MAINTAINER: 10# @MAINTAINER:
11# Gentoo PHP team <php-bugs@gentoo.org> 11# Gentoo PHP team <php-bugs@gentoo.org>
12# @BLURB: Functions to allow ebuilds to depend on php[45] and check for specific features. 12# @BLURB: Functions to allow ebuilds to depend on php[45] and check for specific features.
13# @DESCRIPTION: 13# @DESCRIPTION:
14# This eclass provides functions that allow ebuilds to depend on php[45] and check 14# This eclass provides functions that allow ebuilds to depend on php[45] and check
15# for specific PHP features, SAPIs etc. Also provides dodoc-php wrapper to install 15# for specific PHP features, SAPIs etc. Also provides dodoc-php wrapper to install
16# documentation for PHP packages to php-specific location. 16# documentation for PHP packages to php-specific location.
17 17
18 18
19inherit eutils phpconfutils 19inherit eutils phpconfutils
166 166
167 167
168# @FUNCTION: has_php 168# @FUNCTION: has_php
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 174 # If PHP_PKG is already set, then we have remembered our PHP settings
175 # from last time 175 # from last time
176 if [[ -n ${PHP_PKG} ]] ; then 176 if [[ -n ${PHP_PKG} ]] ; then
203# of them is available. 203# of them is available.
204# 204#
205# Unfortunately, if you want to be really sure that the required SAPI is 205# Unfortunately, if you want to be really sure that the required SAPI is
206# provided by PHP, you will have to use this function or similar ones (like 206# provided by PHP, you will have to use this function or similar ones (like
207# require_php_cli or require_php_cgi) in pkg_setup until we are able to 207# require_php_cli or require_php_cgi) in pkg_setup until we are able to
208# depend on USE flags being enabled. The above described need_php[45]_cli 208# depend on USE flags being enabled. The above described need_php[45]_cli
209# and need_php[45]_httpd functions cannot guarantee these requirements. 209# and need_php[45]_httpd functions cannot guarantee these requirements.
210# See Bug 2272 for details. 210# See Bug 2272 for details.
211require_php_sapi_from() { 211require_php_sapi_from() {
212 has_php 212 has_php
213 213
245 245
246# @VARIABLE: PHPCHECKNODIE 246# @VARIABLE: PHPCHECKNODIE
247# @DESCRIPTION: 247# @DESCRIPTION:
248# You can set PHPCHECKNODIE to non-empty value in your ebuild to chain multiple 248# You can set PHPCHECKNODIE to non-empty value in your ebuild to chain multiple
249# require_php_with_(any)_use checks without making the ebuild die on every failure. 249# require_php_with_(any)_use checks without making the ebuild die on every failure.
250# This is useful in cases when certain PHP features are only required if specific 250# This is useful in cases when certain PHP features are only required if specific
251# USE flag(s) are enabled for that ebuild. 251# USE flag(s) are enabled for that ebuild.
252# @CODE 252# @CODE
253# Example: 253# Example:
254# 254#
255# local flags="pcre session snmp sockets wddx" 255# local flags="pcre session snmp sockets wddx"
621 621
622# @FUNCTION: dodoc-php 622# @FUNCTION: dodoc-php
623# @USAGE: <list of docs> 623# @USAGE: <list of docs>
624# @DESCRIPTION: 624# @DESCRIPTION:
625# Alternative to dodoc function for use in our PHP eclasses and ebuilds. 625# Alternative to dodoc function for use in our PHP eclasses and ebuilds.
626# Stored here because depend.php gets always sourced everywhere in the PHP 626# Stored here because depend.php gets always sourced everywhere in the PHP
627# ebuilds and eclasses. It simply is dodoc with a changed path to the docs. 627# ebuilds and eclasses. It simply is dodoc with a changed path to the docs.
628# NOTE: No support for docinto is provided! 628# NOTE: No support for docinto is provided!
629dodoc-php() { 629dodoc-php() {
630if [[ $# -lt 1 ]] ; then 630if [[ $# -lt 1 ]] ; then
631 echo "$0: at least one argument needed" 1>&2 631 echo "$0: at least one argument needed" 1>&2

Legend:
Removed from v.1.22  
changed lines
  Added in v.1.23

  ViewVC Help
Powered by ViewVC 1.1.20