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

Diff of /eclass/kde4-base.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.53 Revision 1.60
1# Copyright 1999-2009 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.53 2009/11/25 19:51:11 tampakrap Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-base.eclass,v 1.60 2010/05/15 14:03:06 reavertm 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
17# @DESCRIPTION: 17# @DESCRIPTION:
18# Specify if cmake buildsystem is being used. Possible values are 'always' and 'never'. 18# Specify if cmake buildsystem is being used. Possible values are 'always' and 'never'.
19# Please note that if it's set to 'never' you need to explicitly override following phases: 19# Please note that if it's set to 'never' you need to explicitly override following phases:
20# src_configure, src_compile, src_test and src_install. 20# src_configure, src_compile, src_test and src_install.
21# Defaults to 'always'. 21# Defaults to 'always'.
22CMAKE_REQUIRED="${CMAKE_REQUIRED:-${CMAKE_REQUIRED:-always}}" 22: ${CMAKE_REQUIRED:=always}
23if [[ ${CMAKE_REQUIRED} = false || ${CMAKE_REQUIRED} = never ]]; then 23if [[ ${CMAKE_REQUIRED} = false || ${CMAKE_REQUIRED} = never ]]; then
24 buildsystem_eclass="" 24 buildsystem_eclass=""
25 export_fns="" 25 export_fns=""
26else 26else
27 buildsystem_eclass="cmake-utils" 27 buildsystem_eclass="cmake-utils"
57# @ECLASS-VARIABLE: OPENGL_REQUIRED 57# @ECLASS-VARIABLE: OPENGL_REQUIRED
58# @DESCRIPTION: 58# @DESCRIPTION:
59# Is qt-opengl required? Possible values are 'always', 'optional' and 'never'. 59# Is qt-opengl required? Possible values are 'always', 'optional' and 'never'.
60# This variable must be set before inheriting any eclasses. Defaults to 'never'. 60# This variable must be set before inheriting any eclasses. Defaults to 'never'.
61OPENGL_REQUIRED="${OPENGL_REQUIRED:-never}" 61OPENGL_REQUIRED="${OPENGL_REQUIRED:-never}"
62
63# @ECLASS-VARIABLE: MULTIMEDIA_REQUIRED
64# @DESCRIPTION:
65# Is qt-multimedia required? Possible values are 'always', 'optional' and 'never'.
66# This variable must be set before inheriting any eclasses. Defaults to 'never'.
67MULTIMEDIA_REQUIRED="${MULTIMEDIA_REQUIRED:-never}"
62 68
63# @ECLASS-VARIABLE: WEBKIT_REQUIRED 69# @ECLASS-VARIABLE: WEBKIT_REQUIRED
64# @DESCRIPTION: 70# @DESCRIPTION:
65# Is qt-webkit requred? Possible values are 'always', 'optional' and 'never'. 71# Is qt-webkit requred? Possible values are 'always', 'optional' and 'never'.
66# This variable must be set before inheriting any eclasses. Defaults to 'never'. 72# This variable must be set before inheriting any eclasses. Defaults to 'never'.
113 IUSE+=" kdeprefix" 119 IUSE+=" kdeprefix"
114 fi 120 fi
115 # Determine SLOT from PVs 121 # Determine SLOT from PVs
116 case ${PV} in 122 case ${PV} in
117 *.9999*) SLOT="${PV/.9999*/}" ;; # stable live 123 *.9999*) SLOT="${PV/.9999*/}" ;; # stable live
124 4.5* | 4.4.[6-9]*) SLOT="4.5" ;;
118 4.4* | 4.3.[6-9]*) SLOT="4.4" ;; 125 4.4* | 4.3.[6-9]*) SLOT="4.4" ;;
119 4.3*) SLOT="4.3" ;; 126 4.3*) SLOT="4.3" ;;
120 4.2*) SLOT="4.2" ;;
121 9999*) SLOT="live" ;; # regular live 127 9999*) SLOT="live" ;; # regular live
122 *) die "Unsupported ${PV}" ;; 128 *) die "Unsupported ${PV}" ;;
123 esac 129 esac
124 # This code is to prevent portage from searching GENTOO_MIRRORS for 130 # This code is to prevent portage from searching GENTOO_MIRRORS for
125 # packages that will never be mirrored. (As they only will ever be in 131 # packages that will never be mirrored. (As they only will ever be in
142 148
143# @ECLASS-VARIABLE: QT_MINIMAL 149# @ECLASS-VARIABLE: QT_MINIMAL
144# @DESCRIPTION: 150# @DESCRIPTION:
145# Determine version of qt we enforce as minimal for the package. 4.4.0 4.5.1.. 151# Determine version of qt we enforce as minimal for the package. 4.4.0 4.5.1..
146# Currently defaults to 4.5.1 for KDE 4.3 and earlier 152# Currently defaults to 4.5.1 for KDE 4.3 and earlier
147# or 4.6.0_beta for KDE 4.4 and later 153# or 4.6.0_rc1 for KDE 4.4 and later
148if slot_is_at_least 4.4 "${KDE_MINIMAL}"; then 154if slot_is_at_least 4.4 "${KDE_MINIMAL}"; then
149 QT_MINIMAL="${QT_MINIMAL:-4.6.0_beta}" 155 QT_MINIMAL="${QT_MINIMAL:-4.6.0}"
150fi 156fi
151 157
152QT_MINIMAL="${QT_MINIMAL:-4.5.1}" 158QT_MINIMAL="${QT_MINIMAL:-4.5.1}"
153 159
154# OpenGL dependencies 160# OpenGL dependencies
165 ;; 171 ;;
166 *) ;; 172 *) ;;
167esac 173esac
168unset qtopengldepend 174unset qtopengldepend
169 175
176# MultiMedia dependencies
177qtmultimediadepend="
178 >=x11-libs/qt-multimedia-${QT_MINIMAL}:4
179"
180case ${MULTIMEDIA_REQUIRED} in
181 always)
182 COMMONDEPEND+=" ${qtmultimediadepend}"
183 ;;
184 optional)
185 IUSE+=" multimedia"
186 COMMONDEPEND+=" multimedia? ( ${qtmultimediadepend} )"
187 ;;
188 *) ;;
189esac
190unset qtmultimediadepend
191
170# WebKit dependencies 192# WebKit dependencies
171case ${KDE_REQUIRED} in 193case ${KDE_REQUIRED} in
172 always) 194 always)
173 qtwebkitusedeps="[kde]" 195 qtwebkitusedeps="[kde]"
174 ;; 196 ;;
211 233
212# KDE dependencies 234# KDE dependencies
213kdecommondepend=" 235kdecommondepend="
214 dev-lang/perl 236 dev-lang/perl
215 >=x11-libs/qt-core-${QT_MINIMAL}:4[qt3support,ssl] 237 >=x11-libs/qt-core-${QT_MINIMAL}:4[qt3support,ssl]
216 >=x11-libs/qt-gui-${QT_MINIMAL}:4[accessibility,dbus] 238 >=x11-libs/qt-gui-${QT_MINIMAL}:4[dbus]
217 >=x11-libs/qt-qt3support-${QT_MINIMAL}:4[accessibility,kde] 239 >=x11-libs/qt-qt3support-${QT_MINIMAL}:4[kde]
218 >=x11-libs/qt-script-${QT_MINIMAL}:4 240 >=x11-libs/qt-script-${QT_MINIMAL}:4
219 >=x11-libs/qt-sql-${QT_MINIMAL}:4[qt3support] 241 >=x11-libs/qt-sql-${QT_MINIMAL}:4[qt3support]
220 >=x11-libs/qt-svg-${QT_MINIMAL}:4 242 >=x11-libs/qt-svg-${QT_MINIMAL}:4
221 >=x11-libs/qt-test-${QT_MINIMAL}:4 243 >=x11-libs/qt-test-${QT_MINIMAL}:4
222 !aqua? ( 244 !aqua? (
236 >=kde-base/kdelibs-${KDE_MINIMAL} 258 >=kde-base/kdelibs-${KDE_MINIMAL}
237 " 259 "
238 fi 260 fi
239fi 261fi
240kdedepend=" 262kdedepend="
263 dev-util/automoc
241 dev-util/pkgconfig 264 dev-util/pkgconfig
265 !aqua? (
266 || ( >=x11-libs/libXtst-1.1.0 <x11-proto/xextproto-7.1.0 )
267 x11-proto/xf86vidmodeproto
268 )
242" 269"
243case ${KDE_REQUIRED} in 270case ${KDE_REQUIRED} in
244 always) 271 always)
245 IUSE+=" aqua" 272 IUSE+=" aqua"
246 COMMONDEPEND+=" ${kdecommondepend}" 273 COMMONDEPEND+=" ${kdecommondepend}"
251 COMMONDEPEND+=" kde? ( ${kdecommondepend} )" 278 COMMONDEPEND+=" kde? ( ${kdecommondepend} )"
252 DEPEND+=" kde? ( ${kdedepend} )" 279 DEPEND+=" kde? ( ${kdedepend} )"
253 ;; 280 ;;
254 *) ;; 281 *) ;;
255esac 282esac
283
256unset kdecommondepend kdedepend 284unset kdecommondepend kdedepend
257 285
258debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: COMMONDEPEND is ${COMMONDEPEND}" 286debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: COMMONDEPEND is ${COMMONDEPEND}"
259debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: DEPEND (only) is ${DEPEND}" 287debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: DEPEND (only) is ${DEPEND}"
260debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: RDEPEND (only) is ${RDEPEND}" 288debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: RDEPEND (only) is ${RDEPEND}"
261 289
262# Accumulate dependencies set by this eclass 290# Accumulate dependencies set by this eclass
263DEPEND+=" ${COMMONDEPEND}" 291DEPEND+=" ${COMMONDEPEND}"
264RDEPEND+=" ${COMMONDEPEND}" 292RDEPEND+=" ${COMMONDEPEND}"
265unset COMMONDEPEND 293unset COMMONDEPEND
294
295# Add experimental kdeenablefinal, disabled by default
296IUSE+=" kdeenablefinal"
266 297
267# Fetch section - If the ebuild's category is not 'kde-base' and if it is not a 298# Fetch section - If the ebuild's category is not 'kde-base' and if it is not a
268# koffice ebuild, the URI should be set in the ebuild itself 299# koffice ebuild, the URI should be set in the ebuild itself
269case ${BUILD_TYPE} in 300case ${BUILD_TYPE} in
270 live) 301 live)
303 ESVN_REPO_URI="${ESVN_MIRROR}/${branch_prefix}/kdebase/${KMNAME#kdebase-}" 334 ESVN_REPO_URI="${ESVN_MIRROR}/${branch_prefix}/kdebase/${KMNAME#kdebase-}"
304 ;; 335 ;;
305 kdelibs-*) 336 kdelibs-*)
306 ESVN_REPO_URI="${ESVN_MIRROR}/${branch_prefix}/kdelibs/${KMNAME#kdelibs-}" 337 ESVN_REPO_URI="${ESVN_MIRROR}/${branch_prefix}/kdelibs/${KMNAME#kdelibs-}"
307 ;; 338 ;;
308 kdereview) 339 kdereview*)
309 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}/${KMMODULE}" 340 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}/${KMMODULE}"
310 ;; 341 ;;
311 kdesupport) 342 kdesupport)
312 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}/${KMMODULE}" 343 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}/${KMMODULE}"
313 ESVN_PROJECT="${PN}${ESVN_PROJECT_SUFFIX}" 344 ESVN_PROJECT="${PN}${ESVN_PROJECT_SUFFIX}"
354 fi 385 fi
355 _kmname_pv="${_kmname}-${PV}" 386 _kmname_pv="${_kmname}-${PV}"
356 case ${KDEBASE} in 387 case ${KDEBASE} in
357 kde-base) 388 kde-base)
358 case ${PV} in 389 case ${PV} in
359 4.3.85 | 4.3.9[0568]) 390 4.[34].8[05] | 4.[34].9[0568])
360 # block for normally packed unstable releases 391 # block for normally packed unstable releases
361 SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.bz2" ;; 392 SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.bz2" ;;
362 4.3.[6-9]*) 393 4.[34].[6-9]*)
394 # Repacked tarballs: need to depend on xz-utils to ensure that they can be unpacked
363 SRC_URI="http://dev.gentooexperimental.org/~alexxy/kde/${PV}/${_kmname_pv}.tar.lzma" ;; 395 SRC_URI="http://dev.gentooexperimental.org/~alexxy/kde/${PV}/${_kmname_pv}.tar.xz"
396 DEPEND+=" app-arch/xz-utils"
397 ;;
364 *) SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.bz2" ;; 398 *) SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.bz2" ;;
365 esac 399 esac
366 ;; 400 ;;
367 koffice) 401 koffice)
368 case ${PV} in 402 case ${PV} in
389# optional applications link 423# optional applications link
390kde4-base_pkg_setup() { 424kde4-base_pkg_setup() {
391 debug-print-function ${FUNCNAME} "$@" 425 debug-print-function ${FUNCNAME} "$@"
392 426
393 # Prefix compat: 427 # Prefix compat:
394 use prefix || EROOT=${ROOT} 428 if [[ ${EAPI} == 2 ]] && ! use prefix; then
429 EPREFIX=
430 EROOT=${ROOT}
431 fi
432
395 # Append missing trailing slash character 433 # Append missing trailing slash character
396 [[ ${EROOT} = */ ]] || EROOT+="/" 434 [[ ${EROOT} = */ ]] || EROOT+="/"
397 435
398 # QA ebuilds 436 # QA ebuilds
399 [[ -z ${KDE_MINIMAL_VALID} ]] && ewarn "QA Notice: ignoring invalid KDE_MINIMAL (defaulting to ${KDE_MINIMAL})." 437 [[ -z ${KDE_MINIMAL_VALID} ]] && ewarn "QA Notice: ignoring invalid KDE_MINIMAL (defaulting to ${KDE_MINIMAL})."
401 # Don't set KDEHOME during compilation, it will cause access violations 439 # Don't set KDEHOME during compilation, it will cause access violations
402 unset KDEHOME 440 unset KDEHOME
403 441
404 if [[ ${KDEBASE} = kde-base ]]; then 442 if [[ ${KDEBASE} = kde-base ]]; then
405 if use kdeprefix; then 443 if use kdeprefix; then
406 KDEDIR="${EROOT}usr/kde/${_kdedir}" 444 KDEDIR=/usr/kde/${_kdedir}
407 else 445 else
408 KDEDIR="${EROOT}usr" 446 KDEDIR=/usr
409 fi 447 fi
410 PREFIX="${PREFIX:-${KDEDIR}}" 448 : ${PREFIX:=${KDEDIR}}
411 else 449 else
412 # Determine KDEDIR by loooking for the closest match with KDE_MINIMAL 450 # Determine KDEDIR by loooking for the closest match with KDE_MINIMAL
413 KDEDIR= 451 KDEDIR=
414 local kde_minimal_met 452 local kde_minimal_met
415 for slot in ${KDE_SLOTS[@]} ${KDE_LIVE_SLOTS[@]}; do 453 for slot in ${KDE_SLOTS[@]} ${KDE_LIVE_SLOTS[@]}; do
416 [[ -z ${kde_minimal_met} ]] && [[ ${slot} = ${KDE_MINIMAL} ]] && kde_minimal_met=1 454 [[ -z ${kde_minimal_met} ]] && [[ ${slot} = ${KDE_MINIMAL} ]] && kde_minimal_met=1
417 if [[ -n ${kde_minimal_met} ]] && has_version "kde-base/kdelibs:${slot}"; then 455 if [[ -n ${kde_minimal_met} ]] && has_version "kde-base/kdelibs:${slot}"; then
418 if has_version "kde-base/kdelibs:${slot}[kdeprefix]"; then 456 if has_version "kde-base/kdelibs:${slot}[kdeprefix]"; then
419 KDEDIR="${EROOT}usr/kde/${slot}" 457 KDEDIR=/usr/kde/${slot}
420 else 458 else
421 KDEDIR="${EROOT}usr" 459 KDEDIR=/usr
422 fi 460 fi
423 break; 461 break;
424 fi 462 fi
425 done 463 done
426 unset slot 464 unset slot
427 465
428 # Bail out if kdelibs required but not found 466 # Bail out if kdelibs required but not found
429 if [[ ${KDE_REQUIRED} = always ]] || { [[ ${KDE_REQUIRED} = optional ]] && use kde; }; then 467 if [[ ${KDE_REQUIRED} = always ]] || { [[ ${KDE_REQUIRED} = optional ]] && use kde; }; then
430 [[ -z ${KDEDIR} ]] && die "Failed to determine KDEDIR!" 468 [[ -z ${KDEDIR} ]] && die "Failed to determine KDEDIR!"
431 else 469 else
432 [[ -z ${KDEDIR} ]] && KDEDIR="${EROOT}usr" 470 [[ -z ${KDEDIR} ]] && KDEDIR=/usr
433 fi 471 fi
434 472
435 PREFIX="${PREFIX:-${EROOT}usr}" 473 : ${PREFIX:=/usr}
436 fi 474 fi
475 EKDEDIR=${EPREFIX}${KDEDIR}
476
437 # Point pkg-config path to KDE *.pc files 477 # Point pkg-config path to KDE *.pc files
438 export PKG_CONFIG_PATH="${KDEDIR}/$(get_libdir)/pkgconfig${PKG_CONFIG_PATH:+:${PKG_CONFIG_PATH}}" 478 export PKG_CONFIG_PATH="${EKDEDIR}/$(get_libdir)/pkgconfig${PKG_CONFIG_PATH:+:${PKG_CONFIG_PATH}}"
439 # Point to correct QT plugins path 479 # Point to correct QT plugins path
440 QT_PLUGIN_PATH="${KDEDIR}/$(get_libdir)/kde4/plugins/" 480 QT_PLUGIN_PATH="${EKDEDIR}/$(get_libdir)/kde4/plugins/"
441 481
442 # Fix XDG collision with sandbox 482 # Fix XDG collision with sandbox
443 export XDG_CONFIG_HOME="${T}" 483 export XDG_CONFIG_HOME="${T}"
444 # Not needed anymore 484 # Not needed anymore
445 unset _kdedir 485 unset _kdedir
452 debug-print-function ${FUNCNAME} "$@" 492 debug-print-function ${FUNCNAME} "$@"
453 493
454 if [[ ${BUILD_TYPE} = live ]]; then 494 if [[ ${BUILD_TYPE} = live ]]; then
455 migrate_store_dir 495 migrate_store_dir
456 subversion_src_unpack 496 subversion_src_unpack
497 elif [[ ${EAPI} == 2 ]]; then
498 local file
499 for file in ${A}; do
500 # This setup is because EAPI <= 2 cannot unpack *.tar.xz files
501 # directly, so we do it ourselves (using the exact same code as portage)
502 case ${file} in
503 *.tar.xz)
504 echo ">>> Unpacking ${file} to ${PWD}"
505 xz -dc "${DISTDIR}"/${file} | tar xof -
506 assert "failed unpacking ${file}"
507 ;;
508 *)
509 unpack ${file}
510 ;;
511 esac
512 done
457 else 513 else
458 base_src_unpack 514 # For EAPI >= 3, we can just use unpack() directly
515 unpack ${A}
459 fi 516 fi
460} 517}
461 518
462# @FUNCTION: kde4-base_src_prepare 519# @FUNCTION: kde4-base_src_prepare
463# @DESCRIPTION: 520# @DESCRIPTION:
479 if ! has kde4-meta ${INHERITED}; then 536 if ! has kde4-meta ${INHERITED}; then
480 has handbook ${IUSE//+} && [[ ${PN} != kde-l10n ]] && [[ ${PN} != kdelibs ]] && enable_selected_doc_linguas 537 has handbook ${IUSE//+} && [[ ${PN} != kde-l10n ]] && [[ ${PN} != kdelibs ]] && enable_selected_doc_linguas
481 fi 538 fi
482 539
483 [[ ${BUILD_TYPE} = live ]] && subversion_src_prepare 540 [[ ${BUILD_TYPE} = live ]] && subversion_src_prepare
541
542 # Apply patches
484 base_src_prepare 543 base_src_prepare
544 epatch_user
485 545
486 # Save library dependencies 546 # Save library dependencies
487 if [[ -n ${KMSAVELIBS} ]] ; then 547 if [[ -n ${KMSAVELIBS} ]] ; then
488 save_library_dependencies 548 save_library_dependencies
489 fi 549 fi
498# @DESCRIPTION: 558# @DESCRIPTION:
499# Function for configuring the build of KDE4 applications. 559# Function for configuring the build of KDE4 applications.
500kde4-base_src_configure() { 560kde4-base_src_configure() {
501 debug-print-function ${FUNCNAME} "$@" 561 debug-print-function ${FUNCNAME} "$@"
502 562
563 # Build tests in src_test only, where we override this value
564 local cmakeargs=(-DKDE4_BUILD_TESTS=OFF)
565
566 if has kdeenablefinal ${IUSE//+} && use kdeenablefinal; then
567 cmakeargs+=(-DKDE4_ENABLE_FINAL=ON)
568 fi
569
570 if has debug ${IUSE//+} && use debug; then
571 # Set "real" debug mode
572 CMAKE_BUILD_TYPE="Debugfull"
573 else
503 # Handle common release builds 574 # Handle common release builds
504 if ! has debug ${IUSE//+} || ! use debug; then
505 append-cppflags -DQT_NO_DEBUG 575 append-cppflags -DQT_NO_DEBUG
506 fi 576 fi
507 577
508 # Build tests in src_test only, where we override this value
509 local cmakeargs="-DKDE4_BUILD_TESTS=OFF"
510
511 # set "real" debug mode
512 if has debug ${IUSE//+} && use debug; then
513 CMAKE_BUILD_TYPE="Debugfull"
514 fi
515
516 # Set distribution name 578 # Set distribution name
517 [[ ${PN} = kdelibs ]] && cmakeargs+=" -DKDE_DISTRIBUTION_TEXT=Gentoo" 579 [[ ${PN} = kdelibs ]] && cmakeargs+=(-DKDE_DISTRIBUTION_TEXT=Gentoo)
518 580
519 # Here we set the install prefix 581 # Here we set the install prefix
520 cmakeargs+=" -DCMAKE_INSTALL_PREFIX=${PREFIX}" 582 cmakeargs+=(-DCMAKE_INSTALL_PREFIX="${EPREFIX}${PREFIX}")
521 583
522 # Use colors 584 # Use colors
523 QTEST_COLORED=1 585 QTEST_COLORED=1
524 586
525 # Shadow existing /usr installations 587 # Shadow existing /usr installations
526 unset KDEDIRS 588 unset KDEDIRS
527 589
528 # Handle kdeprefix-ed KDE 590 # Handle kdeprefix-ed KDE
529 if [[ ${KDEDIR} != "${EROOT}usr" ]]; then 591 if [[ ${KDEDIR} != /usr ]]; then
530 # Override some environment variables - only when kdeprefix is different, 592 # Override some environment variables - only when kdeprefix is different,
531 # to not break ccache/distcc 593 # to not break ccache/distcc
532 PATH="${KDEDIR}/bin:${PATH}" 594 PATH="${EKDEDIR}/bin:${PATH}"
533 LDPATH="${KDEDIR}/$(get_libdir):${LDPATH}" 595 LDPATH="${EKDEDIR}/$(get_libdir)${LDPATH+:}${LDPATH}"
534 596
535 # Append full RPATH 597 # Append full RPATH
536 cmakeargs+=" -DCMAKE_SKIP_RPATH=OFF" 598 cmakeargs+=(-DCMAKE_SKIP_RPATH=OFF)
537 599
538 # Set cmake prefixes to allow buildsystem to locate valid KDE installation 600 # Set cmake prefixes to allow buildsystem to locate valid KDE installation
539 # when more are present 601 # when more are present
540 cmakeargs+=" -DCMAKE_SYSTEM_PREFIX_PATH=${KDEDIR}" 602 cmakeargs+=(-DCMAKE_SYSTEM_PREFIX_PATH="${EKDEDIR}")
541 fi 603 fi
542 604
543 # Handle kdeprefix in application itself 605 # Handle kdeprefix in application itself
544 if ! has kdeprefix ${IUSE//+} || ! use kdeprefix; then 606 if ! has kdeprefix ${IUSE//+} || ! use kdeprefix; then
545 # If prefix is /usr, sysconf needs to be /etc, not /usr/etc 607 # If prefix is /usr, sysconf needs to be /etc, not /usr/etc
546 cmakeargs+=" -DSYSCONF_INSTALL_DIR=${EROOT}etc" 608 cmakeargs+=(-DSYSCONF_INSTALL_DIR="${EPREFIX}"/etc)
547 fi 609 fi
548 610
611 if [[ $(declare -p mycmakeargs 2>&-) != "declare -a mycmakeargs="* ]]; then
612 mycmakeargs=(${mycmakeargs})
613 fi
614
549 mycmakeargs="${cmakeargs} ${mycmakeargs}" 615 mycmakeargs=("${cmakeargs[@]}" "${mycmakeargs[@]}")
550 616
551 cmake-utils_src_configure 617 cmake-utils_src_configure
552} 618}
553 619
554# @FUNCTION: kde4-base_src_compile 620# @FUNCTION: kde4-base_src_compile
565# Function for testing KDE4 applications. 631# Function for testing KDE4 applications.
566kde4-base_src_test() { 632kde4-base_src_test() {
567 debug-print-function ${FUNCNAME} "$@" 633 debug-print-function ${FUNCNAME} "$@"
568 634
569 # Override this value, set in kde4-base_src_configure() 635 # Override this value, set in kde4-base_src_configure()
570 mycmakeargs+=" -DKDE4_BUILD_TESTS=ON" 636 mycmakeargs+=(-DKDE4_BUILD_TESTS=ON)
571 cmake-utils_src_configure 637 cmake-utils_src_configure
572 kde4-base_src_compile 638 kde4-base_src_compile
573 639
574 cmake-utils_src_test 640 cmake-utils_src_test
575} 641}
577# @FUNCTION: kde4-base_src_install 643# @FUNCTION: kde4-base_src_install
578# @DESCRIPTION: 644# @DESCRIPTION:
579# Function for installing KDE4 applications. 645# Function for installing KDE4 applications.
580kde4-base_src_install() { 646kde4-base_src_install() {
581 debug-print-function ${FUNCNAME} "$@" 647 debug-print-function ${FUNCNAME} "$@"
648
649 # Prefix support, for usage in ebuilds
650 if [[ ${EAPI} == 2 ]] && ! use prefix; then
651 ED=${D}
652 fi
582 653
583 if [[ -n ${KMSAVELIBS} ]] ; then 654 if [[ -n ${KMSAVELIBS} ]] ; then
584 install_library_dependencies 655 install_library_dependencies
585 fi 656 fi
586 657
605 local doc_complete=${doc} 676 local doc_complete=${doc}
606 doc="${doc#*/}" 677 doc="${doc#*/}"
607 newdoc "$doc_complete" "${doc%/*}.${doc##*/}" 678 newdoc "$doc_complete" "${doc%/*}.${doc##*/}"
608 fi 679 fi
609 done 680 done
610 fi
611
612 if [[ -n ${KDEBASE} ]] && [[ -d "${D}${EROOT}usr/share/doc/${PF}" ]]; then
613 # work around bug #97196
614 dodir /usr/share/doc/KDE4 && \
615 cp -r "${D}${EROOT}usr/share/doc/${PF}" "${D}${EROOT}usr/share/doc/KDE4/" || \
616 die "Failed to move docs to KDE4/."
617 rm -rf "${D}${EROOT}usr/share/doc/${PF}"
618 fi 681 fi
619} 682}
620 683
621# @FUNCTION: kde4-base_pkg_postinst 684# @FUNCTION: kde4-base_pkg_postinst
622# @DESCRIPTION: 685# @DESCRIPTION:
640 ewarn "with KDE update strategies." 703 ewarn "with KDE update strategies."
641 ewarn "You are using this setup at your own risk and the kde team does not" 704 ewarn "You are using this setup at your own risk and the kde team does not"
642 ewarn "take responsibilities for dead kittens." 705 ewarn "take responsibilities for dead kittens."
643 echo 706 echo
644 fi 707 fi
708 if [[ -z ${I_KNOW_WHAT_I_AM_DOING} ]] && ! has_version 'kde-base/kdebase-runtime-meta' && ! has_version 'kde-base/kdebase-startkde'; then
709 # warn about not supported approach
710 if [[ ${KDE_REQUIRED} == always ]] || ( [[ ${KDE_REQUIRED} == optional ]] && use kde ); then
711 echo
712 ewarn "WARNING! Your system configuration contains neither \"kde-base/kdebase-runtime-meta\""
713 ewarn "nor \"kde-base/kdebase-startkde\". You need one of above."
714 ewarn "With this setting you are unsupported by KDE team."
715 ewarn "All missing features you report for misc packages will be probably ignored or closed as INVALID."
716 fi
717 fi
645} 718}
646 719
647# @FUNCTION: kde4-base_pkg_postrm 720# @FUNCTION: kde4-base_pkg_postrm
648# @DESCRIPTION: 721# @DESCRIPTION:
649# Function to rebuild the KDE System Configuration Cache after an application has been removed. 722# Function to rebuild the KDE System Configuration Cache after an application has been removed.

Legend:
Removed from v.1.53  
changed lines
  Added in v.1.60

  ViewVC Help
Powered by ViewVC 1.1.20