summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorTomas Chvatal <scarabeus@gentoo.org>2009-09-01 09:32:08 +0000
committerTomas Chvatal <scarabeus@gentoo.org>2009-09-01 09:32:08 +0000
commitbbdbf2d4b427dbde2f1b12932198bed110815f8b (patch)
treeecf75191960ee5051106b7ff514a80110e4247c3 /eclass
parentfix bug #279270 + version bump (diff)
downloadhistorical-bbdbf2d4b427dbde2f1b12932198bed110815f8b.tar.gz
historical-bbdbf2d4b427dbde2f1b12932198bed110815f8b.tar.bz2
historical-bbdbf2d4b427dbde2f1b12932198bed110815f8b.zip
Sync kde4 eclasses with overlay ones in preparation for 4.3.1.
One thing differ from overlay ones. KDE_MINIMAL sets still 4.2 instead of 4.3 because some archies did not keyword all kde-base YET!
Diffstat (limited to 'eclass')
-rw-r--r--eclass/kde4-base.eclass25
-rw-r--r--eclass/kde4-functions.eclass20
2 files changed, 33 insertions, 12 deletions
diff --git a/eclass/kde4-base.eclass b/eclass/kde4-base.eclass
index 7897bd372280..f68b725113f5 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.44 2009/08/20 09:18:01 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-base.eclass,v 1.45 2009/09/01 09:32:08 scarabeus Exp $
# @ECLASS: kde4-base.eclass
# @MAINTAINER:
@@ -88,7 +88,7 @@ fi
# @ECLASS-VARIABLE: KDE_MINIMAL
# @DESCRIPTION:
# This variable is used when KDE_REQUIRED is set, to specify required KDE minimal
-# version for apps to work. Currently defaults to 4.2
+# version for apps to work. Currently defaults to 4.3
# One may override this variable to raise version requirements.
# For possible values look at KDE_SLOTS and KDE_LIVE_SLOTS variables.
# Note that it is fixed to ${SLOT} for kde-base packages.
@@ -193,6 +193,7 @@ case ${KDEBASE} in
9999*) SLOT="live" ;; # regular live
*) die "Unsupported ${PV}" ;;
esac
+ KDE_MINIMAL="${SLOT}"
_kdedir="${SLOT}"
_pv="-${PV}:${SLOT}"
_pvn="-${PV}"
@@ -229,15 +230,25 @@ kdecommondepend="
)
"
if [[ ${PN} != kdelibs ]]; then
+ [[ ${PN} != libknotificationitem ]] && slot_is_at_least 4.3 ${KDE_MINIMAL} && local libknotificationitem_required=1
if [[ ${KDEBASE} = kde-base ]]; then
kdecommondepend+="
kdeprefix? ( >=kde-base/kdelibs${_pv}[kdeprefix] )
!kdeprefix? ( >=kde-base/kdelibs${_pvn}[-kdeprefix] )
"
+ [[ -n ${libknotificationitem_required} ]] && \
+ kdecommondepend+="
+ kdeprefix? ( >=kde-base/libknotificationitem${_pv}[kdeprefix] )
+ !kdeprefix? ( >=kde-base/libknotificationitem${_pvn}[-kdeprefix] )
+ "
else
kdecommondepend+="
>=kde-base/kdelibs${_pv}
"
+ [[ -n ${libknotificationitem_required} ]] && \
+ kdecommondepend+="
+ >=kde-base/libknotificationitem${_pv}
+ "
fi
fi
unset _pv _pvn
@@ -538,6 +549,7 @@ kde4-base_src_configure() {
# Shadow existing /usr installations
unset KDEDIRS
+ # Handle kdeprefix-ed KDE
if [[ ${KDEDIR} != "${EROOT}usr" ]]; then
# Override some environment variables - only when kdeprefix is different,
# to not break ccache/distcc
@@ -546,13 +558,14 @@ kde4-base_src_configure() {
# Append full RPATH
cmakeargs+=" -DCMAKE_SKIP_RPATH=OFF"
- fi
- if has kdeprefix ${IUSE//+} && use kdeprefix; then
- # Set cmake prefixes to allow buildsystem to localize valid KDE installation
+ # Set cmake prefixes to allow buildsystem to locate valid KDE installation
# when more are present
cmakeargs+=" -DCMAKE_SYSTEM_PREFIX_PATH=${KDEDIR}"
- else
+ fi
+
+ # Handle kdeprefix in application itself
+ if ! has kdeprefix ${IUSE//+} || ! use kdeprefix; then
# If prefix is /usr, sysconf needs to be /etc, not /usr/etc
cmakeargs+=" -DSYSCONF_INSTALL_DIR=${EROOT}etc"
fi
diff --git a/eclass/kde4-functions.eclass b/eclass/kde4-functions.eclass
index bbbc8ebe9c51..678e7a70d531 100644
--- a/eclass/kde4-functions.eclass
+++ b/eclass/kde4-functions.eclass
@@ -1,6 +1,6 @@
# 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.23 2009/08/20 09:18:01 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-functions.eclass,v 1.24 2009/09/01 09:32:08 scarabeus Exp $
# Prefix compat:
: ${EROOT:=${ROOT}}
@@ -44,13 +44,23 @@ fi
# @DESCRIPTION:
# The slots used by all KDE versions later than 4.0. The live KDE releases use
# KDE_LIVE_SLOTS instead. Values should be ordered.
-KDE_SLOTS=( "kde-4" "4.1" "4.2" "4.3" "4.4" )
+KDE_SLOTS=( "4.1" "4.2" "4.3" "4.4" )
# @ECLASS-VARIABLE: KDE_LIVE_SLOTS
# @DESCRIPTION:
# The slots used by KDE live versions. Values should be ordered.
KDE_LIVE_SLOTS=( "live" )
+# @FUNCTION: slot_is_at_least
+# @USAGE: <want> <have>
+# @DESCRIPTION:
+# Version aware slot comparator.
+# Current implementation relies on the fact, that slots can be compared like
+# string literals (and let's keep it this way).
+slot_is_at_least() {
+ [[ "${2}" > "${1}" || "${2}" = "${1}" ]]
+}
+
# @FUNCTION: buildsycoca
# @DESCRIPTION:
# Function to rebuild the KDE System Configuration Cache.
@@ -360,10 +370,9 @@ load_library_dependencies() {
# Create blocks for the current package in other slots when
# installed with USE=-kdeprefix
block_other_slots() {
- local slot
-
debug-print-function ${FUNCNAME} "$@"
+ local slot
for slot in ${KDE_SLOTS[@]} ${KDE_LIVE_SLOTS[@]}; do
# Block non kdeprefix ${PN} on other slots
if [[ ${SLOT} != ${slot} ]]; then
@@ -379,11 +388,10 @@ block_other_slots() {
# 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"
+ local slot
for slot in ${KDE_SLOTS[@]} ${KDE_LIVE_SLOTS[@]}; do
# on -kdeprefix we block every slot
RDEPEND+=" !kdeprefix? ( !<=${1}-${2}:${slot}[-kdeprefix] )"