diff options
author | Tomas Chvatal <scarabeus@gentoo.org> | 2009-08-20 09:18:01 +0000 |
---|---|---|
committer | Tomas Chvatal <scarabeus@gentoo.org> | 2009-08-20 09:18:01 +0000 |
commit | 03aa56028fcdb789134bd82b5780173c9ced2fa8 (patch) | |
tree | 3ffecfebdf3cd0af49884b7d4329bc9aa77602c3 /eclass | |
parent | Sync with overlay to fix bug #281978. (diff) | |
download | historical-03aa56028fcdb789134bd82b5780173c9ced2fa8.tar.gz historical-03aa56028fcdb789134bd82b5780173c9ced2fa8.tar.bz2 historical-03aa56028fcdb789134bd82b5780173c9ced2fa8.zip |
Sync eclasses with kde-testing ones.
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/kde4-base.eclass | 52 | ||||
-rw-r--r-- | eclass/kde4-functions.eclass | 41 | ||||
-rw-r--r-- | eclass/kde4-meta.eclass | 2 |
3 files changed, 77 insertions, 18 deletions
diff --git a/eclass/kde4-base.eclass b/eclass/kde4-base.eclass index 079201700deb..7897bd372280 100644 --- a/eclass/kde4-base.eclass +++ b/eclass/kde4-base.eclass @@ -1,6 +1,6 @@ # Copyright 2007-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-base.eclass,v 1.43 2009/08/07 01:00:11 wired Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-base.eclass,v 1.44 2009/08/20 09:18:01 scarabeus Exp $ # @ECLASS: kde4-base.eclass # @MAINTAINER: @@ -13,14 +13,29 @@ # NOTE: KDE 4 ebuilds by default define EAPI="2", this can be redefined but # eclass will fail with version older than 2. -inherit base cmake-utils eutils kde4-functions +# @ECLASS-VARIABLE: WANT_CMAKE +# @DESCRIPTION: +# Specify if cmake-utils eclass is required. Defaults to true. Please note that +# if the variable is set otherwise src_configure/compile/install calls in ebuild +# must be overrided (can't use the eclass ones). +WANT_CMAKE="${WANT_CMAKE:-true}" +if [[ ${WANT_CMAKE} = true ]]; then + exports="src_configure src_compile src_test src_install" + cmake_eclass="cmake-utils" +else + exports="" + cmake_eclass="" +fi + +inherit base ${cmake_eclass} eutils kde4-functions get_build_type if [[ ${BUILD_TYPE} = live ]]; then inherit subversion fi -EXPORT_FUNCTIONS pkg_setup src_unpack src_prepare src_configure src_compile src_test src_install pkg_postinst pkg_postrm + +EXPORT_FUNCTIONS pkg_setup src_unpack src_prepare ${exports} pkg_postinst pkg_postrm case ${KDEBASE} in kde-base) @@ -116,9 +131,19 @@ esac unset qtopengldepend # WebKit dependencies +case ${KDE_REQUIRED} in + always) + qtwebkitusedeps="[kde]" + ;; + optional) + qtwebkitusedeps="[kde?]" + ;; + *) ;; +esac qtwebkitdepend=" - >=x11-libs/qt-webkit-${QT_DEPEND}:4 + >=x11-libs/qt-webkit-${QT_DEPEND}:4${qtwebkitusedeps} " +unset qtwebkitusedeps case ${WEBKIT_REQUIRED} in always) COMMONDEPEND+=" ${qtwebkitdepend}" @@ -173,13 +198,7 @@ case ${KDEBASE} in _pvn="-${PV}" # Block installation of other SLOTS unless kdeprefix - for slot in ${KDE_SLOTS[@]} ${KDE_LIVE_SLOTS[@]}; do - # Block non kdeprefix ${PN} on other slots - if [[ ${SLOT} != ${slot} ]]; then - RDEPEND+=" !kdeprefix? ( !kde-base/${PN}:${slot}[-kdeprefix] )" - fi - done - unset slot + RDEPEND+=" $(block_other_slots)" ;; koffice) SLOT="2" @@ -198,7 +217,7 @@ kdecommondepend=" dev-lang/perl >=x11-libs/qt-core-${QT_DEPEND}:4[qt3support,ssl] >=x11-libs/qt-gui-${QT_DEPEND}:4[accessibility,dbus] - >=x11-libs/qt-qt3support-${QT_DEPEND}:4[accessibility] + >=x11-libs/qt-qt3support-${QT_DEPEND}:4[accessibility,kde] >=x11-libs/qt-script-${QT_DEPEND}:4 >=x11-libs/qt-sql-${QT_DEPEND}:4[qt3support] >=x11-libs/qt-svg-${QT_DEPEND}:4 @@ -453,7 +472,7 @@ kde4-base_src_unpack() { fi } -# @FUNCTION: kde4-base_src_compile +# @FUNCTION: kde4-base_src_prepare # @DESCRIPTION: # General pre-configure and pre-compile function for KDE4 applications. # It also handles translations if KDE_LINGUAS is defined. See KDE_LINGUAS and @@ -468,9 +487,10 @@ kde4-base_src_prepare() { fi # Enable/disable handbooks for kde4-base packages - # kde-l10n inherits kde-base but is metpackage, so no check for doc + # kde-l10n inherits kde4-base but is metpackage, so no check for doc + # kdelibs inherits kde4-base but handle installing the handbook itself if ! has kde4-meta ${INHERITED}; then - has handbook ${IUSE//+} && [[ ${PN} != kde-l10n ]] && enable_selected_doc_linguas + has handbook ${IUSE//+} && [[ ${PN} != kde-l10n ]] && [[ ${PN} != kdelibs ]] && enable_selected_doc_linguas fi [[ ${BUILD_TYPE} = live ]] && subversion_src_prepare @@ -603,7 +623,7 @@ kde4-base_src_make_doc() { if [[ -n ${KDEBASE} ]] && [[ -d "${D}${EROOT}usr/share/doc/${PF}" ]]; then # work around bug #97196 dodir /usr/share/doc/KDE4 && \ - mv "${D}${EROOT}usr/share/doc/${PF}" "${D}${EROOT}usr/share/doc/KDE4/" || \ + mv -f "${D}${EROOT}usr/share/doc/${PF}" "${D}${EROOT}usr/share/doc/KDE4/" || \ die "Failed to move docs to KDE4/." fi } diff --git a/eclass/kde4-functions.eclass b/eclass/kde4-functions.eclass index 33ace54973d2..bbbc8ebe9c51 100644 --- a/eclass/kde4-functions.eclass +++ b/eclass/kde4-functions.eclass @@ -1,9 +1,11 @@ # Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-functions.eclass,v 1.22 2009/08/03 21:59:53 wired Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-functions.eclass,v 1.23 2009/08/20 09:18:01 scarabeus Exp $ # Prefix compat: : ${EROOT:=${ROOT}} +# Append missing trailing slash character +[[ ${EROOT} = */ ]] || EROOT+="/" # @ECLASS: kde4-functions.eclass # @MAINTAINER: @@ -352,3 +354,40 @@ load_library_dependencies() { done eend $? } + +# @FUNCTION: block_other_slots +# @DESCRIPTION: +# Create blocks for the current package in other slots when +# installed with USE=-kdeprefix +block_other_slots() { + local slot + + debug-print-function ${FUNCNAME} "$@" + + for slot in ${KDE_SLOTS[@]} ${KDE_LIVE_SLOTS[@]}; do + # Block non kdeprefix ${PN} on other slots + if [[ ${SLOT} != ${slot} ]]; then + echo "!kdeprefix? ( !kde-base/${PN}:${slot}[-kdeprefix] )" + fi + done +} + +# @FUNCTION: add_blocker +# @DESCRIPTION: +# Create correct RDEPEND value for blocking correct package. +# Usefull for file-collision blocks. +# Parameters are package and version to block. +# add_blocker kde-base/kdelibs 4.2.4 +add_blocker() { + local slot + + debug-print-function ${FUNCNAME} "$@" + + [[ ${1} = "" || ${2} = "" ]] && die "Missing parameter" + for slot in ${KDE_SLOTS[@]} ${KDE_LIVE_SLOTS[@]}; do + # on -kdeprefix we block every slot + RDEPEND+=" !kdeprefix? ( !<=${1}-${2}:${slot}[-kdeprefix] )" + done + # on kdeprefix we block only our slot + RDEPEND+=" kdeprefix? ( !<=${1}-${2}:${SLOT}[kdeprefix] )" +} diff --git a/eclass/kde4-meta.eclass b/eclass/kde4-meta.eclass index 02c7f2986f70..99cec16dcb4c 100644 --- a/eclass/kde4-meta.eclass +++ b/eclass/kde4-meta.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-meta.eclass,v 1.24 2009/08/07 01:00:11 wired Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-meta.eclass,v 1.25 2009/08/20 09:18:01 scarabeus Exp $ # # @ECLASS: kde4-meta.eclass # @MAINTAINER: |