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

Diff of /eclass/kde4-meta.eclass

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

Revision 1.28 Revision 1.31
1# Copyright 1999-2009 Gentoo Foundation 1# Copyright 1999-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-meta.eclass,v 1.28 2009/12/01 10:56:17 scarabeus Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-meta.eclass,v 1.31 2009/12/14 19:44:15 abcd Exp $
4# 4#
5# @ECLASS: kde4-meta.eclass 5# @ECLASS: kde4-meta.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# kde@gentoo.org 7# kde@gentoo.org
8# @BLURB: Eclass for writing "split" KDE packages. 8# @BLURB: Eclass for writing "split" KDE packages.
14 14
15inherit kde4-base versionator 15inherit kde4-base versionator
16 16
17EXPORT_FUNCTIONS pkg_setup src_unpack src_prepare src_configure src_compile src_test src_install pkg_postinst pkg_postrm 17EXPORT_FUNCTIONS pkg_setup src_unpack src_prepare src_configure src_compile src_test src_install pkg_postinst pkg_postrm
18 18
19if [[ -z ${KMNAME} ]]; then
20 die "kde4-meta.eclass inherited but KMNAME not defined - broken ebuild" 19[[ -z ${KMNAME} ]] && die "kde4-meta.eclass inherited but KMNAME not defined - broken ebuild"
20
21# Add khelpcenter dependency when installing handbooks
22if [[ ${PN} != khelpcenter ]] && has handbook ${IUSE//+}; then
23 RDEPEND+=" handbook? ( $(add_kdebase_dep khelpcenter) )"
21fi 24fi
22 25
23# Add dependencies that all packages in a certain module share. 26# Add dependencies that all packages in a certain module share.
24case ${KMNAME} in 27case ${KMNAME} in
25 kdebase|kdebase-apps|kdebase-workspace|kdebase-runtime|kdegraphics) 28 kdebase|kdebase-apps|kdebase-workspace|kdebase-runtime|kdegraphics)
28 kdepim|kdepim-runtime) 31 kdepim|kdepim-runtime)
29 COMMONDEPEND+=" $(add_kdebase_dep kdepimlibs)" 32 COMMONDEPEND+=" $(add_kdebase_dep kdepimlibs)"
30 case ${PN} in 33 case ${PN} in
31 akregator|kaddressbook|kjots|kmail|knode|knotes|korganizer|ktimetracker) 34 akregator|kaddressbook|kjots|kmail|knode|knotes|korganizer|ktimetracker)
32 IUSE+=" +kontact" 35 IUSE+=" +kontact"
33 if ! slot_is_at_least 4.4 ${SLOT} || [[ ${SLOT} == 4.4 && ${PV} < 4.3.68 ]]; then 36 if ! slot_is_at_least 4.4 ${SLOT}; then
34 RDEPEND+=" kontact? ( $(add_kdebase_dep kontactinterfaces) )" 37 RDEPEND+=" kontact? ( $(add_kdebase_dep kontactinterfaces) )"
35 fi 38 fi
36 ;; 39 ;;
37 esac 40 esac
38 ;; 41 ;;
206 "${S}"/CMakeLists.txt || die "Sed to exclude bin/kde4 failed" 209 "${S}"/CMakeLists.txt || die "Sed to exclude bin/kde4 failed"
207 fi 210 fi
208 else 211 else
209 local abort tarball tarfile f extractlist moduleprefix postfix 212 local abort tarball tarfile f extractlist moduleprefix postfix
210 case ${PV} in 213 case ${PV} in
211 4.3.85 | 4.3.9[0568]) 214 4.3.8[05] | 4.3.9[0568])
212 # block for normally packed upstream unstable snapshots 215 # block for normally packed upstream unstable snapshots
213 KMTARPARAMS+=" --bzip2" # bz2 216 KMTARPARAMS+=" --bzip2" # bz2
214 postfix="bz2" 217 postfix="bz2"
215 ;; 218 ;;
216 4.3.[6-9]*) 219 4.3.[6-9]*)
348 KMEXTRACTONLY+=" 351 KMEXTRACTONLY+="
349 kleopatra/ConfigureChecks.cmake" 352 kleopatra/ConfigureChecks.cmake"
350 if has kontact ${IUSE//+} && use kontact; then 353 if has kontact ${IUSE//+} && use kontact; then
351 KMEXTRA+=" 354 KMEXTRA+="
352 kontact/plugins/${PLUGINNAME:-${PN}}/" 355 kontact/plugins/${PLUGINNAME:-${PN}}/"
353 if ! slot_is_at_least 4.4 ${SLOT} || [[ ${SLOT} == 4.4 && ${PV} < 4.3.68 ]]; then 356 if ! slot_is_at_least 4.4 ${SLOT}; then
354 KMEXTRACTONLY+=" 357 KMEXTRACTONLY+="
355 kontactinterfaces/" 358 kontactinterfaces/"
356 fi 359 fi
357 fi 360 fi
358 ;; 361 ;;
629# Currently just calls its equivalent in kde4-base.eclass(5). Use this one in split 632# Currently just calls its equivalent in kde4-base.eclass(5). Use this one in split
630# ebuilds. 633# ebuilds.
631kde4-meta_src_configure() { 634kde4-meta_src_configure() {
632 debug-print-function ${FUNCNAME} "$@" 635 debug-print-function ${FUNCNAME} "$@"
633 636
637 # backwards-compatibility: make mycmakeargs an array, if it isn't already
638 if [[ $(declare -p mycmakeargs 2>&-) != "declare -a mycmakeargs="* ]]; then
639 mycmakeargs=(${mycmakeargs})
640 fi
641
634 # Set some cmake default values here (usually workarounds for automagic deps) 642 # Set some cmake default values here (usually workarounds for automagic deps)
635 case ${KMNAME} in 643 case ${KMNAME} in
636 kdewebdev) 644 kdewebdev)
637 mycmakeargs=" 645 mycmakeargs=(
638 -DWITH_KdepimLibs=OFF 646 -DWITH_KdepimLibs=OFF
639 -DWITH_LibXml2=OFF 647 -DWITH_LibXml2=OFF
640 -DWITH_LibXslt=OFF 648 -DWITH_LibXslt=OFF
641 -DWITH_Boost=OFF 649 -DWITH_Boost=OFF
642 -DWITH_LibTidy=OFF 650 -DWITH_LibTidy=OFF
643 ${mycmakeargs}" 651 "${mycmakeargs[@]}"
652 )
644 ;; 653 ;;
645 esac 654 esac
646 655
647 kde4-base_src_configure 656 kde4-base_src_configure
648} 657}
657 kde4-base_src_compile "$@" 666 kde4-base_src_compile "$@"
658} 667}
659 668
660# @FUNCTION: kde4-meta_src_test 669# @FUNCTION: kde4-meta_src_test
661# @DESCRIPTION: 670# @DESCRIPTION:
662# Currently just calls its equivalent in kde4-base.eclass(5). Use this in split 671# Currently just calls its equivalent in kde4-base.eclass(5) if
663# ebuilds. 672# I_KNOW_WHAT_I_AM_DOING is set. Use this in split ebuilds.
664kde4-meta_src_test() { 673kde4-meta_src_test() {
665 debug-print-function $FUNCNAME "$@" 674 debug-print-function $FUNCNAME "$@"
666 675
676 if [[ $I_KNOW_WHAT_I_AM_DOING ]]; then
667 kde4-base_src_test 677 kde4-base_src_test
678 else
679 einfo "Tests disabled"
680 fi
668} 681}
669 682
670# @FUNCTION: kde4-meta_src_install 683# @FUNCTION: kde4-meta_src_install
671# @DESCRIPTION: 684# @DESCRIPTION:
672# Function for installing KDE4 split applications. 685# Function for installing KDE4 split applications.

Legend:
Removed from v.1.28  
changed lines
  Added in v.1.31

  ViewVC Help
Powered by ViewVC 1.1.20