/[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.31 Revision 1.34
1# Copyright 1999-2011 Gentoo Foundation 1# Copyright 1999-2015 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.31 2011/12/14 23:10:51 mabi Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/depend.php.eclass,v 1.34 2015/06/17 20:11:28 grknight Exp $
4 4
5# @ECLASS: depend.php.eclass 5# @ECLASS: depend.php.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# Gentoo PHP team <php-bugs@gentoo.org> 7# Gentoo PHP team <php-bugs@gentoo.org>
8# @AUTHOR: 8# @AUTHOR:
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
18inherit eutils phpconfutils 18inherit eutils multilib phpconfutils
19 19
20# PHP5-only depend functions 20# PHP5-only depend functions
21 21
22# @FUNCTION: need_php5_cli 22# @FUNCTION: need_php5_cli
23# @DESCRIPTION: 23# @DESCRIPTION:
24# 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
25# with cli SAPI. 25# with cli SAPI.
26need_php5_cli() { 26need_php5_cli() {
27 eqawarn "(need_php5_cli) Deprecated function call. Set to be removed on 2015-07-17"
27 DEPEND="${DEPEND} =dev-lang/php-5*" 28 DEPEND="${DEPEND} =dev-lang/php-5*"
28 RDEPEND="${RDEPEND} =dev-lang/php-5*" 29 RDEPEND="${RDEPEND} =dev-lang/php-5*"
29 PHP_VERSION="5" 30 PHP_VERSION="5"
30} 31}
31 32
32# @FUNCTION: need_php5_httpd 33# @FUNCTION: need_php5_httpd
33# @DESCRIPTION: 34# @DESCRIPTION:
34# Set this after setting DEPEND/RDEPEND in your ebuild if the ebuild requires PHP5 35# Set this after setting DEPEND/RDEPEND in your ebuild if the ebuild requires PHP5
35# with either cgi or apache2 SAPI. 36# with either cgi or apache2 SAPI.
36need_php5_httpd() { 37need_php5_httpd() {
38 eqawarn "(need_php5_httpd) Deprecated function call. Set to be removed on 2015-07-17"
37 DEPEND="${DEPEND} =virtual/httpd-php-5*" 39 DEPEND="${DEPEND} =virtual/httpd-php-5*"
38 RDEPEND="${RDEPEND} =virtual/httpd-php-5*" 40 RDEPEND="${RDEPEND} =virtual/httpd-php-5*"
39 PHP_VERSION="5" 41 PHP_VERSION="5"
40} 42}
41 43
73# @FUNCTION: need_php_cli 75# @FUNCTION: need_php_cli
74# @DESCRIPTION: 76# @DESCRIPTION:
75# Set this after setting DEPEND/RDEPEND in your ebuild if the ebuild requires PHP 77# Set this after setting DEPEND/RDEPEND in your ebuild if the ebuild requires PHP
76# (any version) with cli SAPI. 78# (any version) with cli SAPI.
77need_php_cli() { 79need_php_cli() {
80 eqawarn "(need_php_cli) Deprecated function call. Set to be removed on 2015-07-17"
78 DEPEND="${DEPEND} dev-lang/php" 81 DEPEND="${DEPEND} dev-lang/php"
79 RDEPEND="${RDEPEND} dev-lang/php" 82 RDEPEND="${RDEPEND} dev-lang/php"
80} 83}
81 84
82# @FUNCTION: need_php_httpd 85# @FUNCTION: need_php_httpd
102# @DESCRIPTION: 105# @DESCRIPTION:
103# Set this after setting DEPEND/RDEPEND in your ebuild to depend on PHP version 106# Set this after setting DEPEND/RDEPEND in your ebuild to depend on PHP version
104# determined by ${CATEGORY} - any PHP version or PHP5 for dev-php or 107# determined by ${CATEGORY} - any PHP version or PHP5 for dev-php or
105# dev-php5, respectively. 108# dev-php5, respectively.
106need_php_by_category() { 109need_php_by_category() {
110 eqawarn "(need_php_by_category) Deprecated function call. Set to be removed on 2015-07-17"
107 case "${CATEGORY}" in 111 case "${CATEGORY}" in
108 dev-php) need_php ;; 112 dev-php) need_php ;;
109 *) die "Version of PHP required by packages in category ${CATEGORY} unknown" 113 *) die "Version of PHP required by packages in category ${CATEGORY} unknown"
110 esac 114 esac
111} 115}
143# require_php_cli or require_php_cgi) in pkg_setup until we are able to 147# require_php_cli or require_php_cgi) in pkg_setup until we are able to
144# depend on USE flags being enabled. The above described need_php[45]_cli 148# depend on USE flags being enabled. The above described need_php[45]_cli
145# and need_php[45]_httpd functions cannot guarantee these requirements. 149# and need_php[45]_httpd functions cannot guarantee these requirements.
146# See Bug 2272 for details. 150# See Bug 2272 for details.
147require_php_sapi_from() { 151require_php_sapi_from() {
152 eqawarn "(require_php_sapi_from) Deprecated function call. Set to be removed on 2015-07-17"
148 has_php 153 has_php
149 154
150 local has_sapi="0" 155 local has_sapi="0"
151 local x 156 local x
152 157
246# @DESCRIPTION: 251# @DESCRIPTION:
247# Call this function from pkg_setup if your package requires PHP compiled with 252# Call this function from pkg_setup if your package requires PHP compiled with
248# any of specified USE flags. Returns if any of the listed USE flags are enabled. 253# any of specified USE flags. Returns if any of the listed USE flags are enabled.
249# Dies if all of the listed USE flags are disabled. 254# Dies if all of the listed USE flags are disabled.
250require_php_with_any_use() { 255require_php_with_any_use() {
256 eqawarn "(require_php_with_any_use) Deprecated function call. Set to be removed on 2015-07-17"
251 has_php 257 has_php
252 258
253 local missing_use="" 259 local missing_use=""
254 local x 260 local x
255 261
294# @FUNCTION: has_zts 300# @FUNCTION: has_zts
295# @DESCRIPTION: 301# @DESCRIPTION:
296# Check if our PHP was compiled with ZTS (Zend Thread Safety) enabled. 302# Check if our PHP was compiled with ZTS (Zend Thread Safety) enabled.
297# @RETURN: 0 if true, 1 otherwise 303# @RETURN: 0 if true, 1 otherwise
298has_zts() { 304has_zts() {
305 eqawarn "(has_zts) Deprecated function call. Set to be removed on 2015-07-17"
299 has_php 306 has_php
300 307
301 if built_with_use =${PHP_PKG} apache2 threads || phpconfutils_built_with_use =${PHP_PKG} apache2 threads ; then 308 if built_with_use =${PHP_PKG} apache2 threads || phpconfutils_built_with_use =${PHP_PKG} apache2 threads ; then
302 return 0 309 return 0
303 fi 310 fi
308# @FUNCTION: has_debug 315# @FUNCTION: has_debug
309# @DESCRIPTION: 316# @DESCRIPTION:
310# Check if our PHP was built with debug support enabled. 317# Check if our PHP was built with debug support enabled.
311# @RETURN: 0 if true, 1 otherwise 318# @RETURN: 0 if true, 1 otherwise
312has_debug() { 319has_debug() {
320 eqawarn "(has_debug) Deprecated function call. Set to be removed on 2015-07-17"
313 has_php 321 has_php
314 322
315 if built_with_use =${PHP_PKG} debug || phpconfutils_built_with_use =${PHP_PKG} debug ; then 323 if built_with_use =${PHP_PKG} debug || phpconfutils_built_with_use =${PHP_PKG} debug ; then
316 return 0 324 return 0
317 fi 325 fi
322# @FUNCTION: has_concurrentmodphp 330# @FUNCTION: has_concurrentmodphp
323# @DESCRIPTION: 331# @DESCRIPTION:
324# Check if our PHP was built with the concurrentmodphp support enabled. 332# Check if our PHP was built with the concurrentmodphp support enabled.
325# @RETURN: 0 if true, 1 otherwise 333# @RETURN: 0 if true, 1 otherwise
326has_concurrentmodphp() { 334has_concurrentmodphp() {
335 eqawarn "(has_concurrentmodphp) Deprecated function call. Set to be removed on 2015-07-17"
327 has_php 336 has_php
328 337
329 if built_with_use =${PHP_PKG} apache2 concurrentmodphp || phpconfutils_built_with_use =${PHP_PKG} apache2 concurrentmodphp ; then 338 if built_with_use =${PHP_PKG} apache2 concurrentmodphp || phpconfutils_built_with_use =${PHP_PKG} apache2 concurrentmodphp ; then
330 return 0 339 return 0
331 fi 340 fi
345# This function is now redundant and DEPRECATED since 354# This function is now redundant and DEPRECATED since
346# pdo-external use flag and pecl-pdo-* ebuilds were removed. 355# pdo-external use flag and pecl-pdo-* ebuilds were removed.
347# You should use require_php_with_use pdo instead now. 356# You should use require_php_with_use pdo instead now.
348# @RETURN: die if feature is missing 357# @RETURN: die if feature is missing
349require_pdo() { 358require_pdo() {
359 eqawarn "(require_pdo) Deprecated function call. Set to be removed on 2015-07-17"
350 has_php 360 has_php
351 361
352 # Was PHP5 compiled with internal PDO support? 362 # Was PHP5 compiled with internal PDO support?
353 if built_with_use =${PHP_PKG} pdo || phpconfutils_built_with_use =${PHP_PKG} pdo ; then 363 if built_with_use =${PHP_PKG} pdo || phpconfutils_built_with_use =${PHP_PKG} pdo ; then
354 return 364 return
368# Determines which installed PHP version has the CLI SAPI enabled. 378# Determines which installed PHP version has the CLI SAPI enabled.
369# Useful for PEAR stuff, or anything which needs to run PHP script 379# Useful for PEAR stuff, or anything which needs to run PHP script
370# depending on the CLI SAPI. 380# depending on the CLI SAPI.
371# @RETURN: die if feature is missing 381# @RETURN: die if feature is missing
372require_php_cli() { 382require_php_cli() {
383 eqawarn "(require_php_cli) Deprecated function call. Set to be removed on 2015-07-17"
373 # If PHP_PKG is set, then we have remembered our PHP settings 384 # If PHP_PKG is set, then we have remembered our PHP settings
374 # from last time 385 # from last time
375 if [[ -n ${PHP_PKG} ]] ; then 386 if [[ -n ${PHP_PKG} ]] ; then
376 return 387 return
377 fi 388 fi
437# @FUNCTION: require_sqlite 448# @FUNCTION: require_sqlite
438# @DESCRIPTION: 449# @DESCRIPTION:
439# Require a PHP built with SQLite support 450# Require a PHP built with SQLite support
440# @RETURN: die if feature is missing 451# @RETURN: die if feature is missing
441require_sqlite() { 452require_sqlite() {
453 eqawarn "(require_sqlite) Deprecated function call. Set to be removed on 2015-07-17"
442 has_php 454 has_php
443 455
444 # Has our PHP been built with SQLite support? 456 # Has our PHP been built with SQLite support?
445 if built_with_use =${PHP_PKG} sqlite || phpconfutils_built_with_use =${PHP_PKG} sqlite ; then 457 if built_with_use =${PHP_PKG} sqlite || phpconfutils_built_with_use =${PHP_PKG} sqlite ; then
446 return 458 return
459# @FUNCTION: require_gd 471# @FUNCTION: require_gd
460# @DESCRIPTION: 472# @DESCRIPTION:
461# Require a PHP built with GD support 473# Require a PHP built with GD support
462# @RETURN: die if feature is missing 474# @RETURN: die if feature is missing
463require_gd() { 475require_gd() {
476 eqawarn "(require_gd) Deprecated function call. Set to be removed on 2015-07-17"
464 has_php 477 has_php
465 478
466 # Do we have the internal GD support installed? 479 # Do we have the internal GD support installed?
467 if built_with_use =${PHP_PKG} gd || phpconfutils_built_with_use =${PHP_PKG} gd ; then 480 if built_with_use =${PHP_PKG} gd || phpconfutils_built_with_use =${PHP_PKG} gd ; then
468 return 481 return
492 505
493# @FUNCTION: php_binary_extension 506# @FUNCTION: php_binary_extension
494# @DESCRIPTION: 507# @DESCRIPTION:
495# Executes some checks needed when installing a binary PHP extension. 508# Executes some checks needed when installing a binary PHP extension.
496php_binary_extension() { 509php_binary_extension() {
510 eqawarn "(php_binary_extension) Deprecated function call. Set to be removed on 2015-07-17"
497 has_php 511 has_php
498 512
499 local PUSE_ENABLED="" 513 local PUSE_ENABLED=""
500 514
501 # Binary extensions do not support the change of PHP 515 # Binary extensions do not support the change of PHP

Legend:
Removed from v.1.31  
changed lines
  Added in v.1.34

  ViewVC Help
Powered by ViewVC 1.1.20