/[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.18
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.18 2009/05/09 13:23:15 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}${ESVN_PROJECT_SUFFIX}"
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
265 "${S}"/CMakeLists.txt || die "Sed to exclude bin/kde4 failed" 250 "${S}"/CMakeLists.txt || die "Sed to exclude bin/kde4 failed"
266 fi 251 fi
267 else 252 else
268 local abort tarball tarfile f extractlist moduleprefix postfix 253 local abort tarball tarfile f extractlist moduleprefix postfix
269 case ${PV} in 254 case ${PV} in
255 4.2.85)
256 # block for normally packed upstream unstable snapshots
257 KMTARPARAMS="${KMTARPARAMS} --bzip2" # bz2
258 postfix="bz2"
259 ;;
270 4.2.9* | 4.2.8* | 4.2.7* | 4.2.6*) 260 4.2.9* | 4.2.8* | 4.2.7* | 4.2.6*)
271 KMTARPARAMS="${KMTARPARAMS} --lzma" # lzma 261 KMTARPARAMS="${KMTARPARAMS} --lzma" # lzma
272 postfix="lzma" 262 postfix="lzma"
273 ;; 263 ;;
274 *) 264 *)
343# Also see descriptions of KMMODULE, KMNOMODULE, KMEXTRA, KMCOMPILEONLY, 333# Also see descriptions of KMMODULE, KMNOMODULE, KMEXTRA, KMCOMPILEONLY,
344# KMEXTRACTONLY and KMTARPARAMS. 334# KMEXTRACTONLY and KMTARPARAMS.
345kde4-meta_create_extractlists() { 335kde4-meta_create_extractlists() {
346 debug-print-function ${FUNCNAME} "$@" 336 debug-print-function ${FUNCNAME} "$@"
347 337
348 if has htmlhandbook ${IUSE//+} && use htmlhandbook; then 338 # TODO change to KMEXTRA for more strict check
339 if has doc ${IUSE//+} && use doc && [[ -n ${KMMODULE} ]]; then
349 # We use the basename of $KMMODULE because $KMMODULE can contain 340 # We use the basename of $KMMODULE because $KMMODULE can contain
350 # the path to the module subdirectory. 341 # the path to the module subdirectory.
351 KMEXTRA_NONFATAL="${KMEXTRA_NONFATAL} doc/${KMMODULE##*/}" 342 KMEXTRA_NONFATAL="${KMEXTRA_NONFATAL} doc/${KMMODULE##*/}"
352 fi 343 fi
353 344
387 kdepim) 378 kdepim)
388 if [[ ${PN} != libkdepim ]]; then 379 if [[ ${PN} != libkdepim ]]; then
389 KMEXTRACTONLY="${KMEXTRACTONLY} 380 KMEXTRACTONLY="${KMEXTRACTONLY}
390 libkdepim" 381 libkdepim"
391 fi 382 fi
383 case ${SLOT} in
384 4.3|live)
385 KMEXTRACTONLY="${KMEXTRACTONLY}
386 kdepim-version.h
387 config-enterprise.h.cmake"
388 ;;
389 esac
392 KMEXTRACTONLY="${KMEXTRACTONLY} 390 KMEXTRACTONLY="${KMEXTRACTONLY}
393 kleopatra/ConfigureChecks.cmake" 391 kleopatra/ConfigureChecks.cmake"
394 if has kontact ${IUSE//+} && use kontact; then 392 if has kontact ${IUSE//+} && use kontact; then
395 KMEXTRA="${KMEXTRA} kontact/plugins/${PLUGINNAME:-${PN}}" 393 KMEXTRA="${KMEXTRA} kontact/plugins/${PLUGINNAME:-${PN}}"
396 KMEXTRACTONLY="${KMEXTRACTONLY} kontactinterfaces/" 394 KMEXTRACTONLY="${KMEXTRACTONLY} kontactinterfaces/"
408 esac 406 esac
409 # Don't install cmake modules for split ebuilds, to avoid collisions. 407 # Don't install cmake modules for split ebuilds, to avoid collisions.
410 case ${KMNAME} in 408 case ${KMNAME} in
411 kdebase-runtime|kdebase-workspace|kdeedu|kdegames|kdegraphics|kdepim) 409 kdebase-runtime|kdebase-workspace|kdeedu|kdegames|kdegraphics|kdepim)
412 case ${PN} in 410 case ${PN} in
413 libkdegames|libkdeedu|marble|libkworkspace) 411 libkdegames|libkdeedu|libkworkspace)
414 KMEXTRA="${KMEXTRA} 412 KMEXTRA="${KMEXTRA}
415 cmake/modules/" 413 cmake/modules/"
416 ;; 414 ;;
417 *) 415 *)
418 KMCOMPILEONLY="${KMCOMPILEONLY} 416 KMCOMPILEONLY="${KMCOMPILEONLY}
600 -e '/add_custom_target(kmail_xml /,/)/p' "${S}"/kmail/CMakeLists.txt || die "uncommenting xml failed" 598 -e '/add_custom_target(kmail_xml /,/)/p' "${S}"/kmail/CMakeLists.txt || die "uncommenting xml failed"
601 _change_cmakelists_parent_dirs kmail 599 _change_cmakelists_parent_dirs kmail
602 ;; 600 ;;
603 esac 601 esac
604 ;; 602 ;;
603 kdewebdev)
604 # Disable hardcoded kdepimlibs check
605 sed -e 's/find_package(KdepimLibs REQUIRED)/macro_optional_find_package(KdepimLibs)/' \
606 -e 's/find_package(LibXml2 REQUIRED)/macro_optional_find_package(LibXml2 REQUIRED)/' \
607 -e 's/find_package(LibXslt REQUIRED)/macro_optional_find_package(LibXslt REQUIRED)/' \
608 -e 's/find_package(Boost REQUIRED)/macro_optional_find_package(Boost REQUIRED)/' \
609 -i CMakeLists.txt || die "failed to disable hardcoded checks"
610 ;;
605 koffice) 611 koffice)
606 # prevent collisions 612 # prevent collisions
607 if [[ ${PN} != koffice-data ]]; then 613 if [[ ${PN} != koffice-data ]]; then
608 sed -i -e '/install(.*FindKOfficeLibs.cmake/,/)/ d' \ 614 sed -i -e '/install(.*FindKOfficeLibs.cmake/,/)/ d' \
609 "${S}"/cmake/modules/CMakeLists.txt || \ 615 "${S}"/cmake/modules/CMakeLists.txt || \
622# Currently just calls its equivalent in kde4-base.eclass(5). Use this one in split 628# Currently just calls its equivalent in kde4-base.eclass(5). Use this one in split
623# ebuilds. 629# ebuilds.
624kde4-meta_src_configure() { 630kde4-meta_src_configure() {
625 debug-print-function ${FUNCNAME} "$@" 631 debug-print-function ${FUNCNAME} "$@"
626 632
633 # Set some cmake default values here (usually workarounds for automagic deps)
634 case ${KMNAME} in
635 kdewebdev)
636 mycmakeargs="
637 -DWITH_KdepimLibs=OFF
638 -DWITH_LibXml2=OFF
639 -DWITH_LibXslt=OFF
640 -DWITH_Boost=OFF
641 -DWITH_LibTidy=OFF
642 ${mycmakeargs}"
643 ;;
644 esac
645
627 kde4-base_src_configure 646 kde4-base_src_configure
628} 647}
629 648
630# @FUNCTION: kde4-meta_src_compile 649# @FUNCTION: kde4-meta_src_compile
631# @DESCRIPTION: 650# @DESCRIPTION:
651# @DESCRIPTION: 670# @DESCRIPTION:
652# Function for installing KDE4 split applications. 671# Function for installing KDE4 split applications.
653kde4-meta_src_install() { 672kde4-meta_src_install() {
654 debug-print-function $FUNCNAME "$@" 673 debug-print-function $FUNCNAME "$@"
655 674
656 kde4-meta_src_make_doc 675 kde4-base_src_install
657 cmake-utils_src_install
658
659 if [[ -n ${KMSAVELIBS} ]]; then
660 install_library_dependencies
661 fi
662} 676}
663 677
664# @FUNCTION: kde4-meta_src_make_doc 678# @FUNCTION: kde4-meta_src_make_doc
665# @DESCRIPTION: 679# @DESCRIPTION:
666# This function searches in ${S}/${KMMODULE}, 680# This function searches in ${S}/${KMMODULE},
676 kde4-base_src_make_doc 690 kde4-base_src_make_doc
677} 691}
678 692
679# @FUNCTION: kde4-meta_pkg_postinst 693# @FUNCTION: kde4-meta_pkg_postinst
680# @DESCRIPTION: 694# @DESCRIPTION:
681# Currently just calls its equivalent in kde4-base.eclass(5). Use this in split 695# Display information about application handbook and invoke kbuildsycoca4.
682# ebuilds.
683kde4-meta_pkg_postinst() { 696kde4-meta_pkg_postinst() {
684 debug-print-function ${FUNCNAME} "$@" 697 debug-print-function ${FUNCNAME} "$@"
698
699 if has doc ${IUSE//+} && ! use doc; then
700 echo
701 einfo "Application handbook for ${PN} has not been installed."
702 einfo "To install handbook, reemerge =${CATEGORY}/${P} with 'doc' USE flag."
703 echo
704 fi
685 705
686 kde4-base_pkg_postinst 706 kde4-base_pkg_postinst
687} 707}
688 708
689# @FUNCTION: kde4-meta_pkg_postrm 709# @FUNCTION: kde4-meta_pkg_postrm

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

  ViewVC Help
Powered by ViewVC 1.1.20