diff options
| author | Maciej Mrozowski (reavertm) <reavertm@poczta.fm> | 2009-08-31 00:54:51 +0200 |
|---|---|---|
| committer | Maciej Mrozowski (reavertm) <reavertm@poczta.fm> | 2009-08-31 00:54:51 +0200 |
| commit | 5ba420f170df57e2690172e99b6cfc030aa3adc8 (patch) | |
| tree | 116433ead1c8fe5606500d963404c0700b7aadb9 /eclass | |
| parent | 46ad0f1e4d1b147694f5cae6b3f2ca7642e9c706 (diff) | |
| download | kde-5ba420f170df57e2690172e99b6cfc030aa3adc8.tar.gz kde-5ba420f170df57e2690172e99b6cfc030aa3adc8.tar.bz2 kde-5ba420f170df57e2690172e99b6cfc030aa3adc8.zip | |
[eclass] Pull libknotificationitem when building against >=kdelibs:4.3
Also:
- moved to KDE_MINIMAL=4.3 being the default
- removed kde-4 SLOT
- added function for SLOT comparison (beware! it currently relies on string compatison instead of order in
KDE_SLOTS, KDE_LIVE_SLOTS - still it's the fastest one - and should be, it's in global scope)
- a little cleanup in kde4-functions
4.1 SLOT support can be removed when tree is fixed
Diffstat (limited to 'eclass')
| -rw-r--r-- | eclass/kde4-base.eclass | 17 | ||||
| -rw-r--r-- | eclass/kde4-functions.eclass | 18 |
2 files changed, 19 insertions, 16 deletions
diff --git a/eclass/kde4-base.eclass b/eclass/kde4-base.eclass index f8ddf46fa0c..af5bd007493 100644 --- a/eclass/kde4-base.eclass +++ b/eclass/kde4-base.eclass @@ -74,13 +74,6 @@ CPPUNIT_REQUIRED="${CPPUNIT_REQUIRED:-never}" # Note that for kde-base packages this variable is fixed to 'always'. KDE_REQUIRED="${KDE_REQUIRED:-always}" -# @ECLASS-VARIABLE: LIBKNOTIFICATIONITEM_REQUIRED -# @DESCRIPTION: -# Is libknotificationitem required? Possible values are 'always, 'never'. -# Set this before inheriting any KDE eclasses. Defauls to 'never'. -# Note that it only applies when KDE_REQUIRED is 'always' or 'optional' and enabled. -LIBKNOTIFICATIONITEM_REQUIRED="${LIBKNOTIFICATIONITEM_REQUIRED:-never}" - # Verify KDE_MINIMAL (display QA notice in pkg_setup, still we need to fix it here) if [[ -n ${KDE_MINIMAL} ]]; then for slot in ${KDE_SLOTS[@]} ${KDE_LIVE_SLOTS[@]}; do @@ -95,11 +88,11 @@ 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. -KDE_MINIMAL="${KDE_MINIMAL:-4.2}" +KDE_MINIMAL="${KDE_MINIMAL:-4.3}" # Fallback behaviour (for now) # TODO Remove when tree is clean @@ -200,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}" @@ -236,12 +230,13 @@ kdecommondepend=" ) " if [[ ${PN} != kdelibs ]]; then + 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] ) " - [[ ${LIBKNOTIFICATIONITEM_REQUIRED} = always ]] && \ + [[ -n ${libknotificationitem_required} ]] && \ kdecommondepend+=" kdeprefix? ( >=kde-base/libknotificationitem${_pv}[kdeprefix] ) !kdeprefix? ( >=kde-base/libknotificationitem${_pvn}[-kdeprefix] ) @@ -250,7 +245,7 @@ if [[ ${PN} != kdelibs ]]; then kdecommondepend+=" >=kde-base/kdelibs${_pv} " - [[ ${LIBKNOTIFICATIONITEM_REQUIRED} = always ]] && \ + [[ -n ${libknotificationitem_required} ]] && \ kdecommondepend+=" >=kde-base/libknotificationitem${_pv} " diff --git a/eclass/kde4-functions.eclass b/eclass/kde4-functions.eclass index 31e821b1b71..072ef01921c 100644 --- a/eclass/kde4-functions.eclass +++ b/eclass/kde4-functions.eclass @@ -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] )" |
