/[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.19
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.19 2009/05/14 16:46:53 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}
95 !app-office/${PN}:0 90 !app-office/${PN}:0
96 !app-office/koffice:0 91 !app-office/koffice:0
97 !app-office/koffice-meta:0 92 !app-office/koffice-meta:0
98 " 93 "
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=" 94 COMMON_DEPEND="
110 dev-cpp/eigen:2 95 dev-cpp/eigen:2
111 media-gfx/imagemagick[openexr?] 96 media-gfx/imagemagick[openexr?]
112 media-libs/fontconfig 97 media-libs/fontconfig
113 media-libs/freetype:2 98 media-libs/freetype:2
114 " 99 "
115 DEPEND="${DEPEND} ${COMMON_DEPEND}" 100 DEPEND="${DEPEND} ${COMMON_DEPEND}"
116 RDEPEND="${RDEPEND} ${COMMON_DEPEND}" 101 RDEPEND="${RDEPEND} ${COMMON_DEPEND}"
117 unset COMMON_DEPEND 102 unset COMMON_DEPEND
118 if [[ ${PN} != koffice-libs && ${PN} != koffice-data ]]; then 103 if [[ ${PN} != koffice-libs && ${PN} != koffice-data ]]; then
119 DEPEND="${DEPEND} 104 DEPEND="${DEPEND}
120 >=app-office/koffice-libs-${PV}:${SLOT}[kdeprefix=] 105 >=app-office/koffice-libs-${PV}:${SLOT}
121 " 106 "
122 RDEPEND="${RDEPEND} 107 RDEPEND="${RDEPEND}
123 >=app-office/koffice-libs-${PV}:${SLOT}[kdeprefix=] 108 >=app-office/koffice-libs-${PV}:${SLOT}
124 " 109 "
125 fi 110 fi
126 ;;
127 esac
128 ;; 111 ;;
129esac 112esac
130 113
131debug-print "line ${LINENO} ${ECLASS}: DEPEND ${DEPEND} - after metapackage-specific dependencies" 114debug-print "line ${LINENO} ${ECLASS}: DEPEND ${DEPEND} - after metapackage-specific dependencies"
132debug-print "line ${LINENO} ${ECLASS}: RDEPEND ${RDEPEND} - after metapackage-specific dependencies" 115debug-print "line ${LINENO} ${ECLASS}: RDEPEND ${RDEPEND} - after metapackage-specific dependencies"
135case ${BUILD_TYPE} in 118case ${BUILD_TYPE} in
136 live) 119 live)
137 case ${KMNAME} in 120 case ${KMNAME} in
138 extragear*|playground*) 121 extragear*|playground*)
139 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}" 122 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}"
123 ESVN_PROJECT="${KMNAME}${ESVN_PROJECT_SUFFIX}"
140 ;; 124 ;;
141 esac 125 esac
142 ;; 126 ;;
143 *) ;;
144esac 127esac
145 128
146# @ECLASS-VARIABLE: KMNAME 129# @ECLASS-VARIABLE: KMNAME
147# @DESCRIPTION: 130# @DESCRIPTION:
148# Name of the parent-module (e.g. kdebase, kdepim, ...). You _must_ set it 131# Name of the parent-module (e.g. kdebase, kdepim, ...). You _must_ set it
265 "${S}"/CMakeLists.txt || die "Sed to exclude bin/kde4 failed" 248 "${S}"/CMakeLists.txt || die "Sed to exclude bin/kde4 failed"
266 fi 249 fi
267 else 250 else
268 local abort tarball tarfile f extractlist moduleprefix postfix 251 local abort tarball tarfile f extractlist moduleprefix postfix
269 case ${PV} in 252 case ${PV} in
253 4.2.85)
254 # block for normally packed upstream unstable snapshots
255 KMTARPARAMS="${KMTARPARAMS} --bzip2" # bz2
256 postfix="bz2"
257 ;;
270 4.2.9* | 4.2.8* | 4.2.7* | 4.2.6*) 258 4.2.9* | 4.2.8* | 4.2.7* | 4.2.6*)
271 KMTARPARAMS="${KMTARPARAMS} --lzma" # lzma 259 KMTARPARAMS="${KMTARPARAMS} --lzma" # lzma
272 postfix="lzma" 260 postfix="lzma"
273 ;; 261 ;;
274 *) 262 *)
343# Also see descriptions of KMMODULE, KMNOMODULE, KMEXTRA, KMCOMPILEONLY, 331# Also see descriptions of KMMODULE, KMNOMODULE, KMEXTRA, KMCOMPILEONLY,
344# KMEXTRACTONLY and KMTARPARAMS. 332# KMEXTRACTONLY and KMTARPARAMS.
345kde4-meta_create_extractlists() { 333kde4-meta_create_extractlists() {
346 debug-print-function ${FUNCNAME} "$@" 334 debug-print-function ${FUNCNAME} "$@"
347 335
348 if has htmlhandbook ${IUSE//+} && use htmlhandbook; then 336 # TODO change to KMEXTRA for more strict check
337 if has doc ${IUSE//+} && use doc && [[ -n ${KMMODULE} ]]; then
349 # We use the basename of $KMMODULE because $KMMODULE can contain 338 # We use the basename of $KMMODULE because $KMMODULE can contain
350 # the path to the module subdirectory. 339 # the path to the module subdirectory.
351 KMEXTRA_NONFATAL="${KMEXTRA_NONFATAL} doc/${KMMODULE##*/}" 340 KMEXTRA_NONFATAL="${KMEXTRA_NONFATAL} doc/${KMMODULE##*/}"
352 fi 341 fi
353 342
387 kdepim) 376 kdepim)
388 if [[ ${PN} != libkdepim ]]; then 377 if [[ ${PN} != libkdepim ]]; then
389 KMEXTRACTONLY="${KMEXTRACTONLY} 378 KMEXTRACTONLY="${KMEXTRACTONLY}
390 libkdepim" 379 libkdepim"
391 fi 380 fi
381 case ${SLOT} in
382 4.3|live)
383 KMEXTRACTONLY="${KMEXTRACTONLY}
384 kdepim-version.h
385 config-enterprise.h.cmake"
386 ;;
387 esac
392 KMEXTRACTONLY="${KMEXTRACTONLY} 388 KMEXTRACTONLY="${KMEXTRACTONLY}
393 kleopatra/ConfigureChecks.cmake" 389 kleopatra/ConfigureChecks.cmake"
394 if has kontact ${IUSE//+} && use kontact; then 390 if has kontact ${IUSE//+} && use kontact; then
395 KMEXTRA="${KMEXTRA} kontact/plugins/${PLUGINNAME:-${PN}}" 391 KMEXTRA="${KMEXTRA} kontact/plugins/${PLUGINNAME:-${PN}}"
396 KMEXTRACTONLY="${KMEXTRACTONLY} kontactinterfaces/" 392 KMEXTRACTONLY="${KMEXTRACTONLY} kontactinterfaces/"
408 esac 404 esac
409 # Don't install cmake modules for split ebuilds, to avoid collisions. 405 # Don't install cmake modules for split ebuilds, to avoid collisions.
410 case ${KMNAME} in 406 case ${KMNAME} in
411 kdebase-runtime|kdebase-workspace|kdeedu|kdegames|kdegraphics|kdepim) 407 kdebase-runtime|kdebase-workspace|kdeedu|kdegames|kdegraphics|kdepim)
412 case ${PN} in 408 case ${PN} in
413 libkdegames|libkdeedu|marble|libkworkspace) 409 libkdegames|libkdeedu|libkworkspace)
414 KMEXTRA="${KMEXTRA} 410 KMEXTRA="${KMEXTRA}
415 cmake/modules/" 411 cmake/modules/"
416 ;; 412 ;;
417 *) 413 *)
418 KMCOMPILEONLY="${KMCOMPILEONLY} 414 KMCOMPILEONLY="${KMCOMPILEONLY}
600 -e '/add_custom_target(kmail_xml /,/)/p' "${S}"/kmail/CMakeLists.txt || die "uncommenting xml failed" 596 -e '/add_custom_target(kmail_xml /,/)/p' "${S}"/kmail/CMakeLists.txt || die "uncommenting xml failed"
601 _change_cmakelists_parent_dirs kmail 597 _change_cmakelists_parent_dirs kmail
602 ;; 598 ;;
603 esac 599 esac
604 ;; 600 ;;
601 kdewebdev)
602 # Disable hardcoded kdepimlibs check
603 sed -e 's/find_package(KdepimLibs REQUIRED)/macro_optional_find_package(KdepimLibs)/' \
604 -e 's/find_package(LibXml2 REQUIRED)/macro_optional_find_package(LibXml2 REQUIRED)/' \
605 -e 's/find_package(LibXslt REQUIRED)/macro_optional_find_package(LibXslt REQUIRED)/' \
606 -e 's/find_package(Boost REQUIRED)/macro_optional_find_package(Boost REQUIRED)/' \
607 -i CMakeLists.txt || die "failed to disable hardcoded checks"
608 ;;
605 koffice) 609 koffice)
606 # prevent collisions 610 # prevent collisions
607 if [[ ${PN} != koffice-data ]]; then 611 if [[ ${PN} != koffice-data ]]; then
608 sed -i -e '/install(.*FindKOfficeLibs.cmake/,/)/ d' \ 612 sed -i -e '/install(.*FindKOfficeLibs.cmake/,/)/ d' \
609 "${S}"/cmake/modules/CMakeLists.txt || \ 613 "${S}"/cmake/modules/CMakeLists.txt || \
622# Currently just calls its equivalent in kde4-base.eclass(5). Use this one in split 626# Currently just calls its equivalent in kde4-base.eclass(5). Use this one in split
623# ebuilds. 627# ebuilds.
624kde4-meta_src_configure() { 628kde4-meta_src_configure() {
625 debug-print-function ${FUNCNAME} "$@" 629 debug-print-function ${FUNCNAME} "$@"
626 630
631 # Set some cmake default values here (usually workarounds for automagic deps)
632 case ${KMNAME} in
633 kdewebdev)
634 mycmakeargs="
635 -DWITH_KdepimLibs=OFF
636 -DWITH_LibXml2=OFF
637 -DWITH_LibXslt=OFF
638 -DWITH_Boost=OFF
639 -DWITH_LibTidy=OFF
640 ${mycmakeargs}"
641 ;;
642 esac
643
627 kde4-base_src_configure 644 kde4-base_src_configure
628} 645}
629 646
630# @FUNCTION: kde4-meta_src_compile 647# @FUNCTION: kde4-meta_src_compile
631# @DESCRIPTION: 648# @DESCRIPTION:
651# @DESCRIPTION: 668# @DESCRIPTION:
652# Function for installing KDE4 split applications. 669# Function for installing KDE4 split applications.
653kde4-meta_src_install() { 670kde4-meta_src_install() {
654 debug-print-function $FUNCNAME "$@" 671 debug-print-function $FUNCNAME "$@"
655 672
656 kde4-meta_src_make_doc 673 kde4-base_src_install
657 cmake-utils_src_install
658
659 if [[ -n ${KMSAVELIBS} ]]; then
660 install_library_dependencies
661 fi
662} 674}
663 675
664# @FUNCTION: kde4-meta_src_make_doc 676# @FUNCTION: kde4-meta_src_make_doc
665# @DESCRIPTION: 677# @DESCRIPTION:
666# This function searches in ${S}/${KMMODULE}, 678# This function searches in ${S}/${KMMODULE},
676 kde4-base_src_make_doc 688 kde4-base_src_make_doc
677} 689}
678 690
679# @FUNCTION: kde4-meta_pkg_postinst 691# @FUNCTION: kde4-meta_pkg_postinst
680# @DESCRIPTION: 692# @DESCRIPTION:
681# Currently just calls its equivalent in kde4-base.eclass(5). Use this in split 693# Display information about application handbook and invoke kbuildsycoca4.
682# ebuilds.
683kde4-meta_pkg_postinst() { 694kde4-meta_pkg_postinst() {
684 debug-print-function ${FUNCNAME} "$@" 695 debug-print-function ${FUNCNAME} "$@"
696
697 if has doc ${IUSE//+} && ! use doc; then
698 echo
699 einfo "Application handbook for ${PN} has not been installed."
700 einfo "To install handbook, reemerge =${CATEGORY}/${P} with 'doc' USE flag."
701 echo
702 fi
685 703
686 kde4-base_pkg_postinst 704 kde4-base_pkg_postinst
687} 705}
688 706
689# @FUNCTION: kde4-meta_pkg_postrm 707# @FUNCTION: kde4-meta_pkg_postrm

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

  ViewVC Help
Powered by ViewVC 1.1.20