summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'eclass/kde4-functions.eclass')
-rw-r--r--eclass/kde4-functions.eclass20
1 files changed, 14 insertions, 6 deletions
diff --git a/eclass/kde4-functions.eclass b/eclass/kde4-functions.eclass
index bbbc8ebe9c51..678e7a70d531 100644
--- a/eclass/kde4-functions.eclass
+++ b/eclass/kde4-functions.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-functions.eclass,v 1.23 2009/08/20 09:18:01 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-functions.eclass,v 1.24 2009/09/01 09:32:08 scarabeus Exp $
# Prefix compat:
: ${EROOT:=${ROOT}}
@@ -44,13 +44,23 @@ fi
# @DESCRIPTION:
# The slots used by all KDE versions later than 4.0. The live KDE releases use
# KDE_LIVE_SLOTS instead. Values should be ordered.
-KDE_SLOTS=( "kde-4" "4.1" "4.2" "4.3" "4.4" )
+KDE_SLOTS=( "4.1" "4.2" "4.3" "4.4" )
# @ECLASS-VARIABLE: KDE_LIVE_SLOTS
# @DESCRIPTION:
# The slots used by KDE live versions. Values should be ordered.
KDE_LIVE_SLOTS=( "live" )
+# @FUNCTION: slot_is_at_least
+# @USAGE: <want> <have>
+# @DESCRIPTION:
+# Version aware slot comparator.
+# Current implementation relies on the fact, that slots can be compared like
+# string literals (and let's keep it this way).
+slot_is_at_least() {
+ [[ "${2}" > "${1}" || "${2}" = "${1}" ]]
+}
+
# @FUNCTION: buildsycoca
# @DESCRIPTION:
# Function to rebuild the KDE System Configuration Cache.
@@ -360,10 +370,9 @@ load_library_dependencies() {
# Create blocks for the current package in other slots when
# installed with USE=-kdeprefix
block_other_slots() {
- local slot
-
debug-print-function ${FUNCNAME} "$@"
+ local slot
for slot in ${KDE_SLOTS[@]} ${KDE_LIVE_SLOTS[@]}; do
# Block non kdeprefix ${PN} on other slots
if [[ ${SLOT} != ${slot} ]]; then
@@ -379,11 +388,10 @@ block_other_slots() {
# Parameters are package and version to block.
# add_blocker kde-base/kdelibs 4.2.4
add_blocker() {
- local slot
-
debug-print-function ${FUNCNAME} "$@"
[[ ${1} = "" || ${2} = "" ]] && die "Missing parameter"
+ local slot
for slot in ${KDE_SLOTS[@]} ${KDE_LIVE_SLOTS[@]}; do
# on -kdeprefix we block every slot
RDEPEND+=" !kdeprefix? ( !<=${1}-${2}:${slot}[-kdeprefix] )"