/[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.27 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.27 2009/10/27 14:16:49 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"
21fi
22 20
23# Add khelpcenter dependency when installing handbooks 21# Add khelpcenter dependency when installing handbooks
24if [[ ${PN} != khelpcenter ]] && has handbook ${IUSE//+}; then 22if [[ ${PN} != khelpcenter ]] && has handbook ${IUSE//+}; then
25 RDEPEND+=" handbook? ( $(add_kdebase_dep khelpcenter) )" 23 RDEPEND+=" handbook? ( $(add_kdebase_dep khelpcenter) )"
26fi 24fi
29case ${KMNAME} in 27case ${KMNAME} in
30 kdebase|kdebase-apps|kdebase-workspace|kdebase-runtime|kdegraphics) 28 kdebase|kdebase-apps|kdebase-workspace|kdebase-runtime|kdegraphics)
31 COMMONDEPEND+=" >=kde-base/qimageblitz-0.0.4" 29 COMMONDEPEND+=" >=kde-base/qimageblitz-0.0.4"
32 ;; 30 ;;
33 kdepim|kdepim-runtime) 31 kdepim|kdepim-runtime)
34 COMMONDEPEND+="
35 dev-libs/boost
36 $(add_kdebase_dep kdepimlibs) 32 COMMONDEPEND+=" $(add_kdebase_dep kdepimlibs)"
37 "
38 case ${PN} in 33 case ${PN} in
39 akregator|kaddressbook|kjots|kmail|knode|knotes|korganizer|ktimetracker) 34 akregator|kaddressbook|kjots|kmail|knode|knotes|korganizer|ktimetracker)
40 IUSE+=" +kontact" 35 IUSE+=" +kontact"
41 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
42 RDEPEND+=" kontact? ( $(add_kdebase_dep kontactinterfaces) )" 37 RDEPEND+=" kontact? ( $(add_kdebase_dep kontactinterfaces) )"
43 fi 38 fi
44 ;; 39 ;;
45 esac 40 esac
46 ;; 41 ;;
214 "${S}"/CMakeLists.txt || die "Sed to exclude bin/kde4 failed" 209 "${S}"/CMakeLists.txt || die "Sed to exclude bin/kde4 failed"
215 fi 210 fi
216 else 211 else
217 local abort tarball tarfile f extractlist moduleprefix postfix 212 local abort tarball tarfile f extractlist moduleprefix postfix
218 case ${PV} in 213 case ${PV} in
219 4.3.85 | 4.3.9[0568]) 214 4.3.8[05] | 4.3.9[0568])
220 # block for normally packed upstream unstable snapshots 215 # block for normally packed upstream unstable snapshots
221 KMTARPARAMS+=" --bzip2" # bz2 216 KMTARPARAMS+=" --bzip2" # bz2
222 postfix="bz2" 217 postfix="bz2"
223 ;; 218 ;;
224 4.3.[6-9]*) 219 4.3.[6-9]*)
225 KMTARPARAMS+=" --lzma" # lzma 220 # Not passing --xz, as it doesn't work with stable tar
221 KMTARPARAMS+=" --use-compress-program=xz" # xz
226 postfix="lzma" 222 postfix="xz"
227 ;; 223 ;;
228 *) 224 *)
229 KMTARPARAMS+=" --bzip2" # bz2 225 KMTARPARAMS+=" --bzip2" # bz2
230 postfix="bz2" 226 postfix="bz2"
231 ;; 227 ;;
355 KMEXTRACTONLY+=" 351 KMEXTRACTONLY+="
356 kleopatra/ConfigureChecks.cmake" 352 kleopatra/ConfigureChecks.cmake"
357 if has kontact ${IUSE//+} && use kontact; then 353 if has kontact ${IUSE//+} && use kontact; then
358 KMEXTRA+=" 354 KMEXTRA+="
359 kontact/plugins/${PLUGINNAME:-${PN}}/" 355 kontact/plugins/${PLUGINNAME:-${PN}}/"
360 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
361 KMEXTRACTONLY+=" 357 KMEXTRACTONLY+="
362 kontactinterfaces/" 358 kontactinterfaces/"
363 fi 359 fi
364 fi 360 fi
365 ;; 361 ;;
636# 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
637# ebuilds. 633# ebuilds.
638kde4-meta_src_configure() { 634kde4-meta_src_configure() {
639 debug-print-function ${FUNCNAME} "$@" 635 debug-print-function ${FUNCNAME} "$@"
640 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
641 # Set some cmake default values here (usually workarounds for automagic deps) 642 # Set some cmake default values here (usually workarounds for automagic deps)
642 case ${KMNAME} in 643 case ${KMNAME} in
643 kdewebdev) 644 kdewebdev)
644 mycmakeargs=" 645 mycmakeargs=(
645 -DWITH_KdepimLibs=OFF 646 -DWITH_KdepimLibs=OFF
646 -DWITH_LibXml2=OFF 647 -DWITH_LibXml2=OFF
647 -DWITH_LibXslt=OFF 648 -DWITH_LibXslt=OFF
648 -DWITH_Boost=OFF 649 -DWITH_Boost=OFF
649 -DWITH_LibTidy=OFF 650 -DWITH_LibTidy=OFF
650 ${mycmakeargs}" 651 "${mycmakeargs[@]}"
652 )
651 ;; 653 ;;
652 esac 654 esac
653 655
654 kde4-base_src_configure 656 kde4-base_src_configure
655} 657}
664 kde4-base_src_compile "$@" 666 kde4-base_src_compile "$@"
665} 667}
666 668
667# @FUNCTION: kde4-meta_src_test 669# @FUNCTION: kde4-meta_src_test
668# @DESCRIPTION: 670# @DESCRIPTION:
669# 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
670# ebuilds. 672# I_KNOW_WHAT_I_AM_DOING is set. Use this in split ebuilds.
671kde4-meta_src_test() { 673kde4-meta_src_test() {
672 debug-print-function $FUNCNAME "$@" 674 debug-print-function $FUNCNAME "$@"
673 675
676 if [[ $I_KNOW_WHAT_I_AM_DOING ]]; then
674 kde4-base_src_test 677 kde4-base_src_test
678 else
679 einfo "Tests disabled"
680 fi
675} 681}
676 682
677# @FUNCTION: kde4-meta_src_install 683# @FUNCTION: kde4-meta_src_install
678# @DESCRIPTION: 684# @DESCRIPTION:
679# Function for installing KDE4 split applications. 685# Function for installing KDE4 split applications.
698 kde4-base_src_make_doc 704 kde4-base_src_make_doc
699} 705}
700 706
701# @FUNCTION: kde4-meta_pkg_postinst 707# @FUNCTION: kde4-meta_pkg_postinst
702# @DESCRIPTION: 708# @DESCRIPTION:
703# Display information about application handbook and invoke kbuildsycoca4. 709# Invoke kbuildsycoca4.
704kde4-meta_pkg_postinst() { 710kde4-meta_pkg_postinst() {
705 debug-print-function ${FUNCNAME} "$@" 711 debug-print-function ${FUNCNAME} "$@"
706
707 if has handbook ${IUSE//+} && ! use handbook; then
708 echo
709 einfo "Application handbook for ${PN} has not been installed."
710 einfo "To install handbook, reemerge =${CATEGORY}/${PF} with 'handbook' USE flag."
711 echo
712 fi
713 712
714 kde4-base_pkg_postinst 713 kde4-base_pkg_postinst
715} 714}
716 715
717# @FUNCTION: kde4-meta_pkg_postrm 716# @FUNCTION: kde4-meta_pkg_postrm

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

  ViewVC Help
Powered by ViewVC 1.1.20