summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2006-03-06 13:55:29 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2006-03-06 13:55:29 +0000
commitbb8140cf5d63ec04546bcdc92269b33d62366bd8 (patch)
treeb6f433975f80cbfef2905c8a96c3980ac4801a22 /eclass/kde-functions.eclass
parentRemove bmp useflag now that bmp is no more in portage. (diff)
downloadgentoo-2-bb8140cf5d63ec04546bcdc92269b33d62366bd8.tar.gz
gentoo-2-bb8140cf5d63ec04546bcdc92269b33d62366bd8.tar.bz2
gentoo-2-bb8140cf5d63ec04546bcdc92269b33d62366bd8.zip
Use || ( ) dependency only if the list contains more than one version.
Diffstat (limited to 'eclass/kde-functions.eclass')
-rw-r--r--eclass/kde-functions.eclass12
1 files changed, 8 insertions, 4 deletions
diff --git a/eclass/kde-functions.eclass b/eclass/kde-functions.eclass
index e7a114eedf06..5cf8b7d1c793 100644
--- a/eclass/kde-functions.eclass
+++ b/eclass/kde-functions.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/kde-functions.eclass,v 1.133 2006/02/17 22:18:20 swegener Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/kde-functions.eclass,v 1.134 2006/03/06 13:55:29 flameeyes Exp $
#
# Author Dan Armak <danarmak@gentoo.org>
#
@@ -416,10 +416,14 @@ need-autoconf() {
# Note that only the kde versioning scheme is supported - ie x.y, and we only iterate through y
# (i.e. x can contain more . separators).
deprange() {
- echo -n "|| ( "
- deprange-list $@
- echo -n " )"
+ local list="$(deprange-list $@)"
+ if [[ ${list%% *} == "${list}" ]]; then
+ echo "${list}"
+ else
+ echo "|| ( ${list} )"
+ fi
}
+
deprange-list() {
# Assign, parse params
local MINVER=$1; shift