summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetteri Räty <betelgeuse@gentoo.org>2008-02-16 20:12:58 +0000
committerPetteri Räty <betelgeuse@gentoo.org>2008-02-16 20:12:58 +0000
commit022bdde1a051e0e9a174f2d109e6f841ace2c371 (patch)
treefa66c180e331984b0c98bd732acc3ac278006ca0 /eclass/base.eclass
parentMake the doxygen dep compile-time only, remove zephyr from the defaults, redu... (diff)
downloadhistorical-022bdde1a051e0e9a174f2d109e6f841ace2c371.tar.gz
historical-022bdde1a051e0e9a174f2d109e6f841ace2c371.tar.bz2
historical-022bdde1a051e0e9a174f2d109e6f841ace2c371.zip
Add possibility to use bash arrays for PATCHES.
Diffstat (limited to 'eclass/base.eclass')
-rw-r--r--eclass/base.eclass17
1 files changed, 12 insertions, 5 deletions
diff --git a/eclass/base.eclass b/eclass/base.eclass
index 88af00615d54..2d62c33b4189 100644
--- a/eclass/base.eclass
+++ b/eclass/base.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/base.eclass,v 1.32 2008/02/12 23:51:51 betelgeuse Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/base.eclass,v 1.33 2008/02/16 20:12:58 betelgeuse Exp $
#
# Author Dan Armak <danarmak@gentoo.org> (nowadays retired)
#
@@ -34,10 +34,17 @@ base_src_unpack() {
debug-print-section autopatch
debug-print "$FUNCNAME: autopatch: PATCHES=$PATCHES, PATCHES1=$PATCHES1"
cd "${S}"
- for x in $PATCHES $PATCHES1; do
- debug-print "$FUNCNAME: autopatch: patching from ${x}"
- epatch ${x}
- done
+ if [[ ${#PATCHES[@]} -gt 1 ]]; then
+ for x in "${PATCHES[@]}"; do
+ debug-print "$FUNCNAME: autopatch: patching from ${x}"
+ epatch "${x}"
+ done
+ else
+ for x in ${PATCHES} ${PATCHES1}; do
+ debug-print "$FUNCNAME: autopatch: patching from ${x}"
+ epatch "${x}"
+ done
+ fi
;;
all)
debug-print-section all