From fd15b3a588fcf2a392f7fa7e96481b210843105b Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 14 Jan 2008 04:52:35 +0000 Subject: handle whitespace in epatch/epunt_cxx better #205339 by Santiago M. Mola --- eclass/eutils.eclass | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'eclass') diff --git a/eclass/eutils.eclass b/eclass/eutils.eclass index 16aa18994f75..2ee83b3c4624 100644 --- a/eclass/eutils.eclass +++ b/eclass/eutils.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.293 2007/11/20 22:32:01 wolf31o2 Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.294 2008/01/14 04:52:35 vapier Exp $ # @ECLASS: eutils.eclass # @MAINTAINER: @@ -145,8 +145,7 @@ epatch() { local EPATCH_SOURCE="$1/*.${EPATCH_SUFFIX}" fi else - if [ ! -d ${EPATCH_SOURCE} ] || [ -n "$1" ] - then + if [[ ! -d ${EPATCH_SOURCE} ]] || [[ -n $1 ]] ; then if [ -n "$1" -a "${EPATCH_SOURCE}" = "${WORKDIR}/patch" ] then EPATCH_SOURCE="$1" @@ -1722,8 +1721,8 @@ epunt_cxx() { [[ -z ${dir} ]] && dir=${S} ebegin "Removing useless C++ checks" local f - for f in $(find ${dir} -name configure) ; do - patch -p0 "${f}" "${PORTDIR}/eclass/ELT-patches/nocxx/nocxx.patch" > /dev/null + find "${dir}" -name configure | while read f ; do + patch --no-backup-if-mismatch -p0 "${f}" "${PORTDIR}/eclass/ELT-patches/nocxx/nocxx.patch" > /dev/null done eend 0 } -- cgit v1.2.3-65-gdbad