Gentoo Archives: gentoo-commits

From: Michael Palimaka <kensington@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/kde:master commit in: eclass/
Date: Sat, 29 Nov 2014 15:14:31
Message-Id: 1417273938.b48fb81185b1d826bb84131b47d5b8157b46ac7c.kensington@gentoo
1 commit: b48fb81185b1d826bb84131b47d5b8157b46ac7c
2 Author: Michael Palimaka <kensington <AT> gentoo <DOT> org>
3 AuthorDate: Sat Nov 29 15:12:18 2014 +0000
4 Commit: Michael Palimaka <kensington <AT> gentoo <DOT> org>
5 CommitDate: Sat Nov 29 15:12:18 2014 +0000
6 URL: http://sources.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=b48fb811
7
8 [eclass] Introduce add_kdeapps_deps function to avoid automagic category changes and dependency errors.
9
10 ---
11 eclass/kde4-functions.eclass | 55 ++++++++++++++++++++++++++++++--------------
12 1 file changed, 38 insertions(+), 17 deletions(-)
13
14 diff --git a/eclass/kde4-functions.eclass b/eclass/kde4-functions.eclass
15 index fce6ed1..79acc5c 100644
16 --- a/eclass/kde4-functions.eclass
17 +++ b/eclass/kde4-functions.eclass
18 @@ -272,6 +272,41 @@ load_library_dependencies() {
19 eend $?
20 }
21
22 +# @FUNCTION: add_kdeapps_dep
23 +# @DESCRIPTION:
24 +# Create proper dependency for kde-apps/ dependencies.
25 +# This takes 1 to 3 arguments. The first being the package name, the optional
26 +# second is additional USE flags to append, and the optional third is the
27 +# version to use instead of the automatic version (use sparingly).
28 +# The output of this should be added directly to DEPEND/RDEPEND, and may be
29 +# wrapped in a USE conditional (but not an || conditional without an extra set
30 +# of parentheses).
31 +add_kdeapps_dep() {
32 + debug-print-function ${FUNCNAME} "$@"
33 +
34 + local ver
35 +
36 + if [[ -n ${3} ]]; then
37 + ver=${3}
38 + elif [[ -n ${KDE_OVERRIDE_MINIMAL} ]]; then
39 + ver=${KDE_OVERRIDE_MINIMAL}
40 + elif [[ ${KDEBASE} != kde-base ]]; then
41 + ver=${KDE_MINIMAL}
42 + # if building stable-live version depend just on the raw KDE version
43 + # to allow merging packages against more stable basic stuff
44 + elif [[ ${PV} == *.9999 ]]; then
45 + ver=$(get_kde_version)
46 + else
47 + ver=${PV}
48 + fi
49 +
50 + [[ -z ${1} ]] && die "Missing parameter"
51 +
52 + #FIXME
53 + # Drop aqua= from kf5 packages
54 + echo " >=kde-apps/${1}-${ver}:4[aqua=${2:+,${2}}]"
55 +}
56 +
57 # @FUNCTION: add_kdebase_dep
58 # @DESCRIPTION:
59 # Create proper dependency for kde-base/ dependencies.
60 @@ -284,19 +319,7 @@ load_library_dependencies() {
61 add_kdebase_dep() {
62 debug-print-function ${FUNCNAME} "$@"
63
64 - local ver category=kde-base
65 -
66 - # There is no kde-apps version available, only kde-base/${1}:4 or it was moved to plasma
67 - # right now kde-base/${1}:5, probably soon kde-plasma/${1}:5.
68 - if [[ ${CATEGORY} == kde-apps && ${1} != kdelibs && ${1} != kdepimlibs && ${1} != baloo-widgets &&
69 - ${1} != kactivities && ${1} != baloo && ${1} != kfilemetadata && ${1} != pykde4 &&
70 - ${1} != krosspython && ${1} != nepomuk-core && ${1} != nepomuk-widgets && ${1} != kwin &&
71 - ${1} != khotkeys && ${1} != systemsettings && ${1} != powerdevil && ${1} != plasma-workspace &&
72 - ${1} != krunner && ${1} != plasma-workspace && ${1} != ksysguard && ${1} != kinfocenter &&
73 - ${1} != kdeplasma-addons && ${1} != kmenuedit && ${1} != kwrited && ${1} != libtaskmanager &&
74 - ${1} != klipper && ${1} != khelpcenter && ${1} != kdebindings-meta ]] ; then
75 - category=kde-apps
76 - fi
77 + local ver
78
79 if [[ -n ${3} ]]; then
80 ver=${3}
81 @@ -309,7 +332,7 @@ add_kdebase_dep() {
82 elif [[ ${PV} == *.9999 ]]; then
83 ver=$(get_kde_version)
84 else
85 - if [[ ${CATEGORY} == kde-apps && ${category} == kde-base ]]; then
86 + if [[ ${CATEGORY} == kde-apps ]]; then
87 ver=4.14.3
88 else
89 ver=${PV}
90 @@ -318,9 +341,7 @@ add_kdebase_dep() {
91
92 [[ -z ${1} ]] && die "Missing parameter"
93
94 - #FIXME
95 - # Drop aqua= from kf5 packages
96 - echo " >=${category}/${1}-${ver}:4[aqua=${2:+,${2}}]"
97 + echo " >=kde-base/${1}-${ver}:4[aqua=${2:+,${2}}]"
98 }
99
100 # local function to enable specified translations for specified directory