/[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.15 Revision 1.17
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.15 2009/03/12 17:53:05 scarabeus Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-meta.eclass,v 1.17 2009/04/13 00:02:45 scarabeus 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.
28 koffice) 28 koffice)
29 HOMEPAGE="http://www.koffice.org/" 29 HOMEPAGE="http://www.koffice.org/"
30 LICENSE="GPL-2" 30 LICENSE="GPL-2"
31 ;; 31 ;;
32esac 32esac
33
34# Add khelpcenter dependency when installing
35if [[ ${PN} != khelpcenter ]] && has doc ${IUSE//+} && use doc; then
36 RDEPEND="${RDEPEND}
37 >=kde-base/khelpcenter-${PV}:${SLOT}[kdeprefix=]
38 "
39fi
33 40
34# Add dependencies that all packages in a certain module share. 41# Add dependencies that all packages in a certain module share.
35case ${KMNAME} in 42case ${KMNAME} in
36 kdebase|kdebase-apps|kdebase-workspace|kdebase-runtime|kdegraphic) 43 kdebase|kdebase-apps|kdebase-workspace|kdebase-runtime|kdegraphic)
37 DEPEND="${DEPEND} 44 DEPEND="${DEPEND}
77 " 84 "
78 fi 85 fi
79 ;; 86 ;;
80 koffice) 87 koffice)
81 [[ ${PN} != koffice-data ]] && IUSE="debug" 88 [[ ${PN} != koffice-data ]] && IUSE="debug"
82 case ${PV} in
83 9999*)
84 DEPEND="${DEPEND}
85 !app-office/${PN}:2
86 "
87 ;;
88 1.9*|2*)
89 DEPEND="${DEPEND}
90 !app-office/${PN}:live
91 "
92 ;;
93 esac
94 DEPEND="${DEPEND} 89 RDEPEND="${RDEPEND}
90 !kdeprefix? (
95 !app-office/${PN}:0 91 !app-office/${PN}:0
96 !app-office/koffice:0 92 !app-office/koffice:0
97 !app-office/koffice-meta:0 93 !app-office/koffice-meta:0
94 )
98 " 95 "
99 case ${PN} in
100 koffice-data)
101 DEPEND="${DEPEND}
102 media-libs/lcms
103 "
104 RDEPEND="${RDEPEND}
105 media-libs/lcms
106 "
107 ;;
108 *)
109 COMMON_DEPEND=" 96 COMMON_DEPEND="
110 dev-cpp/eigen:2 97 dev-cpp/eigen:2
111 media-gfx/imagemagick[openexr?] 98 media-gfx/imagemagick[openexr?]
112 media-libs/fontconfig 99 media-libs/fontconfig
113 media-libs/freetype:2 100 media-libs/freetype:2
114 " 101 "
115 DEPEND="${DEPEND} ${COMMON_DEPEND}" 102 DEPEND="${DEPEND} ${COMMON_DEPEND}"
116 RDEPEND="${RDEPEND} ${COMMON_DEPEND}" 103 RDEPEND="${RDEPEND} ${COMMON_DEPEND}"
117 unset COMMON_DEPEND 104 unset COMMON_DEPEND
118 if [[ ${PN} != koffice-libs && ${PN} != koffice-data ]]; then 105 if [[ ${PN} != koffice-libs && ${PN} != koffice-data ]]; then
119 DEPEND="${DEPEND} 106 DEPEND="${DEPEND}
120 >=app-office/koffice-libs-${PV}:${SLOT}[kdeprefix=] 107 >=app-office/koffice-libs-${PV}:${SLOT}
121 " 108 "
122 RDEPEND="${RDEPEND} 109 RDEPEND="${RDEPEND}
123 >=app-office/koffice-libs-${PV}:${SLOT}[kdeprefix=] 110 >=app-office/koffice-libs-${PV}:${SLOT}
124 " 111 "
125 fi 112 fi
126 ;;
127 esac
128 ;; 113 ;;
129esac 114esac
130 115
131debug-print "line ${LINENO} ${ECLASS}: DEPEND ${DEPEND} - after metapackage-specific dependencies" 116debug-print "line ${LINENO} ${ECLASS}: DEPEND ${DEPEND} - after metapackage-specific dependencies"
132debug-print "line ${LINENO} ${ECLASS}: RDEPEND ${RDEPEND} - after metapackage-specific dependencies" 117debug-print "line ${LINENO} ${ECLASS}: RDEPEND ${RDEPEND} - after metapackage-specific dependencies"
135case ${BUILD_TYPE} in 120case ${BUILD_TYPE} in
136 live) 121 live)
137 case ${KMNAME} in 122 case ${KMNAME} in
138 extragear*|playground*) 123 extragear*|playground*)
139 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}" 124 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}"
125 ESVN_PROJECT="${KMNAME}"
140 ;; 126 ;;
141 esac 127 esac
142 ;; 128 ;;
143 *) ;;
144esac 129esac
145 130
146# @ECLASS-VARIABLE: KMNAME 131# @ECLASS-VARIABLE: KMNAME
147# @DESCRIPTION: 132# @DESCRIPTION:
148# Name of the parent-module (e.g. kdebase, kdepim, ...). You _must_ set it 133# Name of the parent-module (e.g. kdebase, kdepim, ...). You _must_ set it
343# Also see descriptions of KMMODULE, KMNOMODULE, KMEXTRA, KMCOMPILEONLY, 328# Also see descriptions of KMMODULE, KMNOMODULE, KMEXTRA, KMCOMPILEONLY,
344# KMEXTRACTONLY and KMTARPARAMS. 329# KMEXTRACTONLY and KMTARPARAMS.
345kde4-meta_create_extractlists() { 330kde4-meta_create_extractlists() {
346 debug-print-function ${FUNCNAME} "$@" 331 debug-print-function ${FUNCNAME} "$@"
347 332
348 if has htmlhandbook ${IUSE//+} && use htmlhandbook; then 333 # TODO change to KMEXTRA for more strict check
334 if has doc ${IUSE//+} && use doc && [[ -n ${KMMODULE} ]]; then
349 # We use the basename of $KMMODULE because $KMMODULE can contain 335 # We use the basename of $KMMODULE because $KMMODULE can contain
350 # the path to the module subdirectory. 336 # the path to the module subdirectory.
351 KMEXTRA_NONFATAL="${KMEXTRA_NONFATAL} doc/${KMMODULE##*/}" 337 KMEXTRA_NONFATAL="${KMEXTRA_NONFATAL} doc/${KMMODULE##*/}"
352 fi 338 fi
353 339
387 kdepim) 373 kdepim)
388 if [[ ${PN} != libkdepim ]]; then 374 if [[ ${PN} != libkdepim ]]; then
389 KMEXTRACTONLY="${KMEXTRACTONLY} 375 KMEXTRACTONLY="${KMEXTRACTONLY}
390 libkdepim" 376 libkdepim"
391 fi 377 fi
378 case ${SLOT} in
379 4.3|live)
380 KMEXTRACTONLY="${KMEXTRACTONLY}
381 kdepim-version.h
382 config-enterprise.h.cmake"
383 ;;
384 esac
392 KMEXTRACTONLY="${KMEXTRACTONLY} 385 KMEXTRACTONLY="${KMEXTRACTONLY}
393 kleopatra/ConfigureChecks.cmake" 386 kleopatra/ConfigureChecks.cmake"
394 if has kontact ${IUSE//+} && use kontact; then 387 if has kontact ${IUSE//+} && use kontact; then
395 KMEXTRA="${KMEXTRA} kontact/plugins/${PLUGINNAME:-${PN}}" 388 KMEXTRA="${KMEXTRA} kontact/plugins/${PLUGINNAME:-${PN}}"
396 KMEXTRACTONLY="${KMEXTRACTONLY} kontactinterfaces/" 389 KMEXTRACTONLY="${KMEXTRACTONLY} kontactinterfaces/"
408 esac 401 esac
409 # Don't install cmake modules for split ebuilds, to avoid collisions. 402 # Don't install cmake modules for split ebuilds, to avoid collisions.
410 case ${KMNAME} in 403 case ${KMNAME} in
411 kdebase-runtime|kdebase-workspace|kdeedu|kdegames|kdegraphics|kdepim) 404 kdebase-runtime|kdebase-workspace|kdeedu|kdegames|kdegraphics|kdepim)
412 case ${PN} in 405 case ${PN} in
413 libkdegames|libkdeedu|marble|libkworkspace) 406 libkdegames|libkdeedu|libkworkspace)
414 KMEXTRA="${KMEXTRA} 407 KMEXTRA="${KMEXTRA}
415 cmake/modules/" 408 cmake/modules/"
416 ;; 409 ;;
417 *) 410 *)
418 KMCOMPILEONLY="${KMCOMPILEONLY} 411 KMCOMPILEONLY="${KMCOMPILEONLY}
600 -e '/add_custom_target(kmail_xml /,/)/p' "${S}"/kmail/CMakeLists.txt || die "uncommenting xml failed" 593 -e '/add_custom_target(kmail_xml /,/)/p' "${S}"/kmail/CMakeLists.txt || die "uncommenting xml failed"
601 _change_cmakelists_parent_dirs kmail 594 _change_cmakelists_parent_dirs kmail
602 ;; 595 ;;
603 esac 596 esac
604 ;; 597 ;;
598 kdewebdev)
599 # Disable hardcoded kdepimlibs check
600 sed -e 's/find_package(KdepimLibs REQUIRED)/macro_optional_find_package(KdepimLibs)/' \
601 -e 's/find_package(LibXml2 REQUIRED)/macro_optional_find_package(LibXml2 REQUIRED)/' \
602 -e 's/find_package(LibXslt REQUIRED)/macro_optional_find_package(LibXslt REQUIRED)/' \
603 -e 's/find_package(Boost REQUIRED)/macro_optional_find_package(Boost REQUIRED)/' \
604 -i CMakeLists.txt || die "failed to disable hardcoded checks"
605 ;;
605 koffice) 606 koffice)
606 # prevent collisions 607 # prevent collisions
607 if [[ ${PN} != koffice-data ]]; then 608 if [[ ${PN} != koffice-data ]]; then
608 sed -i -e '/install(.*FindKOfficeLibs.cmake/,/)/ d' \ 609 sed -i -e '/install(.*FindKOfficeLibs.cmake/,/)/ d' \
609 "${S}"/cmake/modules/CMakeLists.txt || \ 610 "${S}"/cmake/modules/CMakeLists.txt || \
622# Currently just calls its equivalent in kde4-base.eclass(5). Use this one in split 623# Currently just calls its equivalent in kde4-base.eclass(5). Use this one in split
623# ebuilds. 624# ebuilds.
624kde4-meta_src_configure() { 625kde4-meta_src_configure() {
625 debug-print-function ${FUNCNAME} "$@" 626 debug-print-function ${FUNCNAME} "$@"
626 627
628 # Set some cmake default values here (usually workarounds for automagic deps)
629 case ${KMNAME} in
630 kdewebdev)
631 mycmakeargs="
632 -DWITH_KdepimLibs=OFF
633 -DWITH_LibXml2=OFF
634 -DWITH_LibXslt=OFF
635 -DWITH_Boost=OFF
636 -DWITH_LibTidy=OFF
637 ${mycmakeargs}"
638 ;;
639 esac
640
627 kde4-base_src_configure 641 kde4-base_src_configure
628} 642}
629 643
630# @FUNCTION: kde4-meta_src_compile 644# @FUNCTION: kde4-meta_src_compile
631# @DESCRIPTION: 645# @DESCRIPTION:
651# @DESCRIPTION: 665# @DESCRIPTION:
652# Function for installing KDE4 split applications. 666# Function for installing KDE4 split applications.
653kde4-meta_src_install() { 667kde4-meta_src_install() {
654 debug-print-function $FUNCNAME "$@" 668 debug-print-function $FUNCNAME "$@"
655 669
656 kde4-meta_src_make_doc 670 kde4-base_src_install
657 cmake-utils_src_install
658
659 if [[ -n ${KMSAVELIBS} ]]; then
660 install_library_dependencies
661 fi
662} 671}
663 672
664# @FUNCTION: kde4-meta_src_make_doc 673# @FUNCTION: kde4-meta_src_make_doc
665# @DESCRIPTION: 674# @DESCRIPTION:
666# This function searches in ${S}/${KMMODULE}, 675# This function searches in ${S}/${KMMODULE},
676 kde4-base_src_make_doc 685 kde4-base_src_make_doc
677} 686}
678 687
679# @FUNCTION: kde4-meta_pkg_postinst 688# @FUNCTION: kde4-meta_pkg_postinst
680# @DESCRIPTION: 689# @DESCRIPTION:
681# Currently just calls its equivalent in kde4-base.eclass(5). Use this in split 690# Display information about application handbook and invoke kbuildsycoca4.
682# ebuilds.
683kde4-meta_pkg_postinst() { 691kde4-meta_pkg_postinst() {
684 debug-print-function ${FUNCNAME} "$@" 692 debug-print-function ${FUNCNAME} "$@"
693
694 if has doc ${IUSE//+} && ! use doc; then
695 echo
696 einfo "Application handbook for ${PN} has not been installed."
697 einfo "To install handbook, reemerge =${CATEGORY}/${P} with 'doc' USE flag."
698 echo
699 fi
685 700
686 kde4-base_pkg_postinst 701 kde4-base_pkg_postinst
687} 702}
688 703
689# @FUNCTION: kde4-meta_pkg_postrm 704# @FUNCTION: kde4-meta_pkg_postrm

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.17

  ViewVC Help
Powered by ViewVC 1.1.20