/[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.58
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.58 2010/02/02 14:20:16 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
164 COMMONDEPEND+=" opengl? ( ${qtopengldepend} )" 170 COMMONDEPEND+=" opengl? ( ${qtopengldepend} )"
165 ;; 171 ;;
166 *) ;; 172 *) ;;
167esac 173esac
168unset qtopengldepend 174unset qtopengldepend
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
169 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]"
237 " 259 "
238 fi 260 fi
239fi 261fi
240kdedepend=" 262kdedepend="
241 dev-util/pkgconfig 263 dev-util/pkgconfig
264 !aqua? (
265 || ( >=x11-libs/libXtst-1.1.0 <x11-proto/xextproto-7.1.0 )
266 x11-proto/xf86vidmodeproto
267 )
242" 268"
243case ${KDE_REQUIRED} in 269case ${KDE_REQUIRED} in
244 always) 270 always)
245 IUSE+=" aqua" 271 IUSE+=" aqua"
246 COMMONDEPEND+=" ${kdecommondepend}" 272 COMMONDEPEND+=" ${kdecommondepend}"
251 COMMONDEPEND+=" kde? ( ${kdecommondepend} )" 277 COMMONDEPEND+=" kde? ( ${kdecommondepend} )"
252 DEPEND+=" kde? ( ${kdedepend} )" 278 DEPEND+=" kde? ( ${kdedepend} )"
253 ;; 279 ;;
254 *) ;; 280 *) ;;
255esac 281esac
282
256unset kdecommondepend kdedepend 283unset kdecommondepend kdedepend
257 284
258debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: COMMONDEPEND is ${COMMONDEPEND}" 285debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: COMMONDEPEND is ${COMMONDEPEND}"
259debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: DEPEND (only) is ${DEPEND}" 286debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: DEPEND (only) is ${DEPEND}"
260debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: RDEPEND (only) is ${RDEPEND}" 287debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: RDEPEND (only) is ${RDEPEND}"
261 288
262# Accumulate dependencies set by this eclass 289# Accumulate dependencies set by this eclass
263DEPEND+=" ${COMMONDEPEND}" 290DEPEND+=" ${COMMONDEPEND}"
264RDEPEND+=" ${COMMONDEPEND}" 291RDEPEND+=" ${COMMONDEPEND}"
265unset COMMONDEPEND 292unset COMMONDEPEND
293
294# Add experimental kdeenablefinal, disabled by default
295IUSE+=" kdeenablefinal"
266 296
267# Fetch section - If the ebuild's category is not 'kde-base' and if it is not a 297# 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 298# koffice ebuild, the URI should be set in the ebuild itself
269case ${BUILD_TYPE} in 299case ${BUILD_TYPE} in
270 live) 300 live)
303 ESVN_REPO_URI="${ESVN_MIRROR}/${branch_prefix}/kdebase/${KMNAME#kdebase-}" 333 ESVN_REPO_URI="${ESVN_MIRROR}/${branch_prefix}/kdebase/${KMNAME#kdebase-}"
304 ;; 334 ;;
305 kdelibs-*) 335 kdelibs-*)
306 ESVN_REPO_URI="${ESVN_MIRROR}/${branch_prefix}/kdelibs/${KMNAME#kdelibs-}" 336 ESVN_REPO_URI="${ESVN_MIRROR}/${branch_prefix}/kdelibs/${KMNAME#kdelibs-}"
307 ;; 337 ;;
308 kdereview) 338 kdereview*)
309 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}/${KMMODULE}" 339 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}/${KMMODULE}"
310 ;; 340 ;;
311 kdesupport) 341 kdesupport)
312 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}/${KMMODULE}" 342 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}/${KMMODULE}"
313 ESVN_PROJECT="${PN}${ESVN_PROJECT_SUFFIX}" 343 ESVN_PROJECT="${PN}${ESVN_PROJECT_SUFFIX}"
354 fi 384 fi
355 _kmname_pv="${_kmname}-${PV}" 385 _kmname_pv="${_kmname}-${PV}"
356 case ${KDEBASE} in 386 case ${KDEBASE} in
357 kde-base) 387 kde-base)
358 case ${PV} in 388 case ${PV} in
359 4.3.85 | 4.3.9[0568]) 389 4.[34].8[05] | 4.[34].9[0568])
360 # block for normally packed unstable releases 390 # block for normally packed unstable releases
361 SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.bz2" ;; 391 SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.bz2" ;;
362 4.3.[6-9]*) 392 4.[34].[6-9]*)
393 # 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" ;; 394 SRC_URI="http://dev.gentooexperimental.org/~alexxy/kde/${PV}/${_kmname_pv}.tar.xz"
395 DEPEND+=" app-arch/xz-utils"
396 ;;
364 *) SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.bz2" ;; 397 *) SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.bz2" ;;
365 esac 398 esac
366 ;; 399 ;;
367 koffice) 400 koffice)
368 case ${PV} in 401 case ${PV} in
389# optional applications link 422# optional applications link
390kde4-base_pkg_setup() { 423kde4-base_pkg_setup() {
391 debug-print-function ${FUNCNAME} "$@" 424 debug-print-function ${FUNCNAME} "$@"
392 425
393 # Prefix compat: 426 # Prefix compat:
394 use prefix || EROOT=${ROOT} 427 if [[ ${EAPI} == 2 ]] && ! use prefix; then
428 EPREFIX=
429 EROOT=${ROOT}
430 fi
431
395 # Append missing trailing slash character 432 # Append missing trailing slash character
396 [[ ${EROOT} = */ ]] || EROOT+="/" 433 [[ ${EROOT} = */ ]] || EROOT+="/"
397 434
398 # QA ebuilds 435 # QA ebuilds
399 [[ -z ${KDE_MINIMAL_VALID} ]] && ewarn "QA Notice: ignoring invalid KDE_MINIMAL (defaulting to ${KDE_MINIMAL})." 436 [[ -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 438 # Don't set KDEHOME during compilation, it will cause access violations
402 unset KDEHOME 439 unset KDEHOME
403 440
404 if [[ ${KDEBASE} = kde-base ]]; then 441 if [[ ${KDEBASE} = kde-base ]]; then
405 if use kdeprefix; then 442 if use kdeprefix; then
406 KDEDIR="${EROOT}usr/kde/${_kdedir}" 443 KDEDIR=/usr/kde/${_kdedir}
407 else 444 else
408 KDEDIR="${EROOT}usr" 445 KDEDIR=/usr
409 fi 446 fi
410 PREFIX="${PREFIX:-${KDEDIR}}" 447 : ${PREFIX:=${KDEDIR}}
411 else 448 else
412 # Determine KDEDIR by loooking for the closest match with KDE_MINIMAL 449 # Determine KDEDIR by loooking for the closest match with KDE_MINIMAL
413 KDEDIR= 450 KDEDIR=
414 local kde_minimal_met 451 local kde_minimal_met
415 for slot in ${KDE_SLOTS[@]} ${KDE_LIVE_SLOTS[@]}; do 452 for slot in ${KDE_SLOTS[@]} ${KDE_LIVE_SLOTS[@]}; do
416 [[ -z ${kde_minimal_met} ]] && [[ ${slot} = ${KDE_MINIMAL} ]] && kde_minimal_met=1 453 [[ -z ${kde_minimal_met} ]] && [[ ${slot} = ${KDE_MINIMAL} ]] && kde_minimal_met=1
417 if [[ -n ${kde_minimal_met} ]] && has_version "kde-base/kdelibs:${slot}"; then 454 if [[ -n ${kde_minimal_met} ]] && has_version "kde-base/kdelibs:${slot}"; then
418 if has_version "kde-base/kdelibs:${slot}[kdeprefix]"; then 455 if has_version "kde-base/kdelibs:${slot}[kdeprefix]"; then
419 KDEDIR="${EROOT}usr/kde/${slot}" 456 KDEDIR=/usr/kde/${slot}
420 else 457 else
421 KDEDIR="${EROOT}usr" 458 KDEDIR=/usr
422 fi 459 fi
423 break; 460 break;
424 fi 461 fi
425 done 462 done
426 unset slot 463 unset slot
427 464
428 # Bail out if kdelibs required but not found 465 # Bail out if kdelibs required but not found
429 if [[ ${KDE_REQUIRED} = always ]] || { [[ ${KDE_REQUIRED} = optional ]] && use kde; }; then 466 if [[ ${KDE_REQUIRED} = always ]] || { [[ ${KDE_REQUIRED} = optional ]] && use kde; }; then
430 [[ -z ${KDEDIR} ]] && die "Failed to determine KDEDIR!" 467 [[ -z ${KDEDIR} ]] && die "Failed to determine KDEDIR!"
431 else 468 else
432 [[ -z ${KDEDIR} ]] && KDEDIR="${EROOT}usr" 469 [[ -z ${KDEDIR} ]] && KDEDIR=/usr
433 fi 470 fi
434 471
435 PREFIX="${PREFIX:-${EROOT}usr}" 472 : ${PREFIX:=/usr}
436 fi 473 fi
474 EKDEDIR=${EPREFIX}${KDEDIR}
475
437 # Point pkg-config path to KDE *.pc files 476 # Point pkg-config path to KDE *.pc files
438 export PKG_CONFIG_PATH="${KDEDIR}/$(get_libdir)/pkgconfig${PKG_CONFIG_PATH:+:${PKG_CONFIG_PATH}}" 477 export PKG_CONFIG_PATH="${EKDEDIR}/$(get_libdir)/pkgconfig${PKG_CONFIG_PATH:+:${PKG_CONFIG_PATH}}"
439 # Point to correct QT plugins path 478 # Point to correct QT plugins path
440 QT_PLUGIN_PATH="${KDEDIR}/$(get_libdir)/kde4/plugins/" 479 QT_PLUGIN_PATH="${EKDEDIR}/$(get_libdir)/kde4/plugins/"
441 480
442 # Fix XDG collision with sandbox 481 # Fix XDG collision with sandbox
443 export XDG_CONFIG_HOME="${T}" 482 export XDG_CONFIG_HOME="${T}"
444 # Not needed anymore 483 # Not needed anymore
445 unset _kdedir 484 unset _kdedir
452 debug-print-function ${FUNCNAME} "$@" 491 debug-print-function ${FUNCNAME} "$@"
453 492
454 if [[ ${BUILD_TYPE} = live ]]; then 493 if [[ ${BUILD_TYPE} = live ]]; then
455 migrate_store_dir 494 migrate_store_dir
456 subversion_src_unpack 495 subversion_src_unpack
496 elif [[ ${EAPI} == 2 ]]; then
497 local file
498 for file in ${A}; do
499 # This setup is because EAPI <= 2 cannot unpack *.tar.xz files
500 # directly, so we do it ourselves (using the exact same code as portage)
501 case ${file} in
502 *.tar.xz)
503 echo ">>> Unpacking ${file} to ${PWD}"
504 xz -dc "${DISTDIR}"/${file} | tar xof -
505 assert "failed unpacking ${file}"
506 ;;
507 *)
508 unpack ${file}
509 ;;
510 esac
511 done
457 else 512 else
458 base_src_unpack 513 # For EAPI >= 3, we can just use unpack() directly
514 unpack ${A}
459 fi 515 fi
460} 516}
461 517
462# @FUNCTION: kde4-base_src_prepare 518# @FUNCTION: kde4-base_src_prepare
463# @DESCRIPTION: 519# @DESCRIPTION:
479 if ! has kde4-meta ${INHERITED}; then 535 if ! has kde4-meta ${INHERITED}; then
480 has handbook ${IUSE//+} && [[ ${PN} != kde-l10n ]] && [[ ${PN} != kdelibs ]] && enable_selected_doc_linguas 536 has handbook ${IUSE//+} && [[ ${PN} != kde-l10n ]] && [[ ${PN} != kdelibs ]] && enable_selected_doc_linguas
481 fi 537 fi
482 538
483 [[ ${BUILD_TYPE} = live ]] && subversion_src_prepare 539 [[ ${BUILD_TYPE} = live ]] && subversion_src_prepare
540
541 # Apply patches
484 base_src_prepare 542 base_src_prepare
543 epatch_user
485 544
486 # Save library dependencies 545 # Save library dependencies
487 if [[ -n ${KMSAVELIBS} ]] ; then 546 if [[ -n ${KMSAVELIBS} ]] ; then
488 save_library_dependencies 547 save_library_dependencies
489 fi 548 fi
498# @DESCRIPTION: 557# @DESCRIPTION:
499# Function for configuring the build of KDE4 applications. 558# Function for configuring the build of KDE4 applications.
500kde4-base_src_configure() { 559kde4-base_src_configure() {
501 debug-print-function ${FUNCNAME} "$@" 560 debug-print-function ${FUNCNAME} "$@"
502 561
562 # Build tests in src_test only, where we override this value
563 local cmakeargs=(-DKDE4_BUILD_TESTS=OFF)
564
565 if has kdeenablefinal ${IUSE//+} && use kdeenablefinal; then
566 cmakeargs+=(-DKDE4_ENABLE_FINAL=ON)
567 fi
568
569 if has debug ${IUSE//+} && use debug; then
570 # Set "real" debug mode
571 CMAKE_BUILD_TYPE="Debugfull"
572 else
503 # Handle common release builds 573 # Handle common release builds
504 if ! has debug ${IUSE//+} || ! use debug; then
505 append-cppflags -DQT_NO_DEBUG 574 append-cppflags -DQT_NO_DEBUG
506 fi 575 fi
507 576
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 577 # Set distribution name
517 [[ ${PN} = kdelibs ]] && cmakeargs+=" -DKDE_DISTRIBUTION_TEXT=Gentoo" 578 [[ ${PN} = kdelibs ]] && cmakeargs+=(-DKDE_DISTRIBUTION_TEXT=Gentoo)
518 579
519 # Here we set the install prefix 580 # Here we set the install prefix
520 cmakeargs+=" -DCMAKE_INSTALL_PREFIX=${PREFIX}" 581 cmakeargs+=(-DCMAKE_INSTALL_PREFIX="${EPREFIX}${PREFIX}")
521 582
522 # Use colors 583 # Use colors
523 QTEST_COLORED=1 584 QTEST_COLORED=1
524 585
525 # Shadow existing /usr installations 586 # Shadow existing /usr installations
526 unset KDEDIRS 587 unset KDEDIRS
527 588
528 # Handle kdeprefix-ed KDE 589 # Handle kdeprefix-ed KDE
529 if [[ ${KDEDIR} != "${EROOT}usr" ]]; then 590 if [[ ${KDEDIR} != /usr ]]; then
530 # Override some environment variables - only when kdeprefix is different, 591 # Override some environment variables - only when kdeprefix is different,
531 # to not break ccache/distcc 592 # to not break ccache/distcc
532 PATH="${KDEDIR}/bin:${PATH}" 593 PATH="${EKDEDIR}/bin:${PATH}"
533 LDPATH="${KDEDIR}/$(get_libdir):${LDPATH}" 594 LDPATH="${EKDEDIR}/$(get_libdir)${LDPATH+:}${LDPATH}"
534 595
535 # Append full RPATH 596 # Append full RPATH
536 cmakeargs+=" -DCMAKE_SKIP_RPATH=OFF" 597 cmakeargs+=(-DCMAKE_SKIP_RPATH=OFF)
537 598
538 # Set cmake prefixes to allow buildsystem to locate valid KDE installation 599 # Set cmake prefixes to allow buildsystem to locate valid KDE installation
539 # when more are present 600 # when more are present
540 cmakeargs+=" -DCMAKE_SYSTEM_PREFIX_PATH=${KDEDIR}" 601 cmakeargs+=(-DCMAKE_SYSTEM_PREFIX_PATH="${EKDEDIR}")
541 fi 602 fi
542 603
543 # Handle kdeprefix in application itself 604 # Handle kdeprefix in application itself
544 if ! has kdeprefix ${IUSE//+} || ! use kdeprefix; then 605 if ! has kdeprefix ${IUSE//+} || ! use kdeprefix; then
545 # If prefix is /usr, sysconf needs to be /etc, not /usr/etc 606 # If prefix is /usr, sysconf needs to be /etc, not /usr/etc
546 cmakeargs+=" -DSYSCONF_INSTALL_DIR=${EROOT}etc" 607 cmakeargs+=(-DSYSCONF_INSTALL_DIR="${EPREFIX}"/etc)
547 fi 608 fi
548 609
610 if [[ $(declare -p mycmakeargs 2>&-) != "declare -a mycmakeargs="* ]]; then
611 mycmakeargs=(${mycmakeargs})
612 fi
613
549 mycmakeargs="${cmakeargs} ${mycmakeargs}" 614 mycmakeargs=("${cmakeargs[@]}" "${mycmakeargs[@]}")
550 615
551 cmake-utils_src_configure 616 cmake-utils_src_configure
552} 617}
553 618
554# @FUNCTION: kde4-base_src_compile 619# @FUNCTION: kde4-base_src_compile
565# Function for testing KDE4 applications. 630# Function for testing KDE4 applications.
566kde4-base_src_test() { 631kde4-base_src_test() {
567 debug-print-function ${FUNCNAME} "$@" 632 debug-print-function ${FUNCNAME} "$@"
568 633
569 # Override this value, set in kde4-base_src_configure() 634 # Override this value, set in kde4-base_src_configure()
570 mycmakeargs+=" -DKDE4_BUILD_TESTS=ON" 635 mycmakeargs+=(-DKDE4_BUILD_TESTS=ON)
571 cmake-utils_src_configure 636 cmake-utils_src_configure
572 kde4-base_src_compile 637 kde4-base_src_compile
573 638
574 cmake-utils_src_test 639 cmake-utils_src_test
575} 640}
577# @FUNCTION: kde4-base_src_install 642# @FUNCTION: kde4-base_src_install
578# @DESCRIPTION: 643# @DESCRIPTION:
579# Function for installing KDE4 applications. 644# Function for installing KDE4 applications.
580kde4-base_src_install() { 645kde4-base_src_install() {
581 debug-print-function ${FUNCNAME} "$@" 646 debug-print-function ${FUNCNAME} "$@"
647
648 # Prefix support, for usage in ebuilds
649 if [[ ${EAPI} == 2 ]] && ! use prefix; then
650 ED=${D}
651 fi
582 652
583 if [[ -n ${KMSAVELIBS} ]] ; then 653 if [[ -n ${KMSAVELIBS} ]] ; then
584 install_library_dependencies 654 install_library_dependencies
585 fi 655 fi
586 656
605 local doc_complete=${doc} 675 local doc_complete=${doc}
606 doc="${doc#*/}" 676 doc="${doc#*/}"
607 newdoc "$doc_complete" "${doc%/*}.${doc##*/}" 677 newdoc "$doc_complete" "${doc%/*}.${doc##*/}"
608 fi 678 fi
609 done 679 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 680 fi
619} 681}
620 682
621# @FUNCTION: kde4-base_pkg_postinst 683# @FUNCTION: kde4-base_pkg_postinst
622# @DESCRIPTION: 684# @DESCRIPTION:
640 ewarn "with KDE update strategies." 702 ewarn "with KDE update strategies."
641 ewarn "You are using this setup at your own risk and the kde team does not" 703 ewarn "You are using this setup at your own risk and the kde team does not"
642 ewarn "take responsibilities for dead kittens." 704 ewarn "take responsibilities for dead kittens."
643 echo 705 echo
644 fi 706 fi
707 if [[ -z ${I_KNOW_WHAT_I_AM_DOING} ]] && ! has_version 'kde-base/kdebase-runtime-meta' && ! has_version 'kde-base/kdebase-startkde'; then
708 # warn about not supported approach
709 if [[ ${KDE_REQUIRED} == always ]] || ( [[ ${KDE_REQUIRED} == optional ]] && use kde ); then
710 echo
711 ewarn "WARNING! Your system configuration contains neither \"kde-base/kdebase-runtime-meta\""
712 ewarn "nor \"kde-base/kdebase-startkde\". You need one of above."
713 ewarn "With this setting you are unsupported by KDE team."
714 ewarn "All missing features you report for misc packages will be probably ignored or closed as INVALID."
715 fi
716 fi
645} 717}
646 718
647# @FUNCTION: kde4-base_pkg_postrm 719# @FUNCTION: kde4-base_pkg_postrm
648# @DESCRIPTION: 720# @DESCRIPTION:
649# Function to rebuild the KDE System Configuration Cache after an application has been removed. 721# 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.58

  ViewVC Help
Powered by ViewVC 1.1.20