/[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.14 Revision 1.16
1# Copyright 1999-2005 Gentoo Foundation 1# Copyright 1999-2005 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.14 2006/05/05 21:42:16 chtekk Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/depend.php.eclass,v 1.16 2006/08/07 07:10:16 chtekk Exp $
4# 4#
5# ======================================================================== 5# ========================================================================
6# 6#
7# depend.php.eclass 7# depend.php.eclass
8# functions to allow ebuilds to depend on php4 and/or php5 8# functions to allow ebuilds to depend on php4 and/or php5
202 einfo " Discovered missing USE flag: ${x}" 202 einfo " Discovered missing USE flag: ${x}"
203 missing_use="${missing_use} ${x}" 203 missing_use="${missing_use} ${x}"
204 fi 204 fi
205 done 205 done
206 206
207 if [[ -z ${missing_use} ]] ; then 207 if [[ -z "${missing_use}" ]] ; then
208 if [[ -z "${PHPCHECKNODIE}" ]] ; then
208 return 209 return
210 else
211 return 0
209 fi 212 fi
213 fi
210 214
215 if [[ -z "${PHPCHECKNODIE}" ]] ; then
211 eerror 216 eerror
212 eerror "${PHP_PKG} needs to be re-installed with all of the following" 217 eerror "${PHP_PKG} needs to be re-installed with all of the following"
213 eerror "USE flags enabled:" 218 eerror "USE flags enabled:"
214 eerror 219 eerror
215 eerror " $@" 220 eerror " $@"
216 eerror 221 eerror
217 die "Missing PHP USE flags found" 222 die "Missing PHP USE flags found"
223 else
224 return 1
225 fi
218} 226}
219 227
220# Call this function from pkg_setup if your package requires PHP compiled 228# Call this function from pkg_setup if your package requires PHP compiled
221# with any of specified USE flags 229# with any of specified USE flags
222# 230#
240 else 248 else
241 missing_use="${missing_use} ${x}" 249 missing_use="${missing_use} ${x}"
242 fi 250 fi
243 done 251 done
244 252
245 if [[ -z ${missing_use} ]] ; then 253 if [[ -z "${missing_use}" ]] ; then
254 if [[ -z "${PHPCHECKNODIE}" ]] ; then
246 return 255 return
256 else
257 return 0
247 fi 258 fi
259 fi
248 260
261 if [[ -z "${PHPCHECKNODIE}" ]] ; then
249 eerror 262 eerror
250 eerror "${PHP_PKG} needs to be re-installed with any of the following" 263 eerror "${PHP_PKG} needs to be re-installed with any of the following"
251 eerror "USE flags enabled:" 264 eerror "USE flags enabled:"
252 eerror 265 eerror
253 eerror " $@" 266 eerror " $@"
254 eerror 267 eerror
255 die "Missing PHP USE flags found" 268 die "Missing PHP USE flags found"
269 else
270 return 1
271 fi
256} 272}
257 273
258# ======================================================================== 274# ========================================================================
259# has_*() functions 275# has_*() functions
260# 276#
503 519
504 local PUSE_ENABLED="" 520 local PUSE_ENABLED=""
505 521
506 # Binary extensions do not support the change of PHP 522 # Binary extensions do not support the change of PHP
507 # API version, so they can't be installed when USE flags 523 # API version, so they can't be installed when USE flags
508 # are enabled wich change the PHP API version 524 # are enabled which change the PHP API version, they also
525 # don't provide correctly versioned symbols for our use
509 526
510 if built_with_use =${PHP_PKG} hardenedphp || phpconfutils_built_with_use =${PHP_PKG} hardenedphp ; then 527 if built_with_use =${PHP_PKG} hardenedphp || phpconfutils_built_with_use =${PHP_PKG} hardenedphp ; then
511 eerror 528 eerror
512 eerror "You cannot install binary PHP extensions" 529 eerror "You cannot install binary PHP extensions"
513 eerror "when the 'hardenedphp' USE flag is enabled!" 530 eerror "when the 'hardenedphp' USE flag is enabled!"
525 eerror "'debug' USE flag turned off." 542 eerror "'debug' USE flag turned off."
526 eerror 543 eerror
527 PUSE_ENABLED="1" 544 PUSE_ENABLED="1"
528 fi 545 fi
529 546
547 if built_with_use =${PHP_PKG} concurrentmodphp || phpconfutils_built_with_use =${PHP_PKG} concurrentmodphp ; then
548 eerror
549 eerror "You cannot install binary PHP extensions when"
550 eerror "the 'concurrentmodphp' USE flag is enabled!"
551 eerror "Please reemerge dev-lang/php with the"
552 eerror "'concurrentmodphp' USE flag turned off."
553 eerror
554 PUSE_ENABLED="1"
555 fi
556
530 if [[ -n ${PUSE_ENABLED} ]] ; then 557 if [[ -n ${PUSE_ENABLED} ]] ; then
531 die "'hardenedphp' and/or 'debug' USE flags turned on" 558 die "'hardenedphp' and/or 'debug' and/or 'concurrentmodphp' USE flags turned on!"
532 fi 559 fi
533} 560}
534 561
535# Alternative to dodoc function for use in our PHP eclasses and 562# Alternative to dodoc function for use in our PHP eclasses and
536# ebuilds. 563# ebuilds.

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.16

  ViewVC Help
Powered by ViewVC 1.1.20