diff options
author | 2006-07-16 05:49:47 +0000 | |
---|---|---|
committer | 2006-07-16 05:49:47 +0000 | |
commit | 79fe2f6279cccbbde4e8804ac8bc11fd81c7781f (patch) | |
tree | 58bcf149cd44dd13b07c3b0a77f736993656d1c6 /eclass | |
parent | version bump (diff) | |
download | gentoo-2-79fe2f6279cccbbde4e8804ac8bc11fd81c7781f.tar.gz gentoo-2-79fe2f6279cccbbde4e8804ac8bc11fd81c7781f.tar.bz2 gentoo-2-79fe2f6279cccbbde4e8804ac8bc11fd81c7781f.zip |
rewrite filter-mfpmath a bit to avoid executing external programs like tr and to fix error #136800
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/flag-o-matic.eclass | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/eclass/flag-o-matic.eclass b/eclass/flag-o-matic.eclass index 4a9d350fd9af..ccbbc1c09e95 100644 --- a/eclass/flag-o-matic.eclass +++ b/eclass/flag-o-matic.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.108 2006/06/15 14:45:59 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.109 2006/07/16 05:49:47 vapier Exp $ # # Maintainer: base-system@gentoo.org @@ -267,17 +267,19 @@ filter-mfpmath() { local orig_mfpmath new_math prune_math # save the original -mfpmath flag - orig_mfpmath="`get-flag -mfpmath`" + orig_mfpmath=$(get-flag -mfpmath) # get the value of the current -mfpmath flag - new_math=" `get-flag mfpmath | tr , ' '` " + new_math=$(get-flag mfpmath) + new_math=" ${new_math//,/ } " # figure out which math values are to be removed prune_math="" for prune_math in "$@" ; do - new_math="${new_math/ ${prune_math} / }" + new_math=${new_math/ ${prune_math} / } done - new_math="`echo ${new_math:1:${#new_math}-2} | tr ' ' ,`" + new_math=$(echo ${new_math}) + new_math=${new_math// /,} - if [ -z "${new_math}" ] ; then + if [[ -z ${new_math} ]] ; then # if we're removing all user specified math values are # slated for removal, then we just filter the flag filter-flags ${orig_mfpmath} |