1 |
commit: 7e4a53919ff347857cb86bddc887f686185831cb |
2 |
Author: Andreas Sturmlechner <andreas.sturmlechner <AT> gmail <DOT> com> |
3 |
AuthorDate: Thu Jan 7 17:40:12 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=7e4a5391 |
7 |
|
8 |
kde5-functions.eclass: Introduce add_qt_dep for consistent Qt version deps |
9 |
|
10 |
_add_kdecategory_dep -> _add_category_dep |
11 |
|
12 |
eclass/kde5-functions.eclass | 37 +++++++++++++++++++++++++++++++------ |
13 |
1 file changed, 31 insertions(+), 6 deletions(-) |
14 |
|
15 |
diff --git a/eclass/kde5-functions.eclass b/eclass/kde5-functions.eclass |
16 |
index 7b021d2..f8b3b30 100644 |
17 |
--- a/eclass/kde5-functions.eclass |
18 |
+++ b/eclass/kde5-functions.eclass |
19 |
@@ -93,11 +93,12 @@ _check_gcc_version() { |
20 |
fi |
21 |
} |
22 |
|
23 |
-# @FUNCTION: _add_kdecategory_dep |
24 |
+# @FUNCTION: _add_category_dep |
25 |
# @INTERNAL |
26 |
# @DESCRIPTION: |
27 |
-# Implementation of add_plasma_dep and add_frameworks_dep. |
28 |
-_add_kdecategory_dep() { |
29 |
+# Implementation of add_plasma_dep, add_frameworks_dep, add_kdeapps_dep, |
30 |
+# and finally, add_qt_dep. |
31 |
+_add_category_dep() { |
32 |
debug-print-function ${FUNCNAME} "$@" |
33 |
|
34 |
local category=${1} |
35 |
@@ -145,7 +146,7 @@ add_frameworks_dep() { |
36 |
version=${FRAMEWORKS_MINIMAL} |
37 |
fi |
38 |
|
39 |
- _add_kdecategory_dep kde-frameworks "${1}" "${2}" "${version}" |
40 |
+ _add_category_dep kde-frameworks "${1}" "${2}" "${version}" |
41 |
} |
42 |
|
43 |
# @FUNCTION: add_plasma_dep |
44 |
@@ -171,7 +172,7 @@ add_plasma_dep() { |
45 |
version=${PLASMA_MINIMAL} |
46 |
fi |
47 |
|
48 |
- _add_kdecategory_dep kde-plasma "${1}" "${2}" "${version}" |
49 |
+ _add_category_dep kde-plasma "${1}" "${2}" "${version}" |
50 |
} |
51 |
|
52 |
# @FUNCTION: add_kdeapps_dep |
53 |
@@ -202,7 +203,31 @@ add_kdeapps_dep() { |
54 |
fi |
55 |
fi |
56 |
|
57 |
- _add_kdecategory_dep kde-apps "${1}" "${2}" "${version}" |
58 |
+ _add_category_dep kde-apps "${1}" "${2}" "${version}" |
59 |
+} |
60 |
+ |
61 |
+# @FUNCTION: add_qt_dep |
62 |
+# @USAGE: <package> [USE flags] [minimum version] |
63 |
+# @DESCRIPTION: |
64 |
+# Create proper dependency for dev-qt/ dependencies. |
65 |
+# This takes 1 to 3 arguments. The first being the package name, the optional |
66 |
+# second is additional USE flags to append, and the optional third is the |
67 |
+# version to use instead of the automatic version (use sparingly). |
68 |
+# The output of this should be added directly to DEPEND/RDEPEND, and may be |
69 |
+# wrapped in a USE conditional (but not an || conditional without an extra set |
70 |
+# of parentheses). |
71 |
+add_qt_dep() { |
72 |
+ debug-print-function ${FUNCNAME} "$@" |
73 |
+ |
74 |
+ local version |
75 |
+ |
76 |
+ if [[ -n ${3} ]]; then |
77 |
+ version=${3} |
78 |
+ elif [[ -z "${version}" ]] ; then |
79 |
+ version=${QT_MINIMAL} |
80 |
+ fi |
81 |
+ |
82 |
+ _add_category_dep dev-qt "${1}" "${2}" "${version}" |
83 |
} |
84 |
|
85 |
# @FUNCTION: get_kde_version |