1 |
scarabeus 09/09/01 09:32:08 |
2 |
|
3 |
Modified: kde4-base.eclass kde4-functions.eclass |
4 |
Log: |
5 |
Sync kde4 eclasses with overlay ones in preparation for 4.3.1. |
6 |
One thing differ from overlay ones. KDE_MINIMAL sets still 4.2 instead of 4.3 because some archies did not keyword all kde-base YET! |
7 |
|
8 |
Revision Changes Path |
9 |
1.45 eclass/kde4-base.eclass |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/kde4-base.eclass?rev=1.45&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/kde4-base.eclass?rev=1.45&content-type=text/plain |
13 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/kde4-base.eclass?r1=1.44&r2=1.45 |
14 |
|
15 |
Index: kde4-base.eclass |
16 |
=================================================================== |
17 |
RCS file: /var/cvsroot/gentoo-x86/eclass/kde4-base.eclass,v |
18 |
retrieving revision 1.44 |
19 |
retrieving revision 1.45 |
20 |
diff -u -r1.44 -r1.45 |
21 |
--- kde4-base.eclass 20 Aug 2009 09:18:01 -0000 1.44 |
22 |
+++ kde4-base.eclass 1 Sep 2009 09:32:08 -0000 1.45 |
23 |
@@ -1,6 +1,6 @@ |
24 |
# Copyright 2007-2009 Gentoo Foundation |
25 |
# Distributed under the terms of the GNU General Public License v2 |
26 |
-# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-base.eclass,v 1.44 2009/08/20 09:18:01 scarabeus Exp $ |
27 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-base.eclass,v 1.45 2009/09/01 09:32:08 scarabeus Exp $ |
28 |
|
29 |
# @ECLASS: kde4-base.eclass |
30 |
# @MAINTAINER: |
31 |
@@ -88,7 +88,7 @@ |
32 |
# @ECLASS-VARIABLE: KDE_MINIMAL |
33 |
# @DESCRIPTION: |
34 |
# This variable is used when KDE_REQUIRED is set, to specify required KDE minimal |
35 |
-# version for apps to work. Currently defaults to 4.2 |
36 |
+# version for apps to work. Currently defaults to 4.3 |
37 |
# One may override this variable to raise version requirements. |
38 |
# For possible values look at KDE_SLOTS and KDE_LIVE_SLOTS variables. |
39 |
# Note that it is fixed to ${SLOT} for kde-base packages. |
40 |
@@ -193,6 +193,7 @@ |
41 |
9999*) SLOT="live" ;; # regular live |
42 |
*) die "Unsupported ${PV}" ;; |
43 |
esac |
44 |
+ KDE_MINIMAL="${SLOT}" |
45 |
_kdedir="${SLOT}" |
46 |
_pv="-${PV}:${SLOT}" |
47 |
_pvn="-${PV}" |
48 |
@@ -229,15 +230,25 @@ |
49 |
) |
50 |
" |
51 |
if [[ ${PN} != kdelibs ]]; then |
52 |
+ [[ ${PN} != libknotificationitem ]] && slot_is_at_least 4.3 ${KDE_MINIMAL} && local libknotificationitem_required=1 |
53 |
if [[ ${KDEBASE} = kde-base ]]; then |
54 |
kdecommondepend+=" |
55 |
kdeprefix? ( >=kde-base/kdelibs${_pv}[kdeprefix] ) |
56 |
!kdeprefix? ( >=kde-base/kdelibs${_pvn}[-kdeprefix] ) |
57 |
" |
58 |
+ [[ -n ${libknotificationitem_required} ]] && \ |
59 |
+ kdecommondepend+=" |
60 |
+ kdeprefix? ( >=kde-base/libknotificationitem${_pv}[kdeprefix] ) |
61 |
+ !kdeprefix? ( >=kde-base/libknotificationitem${_pvn}[-kdeprefix] ) |
62 |
+ " |
63 |
else |
64 |
kdecommondepend+=" |
65 |
>=kde-base/kdelibs${_pv} |
66 |
" |
67 |
+ [[ -n ${libknotificationitem_required} ]] && \ |
68 |
+ kdecommondepend+=" |
69 |
+ >=kde-base/libknotificationitem${_pv} |
70 |
+ " |
71 |
fi |
72 |
fi |
73 |
unset _pv _pvn |
74 |
@@ -538,6 +549,7 @@ |
75 |
# Shadow existing /usr installations |
76 |
unset KDEDIRS |
77 |
|
78 |
+ # Handle kdeprefix-ed KDE |
79 |
if [[ ${KDEDIR} != "${EROOT}usr" ]]; then |
80 |
# Override some environment variables - only when kdeprefix is different, |
81 |
# to not break ccache/distcc |
82 |
@@ -546,13 +558,14 @@ |
83 |
|
84 |
# Append full RPATH |
85 |
cmakeargs+=" -DCMAKE_SKIP_RPATH=OFF" |
86 |
- fi |
87 |
|
88 |
- if has kdeprefix ${IUSE//+} && use kdeprefix; then |
89 |
- # Set cmake prefixes to allow buildsystem to localize valid KDE installation |
90 |
+ # Set cmake prefixes to allow buildsystem to locate valid KDE installation |
91 |
# when more are present |
92 |
cmakeargs+=" -DCMAKE_SYSTEM_PREFIX_PATH=${KDEDIR}" |
93 |
- else |
94 |
+ fi |
95 |
+ |
96 |
+ # Handle kdeprefix in application itself |
97 |
+ if ! has kdeprefix ${IUSE//+} || ! use kdeprefix; then |
98 |
# If prefix is /usr, sysconf needs to be /etc, not /usr/etc |
99 |
cmakeargs+=" -DSYSCONF_INSTALL_DIR=${EROOT}etc" |
100 |
fi |
101 |
|
102 |
|
103 |
|
104 |
1.24 eclass/kde4-functions.eclass |
105 |
|
106 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/kde4-functions.eclass?rev=1.24&view=markup |
107 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/kde4-functions.eclass?rev=1.24&content-type=text/plain |
108 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/kde4-functions.eclass?r1=1.23&r2=1.24 |
109 |
|
110 |
Index: kde4-functions.eclass |
111 |
=================================================================== |
112 |
RCS file: /var/cvsroot/gentoo-x86/eclass/kde4-functions.eclass,v |
113 |
retrieving revision 1.23 |
114 |
retrieving revision 1.24 |
115 |
diff -u -r1.23 -r1.24 |
116 |
--- kde4-functions.eclass 20 Aug 2009 09:18:01 -0000 1.23 |
117 |
+++ kde4-functions.eclass 1 Sep 2009 09:32:08 -0000 1.24 |
118 |
@@ -1,6 +1,6 @@ |
119 |
# Copyright 1999-2008 Gentoo Foundation |
120 |
# Distributed under the terms of the GNU General Public License v2 |
121 |
-# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-functions.eclass,v 1.23 2009/08/20 09:18:01 scarabeus Exp $ |
122 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-functions.eclass,v 1.24 2009/09/01 09:32:08 scarabeus Exp $ |
123 |
|
124 |
# Prefix compat: |
125 |
: ${EROOT:=${ROOT}} |
126 |
@@ -44,13 +44,23 @@ |
127 |
# @DESCRIPTION: |
128 |
# The slots used by all KDE versions later than 4.0. The live KDE releases use |
129 |
# KDE_LIVE_SLOTS instead. Values should be ordered. |
130 |
-KDE_SLOTS=( "kde-4" "4.1" "4.2" "4.3" "4.4" ) |
131 |
+KDE_SLOTS=( "4.1" "4.2" "4.3" "4.4" ) |
132 |
|
133 |
# @ECLASS-VARIABLE: KDE_LIVE_SLOTS |
134 |
# @DESCRIPTION: |
135 |
# The slots used by KDE live versions. Values should be ordered. |
136 |
KDE_LIVE_SLOTS=( "live" ) |
137 |
|
138 |
+# @FUNCTION: slot_is_at_least |
139 |
+# @USAGE: <want> <have> |
140 |
+# @DESCRIPTION: |
141 |
+# Version aware slot comparator. |
142 |
+# Current implementation relies on the fact, that slots can be compared like |
143 |
+# string literals (and let's keep it this way). |
144 |
+slot_is_at_least() { |
145 |
+ [[ "${2}" > "${1}" || "${2}" = "${1}" ]] |
146 |
+} |
147 |
+ |
148 |
# @FUNCTION: buildsycoca |
149 |
# @DESCRIPTION: |
150 |
# Function to rebuild the KDE System Configuration Cache. |
151 |
@@ -360,10 +370,9 @@ |
152 |
# Create blocks for the current package in other slots when |
153 |
# installed with USE=-kdeprefix |
154 |
block_other_slots() { |
155 |
- local slot |
156 |
- |
157 |
debug-print-function ${FUNCNAME} "$@" |
158 |
|
159 |
+ local slot |
160 |
for slot in ${KDE_SLOTS[@]} ${KDE_LIVE_SLOTS[@]}; do |
161 |
# Block non kdeprefix ${PN} on other slots |
162 |
if [[ ${SLOT} != ${slot} ]]; then |
163 |
@@ -379,11 +388,10 @@ |
164 |
# Parameters are package and version to block. |
165 |
# add_blocker kde-base/kdelibs 4.2.4 |
166 |
add_blocker() { |
167 |
- local slot |
168 |
- |
169 |
debug-print-function ${FUNCNAME} "$@" |
170 |
|
171 |
[[ ${1} = "" || ${2} = "" ]] && die "Missing parameter" |
172 |
+ local slot |
173 |
for slot in ${KDE_SLOTS[@]} ${KDE_LIVE_SLOTS[@]}; do |
174 |
# on -kdeprefix we block every slot |
175 |
RDEPEND+=" !kdeprefix? ( !<=${1}-${2}:${slot}[-kdeprefix] )" |