1 |
commit: b99f8c46537a20bd6ad08b56007a193fb2e5627e |
2 |
Author: Andreas Sturmlechner <andreas.sturmlechner <AT> gmail <DOT> com> |
3 |
AuthorDate: Mon Jan 25 22:50:20 2016 +0000 |
4 |
Commit: Michael Palimaka <kensington <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jan 31 16:21:47 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/kde.git/commit/?id=b99f8c46 |
7 |
|
8 |
kde5-functions.eclass: add_category_dep: Implement slot/op override |
9 |
|
10 |
Also fixes subslot awareness. |
11 |
|
12 |
eclass/kde5-functions.eclass | 16 ++++++++++------ |
13 |
1 file changed, 10 insertions(+), 6 deletions(-) |
14 |
|
15 |
diff --git a/eclass/kde5-functions.eclass b/eclass/kde5-functions.eclass |
16 |
index f8b3b30..932c2b8 100644 |
17 |
--- a/eclass/kde5-functions.eclass |
18 |
+++ b/eclass/kde5-functions.eclass |
19 |
@@ -105,7 +105,7 @@ _add_category_dep() { |
20 |
local package=${2} |
21 |
local use=${3} |
22 |
local version=${4} |
23 |
- local slot= |
24 |
+ local slot=${5} |
25 |
|
26 |
if [[ -n ${use} ]] ; then |
27 |
local use="[${use}]" |
28 |
@@ -116,8 +116,10 @@ _add_category_dep() { |
29 |
local version="-$(get_version_component_range 1-3 ${version})" |
30 |
fi |
31 |
|
32 |
- if [[ ${SLOT} = 4 || ${SLOT} = 5 ]] && ! has kde5-meta-pkg ${INHERITED} ; then |
33 |
- slot=":${SLOT}" |
34 |
+ if [[ -n ${slot} ]] ; then |
35 |
+ slot=":${slot}" |
36 |
+ elif [[ ${SLOT%\/*} = 4 || ${SLOT%\/*} = 5 ]] && ! has kde5-meta-pkg ${INHERITED} ; then |
37 |
+ slot=":${SLOT%\/*}" |
38 |
fi |
39 |
|
40 |
echo " ${operator}${category}/${package}${version}${slot}${use}" |
41 |
@@ -210,9 +212,11 @@ add_kdeapps_dep() { |
42 |
# @USAGE: <package> [USE flags] [minimum version] |
43 |
# @DESCRIPTION: |
44 |
# Create proper dependency for dev-qt/ dependencies. |
45 |
-# This takes 1 to 3 arguments. The first being the package name, the optional |
46 |
+# This takes 1 to 4 arguments. The first being the package name, the optional |
47 |
# second is additional USE flags to append, and the optional third is the |
48 |
-# version to use instead of the automatic version (use sparingly). |
49 |
+# version to use instead of the automatic version (use sparingly). In addition, |
50 |
+# the optional fourth argument defines slot+operator instead of automatic slot |
51 |
+# (use even more sparingly). |
52 |
# The output of this should be added directly to DEPEND/RDEPEND, and may be |
53 |
# wrapped in a USE conditional (but not an || conditional without an extra set |
54 |
# of parentheses). |
55 |
@@ -227,7 +231,7 @@ add_qt_dep() { |
56 |
version=${QT_MINIMAL} |
57 |
fi |
58 |
|
59 |
- _add_category_dep dev-qt "${1}" "${2}" "${version}" |
60 |
+ _add_category_dep dev-qt "${1}" "${2}" "${version}" "${4}" |
61 |
} |
62 |
|
63 |
# @FUNCTION: get_kde_version |