/[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.37 Revision 1.38
1# Copyright 2007-2009 Gentoo Foundation 1# Copyright 2007-2009 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.37 2009/05/09 13:23:15 scarabeus Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-base.eclass,v 1.38 2009/05/28 09:47:52 scarabeus 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
324 else 324 else
325 # kdelibs, kdepimlibs 325 # kdelibs, kdepimlibs
326 ESVN_REPO_URI="${ESVN_MIRROR}/${branch_prefix}/${PN}" 326 ESVN_REPO_URI="${ESVN_MIRROR}/${branch_prefix}/${PN}"
327 ESVN_PROJECT="${PN}${ESVN_PROJECT_SUFFIX}" 327 ESVN_PROJECT="${PN}${ESVN_PROJECT_SUFFIX}"
328 fi 328 fi
329 # limit syncing to 1 hour. 329 # @ECLASS-VARIABLE: ESVN_UP_FREQ
330 ESVN_UP_FREQ=${ESVN_UP_FREQ:-1} 330 # @DESCRIPTION:
331 # This variable is used for specifying the timeout between svn synces
332 # for kde-base and koffice modules. Does not affect misc apps.
333 # Default value is 1 hour.
334 [[ ${KDEBASE} = kde-base || ${KDEBASE} = koffice ]] && ESVN_UP_FREQ=${ESVN_UP_FREQ:-1}
331 ;; 335 ;;
332 *) 336 *)
333 if [[ -n ${KDEBASE} ]]; then 337 if [[ -n ${KDEBASE} ]]; then
334 if [[ -n ${KMNAME} ]]; then 338 if [[ -n ${KMNAME} ]]; then
335 case ${KMNAME} in 339 case ${KMNAME} in
355 SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.bz2" ;; 359 SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.bz2" ;;
356 *) SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.bz2" ;; 360 *) SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.bz2" ;;
357 esac 361 esac
358 ;; 362 ;;
359 koffice) 363 koffice)
364 case ${PV} in
365 1.9*)
360 SRC_URI="mirror://kde/unstable/${_kmname_pv}/src/${_kmname_pv}.tar.bz2" 366 SRC_URI="mirror://kde/unstable/${_kmname_pv}/src/${_kmname_pv}.tar.bz2"
367 ;;
368 *) SRC_URI="mirror://kde/stable/${_kmname_pv}/src/${_kmname_pv}.tar.bz2" ;;
369 esac
361 ;; 370 ;;
362 esac 371 esac
363 fi 372 fi
364 unset _kmname _kmname_pv 373 unset _kmname _kmname_pv
365 fi 374 fi
391 # Don't set KDEHOME during compilation, it will cause access violations 400 # Don't set KDEHOME during compilation, it will cause access violations
392 unset KDEHOME 401 unset KDEHOME
393 402
394 if [[ ${KDEBASE} = kde-base ]]; then 403 if [[ ${KDEBASE} = kde-base ]]; then
395 if use kdeprefix; then 404 if use kdeprefix; then
396 KDEDIR="/usr/kde/${_kdedir}" 405 KDEDIR="${ROOT}usr/kde/${_kdedir}"
397 else 406 else
398 KDEDIR="/usr" 407 KDEDIR="${ROOT}usr"
399 fi 408 fi
400 PREFIX="${PREFIX:-${KDEDIR}}" 409 PREFIX="${PREFIX:-${KDEDIR}}"
401 else 410 else
402 # Determine KDEDIR by loooking for the closest match with KDE_MINIMAL 411 # Determine KDEDIR by loooking for the closest match with KDE_MINIMAL
403 KDEDIR= 412 KDEDIR=
404 local kde_minimal_met 413 local kde_minimal_met
405 for slot in ${KDE_SLOTS[@]} ${KDE_LIVE_SLOTS[@]}; do 414 for slot in ${KDE_SLOTS[@]} ${KDE_LIVE_SLOTS[@]}; do
406 [[ -z ${kde_minimal_met} ]] && [[ ${slot} = ${KDE_MINIMAL} ]] && kde_minimal_met=1 415 [[ -z ${kde_minimal_met} ]] && [[ ${slot} = ${KDE_MINIMAL} ]] && kde_minimal_met=1
407 if [[ -n ${kde_minimal_met} ]] && has_version "kde-base/kdelibs:${slot}"; then 416 if [[ -n ${kde_minimal_met} ]] && has_version "kde-base/kdelibs:${slot}"; then
408 if has_version "kde-base/kdelibs:${slot}[kdeprefix]"; then 417 if has_version "kde-base/kdelibs:${slot}[kdeprefix]"; then
409 KDEDIR="/usr/kde/${slot}" 418 KDEDIR="${ROOT}usr/kde/${slot}"
410 else 419 else
411 KDEDIR="/usr" 420 KDEDIR="${ROOT}usr"
412 fi 421 fi
413 break; 422 break;
414 fi 423 fi
415 done 424 done
416 unset slot 425 unset slot
417 [[ -z KDEDIR ]] && die "Failed to determine KDEDIR!" 426 [[ -z KDEDIR ]] && die "Failed to determine KDEDIR!"
418 PREFIX="${PREFIX:-/usr}" 427 PREFIX="${PREFIX:-${ROOT}usr}"
419 fi 428 fi
420 429
421 # Not needed anymore 430 # Not needed anymore
422 unset _kdedir 431 unset _kdedir
423} 432}
447 # Only enable selected languages, used for KDE extragear apps. 456 # Only enable selected languages, used for KDE extragear apps.
448 if [[ -n ${KDE_LINGUAS} ]]; then 457 if [[ -n ${KDE_LINGUAS} ]]; then
449 enable_selected_linguas 458 enable_selected_linguas
450 fi 459 fi
451 460
461 [[ ${BUILD_TYPE} = live ]] && subversion_src_prepare
452 base_src_prepare 462 base_src_prepare
453 [[ ${BUILD_TYPE} = live ]] && subversion_src_prepare
454 463
455 # Save library dependencies 464 # Save library dependencies
456 if [[ -n ${KMSAVELIBS} ]] ; then 465 if [[ -n ${KMSAVELIBS} ]] ; then
457 save_library_dependencies 466 save_library_dependencies
458 fi 467 fi
475 fi 484 fi
476 485
477 # Build tests in src_test only, where we override this value 486 # Build tests in src_test only, where we override this value
478 local cmakeargs="-DKDE4_BUILD_TESTS=OFF" 487 local cmakeargs="-DKDE4_BUILD_TESTS=OFF"
479 488
489 # set "real" debug mode
490 if has debug ${IUSE//+} && use debug; then
491 CMAKE_BUILD_TYPE="Debugfull"
492 fi
493
480 # Set distribution name 494 # Set distribution name
481 [[ ${PN} = kdelibs ]] && cmakeargs="${cmakeargs} -DKDE_DISTRIBUTION_TEXT=Gentoo" 495 [[ ${PN} = kdelibs ]] && cmakeargs="${cmakeargs} -DKDE_DISTRIBUTION_TEXT=Gentoo"
482 496
483 # Here we set the install prefix 497 # Here we set the install prefix
484 cmakeargs="${cmakeargs} -DCMAKE_INSTALL_PREFIX=${PREFIX}" 498 cmakeargs="${cmakeargs} -DCMAKE_INSTALL_PREFIX=${PREFIX}"
491 export PKG_CONFIG_PATH="${KDEDIR}/$(get_libdir)/pkgconfig${PKG_CONFIG_PATH:+:${PKG_CONFIG_PATH}}" 505 export PKG_CONFIG_PATH="${KDEDIR}/$(get_libdir)/pkgconfig${PKG_CONFIG_PATH:+:${PKG_CONFIG_PATH}}"
492 506
493 # Shadow existing /usr installations 507 # Shadow existing /usr installations
494 unset KDEDIRS 508 unset KDEDIRS
495 509
496 if [[ ${KDEDIR} != /usr ]]; then 510 if [[ ${KDEDIR} != "${ROOT}usr" ]]; then
497 # Override some environment variables - only when kdeprefix is different, 511 # Override some environment variables - only when kdeprefix is different,
498 # to not break ccache/distcc 512 # to not break ccache/distcc
499 PATH="${KDEDIR}/bin:${PATH}" 513 PATH="${KDEDIR}/bin:${PATH}"
500 LDPATH="${KDEDIR}/$(get_libdir):${LDPATH}" 514 LDPATH="${KDEDIR}/$(get_libdir):${LDPATH}"
501 515
507 # Set cmake prefixes to allow buildsystem to localize valid KDE installation 521 # Set cmake prefixes to allow buildsystem to localize valid KDE installation
508 # when more are present 522 # when more are present
509 cmakeargs="${cmakeargs} -DCMAKE_SYSTEM_PREFIX_PATH=${KDEDIR}" 523 cmakeargs="${cmakeargs} -DCMAKE_SYSTEM_PREFIX_PATH=${KDEDIR}"
510 else 524 else
511 # If prefix is /usr, sysconf needs to be /etc, not /usr/etc 525 # If prefix is /usr, sysconf needs to be /etc, not /usr/etc
512 cmakeargs="${cmakeargs} -DSYSCONF_INSTALL_DIR=/etc" 526 cmakeargs="${cmakeargs} -DSYSCONF_INSTALL_DIR=${ROOT}etc"
513 fi 527 fi
514 528
515 mycmakeargs="${cmakeargs} ${mycmakeargs}" 529 mycmakeargs="${cmakeargs} ${mycmakeargs}"
516 530
517 cmake-utils_src_configure 531 cmake-utils_src_configure
573 newdoc "$doc_complete" "${doc%/*}.${doc##*/}" 587 newdoc "$doc_complete" "${doc%/*}.${doc##*/}"
574 fi 588 fi
575 done 589 done
576 fi 590 fi
577 591
578 if [[ -n ${KDEBASE} ]] && [[ -d "${D}/usr/share/doc/${PF}" ]]; then 592 if [[ -n ${KDEBASE} ]] && [[ -d "${D}${ROOT}usr/share/doc/${PF}" ]]; then
579 # work around bug #97196 593 # work around bug #97196
580 dodir /usr/share/doc/KDE4 && \ 594 dodir /usr/share/doc/KDE4 && \
581 mv "${D}/usr/share/doc/${PF}" "${D}"/usr/share/doc/KDE4/ || \ 595 mv "${D}${ROOT}usr/share/doc/${PF}" "${D}${ROOT}usr/share/doc/KDE4/" || \
582 die "Failed to move docs to KDE4/." 596 die "Failed to move docs to KDE4/."
583 fi 597 fi
584} 598}
585 599
586# @FUNCTION: kde4-base_pkg_postinst 600# @FUNCTION: kde4-base_pkg_postinst

Legend:
Removed from v.1.37  
changed lines
  Added in v.1.38

  ViewVC Help
Powered by ViewVC 1.1.20