/[gentoo-x86]/eclass/eutils.eclass
Gentoo

Diff of /eclass/eutils.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.328 Revision 1.329
1# Copyright 1999-2009 Gentoo Foundation 1# Copyright 1999-2009 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/eutils.eclass,v 1.328 2010/01/10 15:58:58 scarabeus Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.329 2010/01/28 22:00:12 betelgeuse Exp $
4 4
5# @ECLASS: eutils.eclass 5# @ECLASS: eutils.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# base-system@gentoo.org 7# base-system@gentoo.org
8# @BLURB: many extra (but common) functions that are used in ebuilds 8# @BLURB: many extra (but common) functions that are used in ebuilds
17 17
18inherit multilib portability 18inherit multilib portability
19 19
20DESCRIPTION="Based on the ${ECLASS} eclass" 20DESCRIPTION="Based on the ${ECLASS} eclass"
21 21
22if has "${EAPI:-0}" 0 1 2; then
23
22# @FUNCTION: epause 24# @FUNCTION: epause
23# @USAGE: [seconds] 25# @USAGE: [seconds]
24# @DESCRIPTION: 26# @DESCRIPTION:
25# Sleep for the specified number of seconds (default of 5 seconds). Useful when 27# Sleep for the specified number of seconds (default of 5 seconds). Useful when
26# printing a message the user should probably be reading and often used in 28# printing a message the user should probably be reading and often used in
27# conjunction with the ebeep function. If the EPAUSE_IGNORE env var is set, 29# conjunction with the ebeep function. If the EPAUSE_IGNORE env var is set,
28# don't wait at all. 30# don't wait at all. Defined in EAPIs 0 1 and 2.
29epause() { 31epause() {
30 [[ -z ${EPAUSE_IGNORE} ]] && sleep ${1:-5} 32 [[ -z ${EPAUSE_IGNORE} ]] && sleep ${1:-5}
31} 33}
32 34
33# @FUNCTION: ebeep 35# @FUNCTION: ebeep
34# @USAGE: [number of beeps] 36# @USAGE: [number of beeps]
35# @DESCRIPTION: 37# @DESCRIPTION:
36# Issue the specified number of beeps (default of 5 beeps). Useful when 38# Issue the specified number of beeps (default of 5 beeps). Useful when
37# printing a message the user should probably be reading and often used in 39# printing a message the user should probably be reading and often used in
38# conjunction with the epause function. If the EBEEP_IGNORE env var is set, 40# conjunction with the epause function. If the EBEEP_IGNORE env var is set,
39# don't beep at all. 41# don't beep at all. Defined in EAPIs 0 1 and 2.
40ebeep() { 42ebeep() {
41 local n 43 local n
42 if [[ -z ${EBEEP_IGNORE} ]] ; then 44 if [[ -z ${EBEEP_IGNORE} ]] ; then
43 for ((n=1 ; n <= ${1:-5} ; n++)) ; do 45 for ((n=1 ; n <= ${1:-5} ; n++)) ; do
44 echo -ne "\a" 46 echo -ne "\a"
46 echo -ne "\a" 48 echo -ne "\a"
47 sleep 1 49 sleep 1
48 done 50 done
49 fi 51 fi
50} 52}
53
54fi
51 55
52# @FUNCTION: ecvs_clean 56# @FUNCTION: ecvs_clean
53# @USAGE: [list of dirs] 57# @USAGE: [list of dirs]
54# @DESCRIPTION: 58# @DESCRIPTION:
55# Remove CVS directories recursiveley. Useful when a source tarball contains 59# Remove CVS directories recursiveley. Useful when a source tarball contains
1743} 1747}
1744 1748
1745# @FUNCTION: built_with_use 1749# @FUNCTION: built_with_use
1746# @USAGE: [--hidden] [--missing <action>] [-a|-o] <DEPEND ATOM> <List of USE flags> 1750# @USAGE: [--hidden] [--missing <action>] [-a|-o] <DEPEND ATOM> <List of USE flags>
1747# @DESCRIPTION: 1751# @DESCRIPTION:
1752#
1753# Deprecated: Use EAPI 2 use deps in DEPEND|RDEPEND and with has_version calls.
1754#
1748# A temporary hack until portage properly supports DEPENDing on USE 1755# A temporary hack until portage properly supports DEPENDing on USE
1749# flags being enabled in packages. This will check to see if the specified 1756# flags being enabled in packages. This will check to see if the specified
1750# DEPEND atom was built with the specified list of USE flags. The 1757# DEPEND atom was built with the specified list of USE flags. The
1751# --missing option controls the behavior if called on a package that does 1758# --missing option controls the behavior if called on a package that does
1752# not actually support the defined USE flags (aka listed in IUSE). 1759# not actually support the defined USE flags (aka listed in IUSE).

Legend:
Removed from v.1.328  
changed lines
  Added in v.1.329

  ViewVC Help
Powered by ViewVC 1.1.20