/[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.34 Revision 1.35
1# Copyright 1999-2015 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.34 2015/06/17 20:11:28 grknight Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/depend.php.eclass,v 1.35 2015/06/18 14:22:59 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 multilib phpconfutils 18inherit eutils multilib
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:
156 local x 156 local x
157 157
158 einfo "Checking for compatible SAPI(s)" 158 einfo "Checking for compatible SAPI(s)"
159 159
160 for x in $@ ; do 160 for x in $@ ; do
161 if built_with_use =${PHP_PKG} ${x} || phpconfutils_built_with_use =${PHP_PKG} ${x} ; then 161 if built_with_use =${PHP_PKG} ${x} ; then
162 einfo " Discovered compatible SAPI ${x}" 162 einfo " Discovered compatible SAPI ${x}"
163 has_sapi="1" 163 has_sapi="1"
164 fi 164 fi
165 done 165 done
166 166
217 eqawarn "if you check the USE flags against PHP 5.3 ebuilds." 217 eqawarn "if you check the USE flags against PHP 5.3 ebuilds."
218 eqawarn "Please use USE dependencies from EAPI 2 instead" 218 eqawarn "Please use USE dependencies from EAPI 2 instead"
219 ;; 219 ;;
220 esac 220 esac
221 221
222 if ! built_with_use =${PHP_PKG} ${x} && ! phpconfutils_built_with_use =${PHP_PKG} ${x} ; then 222 if ! built_with_use =${PHP_PKG} ${x} ; then
223 einfo " Discovered missing USE flag: ${x}" 223 einfo " Discovered missing USE flag: ${x}"
224 missing_use="${missing_use} ${x}" 224 missing_use="${missing_use} ${x}"
225 fi 225 fi
226 done 226 done
227 227
260 local x 260 local x
261 261
262 einfo "Checking for required PHP feature(s) ..." 262 einfo "Checking for required PHP feature(s) ..."
263 263
264 for x in $@ ; do 264 for x in $@ ; do
265 if built_with_use =${PHP_PKG} ${x} || phpconfutils_built_with_use =${PHP_PKG} ${x} ; then 265 if built_with_use =${PHP_PKG} ${x} ; then
266 einfo " USE flag ${x} is enabled, ok ..." 266 einfo " USE flag ${x} is enabled, ok ..."
267 return 267 return
268 else 268 else
269 missing_use="${missing_use} ${x}" 269 missing_use="${missing_use} ${x}"
270 fi 270 fi
303# @RETURN: 0 if true, 1 otherwise 303# @RETURN: 0 if true, 1 otherwise
304has_zts() { 304has_zts() {
305 eqawarn "(has_zts) Deprecated function call. Set to be removed on 2015-07-17" 305 eqawarn "(has_zts) Deprecated function call. Set to be removed on 2015-07-17"
306 has_php 306 has_php
307 307
308 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 ; then
309 return 0 309 return 0
310 fi 310 fi
311 311
312 return 1 312 return 1
313} 313}
318# @RETURN: 0 if true, 1 otherwise 318# @RETURN: 0 if true, 1 otherwise
319has_debug() { 319has_debug() {
320 eqawarn "(has_debug) Deprecated function call. Set to be removed on 2015-07-17" 320 eqawarn "(has_debug) Deprecated function call. Set to be removed on 2015-07-17"
321 has_php 321 has_php
322 322
323 if built_with_use =${PHP_PKG} debug || phpconfutils_built_with_use =${PHP_PKG} debug ; then 323 if built_with_use =${PHP_PKG} debug ; then
324 return 0 324 return 0
325 fi 325 fi
326 326
327 return 1 327 return 1
328} 328}
333# @RETURN: 0 if true, 1 otherwise 333# @RETURN: 0 if true, 1 otherwise
334has_concurrentmodphp() { 334has_concurrentmodphp() {
335 eqawarn "(has_concurrentmodphp) Deprecated function call. Set to be removed on 2015-07-17" 335 eqawarn "(has_concurrentmodphp) Deprecated function call. Set to be removed on 2015-07-17"
336 has_php 336 has_php
337 337
338 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 ; then
339 return 0 339 return 0
340 fi 340 fi
341 341
342 return 1 342 return 1
343} 343}
358require_pdo() { 358require_pdo() {
359 eqawarn "(require_pdo) Deprecated function call. Set to be removed on 2015-07-17" 359 eqawarn "(require_pdo) Deprecated function call. Set to be removed on 2015-07-17"
360 has_php 360 has_php
361 361
362 # Was PHP5 compiled with internal PDO support? 362 # Was PHP5 compiled with internal PDO support?
363 if built_with_use =${PHP_PKG} pdo || phpconfutils_built_with_use =${PHP_PKG} pdo ; then 363 if built_with_use =${PHP_PKG} pdo ; then
364 return 364 return
365 else 365 else
366 eerror 366 eerror
367 eerror "No PDO extension for PHP found." 367 eerror "No PDO extension for PHP found."
368 eerror "Please note that PDO only exists for PHP 5." 368 eerror "Please note that PDO only exists for PHP 5."
390 local PHP_PACKAGE_FOUND="" 390 local PHP_PACKAGE_FOUND=""
391 391
392 if has_version '=dev-lang/php-5*' ; then 392 if has_version '=dev-lang/php-5*' ; then
393 PHP_PACKAGE_FOUND="1" 393 PHP_PACKAGE_FOUND="1"
394 pkg="$(best_version '=dev-lang/php-5*')" 394 pkg="$(best_version '=dev-lang/php-5*')"
395 if built_with_use =${pkg} cli || phpconfutils_built_with_use =${pkg} cli ; then 395 if built_with_use =${pkg} cli ; then
396 PHP_VERSION="5" 396 PHP_VERSION="5"
397 fi 397 fi
398 fi 398 fi
399 399
400 if [[ -z ${PHP_PACKAGE_FOUND} ]] ; then 400 if [[ -z ${PHP_PACKAGE_FOUND} ]] ; then
425 local PHP_PACKAGE_FOUND="" 425 local PHP_PACKAGE_FOUND=""
426 426
427 if has_version '=dev-lang/php-5*' ; then 427 if has_version '=dev-lang/php-5*' ; then
428 PHP_PACKAGE_FOUND="1" 428 PHP_PACKAGE_FOUND="1"
429 pkg="$(best_version '=dev-lang/php-5*')" 429 pkg="$(best_version '=dev-lang/php-5*')"
430 if built_with_use =${pkg} cgi || phpconfutils_built_with_use =${pkg} cgi ; then 430 if built_with_use =${pkg} cgi ; then
431 PHP_VERSION="5" 431 PHP_VERSION="5"
432 fi 432 fi
433 fi 433 fi
434 434
435 if [[ -z ${PHP_PACKAGE_FOUND} ]] ; then 435 if [[ -z ${PHP_PACKAGE_FOUND} ]] ; then
452require_sqlite() { 452require_sqlite() {
453 eqawarn "(require_sqlite) Deprecated function call. Set to be removed on 2015-07-17" 453 eqawarn "(require_sqlite) Deprecated function call. Set to be removed on 2015-07-17"
454 has_php 454 has_php
455 455
456 # Has our PHP been built with SQLite support? 456 # Has our PHP been built with SQLite support?
457 if built_with_use =${PHP_PKG} sqlite || phpconfutils_built_with_use =${PHP_PKG} sqlite ; then 457 if built_with_use =${PHP_PKG} sqlite ; then
458 return 458 return
459 fi 459 fi
460 460
461 # If we get here, then we don't have any SQLite support for PHP installed 461 # If we get here, then we don't have any SQLite support for PHP installed
462 eerror 462 eerror
475require_gd() { 475require_gd() {
476 eqawarn "(require_gd) Deprecated function call. Set to be removed on 2015-07-17" 476 eqawarn "(require_gd) Deprecated function call. Set to be removed on 2015-07-17"
477 has_php 477 has_php
478 478
479 # Do we have the internal GD support installed? 479 # Do we have the internal GD support installed?
480 if built_with_use =${PHP_PKG} gd || phpconfutils_built_with_use =${PHP_PKG} gd ; then 480 if built_with_use =${PHP_PKG} gd ; then
481 return 481 return
482 fi 482 fi
483 483
484 # Ok, maybe GD was built using the external library support? 484 # Ok, maybe GD was built using the external library support?
485 if built_with_use =${PHP_PKG} gd-external || phpconfutils_built_with_use =${PHP_PKG} gd-external ; then 485 if built_with_use =${PHP_PKG} gd-external ; then
486 return 486 return
487 fi 487 fi
488 488
489 # If we get here, then we have no GD support 489 # If we get here, then we have no GD support
490 eerror 490 eerror

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

  ViewVC Help
Powered by ViewVC 1.1.20