/[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.57 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.57 2009/12/14 19:44:15 abcd 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
119 IUSE+=" kdeprefix" 119 IUSE+=" kdeprefix"
120 fi 120 fi
121 # Determine SLOT from PVs 121 # Determine SLOT from PVs
122 case ${PV} in 122 case ${PV} in
123 *.9999*) SLOT="${PV/.9999*/}" ;; # stable live 123 *.9999*) SLOT="${PV/.9999*/}" ;; # stable live
124 4.5* | 4.4.[6-9]*) SLOT="4.5" ;;
124 4.4* | 4.3.[6-9]*) SLOT="4.4" ;; 125 4.4* | 4.3.[6-9]*) SLOT="4.4" ;;
125 4.3*) SLOT="4.3" ;; 126 4.3*) SLOT="4.3" ;;
126 4.2*) SLOT="4.2" ;;
127 9999*) SLOT="live" ;; # regular live 127 9999*) SLOT="live" ;; # regular live
128 *) die "Unsupported ${PV}" ;; 128 *) die "Unsupported ${PV}" ;;
129 esac 129 esac
130 # This code is to prevent portage from searching GENTOO_MIRRORS for 130 # This code is to prevent portage from searching GENTOO_MIRRORS for
131 # 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
384 fi 384 fi
385 _kmname_pv="${_kmname}-${PV}" 385 _kmname_pv="${_kmname}-${PV}"
386 case ${KDEBASE} in 386 case ${KDEBASE} in
387 kde-base) 387 kde-base)
388 case ${PV} in 388 case ${PV} in
389 4.3.8[05] | 4.3.9[0568]) 389 4.[34].8[05] | 4.[34].9[0568])
390 # block for normally packed unstable releases 390 # block for normally packed unstable releases
391 SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.bz2" ;; 391 SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.bz2" ;;
392 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 393 # Repacked tarballs: need to depend on xz-utils to ensure that they can be unpacked
394 SRC_URI="http://dev.gentooexperimental.org/~alexxy/kde/${PV}/${_kmname_pv}.tar.xz" 394 SRC_URI="http://dev.gentooexperimental.org/~alexxy/kde/${PV}/${_kmname_pv}.tar.xz"
395 DEPEND+=" app-arch/xz-utils" 395 DEPEND+=" app-arch/xz-utils"
396 ;; 396 ;;
397 *) SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.bz2" ;; 397 *) SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.bz2" ;;
491 debug-print-function ${FUNCNAME} "$@" 491 debug-print-function ${FUNCNAME} "$@"
492 492
493 if [[ ${BUILD_TYPE} = live ]]; then 493 if [[ ${BUILD_TYPE} = live ]]; then
494 migrate_store_dir 494 migrate_store_dir
495 subversion_src_unpack 495 subversion_src_unpack
496 elif [[ ${EAPI} == [23] ]]; then 496 elif [[ ${EAPI} == 2 ]]; then
497 local file 497 local file
498 for file in ${A}; do 498 for file in ${A}; do
499 # This setup is because EAPI <= 3 cannot unpack *.tar.xz files 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) 500 # directly, so we do it ourselves (using the exact same code as portage)
501 case ${file} in 501 case ${file} in
502 *.tar.xz) 502 *.tar.xz)
503 echo ">>> Unpacking ${file} to ${PWD}" 503 echo ">>> Unpacking ${file} to ${PWD}"
504 xz -dc "${DISTDIR}"/${file} | tar xof - 504 xz -dc "${DISTDIR}"/${file} | tar xof -
508 unpack ${file} 508 unpack ${file}
509 ;; 509 ;;
510 esac 510 esac
511 done 511 done
512 else 512 else
513 # For EAPI >= 4, we can just use unpack() directly 513 # For EAPI >= 3, we can just use unpack() directly
514 unpack ${A} 514 unpack ${A}
515 fi 515 fi
516} 516}
517 517
518# @FUNCTION: kde4-base_src_prepare 518# @FUNCTION: kde4-base_src_prepare
535 if ! has kde4-meta ${INHERITED}; then 535 if ! has kde4-meta ${INHERITED}; then
536 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
537 fi 537 fi
538 538
539 [[ ${BUILD_TYPE} = live ]] && subversion_src_prepare 539 [[ ${BUILD_TYPE} = live ]] && subversion_src_prepare
540
541 # Apply patches
540 base_src_prepare 542 base_src_prepare
543 epatch_user
541 544
542 # Save library dependencies 545 # Save library dependencies
543 if [[ -n ${KMSAVELIBS} ]] ; then 546 if [[ -n ${KMSAVELIBS} ]] ; then
544 save_library_dependencies 547 save_library_dependencies
545 fi 548 fi
672 local doc_complete=${doc} 675 local doc_complete=${doc}
673 doc="${doc#*/}" 676 doc="${doc#*/}"
674 newdoc "$doc_complete" "${doc%/*}.${doc##*/}" 677 newdoc "$doc_complete" "${doc%/*}.${doc##*/}"
675 fi 678 fi
676 done 679 done
677 fi
678
679 [[ -z ${ED} ]] && ED=${D}
680
681 if [[ -n ${KDEBASE} ]] && [[ -d ${ED}usr/share/doc/${PF} ]]; then
682 # work around bug #97196
683 dodir /usr/share/doc/KDE4 && \
684 cp -r "${ED}usr/share/doc/${PF}" "${ED}usr/share/doc/KDE4/" || \
685 die "Failed to move docs to KDE4/."
686 rm -rf "${ED}usr/share/doc/${PF}"
687 fi 680 fi
688} 681}
689 682
690# @FUNCTION: kde4-base_pkg_postinst 683# @FUNCTION: kde4-base_pkg_postinst
691# @DESCRIPTION: 684# @DESCRIPTION:
709 ewarn "with KDE update strategies." 702 ewarn "with KDE update strategies."
710 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"
711 ewarn "take responsibilities for dead kittens." 704 ewarn "take responsibilities for dead kittens."
712 echo 705 echo
713 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
714} 717}
715 718
716# @FUNCTION: kde4-base_pkg_postrm 719# @FUNCTION: kde4-base_pkg_postrm
717# @DESCRIPTION: 720# @DESCRIPTION:
718# 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.57  
changed lines
  Added in v.1.58

  ViewVC Help
Powered by ViewVC 1.1.20