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

Diff of /eclass/eutils.eclass

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

Revision 1.28 Revision 1.29
1# Copyright 1999-2003 Gentoo Technologies, Inc. 1# Copyright 1999-2003 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# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.28 2003/03/10 09:32:34 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.29 2003/03/11 21:50:43 azarah 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.
94# List of patches not to apply. Not this is only file names, 94# List of patches not to apply. Not this is only file names,
95# and not the full path .. 95# and not the full path ..
96EPATCH_EXCLUDE="" 96EPATCH_EXCLUDE=""
97# Change the printed message for a single patch. 97# Change the printed message for a single patch.
98EPATCH_SINGLE_MSG="" 98EPATCH_SINGLE_MSG=""
99# Force applying bulk patches even if not following the style:
100#
101# ??_${ARCH}_foo.${EPATCH_SUFFIX}
102#
103EPATCH_FORCE="no"
99 104
100# This function is for bulk patching, or in theory for just one 105# This function is for bulk patching, or in theory for just one
101# or two patches. 106# or two patches.
102# 107#
103# It should work with .bz2, .gz, .zip and plain text patches. 108# It should work with .bz2, .gz, .zip and plain text patches.
151 local EPATCH_SOURCE="$1" 156 local EPATCH_SOURCE="$1"
152 local EPATCH_SUFFIX="${1##*\.}" 157 local EPATCH_SUFFIX="${1##*\.}"
153 158
154 elif [ -n "$1" -a -d "$1" ] 159 elif [ -n "$1" -a -d "$1" ]
155 then 160 then
161 # Allow no extension if EPATCH_FORCE=yes ... used by vim for example ...
162 if [ "${EPATCH_FORCE}" = "yes" ] && [ -z "${EPATCH_SUFFIX}" ]
163 then
164 local EPATCH_SOURCE="$1/*"
165 else
156 local EPATCH_SOURCE="$1/*.${EPATCH_SUFFIX}" 166 local EPATCH_SOURCE="$1/*.${EPATCH_SUFFIX}"
167 fi
157 else 168 else
158 if [ ! -d ${EPATCH_SOURCE} ] 169 if [ ! -d ${EPATCH_SOURCE} ]
159 then 170 then
160 if [ -n "$1" -a "${EPATCH_SOURCE}" = "${WORKDIR}/patch" ] 171 if [ -n "$1" -a "${EPATCH_SOURCE}" = "${WORKDIR}/patch" ]
161 then 172 then
201 # New ARCH dependant patch naming scheme... 212 # New ARCH dependant patch naming scheme...
202 # 213 #
203 # ???_arch_foo.patch 214 # ???_arch_foo.patch
204 # 215 #
205 if [ -f ${x} ] && \ 216 if [ -f ${x} ] && \
206 [ "${SINGLE_PATCH}" = "yes" -o "${x/_all_}" != "${x}" -o "`eval echo \$\{x/_${ARCH}_\}`" != "${x}" ] 217 ([ "${SINGLE_PATCH}" = "yes" -o "${x/_all_}" != "${x}" -o "`eval echo \$\{x/_${ARCH}_\}`" != "${x}" ] || \
218 [ "${EPATCH_FORCE}" = "yes" ])
207 then 219 then
208 local count=0 220 local count=0
209 local popts="${EPATCH_OPTS}" 221 local popts="${EPATCH_OPTS}"
210 222
211 if [ -n "${EPATCH_EXCLUDE}" ] 223 if [ -n "${EPATCH_EXCLUDE}" ]

Legend:
Removed from v.1.28  
changed lines
  Added in v.1.29

  ViewVC Help
Powered by ViewVC 1.1.20