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

Diff of /eclass/kde4-base.eclass

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

Revision 1.43 Revision 1.44
1# Copyright 2007-2009 Gentoo Foundation 1# Copyright 2007-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-base.eclass,v 1.43 2009/08/07 01:00:11 wired Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-base.eclass,v 1.44 2009/08/20 09:18:01 scarabeus Exp $
4 4
5# @ECLASS: kde4-base.eclass 5# @ECLASS: kde4-base.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# kde@gentoo.org 7# kde@gentoo.org
8# @BLURB: This eclass provides functions for kde 4.X ebuilds 8# @BLURB: This eclass provides functions for kde 4.X ebuilds
11# and KDE4 applications. 11# and KDE4 applications.
12# 12#
13# NOTE: KDE 4 ebuilds by default define EAPI="2", this can be redefined but 13# NOTE: KDE 4 ebuilds by default define EAPI="2", this can be redefined but
14# eclass will fail with version older than 2. 14# eclass will fail with version older than 2.
15 15
16# @ECLASS-VARIABLE: WANT_CMAKE
17# @DESCRIPTION:
18# Specify if cmake-utils eclass is required. Defaults to true. Please note that
19# if the variable is set otherwise src_configure/compile/install calls in ebuild
20# must be overrided (can't use the eclass ones).
21WANT_CMAKE="${WANT_CMAKE:-true}"
22if [[ ${WANT_CMAKE} = true ]]; then
23 exports="src_configure src_compile src_test src_install"
24 cmake_eclass="cmake-utils"
25else
26 exports=""
27 cmake_eclass=""
28fi
29
16inherit base cmake-utils eutils kde4-functions 30inherit base ${cmake_eclass} eutils kde4-functions
17 31
18get_build_type 32get_build_type
19if [[ ${BUILD_TYPE} = live ]]; then 33if [[ ${BUILD_TYPE} = live ]]; then
20 inherit subversion 34 inherit subversion
21fi 35fi
22 36
23EXPORT_FUNCTIONS pkg_setup src_unpack src_prepare src_configure src_compile src_test src_install pkg_postinst pkg_postrm 37
38EXPORT_FUNCTIONS pkg_setup src_unpack src_prepare ${exports} pkg_postinst pkg_postrm
24 39
25case ${KDEBASE} in 40case ${KDEBASE} in
26 kde-base) 41 kde-base)
27 HOMEPAGE="http://www.kde.org/" 42 HOMEPAGE="http://www.kde.org/"
28 LICENSE="GPL-2" 43 LICENSE="GPL-2"
114 *) ;; 129 *) ;;
115esac 130esac
116unset qtopengldepend 131unset qtopengldepend
117 132
118# WebKit dependencies 133# WebKit dependencies
134case ${KDE_REQUIRED} in
135 always)
136 qtwebkitusedeps="[kde]"
137 ;;
138 optional)
139 qtwebkitusedeps="[kde?]"
140 ;;
141 *) ;;
142esac
119qtwebkitdepend=" 143qtwebkitdepend="
120 >=x11-libs/qt-webkit-${QT_DEPEND}:4 144 >=x11-libs/qt-webkit-${QT_DEPEND}:4${qtwebkitusedeps}
121" 145"
146unset qtwebkitusedeps
122case ${WEBKIT_REQUIRED} in 147case ${WEBKIT_REQUIRED} in
123 always) 148 always)
124 COMMONDEPEND+=" ${qtwebkitdepend}" 149 COMMONDEPEND+=" ${qtwebkitdepend}"
125 ;; 150 ;;
126 optional) 151 optional)
171 _kdedir="${SLOT}" 196 _kdedir="${SLOT}"
172 _pv="-${PV}:${SLOT}" 197 _pv="-${PV}:${SLOT}"
173 _pvn="-${PV}" 198 _pvn="-${PV}"
174 199
175 # Block installation of other SLOTS unless kdeprefix 200 # Block installation of other SLOTS unless kdeprefix
176 for slot in ${KDE_SLOTS[@]} ${KDE_LIVE_SLOTS[@]}; do 201 RDEPEND+=" $(block_other_slots)"
177 # Block non kdeprefix ${PN} on other slots
178 if [[ ${SLOT} != ${slot} ]]; then
179 RDEPEND+=" !kdeprefix? ( !kde-base/${PN}:${slot}[-kdeprefix] )"
180 fi
181 done
182 unset slot
183 ;; 202 ;;
184 koffice) 203 koffice)
185 SLOT="2" 204 SLOT="2"
186 _pv="-${KDE_MINIMAL}" 205 _pv="-${KDE_MINIMAL}"
187 _pvn="${_pv}" 206 _pvn="${_pv}"
196# KDE dependencies 215# KDE dependencies
197kdecommondepend=" 216kdecommondepend="
198 dev-lang/perl 217 dev-lang/perl
199 >=x11-libs/qt-core-${QT_DEPEND}:4[qt3support,ssl] 218 >=x11-libs/qt-core-${QT_DEPEND}:4[qt3support,ssl]
200 >=x11-libs/qt-gui-${QT_DEPEND}:4[accessibility,dbus] 219 >=x11-libs/qt-gui-${QT_DEPEND}:4[accessibility,dbus]
201 >=x11-libs/qt-qt3support-${QT_DEPEND}:4[accessibility] 220 >=x11-libs/qt-qt3support-${QT_DEPEND}:4[accessibility,kde]
202 >=x11-libs/qt-script-${QT_DEPEND}:4 221 >=x11-libs/qt-script-${QT_DEPEND}:4
203 >=x11-libs/qt-sql-${QT_DEPEND}:4[qt3support] 222 >=x11-libs/qt-sql-${QT_DEPEND}:4[qt3support]
204 >=x11-libs/qt-svg-${QT_DEPEND}:4 223 >=x11-libs/qt-svg-${QT_DEPEND}:4
205 >=x11-libs/qt-test-${QT_DEPEND}:4 224 >=x11-libs/qt-test-${QT_DEPEND}:4
206 !aqua? ( 225 !aqua? (
451 else 470 else
452 base_src_unpack 471 base_src_unpack
453 fi 472 fi
454} 473}
455 474
456# @FUNCTION: kde4-base_src_compile 475# @FUNCTION: kde4-base_src_prepare
457# @DESCRIPTION: 476# @DESCRIPTION:
458# General pre-configure and pre-compile function for KDE4 applications. 477# General pre-configure and pre-compile function for KDE4 applications.
459# It also handles translations if KDE_LINGUAS is defined. See KDE_LINGUAS and 478# It also handles translations if KDE_LINGUAS is defined. See KDE_LINGUAS and
460# enable_selected_linguas() and enable_selected_doc_linguas() 479# enable_selected_linguas() and enable_selected_doc_linguas()
461# in kde4-functions.eclass(5) for further details. 480# in kde4-functions.eclass(5) for further details.
466 if [[ -n ${KDE_LINGUAS} ]]; then 485 if [[ -n ${KDE_LINGUAS} ]]; then
467 enable_selected_linguas 486 enable_selected_linguas
468 fi 487 fi
469 488
470 # Enable/disable handbooks for kde4-base packages 489 # Enable/disable handbooks for kde4-base packages
471 # kde-l10n inherits kde-base but is metpackage, so no check for doc 490 # kde-l10n inherits kde4-base but is metpackage, so no check for doc
491 # kdelibs inherits kde4-base but handle installing the handbook itself
472 if ! has kde4-meta ${INHERITED}; then 492 if ! has kde4-meta ${INHERITED}; then
473 has handbook ${IUSE//+} && [[ ${PN} != kde-l10n ]] && enable_selected_doc_linguas 493 has handbook ${IUSE//+} && [[ ${PN} != kde-l10n ]] && [[ ${PN} != kdelibs ]] && enable_selected_doc_linguas
474 fi 494 fi
475 495
476 [[ ${BUILD_TYPE} = live ]] && subversion_src_prepare 496 [[ ${BUILD_TYPE} = live ]] && subversion_src_prepare
477 base_src_prepare 497 base_src_prepare
478 498
601 fi 621 fi
602 622
603 if [[ -n ${KDEBASE} ]] && [[ -d "${D}${EROOT}usr/share/doc/${PF}" ]]; then 623 if [[ -n ${KDEBASE} ]] && [[ -d "${D}${EROOT}usr/share/doc/${PF}" ]]; then
604 # work around bug #97196 624 # work around bug #97196
605 dodir /usr/share/doc/KDE4 && \ 625 dodir /usr/share/doc/KDE4 && \
606 mv "${D}${EROOT}usr/share/doc/${PF}" "${D}${EROOT}usr/share/doc/KDE4/" || \ 626 mv -f "${D}${EROOT}usr/share/doc/${PF}" "${D}${EROOT}usr/share/doc/KDE4/" || \
607 die "Failed to move docs to KDE4/." 627 die "Failed to move docs to KDE4/."
608 fi 628 fi
609} 629}
610 630
611# @FUNCTION: kde4-base_pkg_postinst 631# @FUNCTION: kde4-base_pkg_postinst

Legend:
Removed from v.1.43  
changed lines
  Added in v.1.44

  ViewVC Help
Powered by ViewVC 1.1.20