/[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.27 Revision 1.32
1# Copyright 1999-2007 Gentoo Foundation 1# Copyright 1999-2012 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.27 2010/10/02 15:23:57 olemarkus Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/depend.php.eclass,v 1.32 2012/06/02 19:16:31 zmedico Exp $
4 4
5# @ECLASS: depend.php.eclass
6# @MAINTAINER:
7# Gentoo PHP team <php-bugs@gentoo.org>
8# @AUTHOR:
5# Author: Stuart Herbert <stuart@gentoo.org> 9# Author: Stuart Herbert <stuart@gentoo.org>
6# Author: Luca Longinotti <chtekk@gentoo.org> 10# Author: Luca Longinotti <chtekk@gentoo.org>
7# Author: Jakub Moc <jakub@gentoo.org> (documentation) 11# Author: Jakub Moc <jakub@gentoo.org> (documentation)
8
9# @ECLASS: depend.php.eclass
10# @MAINTAINER:
11# Gentoo PHP team <php-bugs@gentoo.org>
12# @BLURB: Functions to allow ebuilds to depend on php5 and check for specific features. 12# @BLURB: Functions to allow ebuilds to depend on php5 and check for specific features.
13# @DESCRIPTION: 13# @DESCRIPTION:
14# This eclass provides functions that allow ebuilds to depend on php5 and check 14# This eclass provides functions that allow ebuilds to depend on php5 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
19inherit eutils phpconfutils 18inherit eutils multilib phpconfutils
20 19
21# PHP5-only depend functions 20# PHP5-only depend functions
22 21
23# @FUNCTION: need_php5_cli 22# @FUNCTION: need_php5_cli
24# @DESCRIPTION: 23# @DESCRIPTION:
25# Set this after setting DEPEND/RDEPEND in your ebuild if the ebuild requires PHP5 24# Set this after setting DEPEND/RDEPEND in your ebuild if the ebuild requires PHP5
26# with cli SAPI. 25# with cli SAPI.
27need_php5_cli() { 26need_php5_cli() {
28 DEPEND="${DEPEND} =virtual/php-5*" 27 DEPEND="${DEPEND} =dev-lang/php-5*"
29 RDEPEND="${RDEPEND} =virtual/php-5*" 28 RDEPEND="${RDEPEND} =dev-lang/php-5*"
30 PHP_VERSION="5" 29 PHP_VERSION="5"
31} 30}
32 31
33# @FUNCTION: need_php5_httpd 32# @FUNCTION: need_php5_httpd
34# @DESCRIPTION: 33# @DESCRIPTION:
74# @FUNCTION: need_php_cli 73# @FUNCTION: need_php_cli
75# @DESCRIPTION: 74# @DESCRIPTION:
76# Set this after setting DEPEND/RDEPEND in your ebuild if the ebuild requires PHP 75# Set this after setting DEPEND/RDEPEND in your ebuild if the ebuild requires PHP
77# (any version) with cli SAPI. 76# (any version) with cli SAPI.
78need_php_cli() { 77need_php_cli() {
79 DEPEND="${DEPEND} virtual/php" 78 DEPEND="${DEPEND} dev-lang/php"
80 RDEPEND="${RDEPEND} virtual/php" 79 RDEPEND="${RDEPEND} dev-lang/php"
81} 80}
82 81
83# @FUNCTION: need_php_httpd 82# @FUNCTION: need_php_httpd
84# @DESCRIPTION: 83# @DESCRIPTION:
85# Set this after setting DEPEND/RDEPEND in your ebuild if the ebuild requires PHP 84# Set this after setting DEPEND/RDEPEND in your ebuild if the ebuild requires PHP
105# determined by ${CATEGORY} - any PHP version or PHP5 for dev-php or 104# determined by ${CATEGORY} - any PHP version or PHP5 for dev-php or
106# dev-php5, respectively. 105# dev-php5, respectively.
107need_php_by_category() { 106need_php_by_category() {
108 case "${CATEGORY}" in 107 case "${CATEGORY}" in
109 dev-php) need_php ;; 108 dev-php) need_php ;;
110 dev-php5) need_php5 ;;
111 *) die "Version of PHP required by packages in category ${CATEGORY} unknown" 109 *) die "Version of PHP required by packages in category ${CATEGORY} unknown"
112 esac 110 esac
113} 111}
114 112
115 113
206 204
207 einfo "Checking for required PHP feature(s) ..." 205 einfo "Checking for required PHP feature(s) ..."
208 206
209 for x in $@ ; do 207 for x in $@ ; do
210 case $x in 208 case $x in
211 pcre|spl|reflection) 209 pcre|spl|reflection|mhash)
212 eqawarn "require_php_with_use MUST NOT check for the pcre, spl or reflection USE flag." 210 eqawarn "require_php_with_use MUST NOT check for the pcre, spl, mhash or reflection USE flag."
213 eqawarn "These USE flags are removed from >=dev-lang/php-5.3 and your ebuild will break" 211 eqawarn "These USE flags are removed from >=dev-lang/php-5.3 and your ebuild will break"
214 eqawarn "if you check the USE flags against PHP 5.3 ebuilds." 212 eqawarn "if you check the USE flags against PHP 5.3 ebuilds."
215 eqawarn "Please use USE dependencies from EAPI 2 instead" 213 eqawarn "Please use USE dependencies from EAPI 2 instead"
216 ;; 214 ;;
217 esac 215 esac

Legend:
Removed from v.1.27  
changed lines
  Added in v.1.32

  ViewVC Help
Powered by ViewVC 1.1.20