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

Diff of /eclass/eutils.eclass

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

Revision 1.228 Revision 1.232
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/eutils.eclass,v 1.228 2006/03/10 23:24:21 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.232 2006/03/22 21:18:05 flameeyes Exp $
4# 4#
5# Author: Martin Schlemmer <azarah@gentoo.org> 5# Author: Martin Schlemmer <azarah@gentoo.org>
6# 6#
7# This eclass is for general purpose functions that most ebuilds 7# This eclass is for general purpose functions that most ebuilds
8# have to implement themselves. 8# have to implement themselves.
10# NB: If you add anything, please comment it! 10# NB: If you add anything, please comment it!
11 11
12inherit multilib portability 12inherit multilib portability
13 13
14DEPEND="!bootstrap? ( sys-devel/patch )" 14DEPEND="!bootstrap? ( sys-devel/patch )"
15RDEPEND=""
15# sys-apps/shadow is needed for useradd, etc, bug #94745. 16# sys-apps/shadow is needed for useradd, etc, bug #94745.
16 17
17DESCRIPTION="Based on the ${ECLASS} eclass" 18DESCRIPTION="Based on the ${ECLASS} eclass"
18 19
19# Wait for the supplied number of seconds. If no argument is supplied, defaults 20# Wait for the supplied number of seconds. If no argument is supplied, defaults
88# Default extension for patches 89# Default extension for patches
89EPATCH_SUFFIX="patch.bz2" 90EPATCH_SUFFIX="patch.bz2"
90# Default options for patch 91# Default options for patch
91# Set -g0 to keep RCS, ClearCase, Perforce and SCCS happy. Bug #24571 92# Set -g0 to keep RCS, ClearCase, Perforce and SCCS happy. Bug #24571
92# Set --no-backup-if-mismatch so we don't leave '.orig' files behind. 93# Set --no-backup-if-mismatch so we don't leave '.orig' files behind.
94# Set -E to automatically remove empty files.
93EPATCH_OPTS="-g0 --no-backup-if-mismatch" 95EPATCH_OPTS="-g0 -E --no-backup-if-mismatch"
94# List of patches not to apply. Not this is only file names, 96# List of patches not to apply. Not this is only file names,
95# and not the full path .. 97# and not the full path ..
96EPATCH_EXCLUDE="" 98EPATCH_EXCLUDE=""
97# Change the printed message for a single patch. 99# Change the printed message for a single patch.
98EPATCH_SINGLE_MSG="" 100EPATCH_SINGLE_MSG=""
137# 139#
138# <azarah@gentoo.org> (10 Nov 2002) 140# <azarah@gentoo.org> (10 Nov 2002)
139# 141#
140epatch() { 142epatch() {
141 _epatch_draw_line() { 143 _epatch_draw_line() {
142 # this func produces a lot of pointless noise when debugging is turned on ... 144 [[ -z $1 ]] && set "$(printf "%65s" '')"
143 local is_debug=0 145 echo "${1//?/=}"
144 [[ $- == *x* ]] && is_debug=1 && set +x
145
146 local i=0 str_length="" str_out=""
147
148 # Handle calls that do not have args, or wc not being installed ...
149 if [[ -z $1 ]] || ! type -p wc >/dev/null ; then
150 str_length=65
151 else
152 str_length=$(echo -n "$*" | wc -m)
153 fi
154
155 while ((i++ < ${str_length})) ; do
156 str_out="${str_out}="
157 done
158 echo ${str_out}
159
160 [[ ${is_debug} -eq 1 ]] && set -x
161 return 0
162 } 146 }
163 _epatch_assert() { local _pipestatus=${PIPESTATUS[*]}; [[ ${_pipestatus// /} -eq 0 ]] ; } 147 _epatch_assert() { local _pipestatus=${PIPESTATUS[*]}; [[ ${_pipestatus// /} -eq 0 ]] ; }
164 local PIPE_CMD="" 148 local PIPE_CMD=""
165 local STDERR_TARGET="${T}/$$.out" 149 local STDERR_TARGET="${T}/$$.out"
166 local PATCH_TARGET="${T}/$$.patch" 150 local PATCH_TARGET="${T}/$$.patch"

Legend:
Removed from v.1.228  
changed lines
  Added in v.1.232

  ViewVC Help
Powered by ViewVC 1.1.20