summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavide Pesavento <pesa@gentoo.org>2011-12-27 16:04:27 +0000
committerDavide Pesavento <pesa@gentoo.org>2011-12-27 16:04:27 +0000
commite6ae4e180e0c13ca26f9f15176b87735476edb0d (patch)
tree3a7b15969b8ee187d12537116989267af6ee9135 /eclass/qt4-build.eclass
parentAlso require rspec:2 with USE=doc since it is required for the Rakefile, fixe... (diff)
downloadhistorical-e6ae4e180e0c13ca26f9f15176b87735476edb0d.tar.gz
historical-e6ae4e180e0c13ca26f9f15176b87735476edb0d.tar.bz2
historical-e6ae4e180e0c13ca26f9f15176b87735476edb0d.zip
Reimplement qt_use() more concisely, fix/clarify doc.
Diffstat (limited to 'eclass/qt4-build.eclass')
-rw-r--r--eclass/qt4-build.eclass21
1 files changed, 5 insertions, 16 deletions
diff --git a/eclass/qt4-build.eclass b/eclass/qt4-build.eclass
index 8ac1358e7da8..7db4959475e4 100644
--- a/eclass/qt4-build.eclass
+++ b/eclass/qt4-build.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/qt4-build.eclass,v 1.110 2011/12/26 11:59:19 pesa Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/qt4-build.eclass,v 1.111 2011/12/27 16:04:27 pesa Exp $
# @ECLASS: qt4-build.eclass
# @MAINTAINER:
@@ -726,23 +726,12 @@ fix_library_files() {
# @FUNCTION: qt_use
# @USAGE: < flag > [ feature ] [ enableval ]
# @DESCRIPTION:
-# This will echo "${enableval}-${feature}" if <flag> is enabled, or
-# "-no-${feature} if the flag is disabled. If [feature] is not specified <flag>
+# This will echo "-${enableval}-${feature}" if <flag> is enabled, or
+# "-no-${feature}" if it's disabled. If [feature] is not specified, <flag>
# will be used for that. If [enableval] is not specified, it omits the
-# assignment part.
+# "-${enableval}" part.
qt_use() {
- local flag=$1
- local feature=$1
- local enableval=
-
- [[ -n $2 ]] && feature=$2
- [[ -n $3 ]] && enableval=-$3
-
- if use ${flag}; then
- echo "${enableval}-${feature}"
- else
- echo "-no-${feature}"
- fi
+ use "$1" && echo "${3:+-$3}-${2:-$1}" || echo "-no-${2:-$1}"
}
# @FUNCTION: qt_mkspecs_dir