Gentoo Archives: gentoo-commits

From: "Mike Frysinger (vapier)" <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in eclass: flag-o-matic.eclass
Date: Tue, 30 Oct 2012 20:52:11
Message-Id: 20121030205144.CB67221600@flycatcher.gentoo.org
1 vapier 12/10/30 20:51:44
2
3 Modified: flag-o-matic.eclass
4 Log:
5 strip-flags: revert previous commit as it was unnecessary; fix _is_flagq to handle arrays #440306 by Mr. Bones.
6
7 Revision Changes Path
8 1.179 eclass/flag-o-matic.eclass
9
10 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.179&view=markup
11 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.179&content-type=text/plain
12 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.178&r2=1.179
13
14 Index: flag-o-matic.eclass
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v
17 retrieving revision 1.178
18 retrieving revision 1.179
19 diff -u -r1.178 -r1.179
20 --- flag-o-matic.eclass 30 Oct 2012 20:20:37 -0000 1.178
21 +++ flag-o-matic.eclass 30 Oct 2012 20:51:44 -0000 1.179
22 @@ -1,6 +1,6 @@
23 # Copyright 1999-2012 Gentoo Foundation
24 # Distributed under the terms of the GNU General Public License v2
25 -# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.178 2012/10/30 20:20:37 vapier Exp $
26 +# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.179 2012/10/30 20:51:44 vapier Exp $
27
28 # @ECLASS: flag-o-matic.eclass
29 # @MAINTAINER:
30 @@ -265,8 +265,9 @@
31 }
32
33 _is_flagq() {
34 - local x
35 - for x in ${!1} ; do
36 + local x var
37 + eval var=\""\${$1[*]}"\"
38 + for x in ${var} ; do
39 [[ ${x} == $2 ]] && return 0
40 done
41 return 1
42 @@ -370,7 +371,7 @@
43 done
44
45 # In case we filtered out all optimization flags fallback to -O2
46 - if _is_flagq ${var} "-O*" && ! (_is_flagq new "-O*" || _is_flagq new -O) ; then
47 + if _is_flagq ${var} "-O*" && ! _is_flagq new "-O*" ; then
48 new+=( -O2 )
49 fi