Gentoo Archives: gentoo-commits

From: "Maciej Mrozowski (reavertm)" <reavertm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in eclass: kde4-base.eclass kde4-functions.eclass kde4-meta.eclass
Date: Tue, 02 Feb 2010 14:20:46
Message-Id: E1NcJc0-0000SF-Vm@stork.gentoo.org
1 reavertm 10/02/02 14:20:16
2
3 Modified: kde4-base.eclass kde4-functions.eclass
4 kde4-meta.eclass
5 Log:
6 Synchronized KDE eclasses from overlay, changes:
7 - KDE SC 4.5 support
8 - EAPI-3 support
9 - prefix support
10 - moved docs to /usr/share/doc/${PF}
11 - applied override for kdepim hardcoded checks
12
13 Revision Changes Path
14 1.58 eclass/kde4-base.eclass
15
16 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/kde4-base.eclass?rev=1.58&view=markup
17 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/kde4-base.eclass?rev=1.58&content-type=text/plain
18 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/kde4-base.eclass?r1=1.57&r2=1.58
19
20 Index: kde4-base.eclass
21 ===================================================================
22 RCS file: /var/cvsroot/gentoo-x86/eclass/kde4-base.eclass,v
23 retrieving revision 1.57
24 retrieving revision 1.58
25 diff -u -r1.57 -r1.58
26 --- kde4-base.eclass 14 Dec 2009 19:44:15 -0000 1.57
27 +++ kde4-base.eclass 2 Feb 2010 14:20:16 -0000 1.58
28 @@ -1,6 +1,6 @@
29 -# Copyright 1999-2009 Gentoo Foundation
30 +# Copyright 1999-2010 Gentoo Foundation
31 # Distributed under the terms of the GNU General Public License v2
32 -# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-base.eclass,v 1.57 2009/12/14 19:44:15 abcd Exp $
33 +# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-base.eclass,v 1.58 2010/02/02 14:20:16 reavertm Exp $
34
35 # @ECLASS: kde4-base.eclass
36 # @MAINTAINER:
37 @@ -121,9 +121,9 @@
38 # Determine SLOT from PVs
39 case ${PV} in
40 *.9999*) SLOT="${PV/.9999*/}" ;; # stable live
41 + 4.5* | 4.4.[6-9]*) SLOT="4.5" ;;
42 4.4* | 4.3.[6-9]*) SLOT="4.4" ;;
43 4.3*) SLOT="4.3" ;;
44 - 4.2*) SLOT="4.2" ;;
45 9999*) SLOT="live" ;; # regular live
46 *) die "Unsupported ${PV}" ;;
47 esac
48 @@ -386,10 +386,10 @@
49 case ${KDEBASE} in
50 kde-base)
51 case ${PV} in
52 - 4.3.8[05] | 4.3.9[0568])
53 + 4.[34].8[05] | 4.[34].9[0568])
54 # block for normally packed unstable releases
55 SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.bz2" ;;
56 - 4.3.[6-9]*)
57 + 4.[34].[6-9]*)
58 # Repacked tarballs: need to depend on xz-utils to ensure that they can be unpacked
59 SRC_URI="http://dev.gentooexperimental.org/~alexxy/kde/${PV}/${_kmname_pv}.tar.xz"
60 DEPEND+=" app-arch/xz-utils"
61 @@ -493,10 +493,10 @@
62 if [[ ${BUILD_TYPE} = live ]]; then
63 migrate_store_dir
64 subversion_src_unpack
65 - elif [[ ${EAPI} == [23] ]]; then
66 + elif [[ ${EAPI} == 2 ]]; then
67 local file
68 for file in ${A}; do
69 - # This setup is because EAPI <= 3 cannot unpack *.tar.xz files
70 + # This setup is because EAPI <= 2 cannot unpack *.tar.xz files
71 # directly, so we do it ourselves (using the exact same code as portage)
72 case ${file} in
73 *.tar.xz)
74 @@ -510,7 +510,7 @@
75 esac
76 done
77 else
78 - # For EAPI >= 4, we can just use unpack() directly
79 + # For EAPI >= 3, we can just use unpack() directly
80 unpack ${A}
81 fi
82 }
83 @@ -537,7 +537,10 @@
84 fi
85
86 [[ ${BUILD_TYPE} = live ]] && subversion_src_prepare
87 +
88 + # Apply patches
89 base_src_prepare
90 + epatch_user
91
92 # Save library dependencies
93 if [[ -n ${KMSAVELIBS} ]] ; then
94 @@ -675,16 +678,6 @@
95 fi
96 done
97 fi
98 -
99 - [[ -z ${ED} ]] && ED=${D}
100 -
101 - if [[ -n ${KDEBASE} ]] && [[ -d ${ED}usr/share/doc/${PF} ]]; then
102 - # work around bug #97196
103 - dodir /usr/share/doc/KDE4 && \
104 - cp -r "${ED}usr/share/doc/${PF}" "${ED}usr/share/doc/KDE4/" || \
105 - die "Failed to move docs to KDE4/."
106 - rm -rf "${ED}usr/share/doc/${PF}"
107 - fi
108 }
109
110 # @FUNCTION: kde4-base_pkg_postinst
111 @@ -711,6 +704,16 @@
112 ewarn "take responsibilities for dead kittens."
113 echo
114 fi
115 + if [[ -z ${I_KNOW_WHAT_I_AM_DOING} ]] && ! has_version 'kde-base/kdebase-runtime-meta' && ! has_version 'kde-base/kdebase-startkde'; then
116 + # warn about not supported approach
117 + if [[ ${KDE_REQUIRED} == always ]] || ( [[ ${KDE_REQUIRED} == optional ]] && use kde ); then
118 + echo
119 + ewarn "WARNING! Your system configuration contains neither \"kde-base/kdebase-runtime-meta\""
120 + ewarn "nor \"kde-base/kdebase-startkde\". You need one of above."
121 + ewarn "With this setting you are unsupported by KDE team."
122 + ewarn "All missing features you report for misc packages will be probably ignored or closed as INVALID."
123 + fi
124 + fi
125 }
126
127 # @FUNCTION: kde4-base_pkg_postrm
128
129
130
131 1.30 eclass/kde4-functions.eclass
132
133 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/kde4-functions.eclass?rev=1.30&view=markup
134 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/kde4-functions.eclass?rev=1.30&content-type=text/plain
135 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/kde4-functions.eclass?r1=1.29&r2=1.30
136
137 Index: kde4-functions.eclass
138 ===================================================================
139 RCS file: /var/cvsroot/gentoo-x86/eclass/kde4-functions.eclass,v
140 retrieving revision 1.29
141 retrieving revision 1.30
142 diff -u -r1.29 -r1.30
143 --- kde4-functions.eclass 14 Dec 2009 19:44:15 -0000 1.29
144 +++ kde4-functions.eclass 2 Feb 2010 14:20:16 -0000 1.30
145 @@ -1,6 +1,6 @@
146 -# Copyright 1999-2009 Gentoo Foundation
147 +# Copyright 1999-2010 Gentoo Foundation
148 # Distributed under the terms of the GNU General Public License v2
149 -# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-functions.eclass,v 1.29 2009/12/14 19:44:15 abcd Exp $
150 +# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-functions.eclass,v 1.30 2010/02/02 14:20:16 reavertm Exp $
151
152 inherit versionator
153
154 @@ -41,7 +41,7 @@
155 # @DESCRIPTION:
156 # The slots used by all KDE versions later than 4.0. The live KDE releases use
157 # KDE_LIVE_SLOTS instead. Values should be ordered.
158 -KDE_SLOTS=( "4.1" "4.2" "4.3" "4.4" )
159 +KDE_SLOTS=( "4.1" "4.2" "4.3" "4.4" "4.5" )
160
161 # @ECLASS-VARIABLE: KDE_LIVE_SLOTS
162 # @DESCRIPTION:
163 @@ -518,6 +518,6 @@
164
165 local use=${2:+,${2}}
166
167 - echo " !kdeprefix? ( >=kde-base/${1}-${PV}[-kdeprefix${use}] )"
168 - echo " kdeprefix? ( >=kde-base/${1}-${PV}:${SLOT}[kdeprefix${use}] )"
169 + echo " !kdeprefix? ( >=kde-base/${1}-${PV}[aqua=,-kdeprefix${use}] )"
170 + echo " kdeprefix? ( >=kde-base/${1}-${PV}:${SLOT}[aqua=,kdeprefix${use}] )"
171 }
172
173
174
175 1.33 eclass/kde4-meta.eclass
176
177 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/kde4-meta.eclass?rev=1.33&view=markup
178 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/kde4-meta.eclass?rev=1.33&content-type=text/plain
179 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/kde4-meta.eclass?r1=1.32&r2=1.33
180
181 Index: kde4-meta.eclass
182 ===================================================================
183 RCS file: /var/cvsroot/gentoo-x86/eclass/kde4-meta.eclass,v
184 retrieving revision 1.32
185 retrieving revision 1.33
186 diff -u -r1.32 -r1.33
187 --- kde4-meta.eclass 11 Jan 2010 17:27:35 -0000 1.32
188 +++ kde4-meta.eclass 2 Feb 2010 14:20:16 -0000 1.33
189 @@ -1,6 +1,6 @@
190 -# Copyright 1999-2009 Gentoo Foundation
191 +# Copyright 1999-2010 Gentoo Foundation
192 # Distributed under the terms of the GNU General Public License v2
193 -# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-meta.eclass,v 1.32 2010/01/11 17:27:35 scarabeus Exp $
194 +# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-meta.eclass,v 1.33 2010/02/02 14:20:16 reavertm Exp $
195 #
196 # @ECLASS: kde4-meta.eclass
197 # @MAINTAINER:
198 @@ -18,24 +18,17 @@
199
200 [[ -z ${KMNAME} ]] && die "kde4-meta.eclass inherited but KMNAME not defined - broken ebuild"
201
202 -# Add khelpcenter dependency when installing handbooks
203 -if [[ ${PN} != khelpcenter ]] && has handbook ${IUSE//+}; then
204 - RDEPEND+=" handbook? ( $(add_kdebase_dep khelpcenter) )"
205 -fi
206 -
207 # Add dependencies that all packages in a certain module share.
208 case ${KMNAME} in
209 kdebase|kdebase-apps|kdebase-workspace|kdebase-runtime|kdegraphics)
210 COMMONDEPEND+=" >=kde-base/qimageblitz-0.0.4"
211 ;;
212 kdepim|kdepim-runtime)
213 - COMMONDEPEND+=" $(add_kdebase_dep kdepimlibs)"
214 + ! slot_is_at_least 4.4 ${SLOT} && COMMONDEPEND+=" $(add_kdebase_dep kdepimlibs)"
215 case ${PN} in
216 akregator|kaddressbook|kjots|kmail|knode|knotes|korganizer|ktimetracker)
217 IUSE+=" +kontact"
218 - if ! slot_is_at_least 4.4 ${SLOT}; then
219 - RDEPEND+=" kontact? ( $(add_kdebase_dep kontactinterfaces) )"
220 - fi
221 + RDEPEND+=" kontact? ( $(add_kdebase_dep kontact) )"
222 ;;
223 esac
224 ;;
225 @@ -211,12 +204,12 @@
226 else
227 local abort tarball tarfile f extractlist moduleprefix postfix
228 case ${PV} in
229 - 4.3.8[05] | 4.3.9[0568])
230 + 4.[34].8[05] | 4.[34].9[0568])
231 # block for normally packed upstream unstable snapshots
232 KMTARPARAMS+=" --bzip2" # bz2
233 postfix="bz2"
234 ;;
235 - 4.3.[6-9]*)
236 + 4.[34].[6-9]*)
237 # Not passing --xz, as it doesn't work with stable tar
238 KMTARPARAMS+=" --use-compress-program=xz" # xz
239 postfix="xz"
240 @@ -334,6 +327,7 @@
241 if [[ ${PN} != libkdegames ]]; then
242 KMEXTRACTONLY+="
243 libkdegames/"
244 + KMLOADLIBS="${KMLOADLIBS} libkdegames"
245 fi
246 ;;
247 kdepim)
248 @@ -341,15 +335,16 @@
249 KMEXTRACTONLY+="
250 libkdepim/"
251 fi
252 - case ${SLOT} in
253 - 4.3|4.4|live)
254 - KMEXTRACTONLY+="
255 - kdepim-version.h
256 - config-enterprise.h.cmake"
257 - ;;
258 - esac
259 KMEXTRACTONLY+="
260 + config-enterprise.h.cmake
261 kleopatra/ConfigureChecks.cmake"
262 + if slot_is_at_least 4.5 ${SLOT}; then
263 + KMEXTRACTONLY+="
264 + kdepim-version.h.cmake"
265 + else
266 + KMEXTRACTONLY+="
267 + kdepim-version.h"
268 + fi
269 if has kontact ${IUSE//+} && use kontact; then
270 KMEXTRA+="
271 kontact/plugins/${PLUGINNAME:-${PN}}/"
272 @@ -360,12 +355,8 @@
273 fi
274 ;;
275 kdeutils)
276 - case ${SLOT} in
277 - 4.3|4.4|live)
278 - KMEXTRACTONLY+="
279 - kdeutils-version.h"
280 - ;;
281 - esac
282 + KMEXTRACTONLY+="
283 + kdeutils-version.h"
284 ;;
285 koffice)
286 KMEXTRACTONLY+="
287 @@ -385,16 +376,6 @@
288 esac
289 # Don't install cmake modules for split ebuilds, to avoid collisions.
290 case ${KMNAME} in
291 - kdepim)
292 - # No need for unpack since 4.2.86
293 - # Remove when 4.2 is wiped out from the tree
294 - case ${PV} in
295 - 4.2.[0-4])
296 - KMCOMPILEONLY+="
297 - cmake/modules/"
298 - ;;
299 - esac
300 - ;;
301 kdebase-runtime|kdebase-workspace|kdeedu|kdegames|kdegraphics)
302 case ${PN} in
303 libkdegames|libkdeedu|libkworkspace)
304 @@ -588,17 +569,24 @@
305 -i CMakeLists.txt || die "failed to disable hardcoded checks"
306 ;;
307 kdepim)
308 - case ${PN} in
309 - kaddressbook|kalarm|kmailcvt|kontact|korganizer|korn)
310 - sed -n -e '/qt4_generate_dbus_interface(.*org\.kde\.kmail\.\(kmail\|mailcomposer\)\.xml/p' \
311 - -e '/add_custom_target(kmail_xml /,/)/p' \
312 - -i kmail/CMakeLists.txt || die "uncommenting xml failed"
313 - _change_cmakelists_parent_dirs kmail
314 - ;;
315 - esac
316 + # Disable hardcoded checks
317 + sed -r -e '/find_package\(KdepimLibs/s/REQUIRED//' \
318 + -e '/find_package\((KdepimLibs|Boost|QGpgme|Akonadi|ZLIB|Strigi|SharedDesktopOntologies|Soprano|Nepomuk)/{/macro_optional_/!s/find/macro_optional_&/}' \
319 + -e '/macro_log_feature\((Boost|QGPGME|Akonadi|ZLIB|STRIGI|SHAREDDESKTOPONTOLOGIES|Soprano|Nepomuk)_FOUND/s/ TRUE / FALSE /' \
320 + -i CMakeLists.txt || die "failed to disable hardcoded checks"
321 + if ! slot_is_at_least 4.5 ${SLOT}; then
322 + case ${PN} in
323 + kalarm|kmailcvt|kontact|korganizer|korn)
324 + sed -n -e '/qt4_generate_dbus_interface(.*org\.kde\.kmail\.\(kmail\|mailcomposer\)\.xml/p' \
325 + -e '/add_custom_target(kmail_xml /,/)/p' \
326 + -i kmail/CMakeLists.txt || die "uncommenting xml failed"
327 + _change_cmakelists_parent_dirs kmail
328 + ;;
329 + esac
330 + fi
331 ;;
332 kdewebdev)
333 - # Disable hardcoded kdepimlibs check
334 + # Disable hardcoded checks
335 sed -e 's/find_package(KdepimLibs REQUIRED)/macro_optional_find_package(KdepimLibs)/' \
336 -e 's/find_package(LibXml2 REQUIRED)/macro_optional_find_package(LibXml2)/' \
337 -e 's/find_package(LibXslt REQUIRED)/macro_optional_find_package(LibXslt)/' \
338 @@ -606,7 +594,7 @@
339 -i CMakeLists.txt || die "failed to disable hardcoded checks"
340 ;;
341 koffice)
342 - # prevent collisions
343 + # Prevent collisions
344 if [[ ${PN} != koffice-data ]]; then
345 sed -e '/install(.*FindKOfficeLibs.cmake/,/)/ d' \
346 -i cmake/modules/CMakeLists.txt || die "${LINENO}: sed died in collision prevention section"