/[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.119 Revision 1.120
1# Copyright 1999-2012 Gentoo Foundation 1# Copyright 1999-2012 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.119 2012/06/22 09:19:46 kensington Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-base.eclass,v 1.120 2012/08/01 19:38:52 johu 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
31# for tests you should proceed with setting VIRTUALX_REQUIRED=test. 31# for tests you should proceed with setting VIRTUALX_REQUIRED=test.
32: ${VIRTUALX_REQUIRED:=manual} 32: ${VIRTUALX_REQUIRED:=manual}
33 33
34inherit kde4-functions toolchain-funcs fdo-mime flag-o-matic gnome2-utils base virtualx versionator eutils multilib 34inherit kde4-functions toolchain-funcs fdo-mime flag-o-matic gnome2-utils base virtualx versionator eutils multilib
35 35
36if [[ ${BUILD_TYPE} = live ]]; then 36if [[ ${KDE_BUILD_TYPE} = live ]]; then
37 case ${KDE_SCM} in 37 case ${KDE_SCM} in
38 svn) inherit subversion ;; 38 svn) inherit subversion ;;
39 git) inherit git-2 ;; 39 git) inherit git-2 ;;
40 esac 40 esac
41fi 41fi
68 ;; 68 ;;
69 koffice) 69 koffice)
70 SLOT="2" 70 SLOT="2"
71 ;; 71 ;;
72 kdevelop) 72 kdevelop)
73 if [[ ${BUILD_TYPE} = live ]]; then 73 if [[ ${KDE_BUILD_TYPE} = live ]]; then
74 # @ECLASS-VARIABLE: KDEVELOP_VERSION 74 # @ECLASS-VARIABLE: KDEVELOP_VERSION
75 # @DESCRIPTION: 75 # @DESCRIPTION:
76 # Specifies KDevelop version. Default is 4.0.0 for tagged packages and 9999 for live packages. 76 # Specifies KDevelop version. Default is 4.0.0 for tagged packages and 9999 for live packages.
77 # Applies to KDEBASE=kdevelop only. 77 # Applies to KDEBASE=kdevelop only.
78 KDEVELOP_VERSION="${KDEVELOP_VERSION:-9999}" 78 KDEVELOP_VERSION="${KDEVELOP_VERSION:-9999}"
157# @ECLASS-VARIABLE: KDE_LINGUAS_LIVE_OVERRIDE 157# @ECLASS-VARIABLE: KDE_LINGUAS_LIVE_OVERRIDE
158# @DESCRIPTION: 158# @DESCRIPTION:
159# Set this varible if you want your live package to manage its 159# Set this varible if you want your live package to manage its
160# translations. (Mostly all kde ebuilds does not ship documentation 160# translations. (Mostly all kde ebuilds does not ship documentation
161# and translations in live ebuilds) 161# and translations in live ebuilds)
162if [[ ${BUILD_TYPE} == live && -z ${KDE_LINGUAS_LIVE_OVERRIDE} ]]; then 162if [[ ${KDE_BUILD_TYPE} == live && -z ${KDE_LINGUAS_LIVE_OVERRIDE} ]]; then
163 # Kdebase actualy provides the handbooks even for live stuff 163 # Kdebase actualy provides the handbooks even for live stuff
164 [[ ${KDEBASE} == kde-base ]] || KDE_HANDBOOK=never 164 [[ ${KDEBASE} == kde-base ]] || KDE_HANDBOOK=never
165 KDE_LINGUAS="" 165 KDE_LINGUAS=""
166fi 166fi
167 167
168# Setup packages inheriting this eclass 168# Setup packages inheriting this eclass
169case ${KDEBASE} in 169case ${KDEBASE} in
170 kde-base) 170 kde-base)
171 HOMEPAGE="http://www.kde.org/" 171 HOMEPAGE="http://www.kde.org/"
172 LICENSE="GPL-2" 172 LICENSE="GPL-2"
173 if [[ ${BUILD_TYPE} = live && -z ${I_KNOW_WHAT_I_AM_DOING} ]]; then 173 if [[ ${KDE_BUILD_TYPE} = live && -z ${I_KNOW_WHAT_I_AM_DOING} ]]; then
174 # Disable tests for live ebuilds by default 174 # Disable tests for live ebuilds by default
175 RESTRICT+=" test" 175 RESTRICT+=" test"
176 fi 176 fi
177 177
178 # Only add the kdeprefix USE flag for older versions, to help 178 # Only add the kdeprefix USE flag for older versions, to help
448 case ${PV} in 448 case ${PV} in
449 4.4.11.1) 449 4.4.11.1)
450 # KDEPIM 4.4, special case 450 # KDEPIM 4.4, special case
451 # TODO: Remove this part when KDEPIM 4.4 gets out of the tree 451 # TODO: Remove this part when KDEPIM 4.4 gets out of the tree
452 SRC_URI="mirror://kde/stable/kdepim-${PV}/src/${_kmname_pv}.tar.bz2" ;; 452 SRC_URI="mirror://kde/stable/kdepim-${PV}/src/${_kmname_pv}.tar.bz2" ;;
453 4.[4567].8[05] | 4.[4567].9[0235678]) 453 4.[89].8[05] | 4.[89].9[0235678])
454 # Unstable KDE SC releases 454 # Unstable KDE SC releases
455 SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.xz" ;;
456 4.[1234567].[12345])
457 # Stable KDE SC with old .bz2 support
455 SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.bz2" ;; 458 SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.bz2" ;;
456 4.8.[12345])
457 # Stable KDE SC releases with .xz support
458 SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.xz" ;;
459 4.[89].8[05] | 4.[89].9[0235678]) 459 4.[89].8[05] | 4.[89].9[0235678])
460 # Unstable KDE SC releases 460 # Unstable KDE SC releases
461 SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.xz" ;; 461 SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.xz" ;;
462 *) 462 *)
463 # Stable KDE SC releases 463 # Stable KDE SC releases
464 SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.bz2" ;; 464 SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.xz" ;;
465 esac 465 esac
466 ;; 466 ;;
467 koffice) 467 koffice)
468 case ${PV} in 468 case ${PV} in
469 2.[1234].[6-9]*) SRC_URI="mirror://kde/unstable/${_kmname_pv}/${_kmname_pv}.tar.bz2" ;; 469 2.[1234].[6-9]*) SRC_URI="mirror://kde/unstable/${_kmname_pv}/${_kmname_pv}.tar.bz2" ;;
588 debug-print "${FUNCNAME}: Branch: ${EGIT_BRANCH}" 588 debug-print "${FUNCNAME}: Branch: ${EGIT_BRANCH}"
589 ;; 589 ;;
590 esac 590 esac
591} 591}
592 592
593case ${BUILD_TYPE} in 593case ${KDE_BUILD_TYPE} in
594 live) _calculate_live_repo ;; 594 live) _calculate_live_repo ;;
595 *) _calculate_src_uri ;; 595 *) _calculate_src_uri ;;
596esac 596esac
597 597
598debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: SRC_URI is ${SRC_URI}" 598debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: SRC_URI is ${SRC_URI}"
660# @DESCRIPTION: 660# @DESCRIPTION:
661# This function unpacks the source tarballs for KDE4 applications. 661# This function unpacks the source tarballs for KDE4 applications.
662kde4-base_src_unpack() { 662kde4-base_src_unpack() {
663 debug-print-function ${FUNCNAME} "$@" 663 debug-print-function ${FUNCNAME} "$@"
664 664
665 if [[ ${BUILD_TYPE} = live ]]; then 665 if [[ ${KDE_BUILD_TYPE} = live ]]; then
666 case ${KDE_SCM} in 666 case ${KDE_SCM} in
667 svn) 667 svn)
668 migrate_store_dir 668 migrate_store_dir
669 subversion_src_unpack 669 subversion_src_unpack
670 ;; 670 ;;
714 enable_selected_doc_linguas 714 enable_selected_doc_linguas
715 fi 715 fi
716 fi 716 fi
717 717
718 # SCM bootstrap 718 # SCM bootstrap
719 if [[ ${BUILD_TYPE} = live ]]; then 719 if [[ ${KDE_BUILD_TYPE} = live ]]; then
720 case ${KDE_SCM} in 720 case ${KDE_SCM} in
721 svn) subversion_src_prepare ;; 721 svn) subversion_src_prepare ;;
722 esac 722 esac
723 fi 723 fi
724 724
753 # Build tests in src_test only, where we override this value 753 # Build tests in src_test only, where we override this value
754 local cmakeargs=(-DKDE4_BUILD_TESTS=OFF) 754 local cmakeargs=(-DKDE4_BUILD_TESTS=OFF)
755 755
756 if use_if_iuse debug; then 756 if use_if_iuse debug; then
757 # Set "real" debug mode 757 # Set "real" debug mode
758 CMAKE_BUILD_TYPE="Debugfull" 758 CMAKE_KDE_BUILD_TYPE="Debugfull"
759 else 759 else
760 # Handle common release builds 760 # Handle common release builds
761 append-cppflags -DQT_NO_DEBUG 761 append-cppflags -DQT_NO_DEBUG
762 fi 762 fi
763 763
890# Function storing icon caches 890# Function storing icon caches
891kde4-base_pkg_preinst() { 891kde4-base_pkg_preinst() {
892 debug-print-function ${FUNCNAME} "$@" 892 debug-print-function ${FUNCNAME} "$@"
893 893
894 gnome2_icon_savelist 894 gnome2_icon_savelist
895 if [[ ${BUILD_TYPE} == live && ${KDE_SCM} == svn ]]; then 895 if [[ ${KDE_BUILD_TYPE} == live && ${KDE_SCM} == svn ]]; then
896 subversion_pkg_preinst 896 subversion_pkg_preinst
897 fi 897 fi
898} 898}
899 899
900# @FUNCTION: kde4-base_pkg_postinst 900# @FUNCTION: kde4-base_pkg_postinst
907 fdo-mime_desktop_database_update 907 fdo-mime_desktop_database_update
908 fdo-mime_mime_database_update 908 fdo-mime_mime_database_update
909 buildsycoca 909 buildsycoca
910 910
911 if [[ -z ${I_KNOW_WHAT_I_AM_DOING} ]]; then 911 if [[ -z ${I_KNOW_WHAT_I_AM_DOING} ]]; then
912 if [[ ${BUILD_TYPE} = live ]]; then 912 if [[ ${KDE_BUILD_TYPE} = live ]]; then
913 echo 913 echo
914 einfo "WARNING! This is an experimental live ebuild of ${CATEGORY}/${PN}" 914 einfo "WARNING! This is an experimental live ebuild of ${CATEGORY}/${PN}"
915 einfo "Use it at your own risk." 915 einfo "Use it at your own risk."
916 einfo "Do _NOT_ file bugs at bugs.gentoo.org because of this ebuild!" 916 einfo "Do _NOT_ file bugs at bugs.gentoo.org because of this ebuild!"
917 echo 917 echo

Legend:
Removed from v.1.119  
changed lines
  Added in v.1.120

  ViewVC Help
Powered by ViewVC 1.1.20