commit:     d35d4bf7e8cf676a1065a497e084b6ccf7f540f4
Author:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 25 15:32:53 2014 +0000
Commit:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Tue Nov 25 15:32:57 2014 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=d35d4bf7

[eclass] Avoid pinning applications to a certain slot.

With each applications release being mixed KDE4/KF5, there's no way to know
which package belongs to which slot.

---
 eclass/kde5-functions.eclass | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/eclass/kde5-functions.eclass b/eclass/kde5-functions.eclass
index 830cacc..0a196a7 100644
--- a/eclass/kde5-functions.eclass
+++ b/eclass/kde5-functions.eclass
@@ -87,6 +87,7 @@ _add_kdecategory_dep() {
        local package=${2}
        local use=${3}
        local version=${4}
+       local slot=${5}
 
        if [[ -n ${use} ]] ; then
                local use="[${use}]"
@@ -97,7 +98,11 @@ _add_kdecategory_dep() {
                local version="-${version}"
        fi
 
-       echo " ${operator}${category}/${package}${version}:5${use}"
+       if [[ -n ${slot} ]] ; then
+               slot=":5"
+       fi
+
+       echo " ${operator}${category}/${package}${version}${slot}${use}"
 }
 
 # @FUNCTION: add_frameworks_dep
@@ -152,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