commit:     3c454f1fab9e64285b751039a4b4d4801095bb3a
Author:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
AuthorDate: Thu Dec  4 10:21:06 2014 +0000
Commit:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Thu Dec  4 10:21:06 2014 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=3c454f1f

[eclass] When using add_*_dep, automatically specify the correct SLOT.

---
 eclass/kde5-functions.eclass | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/eclass/kde5-functions.eclass b/eclass/kde5-functions.eclass
index 0a196a7..d070993 100644
--- a/eclass/kde5-functions.eclass
+++ b/eclass/kde5-functions.eclass
@@ -87,7 +87,7 @@ _add_kdecategory_dep() {
        local package=${2}
        local use=${3}
        local version=${4}
-       local slot=${5}
+       local slot=
 
        if [[ -n ${use} ]] ; then
                local use="[${use}]"
@@ -98,8 +98,8 @@ _add_kdecategory_dep() {
                local version="-${version}"
        fi
 
-       if [[ -n ${slot} ]] ; then
-               slot=":5"
+       if [[ ${SLOT} = 4 || ${SLOT} = 5 ]] && ! has kde5-meta-pkg ${INHERITED} 
; then
+               slot=":${SLOT}"
        fi
 
        echo " ${operator}${category}/${package}${version}${slot}${use}"
@@ -157,7 +157,7 @@ add_kdeapps_dep() {
                version=${PV}
        fi
 
-       _add_kdecategory_dep kde-apps "${1}" "${2}" "${version}" ""
+       _add_kdecategory_dep kde-apps "${1}" "${2}" "${version}"
 }
 
 # @FUNCTION: add_kdebase_dep

Reply via email to