Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Thu, 03 May 2018 12:31:11
Message-Id: 1525350638.4c1bb55fb74e1806ebf87e3bb5afe936c47299b9.asturm@gentoo
1 commit: 4c1bb55fb74e1806ebf87e3bb5afe936c47299b9
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Thu May 3 12:19:45 2018 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Thu May 3 12:30:38 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4c1bb55f
7
8 kde4-base.eclass: Remove last-rited
9
10 Moved to kde-sunset repository.
11
12 Closes: https://bugs.gentoo.org/637770
13
14 eclass/kde4-base.eclass | 963 ------------------------------------------------
15 1 file changed, 963 deletions(-)
16
17 diff --git a/eclass/kde4-base.eclass b/eclass/kde4-base.eclass
18 deleted file mode 100644
19 index 72e4fcfe526..00000000000
20 --- a/eclass/kde4-base.eclass
21 +++ /dev/null
22 @@ -1,963 +0,0 @@
23 -# Copyright 1999-2017 Gentoo Foundation
24 -# Distributed under the terms of the GNU General Public License v2
25 -
26 -# @DEAD
27 -# Removal on 2018-05-03.
28 -# @ECLASS: kde4-base.eclass
29 -# @MAINTAINER:
30 -# kde@g.o
31 -# @BLURB: This eclass provides functions for kde 4.X ebuilds
32 -# @DESCRIPTION:
33 -# The kde4-base.eclass provides support for building KDE4 based ebuilds
34 -# and KDE4 applications.
35 -#
36 -# NOTE: KDE 4 ebuilds currently support EAPI 5. This will be
37 -# reviewed over time as new EAPI versions are approved.
38 -
39 -if [[ -z ${_KDE4_BASE_ECLASS} ]]; then
40 -_KDE4_BASE_ECLASS=1
41 -
42 -# @ECLASS-VARIABLE: KDE_SELINUX_MODULE
43 -# @DESCRIPTION:
44 -# If set to "none", do nothing.
45 -# For any other value, add selinux to IUSE, and depending on that useflag
46 -# add a dependency on sec-policy/selinux-${KDE_SELINUX_MODULE} to (R)DEPEND
47 -: ${KDE_SELINUX_MODULE:=none}
48 -
49 -# @ECLASS-VARIABLE: VIRTUALDBUS_TEST
50 -# @DESCRIPTION:
51 -# If defined, launch and use a private dbus session during src_test.
52 -
53 -# @ECLASS-VARIABLE: VIRTUALX_REQUIRED
54 -# @DESCRIPTION:
55 -# For proper description see virtualx.eclass manpage.
56 -# Here we redefine default value to be manual, if your package needs virtualx
57 -# for tests you should proceed with setting VIRTUALX_REQUIRED=test.
58 -: ${VIRTUALX_REQUIRED:=manual}
59 -
60 -inherit kde4-functions toolchain-funcs flag-o-matic gnome2-utils virtualx versionator eutils multilib xdg-utils
61 -
62 -if [[ ${KDE_BUILD_TYPE} = live ]]; then
63 - case ${KDE_SCM} in
64 - svn) inherit subversion ;;
65 - git) inherit git-r3 ;;
66 - esac
67 -fi
68 -
69 -# @ECLASS-VARIABLE: CMAKE_REQUIRED
70 -# @DESCRIPTION:
71 -# Specify if cmake buildsystem is being used. Possible values are 'always' and 'never'.
72 -# Please note that if it's set to 'never' you need to explicitly override following phases:
73 -# src_configure, src_compile, src_test and src_install.
74 -# Defaults to 'always'.
75 -: ${CMAKE_REQUIRED:=always}
76 -if [[ ${CMAKE_REQUIRED} = always ]]; then
77 - buildsystem_eclass="cmake-utils"
78 - export_fns="src_configure src_compile src_test src_install"
79 -fi
80 -
81 -# @ECLASS-VARIABLE: KDE_MINIMAL
82 -# @DESCRIPTION:
83 -# This variable is used when KDE_REQUIRED is set, to specify required KDE minimal
84 -# version for apps to work. Currently defaults to 4.4
85 -# One may override this variable to raise version requirements.
86 -# Note that it is fixed to ${PV} for kde-base packages.
87 -KDE_MINIMAL="${KDE_MINIMAL:-4.4}"
88 -
89 -# Set slot for KDEBASE known packages
90 -case ${KDEBASE} in
91 - kde-base)
92 - SLOT=4/$(get_version_component_range 1-2)
93 - KDE_MINIMAL="${PV}"
94 - ;;
95 - kdevelop)
96 - if [[ ${KDE_BUILD_TYPE} = live ]]; then
97 - # @ECLASS-VARIABLE: KDEVELOP_VERSION
98 - # @DESCRIPTION:
99 - # Specifies KDevelop version. Default is 4.0.0 for tagged packages and 9999 for live packages.
100 - # Applies to KDEBASE=kdevelop only.
101 - KDEVELOP_VERSION="${KDEVELOP_VERSION:-4.9999}"
102 - # @ECLASS-VARIABLE: KDEVPLATFORM_VERSION
103 - # @DESCRIPTION:
104 - # Specifies KDevplatform version. Default is 1.0.0 for tagged packages and 9999 for live packages.
105 - # Applies to KDEBASE=kdevelop only.
106 - KDEVPLATFORM_VERSION="${KDEVPLATFORM_VERSION:-4.9999}"
107 - else
108 - case ${PN} in
109 - kdevelop)
110 - KDEVELOP_VERSION=${PV}
111 - KDEVPLATFORM_VERSION="$(($(get_major_version)-3)).$(get_after_major_version)"
112 - ;;
113 - kdevplatform|kdevelop-php*|kdevelop-python)
114 - KDEVELOP_VERSION="$(($(get_major_version)+3)).$(get_after_major_version)"
115 - KDEVPLATFORM_VERSION=${PV}
116 - ;;
117 - *)
118 - KDEVELOP_VERSION="${KDEVELOP_VERSION:-4.0.0}"
119 - KDEVPLATFORM_VERSION="${KDEVPLATFORM_VERSION:-1.0.0}"
120 - esac
121 - fi
122 - SLOT="4"
123 - ;;
124 -esac
125 -
126 -inherit ${buildsystem_eclass}
127 -
128 -EXPORT_FUNCTIONS pkg_setup src_unpack src_prepare ${export_fns} pkg_preinst pkg_postinst pkg_postrm
129 -
130 -unset buildsystem_eclass
131 -unset export_fns
132 -
133 -# @ECLASS-VARIABLE: DECLARATIVE_REQUIRED
134 -# @DESCRIPTION:
135 -# Is qtdeclarative required? Possible values are 'always', 'optional' and 'never'.
136 -# This variable must be set before inheriting any eclasses. Defaults to 'never'.
137 -DECLARATIVE_REQUIRED="${DECLARATIVE_REQUIRED:-never}"
138 -
139 -# @ECLASS-VARIABLE: QT3SUPPORT_REQUIRED
140 -# @DESCRIPTION:
141 -# Is qt3support required? Possible values are 'true' or 'false'.
142 -# This variable must be set before inheriting any eclasses. Defaults to 'false'.
143 -QT3SUPPORT_REQUIRED="${QT3SUPPORT_REQUIRED:-false}"
144 -
145 -# @ECLASS-VARIABLE: QTHELP_REQUIRED
146 -# @DESCRIPTION:
147 -# Is qthelp required? Possible values are 'always', 'optional' and 'never'.
148 -# This variable must be set before inheriting any eclasses. Defaults to 'never'.
149 -QTHELP_REQUIRED="${QTHELP_REQUIRED:-never}"
150 -
151 -# @ECLASS-VARIABLE: OPENGL_REQUIRED
152 -# @DESCRIPTION:
153 -# Is qtopengl required? Possible values are 'always', 'optional' and 'never'.
154 -# This variable must be set before inheriting any eclasses. Defaults to 'never'.
155 -OPENGL_REQUIRED="${OPENGL_REQUIRED:-never}"
156 -
157 -# @ECLASS-VARIABLE: MULTIMEDIA_REQUIRED
158 -# @DESCRIPTION:
159 -# Is qtmultimedia required? Possible values are 'always', 'optional' and 'never'.
160 -# This variable must be set before inheriting any eclasses. Defaults to 'never'.
161 -MULTIMEDIA_REQUIRED="${MULTIMEDIA_REQUIRED:-never}"
162 -
163 -# @ECLASS-VARIABLE: SQL_REQUIRED
164 -# @DESCRIPTION:
165 -# Is qtsql required? Possible values are 'always', 'optional' and 'never'.
166 -# This variable must be set before inheriting any eclasses. Defaults to 'never'.
167 -SQL_REQUIRED="${SQL_REQUIRED:-never}"
168 -
169 -# @ECLASS-VARIABLE: WEBKIT_REQUIRED
170 -# @DESCRIPTION:
171 -# Is qtwebkit required? Possible values are 'always', 'optional' and 'never'.
172 -# This variable must be set before inheriting any eclasses. Defaults to 'never'.
173 -WEBKIT_REQUIRED="${WEBKIT_REQUIRED:-never}"
174 -
175 -# @ECLASS-VARIABLE: CPPUNIT_REQUIRED
176 -# @DESCRIPTION:
177 -# Is cppunit required for tests? Possible values are 'always', 'optional' and 'never'.
178 -# This variable must be set before inheriting any eclasses. Defaults to 'never'.
179 -CPPUNIT_REQUIRED="${CPPUNIT_REQUIRED:-never}"
180 -
181 -# @ECLASS-VARIABLE: KDE_REQUIRED
182 -# @DESCRIPTION:
183 -# Is kde required? Possible values are 'always', 'optional' and 'never'.
184 -# This variable must be set before inheriting any eclasses. Defaults to 'always'
185 -# If set to 'always' or 'optional', KDE_MINIMAL may be overridden as well.
186 -# Note that for kde-base packages this variable is fixed to 'always'.
187 -KDE_REQUIRED="${KDE_REQUIRED:-always}"
188 -
189 -# @ECLASS-VARIABLE: KDE_HANDBOOK
190 -# @DESCRIPTION:
191 -# Set to enable handbook in application. Possible values are 'always', 'optional'
192 -# (handbook USE flag) and 'never'.
193 -# This variable must be set before inheriting any eclasses. Defaults to 'never'.
194 -# It adds default handbook dirs for kde-base packages to KMEXTRA and in any case it
195 -# ensures buildtime and runtime dependencies.
196 -KDE_HANDBOOK="${KDE_HANDBOOK:-never}"
197 -
198 -# @ECLASS-VARIABLE: KDE_LINGUAS_LIVE_OVERRIDE
199 -# @DESCRIPTION:
200 -# Set this varible if you want your live package to manage its
201 -# translations. (Mostly all kde ebuilds does not ship documentation
202 -# and translations in live ebuilds)
203 -if [[ ${KDE_BUILD_TYPE} == live && -z ${KDE_LINGUAS_LIVE_OVERRIDE} ]]; then
204 - # Kdebase actually provides the handbooks even for live stuff
205 - [[ ${KDEBASE} == kde-base ]] || KDE_HANDBOOK=never
206 - KDE_LINGUAS=""
207 -fi
208 -
209 -# Setup packages inheriting this eclass
210 -case ${KDEBASE} in
211 - kde-base)
212 - HOMEPAGE="https://www.kde.org/"
213 - LICENSE="GPL-2"
214 - if [[ ${KDE_BUILD_TYPE} = live && -z ${I_KNOW_WHAT_I_AM_DOING} ]]; then
215 - # Disable tests for live ebuilds by default
216 - RESTRICT+=" test"
217 - fi
218 -
219 - # This code is to prevent portage from searching GENTOO_MIRRORS for
220 - # packages that will never be mirrored. (As they only will ever be in
221 - # the overlay).
222 - case ${PV} in
223 - *9999* | 4.?.[6-9]? | 4.??.[6-9]? | ??.?.[6-9]? | ??.??.[6-9]?)
224 - RESTRICT+=" mirror"
225 - ;;
226 - esac
227 - ;;
228 - kdevelop)
229 - HOMEPAGE="https://www.kdevelop.org/"
230 - LICENSE="GPL-2"
231 - ;;
232 -esac
233 -
234 -# @ECLASS-VARIABLE: QT_MINIMAL
235 -# @DESCRIPTION:
236 -# Determine version of qt we enforce as minimal for the package.
237 -QT_MINIMAL="${QT_MINIMAL:-4.8.5}"
238 -
239 -# Declarative dependencies
240 -qtdeclarativedepend="
241 - >=dev-qt/qtdeclarative-${QT_MINIMAL}:4
242 -"
243 -case ${DECLARATIVE_REQUIRED} in
244 - always)
245 - COMMONDEPEND+=" ${qtdeclarativedepend}"
246 - ;;
247 - optional)
248 - IUSE+=" declarative"
249 - COMMONDEPEND+=" declarative? ( ${qtdeclarativedepend} )"
250 - ;;
251 - *) ;;
252 -esac
253 -unset qtdeclarativedepend
254 -
255 -# Qt3Support dependencies
256 -qt3supportdepend="
257 - >=dev-qt/qt3support-${QT_MINIMAL}:4[accessibility]
258 -"
259 -case ${QT3SUPPORT_REQUIRED} in
260 - true)
261 - COMMONDEPEND+=" ${qt3supportdepend}"
262 - [[ -n ${qtcoreuse} ]] && qtcoreuse+=",qt3support" || qtcoreuse="qt3support"
263 - [[ -n ${qtsqluse} ]] && qtsqluse+=",qt3support" || qtsqluse="qt3support"
264 - [[ -n ${kdelibsuse} ]] && kdelibsuse+=",qt3support(+)" || kdelibsuse="qt3support(+)"
265 - ;;
266 - *) ;;
267 -esac
268 -unset qt3supportdepend
269 -
270 -# QtHelp dependencies
271 -qthelpdepend="
272 - >=dev-qt/qthelp-${QT_MINIMAL}:4
273 -"
274 -case ${QTHELP_REQUIRED} in
275 - always)
276 - COMMONDEPEND+=" ${qthelpdepend}"
277 - ;;
278 - optional)
279 - IUSE+=" qthelp"
280 - COMMONDEPEND+=" qthelp? ( ${qthelpdepend} )"
281 - ;;
282 -esac
283 -unset qthelpdepend
284 -
285 -# OpenGL dependencies
286 -qtopengldepend="
287 - >=dev-qt/qtopengl-${QT_MINIMAL}:4
288 -"
289 -case ${OPENGL_REQUIRED} in
290 - always)
291 - COMMONDEPEND+=" ${qtopengldepend}"
292 - ;;
293 - optional)
294 - IUSE+=" opengl"
295 - COMMONDEPEND+=" opengl? ( ${qtopengldepend} )"
296 - ;;
297 - *) ;;
298 -esac
299 -unset qtopengldepend
300 -
301 -# MultiMedia dependencies
302 -qtmultimediadepend="
303 - >=dev-qt/qtmultimedia-${QT_MINIMAL}:4
304 -"
305 -case ${MULTIMEDIA_REQUIRED} in
306 - always)
307 - COMMONDEPEND+=" ${qtmultimediadepend}"
308 - ;;
309 - optional)
310 - IUSE+=" multimedia"
311 - COMMONDEPEND+=" multimedia? ( ${qtmultimediadepend} )"
312 - ;;
313 - *) ;;
314 -esac
315 -unset qtmultimediadepend
316 -
317 -# Sql dependencies
318 -[[ -n ${qtsqluse} ]] && qtsqluse="[${qtsqluse}]"
319 -qtsqldepend="
320 - >=dev-qt/qtsql-${QT_MINIMAL}:4${qtsqluse}
321 -"
322 -case ${SQL_REQUIRED} in
323 - always)
324 - COMMONDEPEND+=" ${qtsqldepend}"
325 - ;;
326 - optional)
327 - IUSE+=" sql"
328 - COMMONDEPEND+=" sql? ( ${qtsqldepend} )"
329 - ;;
330 - *) ;;
331 -esac
332 -unset qtsqluse
333 -unset qtsqldepend
334 -
335 -# WebKit dependencies
336 -qtwebkitdepend="
337 - >=dev-qt/qtwebkit-${QT_MINIMAL}:4
338 -"
339 -case ${WEBKIT_REQUIRED} in
340 - always)
341 - COMMONDEPEND+=" ${qtwebkitdepend}"
342 - [[ -n ${kdelibsuse} ]] && kdelibsuse+=",webkit(+)" || kdelibsuse="webkit(+)"
343 - ;;
344 - optional)
345 - IUSE+=" +webkit"
346 - COMMONDEPEND+=" webkit? ( ${qtwebkitdepend} )"
347 - [[ -n ${kdelibsuse} ]] && kdelibsuse+=",webkit?" || kdelibsuse="webkit?"
348 - ;;
349 - *) ;;
350 -esac
351 -unset qtwebkitdepend
352 -
353 -# CppUnit dependencies
354 -cppuintdepend="
355 - dev-util/cppunit
356 -"
357 -case ${CPPUNIT_REQUIRED} in
358 - always)
359 - DEPEND+=" ${cppuintdepend}"
360 - ;;
361 - optional)
362 - IUSE+=" test"
363 - DEPEND+=" test? ( ${cppuintdepend} )"
364 - ;;
365 - *) ;;
366 -esac
367 -unset cppuintdepend
368 -
369 -# KDE dependencies
370 -# Qt accessibility classes are needed in various places, bug 325461
371 -[[ -n ${qtcoreuse} ]] && qtcoreuse+=",ssl" || qtcoreuse="ssl"
372 -[[ -n ${qtcoreuse} ]] && qtcoreuse="[${qtcoreuse}]"
373 -kdecommondepend="
374 - dev-lang/perl
375 - >=dev-qt/designer-${QT_MINIMAL}:4
376 - >=dev-qt/qtcore-${QT_MINIMAL}:4${qtcoreuse}
377 - >=dev-qt/qtdbus-${QT_MINIMAL}:4
378 - >=dev-qt/qtgui-${QT_MINIMAL}:4[accessibility,dbus(+)]
379 - >=dev-qt/qtscript-${QT_MINIMAL}:4
380 - >=dev-qt/qtsvg-${QT_MINIMAL}:4
381 - >=dev-qt/qttest-${QT_MINIMAL}:4
382 -"
383 -unset qtcoreuse
384 -
385 -if [[ ${PN} != kdelibs ]]; then
386 - [[ -n ${kdelibsuse} ]] && kdelibsuse="[${kdelibsuse}]"
387 - kdecommondepend+=" kde-frameworks/kdelibs:4${kdelibsuse}"
388 - if [[ ${KDEBASE} = kdevelop ]]; then
389 - if [[ ${PN} != kdevplatform ]]; then
390 - # @ECLASS-VARIABLE: KDEVPLATFORM_REQUIRED
391 - # @DESCRIPTION:
392 - # Specifies whether kdevplatform is required. Possible values are 'always' (default) and 'never'.
393 - # Applies to KDEBASE=kdevelop only.
394 - KDEVPLATFORM_REQUIRED="${KDEVPLATFORM_REQUIRED:-always}"
395 - case ${KDEVPLATFORM_REQUIRED} in
396 - always)
397 - kdecommondepend+="
398 - >=dev-util/kdevplatform-${KDEVPLATFORM_VERSION}:4
399 - "
400 - ;;
401 - *) ;;
402 - esac
403 - fi
404 - fi
405 -fi
406 -unset kdelibsuse
407 -
408 -kdedepend="
409 - dev-util/automoc
410 - virtual/pkgconfig
411 - >=x11-libs/libXtst-1.1.0
412 - x11-base/xorg-proto
413 -"
414 -
415 -kderdepend=""
416 -
417 -# all packages needs oxygen icons for basic iconset
418 -if [[ ${PN} != oxygen-icons ]]; then
419 - kderdepend+=" kde-frameworks/oxygen-icons"
420 -fi
421 -
422 -# add a dependency over kde4-l10n
423 -if [[ ${KDEBASE} != "kde-base" && -n ${KDE_LINGUAS} ]]; then
424 - for _lingua in $(kde4_lingua_to_l10n ${KDE_LINGUAS}); do
425 - # if our package has linguas, pull in kde4-l10n with selected lingua enabled,
426 - # but only for selected ones.
427 - # this can't be done on one line because if user doesn't use any localisation
428 - # then he is probably not interested in kde4-l10n at all.
429 - kderdepend+="
430 - l10n_${_lingua}? ( $(add_kdeapps_dep kde4-l10n "l10n_${_lingua}(+)") )
431 - "
432 - done
433 - unset _lingua
434 -fi
435 -
436 -kdehandbookdepend="
437 - app-text/docbook-xml-dtd:4.2
438 - app-text/docbook-xsl-stylesheets
439 -"
440 -kdehandbookrdepend="
441 - kde-frameworks/kdelibs:4[handbook]
442 -"
443 -case ${KDE_HANDBOOK} in
444 - always)
445 - kdedepend+=" ${kdehandbookdepend}"
446 - [[ ${PN} != kdelibs ]] && kderdepend+=" ${kdehandbookrdepend}"
447 - ;;
448 - optional)
449 - IUSE+=" +handbook"
450 - kdedepend+=" handbook? ( ${kdehandbookdepend} )"
451 - [[ ${PN} != kdelibs ]] && kderdepend+=" handbook? ( ${kdehandbookrdepend} )"
452 - ;;
453 - *) ;;
454 -esac
455 -unset kdehandbookdepend kdehandbookrdepend
456 -
457 -case ${KDE_SELINUX_MODULE} in
458 - none) ;;
459 - *)
460 - IUSE+=" selinux"
461 - kderdepend+=" selinux? ( sec-policy/selinux-${KDE_SELINUX_MODULE} )"
462 - ;;
463 -esac
464 -
465 -case ${KDE_REQUIRED} in
466 - always)
467 - [[ -n ${kdecommondepend} ]] && COMMONDEPEND+=" ${kdecommondepend}"
468 - [[ -n ${kdedepend} ]] && DEPEND+=" ${kdedepend}"
469 - [[ -n ${kderdepend} ]] && RDEPEND+=" ${kderdepend}"
470 - ;;
471 - optional)
472 - IUSE+=" kde"
473 - [[ -n ${kdecommondepend} ]] && COMMONDEPEND+=" kde? ( ${kdecommondepend} )"
474 - [[ -n ${kdedepend} ]] && DEPEND+=" kde? ( ${kdedepend} )"
475 - [[ -n ${kderdepend} ]] && RDEPEND+=" kde? ( ${kderdepend} )"
476 - ;;
477 - *) ;;
478 -esac
479 -
480 -unset kdecommondepend kdedepend kderdepend
481 -
482 -debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: COMMONDEPEND is ${COMMONDEPEND}"
483 -debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: DEPEND (only) is ${DEPEND}"
484 -debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: RDEPEND (only) is ${RDEPEND}"
485 -
486 -# Accumulate dependencies set by this eclass
487 -DEPEND+=" ${COMMONDEPEND}"
488 -RDEPEND+=" ${COMMONDEPEND}"
489 -unset COMMONDEPEND
490 -
491 -# Fetch section - If the ebuild's category is not 'kde-base' and if it is not a
492 -# kdevelop ebuild, the URI should be set in the ebuild itself
493 -_calculate_src_uri() {
494 - debug-print-function ${FUNCNAME} "$@"
495 -
496 - local _kmname _kmname_pv
497 -
498 - # we calculate URI only for known KDEBASE modules
499 - [[ -n ${KDEBASE} ]] || return
500 -
501 - # calculate tarball module name
502 - if [[ -n ${KMNAME} ]]; then
503 - _kmname="${KMNAME}"
504 - else
505 - _kmname=${PN}
506 - fi
507 - _kmname_pv="${_kmname}-${PV}"
508 - case ${KDEBASE} in
509 - kde-base)
510 - case ${PV} in
511 - 4.4.20*)
512 - # KDEPIM 4.4 no-akonadi branch, special case
513 - # TODO: Remove this part when KDEPIM 4.4 gets out of the tree
514 - SRC_URI="https://dev.gentoo.org/~dilfridge/distfiles/${_kmname_pv}.tar.xz" ;;
515 - 4.?.[6-9]? | 4.??.[6-9]?)
516 - # Unstable KDE SC releases
517 - SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.xz" ;;
518 - 4.11.22)
519 - # Part of 15.08.0 actually, sigh. Not stable for next release!
520 - SRC_URI="mirror://kde/Attic/applications/15.08.0/src/${_kmname_pv}.tar.xz" ;;
521 - 4.14.3)
522 - # Last SC release
523 - SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.xz" ;;
524 - 4.14.10)
525 - # Part of 15.04.3 actually, sigh. Used by last version of KDE PIM 4.
526 - SRC_URI="mirror://kde/Attic/applications/15.04.3/src/${_kmname_pv}.tar.xz" ;;
527 - 4.14.11*)
528 - # KDEPIM 4.14 snapshot with Gentoo patches
529 - SRC_URI="https://dev.gentoo.org/~asturm/distfiles/${_kmname_pv}.tar.xz" ;;
530 - 16.12.3)
531 - SRC_URI="mirror://kde/Attic/applications/16.12.3/src/${_kmname_pv}.tar.xz" ;;
532 - ??.?.[6-9]? | ??.??.[4-9]?)
533 - # Unstable KDE Applications releases
534 - SRC_URI="mirror://kde/unstable/applications/${PV}/src/${_kmname}-${PV}.tar.xz" ;;
535 - *)
536 - # Stable KDE Applications releases
537 - SRC_URI="mirror://kde/stable/applications/${PV}/src/${_kmname}-${PV}.tar.xz"
538 - ;;
539 - esac
540 - ;;
541 - kdevelop|kdevelop-php*|kdevplatform)
542 - case ${KDEVELOP_VERSION} in
543 - 4.[123].[6-9]*) SRC_URI="mirror://kde/unstable/kdevelop/${KDEVELOP_VERSION}/src/${P}.tar.xz" ;;
544 - 4.7.3) SRC_URI="mirror://kde/stable/kdevelop/${KDEVELOP_VERSION}/src/${P}.tar.bz2" ;;
545 - 4.7.4) SRC_URI="mirror://kde/stable/kdevelop/${KDEVELOP_VERSION}/${P}.tar.xz" ;;
546 - *) SRC_URI="mirror://kde/stable/kdevelop/${KDEVELOP_VERSION}/src/${P}.tar.xz" ;;
547 - esac
548 - ;;
549 - esac
550 -}
551 -
552 -_calculate_live_repo() {
553 - debug-print-function ${FUNCNAME} "$@"
554 -
555 - SRC_URI=""
556 - case ${KDE_SCM} in
557 - svn)
558 - # Determine branch URL based on live type
559 - local branch_prefix
560 - case ${PV} in
561 - 9999*)
562 - # trunk
563 - branch_prefix="trunk/KDE"
564 - ;;
565 - *)
566 - # branch
567 - branch_prefix="branches/KDE/$(get_kde_version)"
568 -
569 - if [[ ${PV} == ??.??.49.9999 && ${CATEGORY} = kde-apps ]]; then
570 - branch_prefix="branches/Applications/$(get_kde_version)"
571 - fi
572 -
573 - # @ECLASS-VARIABLE: ESVN_PROJECT_SUFFIX
574 - # @DESCRIPTION
575 - # Suffix appended to ESVN_PROJECT depending on fetched branch.
576 - # Defaults is empty (for -9999 = trunk), and "-${PV}" otherwise.
577 - ESVN_PROJECT_SUFFIX="-${PV}"
578 - ;;
579 - esac
580 - # @ECLASS-VARIABLE: ESVN_MIRROR
581 - # @DESCRIPTION:
582 - # This variable allows easy overriding of default kde mirror service
583 - # (anonsvn) with anything else you might want to use.
584 - ESVN_MIRROR=${ESVN_MIRROR:=svn://anonsvn.kde.org/home/kde}
585 - # Split ebuild, or extragear stuff
586 - if [[ -n ${KMNAME} ]]; then
587 - ESVN_PROJECT="${KMNAME}${ESVN_PROJECT_SUFFIX}"
588 - if [[ -z ${KMNOMODULE} ]] && [[ -z ${KMMODULE} ]]; then
589 - KMMODULE="${PN}"
590 - fi
591 - # Split kde-base/ ebuilds: (they reside in trunk/KDE)
592 - case ${KMNAME} in
593 - kdebase-*)
594 - ESVN_REPO_URI="${ESVN_MIRROR}/${branch_prefix}/kdebase/${KMNAME#kdebase-}"
595 - ;;
596 - kdelibs-*)
597 - ESVN_REPO_URI="${ESVN_MIRROR}/${branch_prefix}/kdelibs/${KMNAME#kdelibs-}"
598 - ;;
599 - kdereview*)
600 - ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}/${KMMODULE}"
601 - ;;
602 - kdesupport)
603 - ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}/${KMMODULE}"
604 - ESVN_PROJECT="${PN}${ESVN_PROJECT_SUFFIX}"
605 - ;;
606 - kde*)
607 - ESVN_REPO_URI="${ESVN_MIRROR}/${branch_prefix}/${KMNAME}"
608 - ;;
609 - extragear*|playground*)
610 - # Unpack them in toplevel dir, so that they won't conflict with kde4-meta
611 - # build packages from same svn location.
612 - ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}/${KMMODULE}"
613 - ESVN_PROJECT="${PN}${ESVN_PROJECT_SUFFIX}"
614 - ;;
615 - *)
616 - ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}/${KMMODULE}"
617 - ;;
618 - esac
619 - else
620 - # kdelibs, kdepimlibs
621 - ESVN_REPO_URI="${ESVN_MIRROR}/${branch_prefix}/${PN}"
622 - ESVN_PROJECT="${PN}${ESVN_PROJECT_SUFFIX}"
623 - fi
624 - # @ECLASS-VARIABLE: ESVN_UP_FREQ
625 - # @DESCRIPTION:
626 - # This variable is used for specifying the timeout between svn synces
627 - # for kde-base modules. Does not affect misc apps.
628 - # Default value is 1 hour.
629 - [[ ${KDEBASE} = kde-base ]] && ESVN_UP_FREQ=${ESVN_UP_FREQ:-1}
630 - ;;
631 - git)
632 - local _kmname
633 - # @ECLASS-VARIABLE: EGIT_MIRROR
634 - # @DESCRIPTION:
635 - # This variable allows easy overriding of default kde mirror service
636 - # (anongit) with anything else you might want to use.
637 - EGIT_MIRROR=${EGIT_MIRROR:=https://anongit.kde.org}
638 -
639 - # @ECLASS-VARIABLE: EGIT_REPONAME
640 - # @DESCRIPTION:
641 - # This variable allows overriding of default repository
642 - # name. Specify only if this differ from PN and KMNAME.
643 - if [[ -n ${EGIT_REPONAME} ]]; then
644 - # the repository and kmname different
645 - _kmname=${EGIT_REPONAME}
646 - elif [[ -n ${KMNAME} ]]; then
647 - _kmname=${KMNAME}
648 - else
649 - _kmname=${PN}
650 - fi
651 -
652 - # default branching
653 - [[ ${PV} != 4.9999* && ${PV} != 9999 && ${KDEBASE} == kde-base ]] && \
654 - EGIT_BRANCH="KDE/$(get_kde_version)"
655 -
656 - # Applications branching
657 - [[ ${PV} == ??.??.49.9999 && ${KDEBASE} == kde-base ]] && \
658 - EGIT_BRANCH="Applications/$(get_kde_version)"
659 -
660 - # default repo uri
661 - EGIT_REPO_URI+=( "${EGIT_MIRROR}/${_kmname}" )
662 -
663 - debug-print "${FUNCNAME}: Repository: ${EGIT_REPO_URI}"
664 - debug-print "${FUNCNAME}: Branch: ${EGIT_BRANCH}"
665 - ;;
666 - esac
667 -}
668 -
669 -case ${KDE_BUILD_TYPE} in
670 - live) _calculate_live_repo ;;
671 - *) _calculate_src_uri ;;
672 -esac
673 -
674 -debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: SRC_URI is ${SRC_URI}"
675 -
676 -# @ECLASS-VARIABLE: PREFIX
677 -# @DESCRIPTION:
678 -# Set the installation PREFIX for non kde-base applications. It defaults to /usr.
679 -# kde-base packages go into KDE4 installation directory (/usr).
680 -# No matter the PREFIX, package will be built against KDE installed in /usr.
681 -
682 -# @FUNCTION: kde4-base_pkg_setup
683 -# @DESCRIPTION:
684 -# Do some basic settings
685 -kde4-base_pkg_setup() {
686 - debug-print-function ${FUNCNAME} "$@"
687 -
688 - if has handbook ${IUSE} || has "+handbook" ${IUSE} && [[ "${KDE_HANDBOOK}" != optional ]] ; then
689 - eqawarn "Handbook support is enabled via KDE_HANDBOOK=optional in the ebuild."
690 - eqawarn "Please do not just set IUSE=handbook, as this leads to dependency errors."
691 - fi
692 -
693 - # Don't set KDEHOME during compilation, it will cause access violations
694 - unset KDEHOME
695 -
696 - KDEDIR=/usr
697 - : ${PREFIX:=/usr}
698 - EKDEDIR=${EPREFIX}/usr
699 -
700 - # Point to correct QT plugins path
701 - QT_PLUGIN_PATH="${EPREFIX}/usr/$(get_libdir)/kde4/plugins/"
702 -
703 - # Fix XDG collision with sandbox
704 - export XDG_CONFIG_HOME="${T}"
705 -}
706 -
707 -# @FUNCTION: kde4-base_src_unpack
708 -# @DESCRIPTION:
709 -# This function unpacks the source tarballs for KDE4 applications.
710 -kde4-base_src_unpack() {
711 - debug-print-function ${FUNCNAME} "$@"
712 -
713 - if [[ ${KDE_BUILD_TYPE} = live ]]; then
714 - case ${KDE_SCM} in
715 - svn)
716 - subversion_src_unpack
717 - ;;
718 - git)
719 - git-r3_src_unpack
720 - ;;
721 - esac
722 - else
723 - unpack ${A}
724 - fi
725 -}
726 -
727 -# @FUNCTION: kde4-base_src_prepare
728 -# @DESCRIPTION:
729 -# General pre-configure and pre-compile function for KDE4 applications.
730 -# It also handles translations if KDE_LINGUAS is defined. See KDE_LINGUAS and
731 -# enable_selected_linguas() and enable_selected_doc_linguas()
732 -# in kde4-functions.eclass(5) for further details.
733 -kde4-base_src_prepare() {
734 - debug-print-function ${FUNCNAME} "$@"
735 -
736 - # enable handbook and linguas only when not using live ebuild
737 -
738 - # Only enable selected languages, used for KDE extragear apps.
739 - if [[ -n ${KDE_LINGUAS} ]]; then
740 - enable_selected_linguas
741 - fi
742 -
743 - # Enable/disable handbooks for kde4-base packages
744 - # kde4-l10n inherits kde4-base but is metapackage, so no check for doc
745 - # kdelibs inherits kde4-base but handle installing the handbook itself
746 - if ! has kde4-meta ${INHERITED} && in_iuse handbook; then
747 - if [[ ${KDEBASE} == kde-base ]]; then
748 - if [[ ${PN} != kde4-l10n && ${PN} != kdepim-l10n && ${PN} != kdelibs ]] && use !handbook; then
749 - # documentation in kde4-functions
750 - : ${KDE_DOC_DIRS:=doc}
751 - local dir
752 - for dir in ${KDE_DOC_DIRS}; do
753 - sed -e "\!^[[:space:]]*add_subdirectory[[:space:]]*([[:space:]]*${dir}[[:space:]]*)!s/^/#DONOTCOMPILE /" \
754 - -e "\!^[[:space:]]*ADD_SUBDIRECTORY[[:space:]]*([[:space:]]*${dir}[[:space:]]*)!s/^/#DONOTCOMPILE /" \
755 - -e "\!^[[:space:]]*macro_optional_add_subdirectory[[:space:]]*([[:space:]]*${dir}[[:space:]]*)!s/^/#DONOTCOMPILE /" \
756 - -e "\!^[[:space:]]*MACRO_OPTIONAL_ADD_SUBDIRECTORY[[:space:]]*([[:space:]]*${dir}[[:space:]]*)!s/^/#DONOTCOMPILE /" \
757 - -i CMakeLists.txt || die "failed to comment out handbook"
758 - done
759 - fi
760 - else
761 - enable_selected_doc_linguas
762 - fi
763 - fi
764 -
765 - # SCM bootstrap
766 - if [[ ${KDE_BUILD_TYPE} = live ]]; then
767 - case ${KDE_SCM} in
768 - svn) subversion_src_prepare ;;
769 - esac
770 - fi
771 -
772 - # Apply patches, cmake-utils does the job already
773 - cmake-utils_src_prepare
774 -
775 - # Save library dependencies
776 - if [[ -n ${KMSAVELIBS} ]] ; then
777 - save_library_dependencies
778 - fi
779 -
780 - # Inject library dependencies
781 - if [[ -n ${KMLOADLIBS} ]] ; then
782 - load_library_dependencies
783 - fi
784 -
785 - # Hack for manuals relying on outdated DTD, only outside kde-base/...
786 - if [[ -z ${KDEBASE} ]]; then
787 - find "${S}" -name "*.docbook" \
788 - -exec sed -i -r \
789 - -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' {} + \
790 - || die 'failed to fix DocBook variant version'
791 - fi
792 -}
793 -
794 -# @FUNCTION: kde4-base_src_configure
795 -# @DESCRIPTION:
796 -# Function for configuring the build of KDE4 applications.
797 -kde4-base_src_configure() {
798 - debug-print-function ${FUNCNAME} "$@"
799 -
800 - # Build tests in src_test only, where we override this value
801 - local cmakeargs=(-DKDE4_BUILD_TESTS=OFF)
802 -
803 - if use_if_iuse debug; then
804 - # Set "real" debug mode
805 - CMAKE_KDE_BUILD_TYPE="Debugfull"
806 - else
807 - # Handle common release builds
808 - append-cppflags -DQT_NO_DEBUG
809 - fi
810 -
811 - # Set distribution name
812 - [[ ${PN} = kdelibs ]] && cmakeargs+=(-DKDE_DISTRIBUTION_TEXT=Gentoo)
813 -
814 - # Here we set the install prefix
815 - tc-is-cross-compiler || cmakeargs+=(-DCMAKE_INSTALL_PREFIX="${EPREFIX}${PREFIX}")
816 -
817 - # Use colors
818 - QTEST_COLORED=1
819 -
820 - # Shadow existing installations
821 - unset KDEDIRS
822 -
823 - #qmake -query QT_INSTALL_LIBS unavailable when cross-compiling
824 - tc-is-cross-compiler && cmakeargs+=(-DQT_LIBRARY_DIR=${ROOT}/usr/$(get_libdir)/qt4)
825 - #kde-config -path data unavailable when cross-compiling
826 - tc-is-cross-compiler && cmakeargs+=(-DKDE4_DATA_DIR=${ROOT}/usr/share/apps/)
827 -
828 - # sysconf needs to be /etc, not /usr/etc
829 - cmakeargs+=(-DSYSCONF_INSTALL_DIR="${EPREFIX}"/etc)
830 -
831 - if [[ $(declare -p mycmakeargs 2>&-) != "declare -a mycmakeargs="* ]]; then
832 - if [[ ${mycmakeargs} ]]; then
833 - eqawarn "mycmakeargs should always be declared as an array, not a string"
834 - fi
835 - mycmakeargs=(${mycmakeargs})
836 - fi
837 -
838 - mycmakeargs=("${cmakeargs[@]}" "${mycmakeargs[@]}")
839 -
840 - cmake-utils_src_configure
841 -}
842 -
843 -# @FUNCTION: kde4-base_src_compile
844 -# @DESCRIPTION:
845 -# General function for compiling KDE4 applications.
846 -kde4-base_src_compile() {
847 - debug-print-function ${FUNCNAME} "$@"
848 -
849 - cmake-utils_src_compile "$@"
850 -}
851 -
852 -# @FUNCTION: kde4-base_src_test
853 -# @DESCRIPTION:
854 -# Function for testing KDE4 applications.
855 -kde4-base_src_test() {
856 - debug-print-function ${FUNCNAME} "$@"
857 -
858 - local kded4_pid
859 -
860 - _test_runner() {
861 - if [[ -n "${VIRTUALDBUS_TEST}" ]]; then
862 - export $(dbus-launch)
863 - kded4 2>&1 > /dev/null &
864 - kded4_pid=$!
865 - fi
866 -
867 - cmake-utils_src_test
868 - }
869 -
870 - # When run as normal user during ebuild development with the ebuild command, the
871 - # kde tests tend to access the session DBUS. This however is not possible in a real
872 - # emerge or on the tinderbox.
873 - # > make sure it does not happen, so bad tests can be recognized and disabled
874 - unset DBUS_SESSION_BUS_ADDRESS DBUS_SESSION_BUS_PID
875 -
876 - # Override this value, set in kde4-base_src_configure()
877 - mycmakeargs+=(-DKDE4_BUILD_TESTS=ON)
878 - cmake-utils_src_configure
879 - kde4-base_src_compile
880 -
881 - if [[ ${VIRTUALX_REQUIRED} == always || ${VIRTUALX_REQUIRED} == test ]]; then
882 - # check for sanity if anyone already redefined VIRTUALX_COMMAND from the default
883 - if [[ ${VIRTUALX_COMMAND} != emake ]]; then
884 - # surprise- we are already INSIDE virtualmake!!!
885 - debug-print "QA Notice: This version of kde4-base.eclass includes the virtualx functionality."
886 - debug-print " You may NOT set VIRTUALX_COMMAND or call virtualmake from the ebuild."
887 - debug-print " Setting VIRTUALX_REQUIRED is completely sufficient. See the"
888 - debug-print " kde4-base.eclass docs for details... Applying workaround."
889 - _test_runner
890 - else
891 - virtx _test_runner
892 - fi
893 - else
894 - _test_runner
895 - fi
896 -
897 - if [ -n "${kded4_pid}" ] ; then
898 - kill ${kded4_pid}
899 - fi
900 -
901 - if [ -n "${DBUS_SESSION_BUS_PID}" ] ; then
902 - kill ${DBUS_SESSION_BUS_PID}
903 - fi
904 -}
905 -
906 -# @FUNCTION: kde4-base_src_install
907 -# @DESCRIPTION:
908 -# Function for installing KDE4 applications.
909 -kde4-base_src_install() {
910 - debug-print-function ${FUNCNAME} "$@"
911 -
912 - if [[ -n ${KMSAVELIBS} ]] ; then
913 - install_library_dependencies
914 - fi
915 -
916 - # Install common documentation of KDE4 applications
917 - local doc
918 - if ! has kde4-meta ${INHERITED}; then
919 - for doc in "${S}"/{AUTHORS,CHANGELOG,ChangeLog*,README*,NEWS,TODO,HACKING}; do
920 - [[ -f ${doc} && -s ${doc} ]] && dodoc "${doc}"
921 - done
922 - for doc in "${S}"/*/{AUTHORS,CHANGELOG,ChangeLog*,README*,NEWS,TODO,HACKING}; do
923 - [[ -f ${doc} && -s ${doc} ]] && newdoc "${doc}" "$(basename $(dirname ${doc})).$(basename ${doc})"
924 - done
925 - fi
926 -
927 - cmake-utils_src_install
928 -
929 - # We don't want ${PREFIX}/share/doc/HTML to be compressed,
930 - # because then khelpcenter can't find the docs
931 - [[ -d ${ED}/${PREFIX}/share/doc/HTML ]] &&
932 - docompress -x ${PREFIX}/share/doc/HTML
933 -}
934 -
935 -# @FUNCTION: kde4-base_pkg_preinst
936 -# @DESCRIPTION:
937 -# Function storing icon caches
938 -kde4-base_pkg_preinst() {
939 - debug-print-function ${FUNCNAME} "$@"
940 -
941 - gnome2_icon_savelist
942 - if [[ ${KDE_BUILD_TYPE} == live && ${KDE_SCM} == svn ]]; then
943 - subversion_pkg_preinst
944 - fi
945 -}
946 -
947 -# @FUNCTION: kde4-base_pkg_postinst
948 -# @DESCRIPTION:
949 -# Function to rebuild the KDE System Configuration Cache after an application has been installed.
950 -kde4-base_pkg_postinst() {
951 - debug-print-function ${FUNCNAME} "$@"
952 -
953 - if [[ -n ${GNOME2_ECLASS_ICONS} ]]; then
954 - gnome2_icon_cache_update
955 - fi
956 - xdg_desktop_database_update
957 - xdg_mimeinfo_database_update
958 - buildsycoca
959 -
960 - if [[ -z ${I_KNOW_WHAT_I_AM_DOING} ]]; then
961 - if [[ ${KDE_BUILD_TYPE} = live ]]; then
962 - echo
963 - einfo "WARNING! This is an experimental live ebuild of ${CATEGORY}/${PN}"
964 - einfo "Use it at your own risk."
965 - einfo "Do _NOT_ file bugs at bugs.gentoo.org because of this ebuild!"
966 - echo
967 - fi
968 - fi
969 -}
970 -
971 -# @FUNCTION: kde4-base_pkg_postrm
972 -# @DESCRIPTION:
973 -# Function to rebuild the KDE System Configuration Cache after an application has been removed.
974 -kde4-base_pkg_postrm() {
975 - debug-print-function ${FUNCNAME} "$@"
976 -
977 - if [[ -n ${GNOME2_ECLASS_ICONS} ]]; then
978 - gnome2_icon_cache_update
979 - fi
980 - xdg_desktop_database_update
981 - xdg_mimeinfo_database_update
982 - buildsycoca
983 -}
984 -
985 -fi