From 33ffd63609f02d3e02e7e0d8b024959e321bf287 Mon Sep 17 00:00:00 2001 From: Donnie Berkholz Date: Sun, 13 Apr 2008 04:44:16 +0000 Subject: Allow PATCHES to be an array. Based on change in ruby-gnome2.eclass. --- eclass/x-modular.eclass | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'eclass') diff --git a/eclass/x-modular.eclass b/eclass/x-modular.eclass index 9db29dcc8ec5..1251e1a2eb1d 100644 --- a/eclass/x-modular.eclass +++ b/eclass/x-modular.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/x-modular.eclass,v 1.94 2008/03/09 05:20:30 dberkholz Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/x-modular.eclass,v 1.95 2008/04/13 04:44:16 dberkholz Exp $ # # @ECLASS: x-modular.eclass # @MAINTAINER: @@ -282,10 +282,13 @@ x-modular_patch_source() { # If you have any patches to apply, set PATCHES to their locations and epatch # will apply them. It also handles epatch-style bulk patches, if you know how to # use them and set the correct variables. If you don't, read eutils.eclass. - if [[ -n "${PATCHES}" ]] ; then - for PATCH in ${PATCHES} - do - epatch ${PATCH} + if [[ ${#PATCHES[@]} -gt 1 ]]; then + for x in "${PATCHES[@]}"; do + epatch "${x}" + done + elif [[ -n "${PATCHES}" ]]; then + for x in ${PATCHES}; do + epatch "${x}" done # For non-default directory bulk patching elif [[ -n "${PATCH_LOC}" ]] ; then -- cgit v1.2.3-65-gdbad