| 1 | # Copyright 1999-2010 Gentoo Foundation |
1 | # Copyright 1999-2010 Gentoo Foundation |
| 2 | # Distributed under the terms of the GNU General Public License v2 |
2 | # Distributed under the terms of the GNU General Public License v2 |
| 3 | # $Header: /var/cvsroot/gentoo-x86/eclass/kde4-base.eclass,v 1.68 2010/08/13 05:05:40 reavertm Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/kde4-base.eclass,v 1.79 2010/12/06 10:17:04 tampakrap Exp $ |
| 4 | |
4 | |
| 5 | # @ECLASS: kde4-base.eclass |
5 | # @ECLASS: kde4-base.eclass |
| 6 | # @MAINTAINER: |
6 | # @MAINTAINER: |
| 7 | # kde@gentoo.org |
7 | # kde@gentoo.org |
| 8 | # @BLURB: This eclass provides functions for kde 4.X ebuilds |
8 | # @BLURB: This eclass provides functions for kde 4.X ebuilds |
| … | |
… | |
| 11 | # and KDE4 applications. |
11 | # and KDE4 applications. |
| 12 | # |
12 | # |
| 13 | # NOTE: KDE 4 ebuilds by default define EAPI="2", this can be redefined but |
13 | # NOTE: KDE 4 ebuilds by default define EAPI="2", this can be redefined but |
| 14 | # eclass will fail with version older than 2. |
14 | # eclass will fail with version older than 2. |
| 15 | |
15 | |
|
|
16 | # @ECLASS-VARIABLE: VIRTUALX_REQUIRED |
|
|
17 | # @DESCRIPTION: |
|
|
18 | # Do we need an X server? Valid values are "always", "optional", and "manual". |
|
|
19 | # "tests" is a synonym for "optional". While virtualx.eclass supports in principle |
|
|
20 | # also the use of an X server during other ebuild phases, we only use it in |
|
|
21 | # src_test here. Most likely you'll want to set "optional", which introduces the |
|
|
22 | # use-flag "test" (if not already present), adds dependencies conditional on that |
|
|
23 | # use-flag, and automatically runs (only) the ebuild test phase with a virtual X server |
|
|
24 | # present. This makes things a lot more comfortable than the bare virtualx eclass. |
|
|
25 | |
|
|
26 | # In case the variable is not set in the ebuild, let virtualx eclass not do anything |
|
|
27 | : ${VIRTUALX_REQUIRED:=manual} |
|
|
28 | |
| 16 | inherit kde4-functions base eutils |
29 | inherit kde4-functions base virtualx eutils |
| 17 | |
30 | |
| 18 | get_build_type |
31 | get_build_type |
| 19 | if [[ ${BUILD_TYPE} = live ]]; then |
32 | if [[ ${BUILD_TYPE} = live ]]; then |
| 20 | if [[ ${KDEBASE} = kdevelop ]]; then |
33 | if [[ ${KDEBASE} = kdevelop ]]; then |
| 21 | inherit git |
34 | inherit git |
| … | |
… | |
| 60 | case ${KDEBASE} in |
73 | case ${KDEBASE} in |
| 61 | kde-base) |
74 | kde-base) |
| 62 | # Determine SLOT from PVs |
75 | # Determine SLOT from PVs |
| 63 | case ${PV} in |
76 | case ${PV} in |
| 64 | *.9999*) SLOT="${PV/.9999*/}" ;; # stable live |
77 | *.9999*) SLOT="${PV/.9999*/}" ;; # stable live |
| 65 | 4.6* | 4.5.[6-9]*) SLOT="4.6" ;; |
78 | 4.6* | 4.5.[6-9][0-9]*) SLOT="4.6" ;; |
| 66 | 4.5* | 4.4.[6-9]*) SLOT="4.5" ;; |
79 | 4.5* | 4.4.[6-9][0-9]*) SLOT="4.5" ;; |
| 67 | 4.4* | 4.3.[6-9]*) SLOT="4.4" ;; |
80 | 4.4* | 4.3.[6-9][0-9]*) SLOT="4.4" ;; |
| 68 | 9999*) SLOT="live" ;; # regular live |
81 | 9999*) SLOT="live" ;; # regular live |
| 69 | *) die "Unsupported ${PV}" ;; |
82 | *) die "Unsupported ${PV}" ;; |
| 70 | esac |
83 | esac |
| 71 | KDE_MINIMAL="${SLOT}" |
84 | KDE_MINIMAL="${SLOT}" |
| 72 | ;; |
85 | ;; |
| … | |
… | |
| 111 | EXPORT_FUNCTIONS pkg_setup src_unpack src_prepare ${export_fns} pkg_postinst pkg_postrm |
124 | EXPORT_FUNCTIONS pkg_setup src_unpack src_prepare ${export_fns} pkg_postinst pkg_postrm |
| 112 | |
125 | |
| 113 | unset buildsystem_eclass |
126 | unset buildsystem_eclass |
| 114 | unset export_fns |
127 | unset export_fns |
| 115 | |
128 | |
|
|
129 | # @ECLASS-VARIABLE: DECLARATIVE_REQUIRED |
|
|
130 | # @DESCRIPTION: |
|
|
131 | # Is qt-declarative required? Possible values are 'always', 'optional' and 'never'. |
|
|
132 | # This variable must be set before inheriting any eclasses. Defaults to 'never'. |
|
|
133 | DECLARATIVE_REQUIRED="${DECLARATIVE_REQUIRED:-never}" |
|
|
134 | |
|
|
135 | # @ECLASS-VARIABLE: QTHELP_REQUIRED |
|
|
136 | # @DESCRIPTION: |
|
|
137 | # Is qt-assistant required? Possible values are 'always', 'optional' and 'never'. |
|
|
138 | # This variable must be set before inheriting any eclasses. Defaults to 'never'. |
|
|
139 | QTHELP_REQUIRED="${QTHELP_REQUIRED:-never}" |
|
|
140 | |
|
|
141 | # @ECLASS-VARIABLE: OPENGL_REQUIRED |
|
|
142 | # @DESCRIPTION: |
|
|
143 | # Is qt-opengl required? Possible values are 'always', 'optional' and 'never'. |
|
|
144 | # This variable must be set before inheriting any eclasses. Defaults to 'never'. |
|
|
145 | OPENGL_REQUIRED="${OPENGL_REQUIRED:-never}" |
|
|
146 | |
|
|
147 | # @ECLASS-VARIABLE: MULTIMEDIA_REQUIRED |
|
|
148 | # @DESCRIPTION: |
|
|
149 | # Is qt-multimedia required? Possible values are 'always', 'optional' and 'never'. |
|
|
150 | # This variable must be set before inheriting any eclasses. Defaults to 'never'. |
|
|
151 | MULTIMEDIA_REQUIRED="${MULTIMEDIA_REQUIRED:-never}" |
|
|
152 | |
|
|
153 | # @ECLASS-VARIABLE: WEBKIT_REQUIRED |
|
|
154 | # @DESCRIPTION: |
|
|
155 | # Is qt-webkit requred? Possible values are 'always', 'optional' and 'never'. |
|
|
156 | # This variable must be set before inheriting any eclasses. Defaults to 'never'. |
|
|
157 | WEBKIT_REQUIRED="${WEBKIT_REQUIRED:-never}" |
|
|
158 | |
|
|
159 | # @ECLASS-VARIABLE: CPPUNIT_REQUIRED |
|
|
160 | # @DESCRIPTION: |
|
|
161 | # Is cppunit required for tests? Possible values are 'always', 'optional' and 'never'. |
|
|
162 | # This variable must be set before inheriting any eclasses. Defaults to 'never'. |
|
|
163 | CPPUNIT_REQUIRED="${CPPUNIT_REQUIRED:-never}" |
|
|
164 | |
|
|
165 | # @ECLASS-VARIABLE: KDE_REQUIRED |
|
|
166 | # @DESCRIPTION: |
|
|
167 | # Is kde required? Possible values are 'always', 'optional' and 'never'. |
|
|
168 | # This variable must be set before inheriting any eclasses. Defaults to 'always' |
|
|
169 | # If set to 'always' or 'optional', KDE_MINIMAL may be overriden as well. |
|
|
170 | # Note that for kde-base packages this variable is fixed to 'always'. |
|
|
171 | KDE_REQUIRED="${KDE_REQUIRED:-always}" |
|
|
172 | |
|
|
173 | # @ECLASS-VARIABLE: KDE_HANDBOOK |
|
|
174 | # @DESCRIPTION: |
|
|
175 | # Set to enable handbook in application. Possible values are 'always', 'optional' |
|
|
176 | # (handbook USE flag) and 'never'. |
|
|
177 | # This variable must be set before inheriting any eclasses. Defaults to 'never'. |
|
|
178 | # It adds default handbook dirs for kde-base packages to KMEXTRA and in any case it |
|
|
179 | # ensures buildtime and runtime dependencies. |
|
|
180 | KDE_HANDBOOK="${KDE_HANDBOOK:-never}" |
|
|
181 | |
|
|
182 | # Setup packages inheriting this eclass |
| 116 | case ${KDEBASE} in |
183 | case ${KDEBASE} in |
| 117 | kde-base) |
184 | kde-base) |
| 118 | HOMEPAGE="http://www.kde.org/" |
185 | HOMEPAGE="http://www.kde.org/" |
| 119 | LICENSE="GPL-2" |
186 | LICENSE="GPL-2" |
| 120 | ;; |
|
|
| 121 | koffice) |
|
|
| 122 | HOMEPAGE="http://www.koffice.org/" |
|
|
| 123 | LICENSE="GPL-2" |
|
|
| 124 | ;; |
|
|
| 125 | kdevelop) |
|
|
| 126 | HOMEPAGE="http://www.kdevelop.org/" |
|
|
| 127 | LICENSE="GPL-2" |
|
|
| 128 | ;; |
|
|
| 129 | esac |
|
|
| 130 | |
|
|
| 131 | # @ECLASS-VARIABLE: OPENGL_REQUIRED |
|
|
| 132 | # @DESCRIPTION: |
|
|
| 133 | # Is qt-opengl required? Possible values are 'always', 'optional' and 'never'. |
|
|
| 134 | # This variable must be set before inheriting any eclasses. Defaults to 'never'. |
|
|
| 135 | OPENGL_REQUIRED="${OPENGL_REQUIRED:-never}" |
|
|
| 136 | |
|
|
| 137 | # @ECLASS-VARIABLE: MULTIMEDIA_REQUIRED |
|
|
| 138 | # @DESCRIPTION: |
|
|
| 139 | # Is qt-multimedia required? Possible values are 'always', 'optional' and 'never'. |
|
|
| 140 | # This variable must be set before inheriting any eclasses. Defaults to 'never'. |
|
|
| 141 | MULTIMEDIA_REQUIRED="${MULTIMEDIA_REQUIRED:-never}" |
|
|
| 142 | |
|
|
| 143 | # @ECLASS-VARIABLE: WEBKIT_REQUIRED |
|
|
| 144 | # @DESCRIPTION: |
|
|
| 145 | # Is qt-webkit requred? Possible values are 'always', 'optional' and 'never'. |
|
|
| 146 | # This variable must be set before inheriting any eclasses. Defaults to 'never'. |
|
|
| 147 | WEBKIT_REQUIRED="${WEBKIT_REQUIRED:-never}" |
|
|
| 148 | |
|
|
| 149 | # @ECLASS-VARIABLE: CPPUNIT_REQUIRED |
|
|
| 150 | # @DESCRIPTION: |
|
|
| 151 | # Is cppunit required for tests? Possible values are 'always', 'optional' and 'never'. |
|
|
| 152 | # This variable must be set before inheriting any eclasses. Defaults to 'never'. |
|
|
| 153 | CPPUNIT_REQUIRED="${CPPUNIT_REQUIRED:-never}" |
|
|
| 154 | |
|
|
| 155 | # @ECLASS-VARIABLE: KDE_REQUIRED |
|
|
| 156 | # @DESCRIPTION: |
|
|
| 157 | # Is kde required? Possible values are 'always', 'optional' and 'never'. |
|
|
| 158 | # This variable must be set before inheriting any eclasses. Defaults to 'always' |
|
|
| 159 | # If set to always or optional, KDE_MINIMAL may be overriden as well. |
|
|
| 160 | # Note that for kde-base packages this variable is fixed to 'always'. |
|
|
| 161 | KDE_REQUIRED="${KDE_REQUIRED:-always}" |
|
|
| 162 | |
|
|
| 163 | # Setup packages inheriting this eclass |
|
|
| 164 | case ${KDEBASE} in |
|
|
| 165 | kde-base) |
|
|
| 166 | if [[ $BUILD_TYPE = live ]]; then |
187 | if [[ $BUILD_TYPE = live ]]; then |
| 167 | # Disable tests for live ebuilds |
188 | # Disable tests for live ebuilds |
| 168 | RESTRICT+=" test" |
189 | RESTRICT+=" test" |
| 169 | # Live ebuilds in kde-base default to kdeprefix by default |
190 | # Live ebuilds in kde-base default to kdeprefix by default |
| 170 | IUSE+=" +kdeprefix" |
191 | IUSE+=" +kdeprefix" |
| … | |
… | |
| 181 | ;; |
202 | ;; |
| 182 | esac |
203 | esac |
| 183 | # Block installation of other SLOTS unless kdeprefix |
204 | # Block installation of other SLOTS unless kdeprefix |
| 184 | RDEPEND+=" $(block_other_slots)" |
205 | RDEPEND+=" $(block_other_slots)" |
| 185 | ;; |
206 | ;; |
|
|
207 | koffice) |
|
|
208 | HOMEPAGE="http://www.koffice.org/" |
|
|
209 | LICENSE="GPL-2" |
|
|
210 | ;; |
|
|
211 | kdevelop) |
|
|
212 | HOMEPAGE="http://www.kdevelop.org/" |
|
|
213 | LICENSE="GPL-2" |
|
|
214 | ;; |
| 186 | esac |
215 | esac |
| 187 | |
216 | |
| 188 | # @ECLASS-VARIABLE: QT_MINIMAL |
217 | # @ECLASS-VARIABLE: QT_MINIMAL |
| 189 | # @DESCRIPTION: |
218 | # @DESCRIPTION: |
| 190 | # Determine version of qt we enforce as minimal for the package. 4.4.0 4.5.1... |
219 | # Determine version of qt we enforce as minimal for the package. 4.4.0 4.5.1... |
| 191 | # 4.6.0 for 4.4 and 4.6.3 for 4.5 and later |
220 | # 4.6.0 for 4.4, 4.6.3 for 4.5, and 4.7.0 for 4.6 and later |
|
|
221 | if slot_is_at_least 4.6 "${KDE_MINIMAL}"; then |
|
|
222 | QT_MINIMAL="${QT_MINIMAL:-4.7.0}" |
| 192 | if slot_is_at_least 4.5 "${KDE_MINIMAL}"; then |
223 | elif slot_is_at_least 4.5 "${KDE_MINIMAL}"; then |
| 193 | QT_MINIMAL="${QT_MINIMAL:-4.6.3}" |
224 | QT_MINIMAL="${QT_MINIMAL:-4.6.3}" |
| 194 | else |
225 | else |
| 195 | QT_MINIMAL="${QT_MINIMAL:-4.6.0}" |
226 | QT_MINIMAL="${QT_MINIMAL:-4.6.0}" |
| 196 | fi |
227 | fi |
|
|
228 | |
|
|
229 | # Declarative dependencies |
|
|
230 | qtdeclarativedepend=" |
|
|
231 | >=x11-libs/qt-declarative-${QT_MINIMAL}:4 |
|
|
232 | " |
|
|
233 | case ${DECLARATIVE_REQUIRED} in |
|
|
234 | always) |
|
|
235 | COMMONDEPEND+=" ${qtdeclarativedepend}" |
|
|
236 | ;; |
|
|
237 | optional) |
|
|
238 | IUSE+=" declarative" |
|
|
239 | COMMONDEPEND+=" declarative? ( ${qtdeclarativedepend} )" |
|
|
240 | ;; |
|
|
241 | *) ;; |
|
|
242 | esac |
|
|
243 | unset qtdeclarativedepend |
|
|
244 | |
|
|
245 | # QtHelp dependencies |
|
|
246 | qthelpdepend=" |
|
|
247 | >=x11-libs/qt-assistant-${QT_MINIMAL}:4 |
|
|
248 | " |
|
|
249 | case ${QTHELP_REQUIRED} in |
|
|
250 | always) |
|
|
251 | COMMONDEPEND+=" ${qthelpdepend}" |
|
|
252 | ;; |
|
|
253 | optional) |
|
|
254 | IUSE+=" qthelp" |
|
|
255 | COMMONDEPEND+=" qthelp? ( ${qthelpdepend} )" |
|
|
256 | ;; |
|
|
257 | esac |
|
|
258 | unset qthelpdepend |
| 197 | |
259 | |
| 198 | # OpenGL dependencies |
260 | # OpenGL dependencies |
| 199 | qtopengldepend=" |
261 | qtopengldepend=" |
| 200 | >=x11-libs/qt-opengl-${QT_MINIMAL}:4 |
262 | >=x11-libs/qt-opengl-${QT_MINIMAL}:4 |
| 201 | " |
263 | " |
| … | |
… | |
| 270 | unset cppuintdepend |
332 | unset cppuintdepend |
| 271 | |
333 | |
| 272 | # KDE dependencies |
334 | # KDE dependencies |
| 273 | # Qt accessibility classes are needed in various places, bug 325461 |
335 | # Qt accessibility classes are needed in various places, bug 325461 |
| 274 | kdecommondepend=" |
336 | kdecommondepend=" |
|
|
337 | dev-lang/perl |
| 275 | >=x11-libs/qt-core-${QT_MINIMAL}:4[qt3support,ssl] |
338 | >=x11-libs/qt-core-${QT_MINIMAL}:4[qt3support,ssl] |
| 276 | >=x11-libs/qt-gui-${QT_MINIMAL}:4[accessibility,dbus] |
339 | >=x11-libs/qt-gui-${QT_MINIMAL}:4[accessibility,dbus] |
| 277 | >=x11-libs/qt-qt3support-${QT_MINIMAL}:4[accessibility,kde] |
340 | >=x11-libs/qt-qt3support-${QT_MINIMAL}:4[accessibility,kde] |
| 278 | >=x11-libs/qt-script-${QT_MINIMAL}:4 |
341 | >=x11-libs/qt-script-${QT_MINIMAL}:4 |
| 279 | >=x11-libs/qt-sql-${QT_MINIMAL}:4[qt3support] |
342 | >=x11-libs/qt-sql-${QT_MINIMAL}:4[qt3support] |
| … | |
… | |
| 283 | x11-libs/libXext |
346 | x11-libs/libXext |
| 284 | x11-libs/libXt |
347 | x11-libs/libXt |
| 285 | x11-libs/libXxf86vm |
348 | x11-libs/libXxf86vm |
| 286 | ) |
349 | ) |
| 287 | " |
350 | " |
| 288 | #perl is not needed on host (+ difficult crosscompilation) |
|
|
| 289 | tc-is-cross-compiler || kdecommondepend+=" dev-lang/perl" |
|
|
| 290 | |
351 | |
| 291 | if [[ ${PN} != kdelibs ]]; then |
352 | if [[ ${PN} != kdelibs ]]; then |
| 292 | if [[ ${KDEBASE} = kde-base ]]; then |
|
|
| 293 | kdecommondepend+=" $(add_kdebase_dep kdelibs)" |
353 | kdecommondepend+=" $(add_kdebase_dep kdelibs)" |
| 294 | else |
|
|
| 295 | kdecommondepend+=" |
|
|
| 296 | >=kde-base/kdelibs-${KDE_MINIMAL} |
|
|
| 297 | " |
|
|
| 298 | if [[ ${KDEBASE} = kdevelop ]]; then |
354 | if [[ ${KDEBASE} = kdevelop ]]; then |
| 299 | if [[ ${PN} != kdevplatform ]]; then |
355 | if [[ ${PN} != kdevplatform ]]; then |
| 300 | # @ECLASS-VARIABLE: KDEVPLATFORM_REQUIRED |
356 | # @ECLASS-VARIABLE: KDEVPLATFORM_REQUIRED |
| 301 | # @DESCRIPTION: |
357 | # @DESCRIPTION: |
| 302 | # Specifies whether kdevplatform is required. Possible values are 'always' (default) and 'never'. |
358 | # Specifies whether kdevplatform is required. Possible values are 'always' (default) and 'never'. |
| 303 | # Applies to KDEBASE=kdevelop only. |
359 | # Applies to KDEBASE=kdevelop only. |
| 304 | KDEVPLATFORM_REQUIRED="${KDEVPLATFORM_REQUIRED:-always}" |
360 | KDEVPLATFORM_REQUIRED="${KDEVPLATFORM_REQUIRED:-always}" |
| 305 | case ${KDEVPLATFORM_REQUIRED} in |
361 | case ${KDEVPLATFORM_REQUIRED} in |
| 306 | always) |
362 | always) |
| 307 | kdecommondepend+=" |
363 | kdecommondepend+=" |
| 308 | >=dev-util/kdevplatform-${KDEVPLATFORM_VERSION} |
364 | >=dev-util/kdevplatform-${KDEVPLATFORM_VERSION} |
| 309 | " |
365 | " |
| 310 | ;; |
366 | ;; |
| 311 | *) ;; |
367 | *) ;; |
| 312 | esac |
368 | esac |
| 313 | fi |
|
|
| 314 | fi |
369 | fi |
| 315 | fi |
370 | fi |
| 316 | fi |
371 | fi |
| 317 | kdedepend=" |
372 | kdedepend=" |
| 318 | dev-util/automoc |
373 | dev-util/automoc |
| … | |
… | |
| 320 | !aqua? ( |
375 | !aqua? ( |
| 321 | || ( >=x11-libs/libXtst-1.1.0 <x11-proto/xextproto-7.1.0 ) |
376 | || ( >=x11-libs/libXtst-1.1.0 <x11-proto/xextproto-7.1.0 ) |
| 322 | x11-proto/xf86vidmodeproto |
377 | x11-proto/xf86vidmodeproto |
| 323 | ) |
378 | ) |
| 324 | " |
379 | " |
|
|
380 | kderdepend="" |
|
|
381 | |
|
|
382 | kdehandbookdepend=" |
|
|
383 | app-text/docbook-xml-dtd:4.2 |
|
|
384 | app-text/docbook-xsl-stylesheets |
|
|
385 | " |
|
|
386 | kdehandbookrdepend=" |
|
|
387 | $(add_kdebase_dep kdelibs 'handbook') |
|
|
388 | " |
|
|
389 | case ${KDE_HANDBOOK} in |
|
|
390 | always) |
|
|
391 | kdedepend+=" ${kdehandbookdepend}" |
|
|
392 | [[ ${PN} != kdelibs ]] && kderdepend+=" ${kdehandbookrdepend}" |
|
|
393 | ;; |
|
|
394 | optional) |
|
|
395 | IUSE+=" +handbook" |
|
|
396 | kdedepend+=" handbook? ( ${kdehandbookdepend} )" |
|
|
397 | [[ ${PN} != kdelibs ]] && kderdepend+=" handbook? ( ${kdehandbookrdepend} )" |
|
|
398 | ;; |
|
|
399 | *) ;; |
|
|
400 | esac |
|
|
401 | unset kdehandbookdepend kdehandbookrdepend |
|
|
402 | |
| 325 | case ${KDE_REQUIRED} in |
403 | case ${KDE_REQUIRED} in |
| 326 | always) |
404 | always) |
| 327 | IUSE+=" aqua" |
405 | IUSE+=" aqua" |
| 328 | COMMONDEPEND+=" ${kdecommondepend}" |
406 | [[ -n ${kdecommondepend} ]] && COMMONDEPEND+=" ${kdecommondepend}" |
| 329 | DEPEND+=" ${kdedepend}" |
407 | [[ -n ${kdedepend} ]] && DEPEND+=" ${kdedepend}" |
|
|
408 | [[ -n ${kderdepend} ]] && RDEPEND+=" ${kderdepend}" |
| 330 | ;; |
409 | ;; |
| 331 | optional) |
410 | optional) |
| 332 | IUSE+=" aqua kde" |
411 | IUSE+=" aqua kde" |
| 333 | COMMONDEPEND+=" kde? ( ${kdecommondepend} )" |
412 | [[ -n ${kdecommondepend} ]] && COMMONDEPEND+=" kde? ( ${kdecommondepend} )" |
| 334 | DEPEND+=" kde? ( ${kdedepend} )" |
413 | [[ -n ${kdedepend} ]] && DEPEND+=" kde? ( ${kdedepend} )" |
|
|
414 | [[ -n ${kderdepend} ]] && RDEPEND+=" kde? ( ${kderdepend} )" |
| 335 | ;; |
415 | ;; |
| 336 | *) ;; |
416 | *) ;; |
| 337 | esac |
417 | esac |
| 338 | |
418 | |
| 339 | unset kdecommondepend kdedepend |
419 | unset kdecommondepend kdedepend kderdepend |
| 340 | |
420 | |
| 341 | debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: COMMONDEPEND is ${COMMONDEPEND}" |
421 | debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: COMMONDEPEND is ${COMMONDEPEND}" |
| 342 | debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: DEPEND (only) is ${DEPEND}" |
422 | debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: DEPEND (only) is ${DEPEND}" |
| 343 | debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: RDEPEND (only) is ${RDEPEND}" |
423 | debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: RDEPEND (only) is ${RDEPEND}" |
| 344 | |
424 | |
| … | |
… | |
| 430 | if [[ -z ${KMNOMODULE} ]] && [[ -z ${KMMODULE} ]]; then |
510 | if [[ -z ${KMNOMODULE} ]] && [[ -z ${KMMODULE} ]]; then |
| 431 | KMMODULE="${PN}" |
511 | KMMODULE="${PN}" |
| 432 | fi |
512 | fi |
| 433 | case ${KDEBASE} in |
513 | case ${KDEBASE} in |
| 434 | kdevelop) |
514 | kdevelop) |
| 435 | EGIT_REPO_URI="git://gitorious.org/${KMNAME}/${KMMODULE}.git" |
515 | EGIT_REPO_URI="git://git.kde.org/${KMMODULE}" |
| 436 | ;; |
516 | ;; |
| 437 | esac |
517 | esac |
| 438 | fi |
518 | fi |
| 439 | ;; |
519 | ;; |
| 440 | *) |
520 | *) |
| … | |
… | |
| 451 | fi |
531 | fi |
| 452 | _kmname_pv="${_kmname}-${PV}" |
532 | _kmname_pv="${_kmname}-${PV}" |
| 453 | case ${KDEBASE} in |
533 | case ${KDEBASE} in |
| 454 | kde-base) |
534 | kde-base) |
| 455 | case ${PV} in |
535 | case ${PV} in |
| 456 | 4.[45].8[05] | 4.[45].9[02568]) |
536 | 4.[456].8[05] | 4.[456].9[023568]) |
| 457 | # Normally packed unstable releases |
537 | # Unstable KDE SC releases |
| 458 | SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.bz2" ;; |
538 | SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.bz2" |
| 459 | 4.[45].[6-9]*) |
|
|
| 460 | # Repacked tarballs: need to depend on xz-utils to ensure that they can be unpacked |
|
|
| 461 | SRC_URI="http://dev.gentooexperimental.org/~alexxy/kde/${PV}/src/${_kmname_pv}.tar.xz" |
|
|
| 462 | DEPEND+=" app-arch/xz-utils" |
|
|
| 463 | ;; |
539 | ;; |
|
|
540 | 4.4.6 | 4.4.7 | 4.4.8) |
|
|
541 | # Only kdepim here |
|
|
542 | SRC_URI="mirror://kde/stable/kdepim-${PV}/src/${_kmname_pv}.tar.bz2" |
|
|
543 | ;; |
|
|
544 | *) |
|
|
545 | # Stable KDE SC releases |
| 464 | *) SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.bz2" ;; |
546 | SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.bz2" |
|
|
547 | ;; |
| 465 | esac |
548 | esac |
| 466 | ;; |
549 | ;; |
| 467 | koffice) |
550 | koffice) |
| 468 | case ${PV} in |
551 | case ${PV} in |
| 469 | 2.1.[6-9]*) SRC_URI="mirror://kde/unstable/${_kmname_pv}/${_kmname_pv}.tar.bz2" ;; |
552 | 2.1.[6-9]*) SRC_URI="mirror://kde/unstable/${_kmname_pv}/${_kmname_pv}.tar.bz2" ;; |
| … | |
… | |
| 628 | |
711 | |
| 629 | # Inject library dependencies |
712 | # Inject library dependencies |
| 630 | if [[ -n ${KMLOADLIBS} ]] ; then |
713 | if [[ -n ${KMLOADLIBS} ]] ; then |
| 631 | load_library_dependencies |
714 | load_library_dependencies |
| 632 | fi |
715 | fi |
|
|
716 | |
|
|
717 | # Replace KDE4Workspace library targets |
|
|
718 | find "${S}" -name CMakeLists.txt \ |
|
|
719 | -exec sed -i -r -e 's/\$\{KDE4WORKSPACE_TASKMANAGER_(LIBRARY|LIBS)\}/taskmanager/g' {} + \ |
|
|
720 | -exec sed -i -r -e 's/\$\{KDE4WORKSPACE_KWORKSPACE_(LIBRARY|LIBS)\}/kworkspace/g' {} + \ |
|
|
721 | -exec sed -i -r -e 's/\$\{KDE4WORKSPACE_SOLIDCONTROLIFACES_(LIBRARY|LIBS)\}/solidcontrolifaces/g' {} + \ |
|
|
722 | -exec sed -i -r -e 's/\$\{KDE4WORKSPACE_SOLIDCONTROL_(LIBRARY|LIBS)\}/solidcontrol/g' {} + \ |
|
|
723 | -exec sed -i -r -e 's/\$\{KDE4WORKSPACE_PROCESSUI_(LIBRARY|LIBS)\}/processui/g' {} + \ |
|
|
724 | -exec sed -i -r -e 's/\$\{KDE4WORKSPACE_LSOFUI_(LIBRARY|LIBS)\}/lsofui/g' {} + \ |
|
|
725 | -exec sed -i -r -e 's/\$\{KDE4WORKSPACE_PLASMACLOCK_(LIBRARY|LIBS)\}/plasmaclock/g' {} + \ |
|
|
726 | -exec sed -i -r -e 's/\$\{KDE4WORKSPACE_NEPOMUKQUERYCLIENT_(LIBRARY|LIBS)\}/nepomukqueryclient/g' {} + \ |
|
|
727 | -exec sed -i -r -e 's/\$\{KDE4WORKSPACE_NEPOMUKQUERY_(LIBRARY|LIBS)\}/nepomukquery/g' {} + \ |
|
|
728 | -exec sed -i -r -e 's/\$\{KDE4WORKSPACE_KSCREENSAVER_(LIBRARY|LIBS)\}/kscreensaver/g' {} + \ |
|
|
729 | -exec sed -i -r -e 's/\$\{KDE4WORKSPACE_WEATHERION_(LIBRARY|LIBS)\}/weather_ion/g' {} + \ |
|
|
730 | -exec sed -i -r -e 's/\$\{KDE4WORKSPACE_KWINEFFECTS_(LIBRARY|LIBS)\}/kwineffects/g' {} + \ |
|
|
731 | -exec sed -i -r -e 's/\$\{KDE4WORKSPACE_KDECORATIONS_(LIBRARY|LIBS)\}/kdecorations/g' {} + \ |
|
|
732 | -exec sed -i -r -e 's/\$\{KDE4WORKSPACE_KSGRD_(LIBRARY|LIBS)\}/ksgrd/g' {} + \ |
|
|
733 | -exec sed -i -r -e 's/\$\{KDE4WORKSPACE_KEPHAL_(LIBRARY|LIBS)\}/kephal/g' {} + \ |
|
|
734 | || die 'failed to replace KDE4Workspace library targets' |
|
|
735 | |
|
|
736 | # Hack for manuals relying on outdated DTD, only outside kde-base/koffice/... |
|
|
737 | if [[ -z ${KDEBASE} ]]; then |
|
|
738 | find "${S}" -name "*.docbook" \ |
|
|
739 | -exec sed -i -r \ |
|
|
740 | -e 's:-//KDE//DTD DocBook XML V4\.1(\..)?-Based Variant V1\.[01]//EN:-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN:g' {} + \ |
|
|
741 | || die 'failed to fix DocBook variant version' |
|
|
742 | fi |
| 633 | } |
743 | } |
| 634 | |
744 | |
| 635 | # @FUNCTION: kde4-base_src_configure |
745 | # @FUNCTION: kde4-base_src_configure |
| 636 | # @DESCRIPTION: |
746 | # @DESCRIPTION: |
| 637 | # Function for configuring the build of KDE4 applications. |
747 | # Function for configuring the build of KDE4 applications. |
| … | |
… | |
| 720 | # Override this value, set in kde4-base_src_configure() |
830 | # Override this value, set in kde4-base_src_configure() |
| 721 | mycmakeargs+=(-DKDE4_BUILD_TESTS=ON) |
831 | mycmakeargs+=(-DKDE4_BUILD_TESTS=ON) |
| 722 | cmake-utils_src_configure |
832 | cmake-utils_src_configure |
| 723 | kde4-base_src_compile |
833 | kde4-base_src_compile |
| 724 | |
834 | |
|
|
835 | if [[ ${VIRTUALX_REQUIRED} == always ]] || |
|
|
836 | ( [[ ${VIRTUALX_REQUIRED} != manual ]] && use test ); then |
|
|
837 | |
|
|
838 | if [[ ${maketype} ]]; then |
|
|
839 | # surprise- we are already INSIDE virtualmake!!! |
|
|
840 | ewarn "QA Notice: This version of kde4-base.eclass includes the virtualx functionality." |
|
|
841 | ewarn " You may NOT set maketype or call virtualmake from the ebuild. Applying workaround." |
|
|
842 | cmake-utils_src_test |
|
|
843 | else |
|
|
844 | export maketype="cmake-utils_src_test" |
|
|
845 | virtualmake |
|
|
846 | fi |
|
|
847 | else |
| 725 | cmake-utils_src_test |
848 | cmake-utils_src_test |
|
|
849 | fi |
| 726 | } |
850 | } |
| 727 | |
851 | |
| 728 | # @FUNCTION: kde4-base_src_install |
852 | # @FUNCTION: kde4-base_src_install |
| 729 | # @DESCRIPTION: |
853 | # @DESCRIPTION: |
| 730 | # Function for installing KDE4 applications. |
854 | # Function for installing KDE4 applications. |