summaryrefslogtreecommitdiff
path: root/eclass/kde4-functions.eclass
diff options
context:
space:
mode:
Diffstat (limited to 'eclass/kde4-functions.eclass')
-rw-r--r--eclass/kde4-functions.eclass18
1 files changed, 13 insertions, 5 deletions
diff --git a/eclass/kde4-functions.eclass b/eclass/kde4-functions.eclass
index 31e821b1b71..072ef01921c 100644
--- a/eclass/kde4-functions.eclass
+++ b/eclass/kde4-functions.eclass
@@ -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] )"