/[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.231
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.231 2006/03/18 18:38:11 swegener 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.
88# Default extension for patches 88# Default extension for patches
89EPATCH_SUFFIX="patch.bz2" 89EPATCH_SUFFIX="patch.bz2"
90# Default options for patch 90# Default options for patch
91# Set -g0 to keep RCS, ClearCase, Perforce and SCCS happy. Bug #24571 91# 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. 92# Set --no-backup-if-mismatch so we don't leave '.orig' files behind.
93# Set -E to automatically remove empty files.
93EPATCH_OPTS="-g0 --no-backup-if-mismatch" 94EPATCH_OPTS="-g0 -E --no-backup-if-mismatch"
94# List of patches not to apply. Not this is only file names, 95# List of patches not to apply. Not this is only file names,
95# and not the full path .. 96# and not the full path ..
96EPATCH_EXCLUDE="" 97EPATCH_EXCLUDE=""
97# Change the printed message for a single patch. 98# Change the printed message for a single patch.
98EPATCH_SINGLE_MSG="" 99EPATCH_SINGLE_MSG=""
137# 138#
138# <azarah@gentoo.org> (10 Nov 2002) 139# <azarah@gentoo.org> (10 Nov 2002)
139# 140#
140epatch() { 141epatch() {
141 _epatch_draw_line() { 142 _epatch_draw_line() {
142 # this func produces a lot of pointless noise when debugging is turned on ... 143 [[ -z $1 ]] && set "$(printf "%65s" '')"
143 local is_debug=0 144 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 } 145 }
163 _epatch_assert() { local _pipestatus=${PIPESTATUS[*]}; [[ ${_pipestatus// /} -eq 0 ]] ; } 146 _epatch_assert() { local _pipestatus=${PIPESTATUS[*]}; [[ ${_pipestatus// /} -eq 0 ]] ; }
164 local PIPE_CMD="" 147 local PIPE_CMD=""
165 local STDERR_TARGET="${T}/$$.out" 148 local STDERR_TARGET="${T}/$$.out"
166 local PATCH_TARGET="${T}/$$.patch" 149 local PATCH_TARGET="${T}/$$.patch"

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

  ViewVC Help
Powered by ViewVC 1.1.20