/[gentoo-x86]/eclass/kde4-base.eclass
Gentoo

Contents of /eclass/kde4-base.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.43 - (show annotations) (download)
Fri Aug 7 01:00:11 2009 UTC (4 years, 8 months ago) by wired
Branch: MAIN
Changes since 1.42: +11 -0 lines
moved license/homepage stuff from kde4-meta to kde4-base

1 # Copyright 2007-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/eclass/kde4-base.eclass,v 1.37 2009/05/09 13:23:15 scarabeus Exp $
4
5 # @ECLASS: kde4-base.eclass
6 # @MAINTAINER:
7 # kde@gentoo.org
8 # @BLURB: This eclass provides functions for kde 4.X ebuilds
9 # @DESCRIPTION:
10 # The kde4-base.eclass provides support for building KDE4 based ebuilds
11 # and KDE4 applications.
12 #
13 # NOTE: KDE 4 ebuilds by default define EAPI="2", this can be redefined but
14 # eclass will fail with version older than 2.
15
16 inherit base cmake-utils eutils kde4-functions
17
18 get_build_type
19 if [[ ${BUILD_TYPE} = live ]]; then
20 inherit subversion
21 fi
22
23 EXPORT_FUNCTIONS pkg_setup src_unpack src_prepare src_configure src_compile src_test src_install pkg_postinst pkg_postrm
24
25 case ${KDEBASE} in
26 kde-base)
27 HOMEPAGE="http://www.kde.org/"
28 LICENSE="GPL-2"
29 ;;
30 koffice)
31 HOMEPAGE="http://www.koffice.org/"
32 LICENSE="GPL-2"
33 ;;
34 esac
35
36 # @ECLASS-VARIABLE: OPENGL_REQUIRED
37 # @DESCRIPTION:
38 # Is qt-opengl required? Possible values are 'always', 'optional' and 'never'.
39 # This variable must be set before inheriting any eclasses. Defaults to 'never'.
40 OPENGL_REQUIRED="${OPENGL_REQUIRED:-never}"
41
42 # @ECLASS-VARIABLE: WEBKIT_REQUIRED
43 # @DESCRIPTION:
44 # Is qt-webkit requred? Possible values are 'always', 'optional' and 'never'.
45 # This variable must be set before inheriting any eclasses. Defaults to 'never'.
46 WEBKIT_REQUIRED="${WEBKIT_REQUIRED:-never}"
47
48 # @ECLASS-VARIABLE: CPPUNIT_REQUIRED
49 # @DESCRIPTION:
50 # Is cppunit required for tests? Possible values are 'always', 'optional' and 'never'.
51 # This variable must be set before inheriting any eclasses. Defaults to 'never'.
52 CPPUNIT_REQUIRED="${CPPUNIT_REQUIRED:-never}"
53
54 # @ECLASS-VARIABLE: KDE_REQUIRED
55 # @DESCRIPTION:
56 # Is kde required? Possible values are 'always', 'optional' and 'never'.
57 # This variable must be set before inheriting any eclasses. Defaults to 'always'
58 # If set to always or optional, KDE_MINIMAL may be overriden as well.
59 # Note that for kde-base packages this variable is fixed to 'always'.
60 KDE_REQUIRED="${KDE_REQUIRED:-always}"
61
62 # Verify KDE_MINIMAL (display QA notice in pkg_setup, still we need to fix it here)
63 if [[ -n ${KDE_MINIMAL} ]]; then
64 for slot in ${KDE_SLOTS[@]} ${KDE_LIVE_SLOTS[@]}; do
65 [[ ${KDE_MINIMAL} = ${slot} ]] && KDE_MINIMAL_VALID=1 && break
66 done
67 unset slot
68 [[ -z ${KDE_MINIMAL_VALID} ]] && unset KDE_MINIMAL
69 else
70 KDE_MINIMAL_VALID=1
71 fi
72
73 # @ECLASS-VARIABLE: KDE_MINIMAL
74 # @DESCRIPTION:
75 # This variable is used when KDE_REQUIRED is set, to specify required KDE minimal
76 # version for apps to work. Currently defaults to 4.2
77 # One may override this variable to raise version requirements.
78 # For possible values look at KDE_SLOTS and KDE_LIVE_SLOTS variables.
79 # Note that it is fixed to ${SLOT} for kde-base packages.
80 KDE_MINIMAL="${KDE_MINIMAL:-4.2}"
81
82 # Fallback behaviour (for now)
83 # TODO Remove when tree is clean
84 if [[ -n ${NEED_KDE} ]]; then
85 case ${NEED_KDE} in
86 none)
87 KDE_REQUIRED="never"
88 ;;
89 *)
90 KDE_REQUIRED="always"
91 KDE_MINIMAL="${NEED_KDE}"
92 ;;
93 esac
94 fi
95
96 # @ECLASS-VARIABLE: QT_DEPEND
97 # @DESCRIPTION:
98 # Determine version of qt we enforce as minimal for the package. 4.4.0 4.5.1..
99 # Currently defaults to 4.5.1
100 QT_DEPEND="${QT_DEPEND:-4.5.1}"
101
102 # OpenGL dependencies
103 qtopengldepend="
104 >=x11-libs/qt-opengl-${QT_DEPEND}:4
105 "
106 case ${OPENGL_REQUIRED} in
107 always)
108 COMMONDEPEND+=" ${qtopengldepend}"
109 ;;
110 optional)
111 IUSE+=" opengl"
112 COMMONDEPEND+=" opengl? ( ${qtopengldepend} )"
113 ;;
114 *) ;;
115 esac
116 unset qtopengldepend
117
118 # WebKit dependencies
119 qtwebkitdepend="
120 >=x11-libs/qt-webkit-${QT_DEPEND}:4
121 "
122 case ${WEBKIT_REQUIRED} in
123 always)
124 COMMONDEPEND+=" ${qtwebkitdepend}"
125 ;;
126 optional)
127 IUSE+=" webkit"
128 COMMONDEPEND+=" webkit? ( ${qtwebkitdepend} )"
129 ;;
130 *) ;;
131 esac
132 unset qtwebkitdepend
133
134 # CppUnit dependencies
135 cppuintdepend="
136 dev-util/cppunit
137 "
138 case ${CPPUNIT_REQUIRED} in
139 always)
140 DEPEND+=" ${cppuintdepend}"
141 ;;
142 optional)
143 IUSE+=" test"
144 DEPEND+=" test? ( ${cppuintdepend} )"
145 ;;
146 *) ;;
147 esac
148 unset cppuintdepend
149
150 # Setup packages inheriting this eclass
151 case ${KDEBASE} in
152 kde-base)
153 if [[ $BUILD_TYPE = live ]]; then
154 # Disable tests for live ebuilds
155 RESTRICT+=" test"
156 # Live ebuilds in kde-base default to kdeprefix by default
157 IUSE+=" +kdeprefix"
158 else
159 # All other ebuild types default to -kdeprefix as before
160 IUSE+=" kdeprefix"
161 fi
162 # Determine SLOT from PVs
163 case ${PV} in
164 *.9999*) SLOT="${PV/.9999*/}" ;; # stable live
165 4.4* | 4.3.9* | 4.3.8* | 4.3.7* | 4.3.6*) SLOT="4.4" ;;
166 4.3* | 4.2.9* | 4.2.8* | 4.2.7* | 4.2.6*) SLOT="4.3" ;;
167 4.2* | 4.1.9* | 4.1.8* | 4.1.7* | 4.1.6*) SLOT="4.2" ;;
168 9999*) SLOT="live" ;; # regular live
169 *) die "Unsupported ${PV}" ;;
170 esac
171 _kdedir="${SLOT}"
172 _pv="-${PV}:${SLOT}"
173 _pvn="-${PV}"
174
175 # Block installation of other SLOTS unless kdeprefix
176 for slot in ${KDE_SLOTS[@]} ${KDE_LIVE_SLOTS[@]}; do
177 # Block non kdeprefix ${PN} on other slots
178 if [[ ${SLOT} != ${slot} ]]; then
179 RDEPEND+=" !kdeprefix? ( !kde-base/${PN}:${slot}[-kdeprefix] )"
180 fi
181 done
182 unset slot
183 ;;
184 koffice)
185 SLOT="2"
186 _pv="-${KDE_MINIMAL}"
187 _pvn="${_pv}"
188 ;;
189 *)
190 _pv="-${KDE_MINIMAL}"
191 _pvn="${_pv}"
192 ;;
193
194 esac
195
196 # KDE dependencies
197 kdecommondepend="
198 dev-lang/perl
199 >=x11-libs/qt-core-${QT_DEPEND}:4[qt3support,ssl]
200 >=x11-libs/qt-gui-${QT_DEPEND}:4[accessibility,dbus]
201 >=x11-libs/qt-qt3support-${QT_DEPEND}:4[accessibility]
202 >=x11-libs/qt-script-${QT_DEPEND}:4
203 >=x11-libs/qt-sql-${QT_DEPEND}:4[qt3support]
204 >=x11-libs/qt-svg-${QT_DEPEND}:4
205 >=x11-libs/qt-test-${QT_DEPEND}:4
206 !aqua? (
207 x11-libs/libXext
208 x11-libs/libXt
209 x11-libs/libXxf86vm
210 )
211 "
212 if [[ ${PN} != kdelibs ]]; then
213 if [[ ${KDEBASE} = kde-base ]]; then
214 kdecommondepend+="
215 kdeprefix? ( >=kde-base/kdelibs${_pv}[kdeprefix] )
216 !kdeprefix? ( >=kde-base/kdelibs${_pvn}[-kdeprefix] )
217 "
218 else
219 kdecommondepend+="
220 >=kde-base/kdelibs${_pv}
221 "
222 fi
223 fi
224 unset _pv _pvn
225 kdedepend="
226 dev-util/pkgconfig
227 "
228 case ${KDE_REQUIRED} in
229 always)
230 IUSE+=" aqua"
231 COMMONDEPEND+=" ${kdecommondepend}"
232 DEPEND+=" ${kdedepend}"
233 ;;
234 optional)
235 IUSE+=" aqua kde"
236 COMMONDEPEND+=" kde? ( ${kdecommondepend} )"
237 DEPEND+=" kde? ( ${kdedepend} )"
238 ;;
239 *) ;;
240 esac
241 unset kdecommondepend kdedepend
242
243 debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: COMMONDEPEND is ${COMMONDEPEND}"
244 debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: DEPEND (only) is ${DEPEND}"
245 debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: RDEPEND (only) is ${RDEPEND}"
246
247 # Accumulate dependencies set by this eclass
248 DEPEND+=" ${COMMONDEPEND}"
249 RDEPEND+=" ${COMMONDEPEND}"
250 unset COMMONDEPEND
251
252 # Fetch section - If the ebuild's category is not 'kde-base' and if it is not a
253 # koffice ebuild, the URI should be set in the ebuild itself
254 case ${BUILD_TYPE} in
255 live)
256 # Determine branch URL based on live type
257 local branch_prefix
258 case ${PV} in
259 9999*)
260 # trunk
261 branch_prefix="trunk/KDE"
262 ;;
263 *)
264 # branch
265 branch_prefix="branches/KDE/${SLOT}"
266 # @ECLASS-VARIABLE: ESVN_PROJECT_SUFFIX
267 # @DESCRIPTION
268 # Suffix appended to ESVN_PROJECT depending on fetched branch.
269 # Defaults is empty (for -9999 = trunk), and "-${PV}" otherwise.
270 ESVN_PROJECT_SUFFIX="-${PV}"
271 ;;
272 esac
273 SRC_URI=""
274 # @ECLASS-VARIABLE: ESVN_MIRROR
275 # @DESCRIPTION:
276 # This variable allows easy overriding of default kde mirror service
277 # (anonsvn) with anything else you might want to use.
278 ESVN_MIRROR=${ESVN_MIRROR:=svn://anonsvn.kde.org/home/kde}
279 # Split ebuild, or extragear stuff
280 if [[ -n ${KMNAME} ]]; then
281 ESVN_PROJECT="${KMNAME}${ESVN_PROJECT_SUFFIX}"
282 if [[ -z ${KMNOMODULE} ]] && [[ -z ${KMMODULE} ]]; then
283 KMMODULE="${PN}"
284 fi
285 # Split kde-base/ ebuilds: (they reside in trunk/KDE)
286 case ${KMNAME} in
287 kdebase-*)
288 ESVN_REPO_URI="${ESVN_MIRROR}/${branch_prefix}/kdebase/${KMNAME#kdebase-}"
289 ;;
290 kdelibs-*)
291 ESVN_REPO_URI="${ESVN_MIRROR}/${branch_prefix}/kdelibs/${KMNAME#kdelibs-}"
292 ;;
293 kdereview)
294 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}/${KMMODULE}"
295 ;;
296 kdesupport)
297 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}/${KMMODULE}"
298 ESVN_PROJECT="${PN}${ESVN_PROJECT_SUFFIX}"
299 ;;
300 kde*)
301 ESVN_REPO_URI="${ESVN_MIRROR}/${branch_prefix}/${KMNAME}"
302 ;;
303 extragear*|playground*)
304 # Unpack them in toplevel dir, so that they won't conflict with kde4-meta
305 # build packages from same svn location.
306 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}/${KMMODULE}"
307 ESVN_PROJECT="${PN}${ESVN_PROJECT_SUFFIX}"
308 ;;
309 koffice)
310 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}"
311 ;;
312 *)
313 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}/${KMMODULE}"
314 ;;
315 esac
316 else
317 # kdelibs, kdepimlibs
318 ESVN_REPO_URI="${ESVN_MIRROR}/${branch_prefix}/${PN}"
319 ESVN_PROJECT="${PN}${ESVN_PROJECT_SUFFIX}"
320 fi
321 # @ECLASS-VARIABLE: ESVN_UP_FREQ
322 # @DESCRIPTION:
323 # This variable is used for specifying the timeout between svn synces
324 # for kde-base and koffice modules. Does not affect misc apps.
325 # Default value is 1 hour.
326 [[ ${KDEBASE} = kde-base || ${KDEBASE} = koffice ]] && ESVN_UP_FREQ=${ESVN_UP_FREQ:-1}
327 ;;
328 *)
329 if [[ -n ${KDEBASE} ]]; then
330 if [[ -n ${KMNAME} ]]; then
331 case ${KMNAME} in
332 kdebase-apps)
333 _kmname="kdebase" ;;
334 *)
335 _kmname="${KMNAME}" ;;
336 esac
337 else
338 _kmname=${PN}
339 fi
340 _kmname_pv="${_kmname}-${PV}"
341 if [[ $NEED_KDE != live ]]; then
342 case ${KDEBASE} in
343 kde-base)
344 case ${PV} in
345 4.3.85 | 4.3.90 | 4.3.95 | 4.3.96)
346 # block for normally packed unstable releases
347 SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.bz2" ;;
348 4.3.9* | 4.3.8* | 4.3.7* | 4.3.6*)
349 SRC_URI="http://dev.gentooexperimental.org/~alexxy/kde/${PV}/${_kmname_pv}.tar.lzma" ;;
350 4.2.85 | 4.2.90 | 4.2.95 | 4.2.96 | 4.2.98)
351 # block for normally packed unstable releases
352 SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.bz2" ;;
353 4.2.9* | 4.2.8* | 4.2.7* | 4.2.6*)
354 SRC_URI="http://dev.gentooexperimental.org/~alexxy/kde/${PV}/${_kmname_pv}.tar.lzma" ;;
355 4.1.9* | 4.1.8* | 4.1.7* | 4.1.6* | 4.0.9* | 4.0.8*)
356 SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.bz2" ;;
357 *) SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.bz2" ;;
358 esac
359 ;;
360 koffice)
361 case ${PV} in
362 1.9*)
363 SRC_URI="mirror://kde/unstable/${_kmname_pv}/src/${_kmname_pv}.tar.bz2"
364 ;;
365 *) SRC_URI="mirror://kde/stable/${_kmname_pv}/src/${_kmname_pv}.tar.bz2" ;;
366 esac
367 ;;
368 esac
369 fi
370 unset _kmname _kmname_pv
371 fi
372 ;;
373 esac
374
375 debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: SRC_URI is ${SRC_URI}"
376
377 # @ECLASS-VARIABLE: PREFIX
378 # @DESCRIPTION:
379 # Set the installation PREFIX for non kde-base applications. It defaults to /usr.
380 # kde-base packages go into KDE4 installation directory (KDEDIR) by default.
381 # No matter the PREFIX, package will be built against KDE installed in KDEDIR.
382
383 # @FUNCTION: kde4-base_pkg_setup
384 # @DESCRIPTION:
385 # Do the basic kdeprefix KDEDIR settings and determine with which kde should
386 # optional applications link
387 kde4-base_pkg_setup() {
388 debug-print-function ${FUNCNAME} "$@"
389
390 # QA ebuilds
391 case ${NEED_KDE} in
392 none) ewarn "QA Notice: using deprecated NEED_KDE variable, use KDE_REQUIRED=\"never\" or KDE_REQUIRED=\"optional\" instead. You may want to override KDE_MINIMAL as well (default is KDE_MINIMAL=\"${KDE_MINIMAL}\")." ;;
393 *) [[ -n ${NEED_KDE} ]] && ewarn "QA Notice: using deprecated NEED_KDE variable, use KDE_MINIMAL instead (default is KDE_MINIMAL=\"${KDE_MINIMAL}\")." ;;
394 esac
395 [[ -z ${KDE_MINIMAL_VALID} ]] && ewarn "QA Notice: ignoring invalid KDE_MINIMAL (defaulting to ${KDE_MINIMAL})."
396
397 # Don't set KDEHOME during compilation, it will cause access violations
398 unset KDEHOME
399
400 if [[ ${KDEBASE} = kde-base ]]; then
401 if use kdeprefix; then
402 KDEDIR="${EROOT}usr/kde/${_kdedir}"
403 else
404 KDEDIR="${EROOT}usr"
405 fi
406 PREFIX="${PREFIX:-${KDEDIR}}"
407 else
408 # Determine KDEDIR by loooking for the closest match with KDE_MINIMAL
409 KDEDIR=
410 local kde_minimal_met
411 for slot in ${KDE_SLOTS[@]} ${KDE_LIVE_SLOTS[@]}; do
412 [[ -z ${kde_minimal_met} ]] && [[ ${slot} = ${KDE_MINIMAL} ]] && kde_minimal_met=1
413 if [[ -n ${kde_minimal_met} ]] && has_version "kde-base/kdelibs:${slot}"; then
414 if has_version "kde-base/kdelibs:${slot}[kdeprefix]"; then
415 KDEDIR="${EROOT}usr/kde/${slot}"
416 else
417 KDEDIR="${EROOT}usr"
418 fi
419 break;
420 fi
421 done
422 unset slot
423
424 # Bail out if kdelibs required but not found
425 if [[ ${KDE_REQUIRED} = always ]] || { [[ ${KDE_REQUIRED} = optional ]] && use kde; }; then
426 [[ -z ${KDEDIR} ]] && die "Failed to determine KDEDIR!"
427 else
428 [[ -z ${KDEDIR} ]] && KDEDIR="${EROOT}usr"
429 fi
430
431 PREFIX="${PREFIX:-${EROOT}usr}"
432 fi
433 # Point pkg-config path to KDE *.pc files
434 export PKG_CONFIG_PATH="${KDEDIR}/$(get_libdir)/pkgconfig${PKG_CONFIG_PATH:+:${PKG_CONFIG_PATH}}"
435 # Point to correct QT plugins path
436 QT_PLUGIN_PATH="${KDEDIR}/$(get_libdir)/kde4/plugins/"
437
438 # Not needed anymore
439 unset _kdedir
440 }
441
442 # @FUNCTION: kde4-base_src_unpack
443 # @DESCRIPTION:
444 # This function unpacks the source tarballs for KDE4 applications.
445 kde4-base_src_unpack() {
446 debug-print-function ${FUNCNAME} "$@"
447
448 if [[ ${BUILD_TYPE} = live ]]; then
449 migrate_store_dir
450 subversion_src_unpack
451 else
452 base_src_unpack
453 fi
454 }
455
456 # @FUNCTION: kde4-base_src_compile
457 # @DESCRIPTION:
458 # General pre-configure and pre-compile function for KDE4 applications.
459 # It also handles translations if KDE_LINGUAS is defined. See KDE_LINGUAS and
460 # enable_selected_linguas() and enable_selected_doc_linguas()
461 # in kde4-functions.eclass(5) for further details.
462 kde4-base_src_prepare() {
463 debug-print-function ${FUNCNAME} "$@"
464
465 # Only enable selected languages, used for KDE extragear apps.
466 if [[ -n ${KDE_LINGUAS} ]]; then
467 enable_selected_linguas
468 fi
469
470 # Enable/disable handbooks for kde4-base packages
471 # kde-l10n inherits kde-base but is metpackage, so no check for doc
472 if ! has kde4-meta ${INHERITED}; then
473 has handbook ${IUSE//+} && [[ ${PN} != kde-l10n ]] && enable_selected_doc_linguas
474 fi
475
476 [[ ${BUILD_TYPE} = live ]] && subversion_src_prepare
477 base_src_prepare
478
479 # Save library dependencies
480 if [[ -n ${KMSAVELIBS} ]] ; then
481 save_library_dependencies
482 fi
483
484 # Inject library dependencies
485 if [[ -n ${KMLOADLIBS} ]] ; then
486 load_library_dependencies
487 fi
488 }
489
490 # @FUNCTION: kde4-base_src_configure
491 # @DESCRIPTION:
492 # Function for configuring the build of KDE4 applications.
493 kde4-base_src_configure() {
494 debug-print-function ${FUNCNAME} "$@"
495
496 # Handle common release builds
497 if ! has debug ${IUSE//+} || ! use debug; then
498 append-cppflags -DQT_NO_DEBUG
499 fi
500
501 # Build tests in src_test only, where we override this value
502 local cmakeargs="-DKDE4_BUILD_TESTS=OFF"
503
504 # set "real" debug mode
505 if has debug ${IUSE//+} && use debug; then
506 CMAKE_BUILD_TYPE="Debugfull"
507 fi
508
509 # Set distribution name
510 [[ ${PN} = kdelibs ]] && cmakeargs+=" -DKDE_DISTRIBUTION_TEXT=Gentoo"
511
512 # Here we set the install prefix
513 cmakeargs+=" -DCMAKE_INSTALL_PREFIX=${PREFIX}"
514
515 # Use colors
516 QTEST_COLORED=1
517
518 # Shadow existing /usr installations
519 unset KDEDIRS
520
521 if [[ ${KDEDIR} != "${EROOT}usr" ]]; then
522 # Override some environment variables - only when kdeprefix is different,
523 # to not break ccache/distcc
524 PATH="${KDEDIR}/bin:${PATH}"
525 LDPATH="${KDEDIR}/$(get_libdir):${LDPATH}"
526
527 # Append full RPATH
528 cmakeargs+=" -DCMAKE_SKIP_RPATH=OFF"
529 fi
530
531 if has kdeprefix ${IUSE//+} && use kdeprefix; then
532 # Set cmake prefixes to allow buildsystem to localize valid KDE installation
533 # when more are present
534 cmakeargs+=" -DCMAKE_SYSTEM_PREFIX_PATH=${KDEDIR}"
535 else
536 # If prefix is /usr, sysconf needs to be /etc, not /usr/etc
537 cmakeargs+=" -DSYSCONF_INSTALL_DIR=${EROOT}etc"
538 fi
539
540 mycmakeargs="${cmakeargs} ${mycmakeargs}"
541
542 cmake-utils_src_configure
543 }
544
545 # @FUNCTION: kde4-base_src_compile
546 # @DESCRIPTION:
547 # General function for compiling KDE4 applications.
548 kde4-base_src_compile() {
549 debug-print-function ${FUNCNAME} "$@"
550
551 cmake-utils_src_compile "$@"
552 }
553
554 # @FUNCTION: kde4-base_src_test
555 # @DESCRIPTION:
556 # Function for testing KDE4 applications.
557 kde4-base_src_test() {
558 debug-print-function ${FUNCNAME} "$@"
559
560 # Override this value, set in kde4-base_src_configure()
561 mycmakeargs+=" -DKDE4_BUILD_TESTS=ON"
562 cmake-utils_src_configure
563 kde4-base_src_compile
564
565 cmake-utils_src_test
566 }
567
568 # @FUNCTION: kde4-base_src_install
569 # @DESCRIPTION:
570 # Function for installing KDE4 applications.
571 kde4-base_src_install() {
572 debug-print-function ${FUNCNAME} "$@"
573
574 if [[ -n ${KMSAVELIBS} ]] ; then
575 install_library_dependencies
576 fi
577
578 kde4-base_src_make_doc
579 cmake-utils_src_install
580 }
581
582 # @FUNCTION: kde4-base_src_make_doc
583 # @DESCRIPTION:
584 # Function for installing the documentation of KDE4 applications.
585 kde4-base_src_make_doc() {
586 debug-print-function ${FUNCNAME} "$@"
587
588 local doc
589 for doc in AUTHORS ChangeLog* README* NEWS TODO; do
590 [[ -s ${doc} ]] && dodoc ${doc}
591 done
592
593 if [[ -z ${KMNAME} ]]; then
594 for doc in {apps,runtime,workspace,.}/*/{AUTHORS,README*}; do
595 if [[ -s ${doc} ]]; then
596 local doc_complete=${doc}
597 doc="${doc#*/}"
598 newdoc "$doc_complete" "${doc%/*}.${doc##*/}"
599 fi
600 done
601 fi
602
603 if [[ -n ${KDEBASE} ]] && [[ -d "${D}${EROOT}usr/share/doc/${PF}" ]]; then
604 # work around bug #97196
605 dodir /usr/share/doc/KDE4 && \
606 mv "${D}${EROOT}usr/share/doc/${PF}" "${D}${EROOT}usr/share/doc/KDE4/" || \
607 die "Failed to move docs to KDE4/."
608 fi
609 }
610
611 # @FUNCTION: kde4-base_pkg_postinst
612 # @DESCRIPTION:
613 # Function to rebuild the KDE System Configuration Cache after an application has been installed.
614 kde4-base_pkg_postinst() {
615 debug-print-function ${FUNCNAME} "$@"
616
617 buildsycoca
618
619 if [[ ${BUILD_TYPE} = live ]] && [[ -z ${I_KNOW_WHAT_I_AM_DOING} ]]; then
620 echo
621 einfo "WARNING! This is an experimental live ebuild of ${CATEGORY}/${PN}"
622 einfo "Use it at your own risk."
623 einfo "Do _NOT_ file bugs at bugs.gentoo.org because of this ebuild!"
624 echo
625 elif [[ ${BUILD_TYPE} != live ]] && [[ -z ${I_KNOW_WHAT_I_AM_DOING} ]] && has kdeprefix ${IUSE//+} && use kdeprefix; then
626 # warning about kdeprefix for non-live users
627 echo
628 ewarn "WARNING! You have the kdeprefix useflag enabled."
629 ewarn "This setting is strongly discouraged and might lead to potential trouble"
630 ewarn "with KDE update strategies."
631 ewarn "You are using this setup at your own risk and the kde team does not"
632 ewarn "take responsibilities for dead kittens."
633 echo
634 fi
635 }
636
637 # @FUNCTION: kde4-base_pkg_postrm
638 # @DESCRIPTION:
639 # Function to rebuild the KDE System Configuration Cache after an application has been removed.
640 kde4-base_pkg_postrm() {
641 debug-print-function ${FUNCNAME} "$@"
642
643 buildsycoca
644 }

  ViewVC Help
Powered by ViewVC 1.1.20