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

Diff of /eclass/eutils.eclass

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

Revision 1.3 Revision 1.4
1# Copyright 1999-2002 Gentoo Technologies, Inc. 1# Copyright 1999-2002 Gentoo Technologies, Inc.
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# Author: Martin Schlemmer <azarah@gentoo.org> 3# Author: Martin Schlemmer <azarah@gentoo.org>
4# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.3 2002/11/11 19:51:20 azarah Exp $ 4# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.4 2002/11/11 21:36:45 azarah Exp $
5# This eclass is for general purpose functions that most ebuilds 5# This eclass is for general purpose functions that most ebuilds
6# have to implement themselfs. 6# have to implement themselfs.
7# 7#
8# NB: If you add anything, please comment it! 8# NB: If you add anything, please comment it!
9 9
94# 94#
95epatch() { 95epatch() {
96 local PIPE_CMD="" 96 local PIPE_CMD=""
97 local STDERR_TARGET="${T}/$$.out" 97 local STDERR_TARGET="${T}/$$.out"
98 local SINGLE_PATCH="no" 98 local SINGLE_PATCH="no"
99 local x=""
99 100
100 if [ "$#" -gt 1 ] 101 if [ "$#" -gt 1 ]
101 then 102 then
102 eerror "Invalid arguments to epatch()" 103 eerror "Invalid arguments to epatch()"
103 die "Invalid arguments to epatch()" 104 die "Invalid arguments to epatch()"
105 106
106 if [ -n "$1" -a -f "$1" ] 107 if [ -n "$1" -a -f "$1" ]
107 then 108 then
108 SINGLE_PATCH="yes" 109 SINGLE_PATCH="yes"
109 110
110 EPATCH_SOURCE="$1" 111 local EPATCH_SOURCE="$1"
111 EPATCH_SUFFIX="${1##*\.}" 112 local EPATCH_SUFFIX="${1##*\.}"
112 113
113 elif [ -n "$1" -a -d "$1" ] 114 elif [ -n "$1" -a -d "$1" ]
114 then 115 then
115 EPATCH_SOURCE="$1/*.${EPATCH_SUFFIX}" 116 local EPATCH_SOURCE="$1/*.${EPATCH_SUFFIX}"
116 else 117 else
117 EPATCH_SOURCE="${EPATCH_SOURCE}/*.${EPATCH_SUFFIX}" 118 local EPATCH_SOURCE="${EPATCH_SOURCE}/*.${EPATCH_SUFFIX}"
118 fi 119 fi
119 120
120 case ${EPATCH_SUFFIX##*\.} in 121 case ${EPATCH_SUFFIX##*\.} in
121 bz2) 122 bz2)
122 PIPE_CMD="bzip2 -dc" 123 PIPE_CMD="bzip2 -dc"

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.20