Gentoo Archives: gentoo-commits

From: "Davide Pesavento (pesa)" <pesa@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in eclass: qt4-build.eclass
Date: Tue, 27 Dec 2011 16:04:38
Message-Id: 20111227160427.DC3252004B@flycatcher.gentoo.org
1 pesa 11/12/27 16:04:27
2
3 Modified: qt4-build.eclass
4 Log:
5 Reimplement qt_use() more concisely, fix/clarify doc.
6
7 Revision Changes Path
8 1.111 eclass/qt4-build.eclass
9
10 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/qt4-build.eclass?rev=1.111&view=markup
11 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/qt4-build.eclass?rev=1.111&content-type=text/plain
12 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/qt4-build.eclass?r1=1.110&r2=1.111
13
14 Index: qt4-build.eclass
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo-x86/eclass/qt4-build.eclass,v
17 retrieving revision 1.110
18 retrieving revision 1.111
19 diff -u -r1.110 -r1.111
20 --- qt4-build.eclass 26 Dec 2011 11:59:19 -0000 1.110
21 +++ qt4-build.eclass 27 Dec 2011 16:04:27 -0000 1.111
22 @@ -1,6 +1,6 @@
23 # Copyright 1999-2011 Gentoo Foundation
24 # Distributed under the terms of the GNU General Public License v2
25 -# $Header: /var/cvsroot/gentoo-x86/eclass/qt4-build.eclass,v 1.110 2011/12/26 11:59:19 pesa Exp $
26 +# $Header: /var/cvsroot/gentoo-x86/eclass/qt4-build.eclass,v 1.111 2011/12/27 16:04:27 pesa Exp $
27
28 # @ECLASS: qt4-build.eclass
29 # @MAINTAINER:
30 @@ -726,23 +726,12 @@
31 # @FUNCTION: qt_use
32 # @USAGE: < flag > [ feature ] [ enableval ]
33 # @DESCRIPTION:
34 -# This will echo "${enableval}-${feature}" if <flag> is enabled, or
35 -# "-no-${feature} if the flag is disabled. If [feature] is not specified <flag>
36 +# This will echo "-${enableval}-${feature}" if <flag> is enabled, or
37 +# "-no-${feature}" if it's disabled. If [feature] is not specified, <flag>
38 # will be used for that. If [enableval] is not specified, it omits the
39 -# assignment part.
40 +# "-${enableval}" part.
41 qt_use() {
42 - local flag=$1
43 - local feature=$1
44 - local enableval=
45 -
46 - [[ -n $2 ]] && feature=$2
47 - [[ -n $3 ]] && enableval=-$3
48 -
49 - if use ${flag}; then
50 - echo "${enableval}-${feature}"
51 - else
52 - echo "-no-${feature}"
53 - fi
54 + use "$1" && echo "${3:+-$3}-${2:-$1}" || echo "-no-${2:-$1}"
55 }
56
57 # @FUNCTION: qt_mkspecs_dir