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

Diff of /eclass/kde4-functions.eclass

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

Revision 1.25 Revision 1.26
1# Copyright 1999-2008 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-functions.eclass,v 1.25 2009/10/06 18:02:12 alexxy Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-functions.eclass,v 1.26 2009/10/27 14:16:49 scarabeus Exp $
4 4
5inherit versionator 5inherit versionator
6
7# Prefix compat:
8: ${EROOT:=${ROOT}}
9# Append missing trailing slash character
10[[ ${EROOT} = */ ]] || EROOT+="/"
11 6
12# @ECLASS: kde4-functions.eclass 7# @ECLASS: kde4-functions.eclass
13# @MAINTAINER: 8# @MAINTAINER:
14# kde@gentoo.org 9# kde@gentoo.org
15# @BLURB: Common ebuild functions for KDE 4 packages 10# @BLURB: Common ebuild functions for KDE 4 packages
448 for param; do 443 for param; do
449 # If the parameter does not have a ":" in it... 444 # If the parameter does not have a ":" in it...
450 if [[ ${param/:} == ${param} ]]; then 445 if [[ ${param/:} == ${param} ]]; then
451 def=${param} 446 def=${param}
452 else # the parameter *does* have a ":" in it 447 else # the parameter *does* have a ":" in it
453 # so everythin after the : is the slot... 448 # so everything after the : is the slot...
454 slot=${param#*:} 449 slot=${param#*:}
455 # ...and everything before the : is the version 450 # ...and everything before the : is the version
456 local block_${slot//./_}=${param%:*} 451 local block_${slot//./_}=${param%:*}
457 fi 452 fi
458 done 453 done
462 # ${!var} is it's value 457 # ${!var} is it's value
463 var=block_${slot//./_} 458 var=block_${slot//./_}
464 # if we didn't pass *:${slot}, then use the unsloted value 459 # if we didn't pass *:${slot}, then use the unsloted value
465 [[ ${!var} == "unset" ]] && var=def 460 [[ ${!var} == "unset" ]] && var=def
466 461
467 # If the no version was passed, or the version is greater than the 462 # If no version was passed, or the version is greater than the maximum
468 # maximum possible version in this slot, block all versions in this 463 # possible version in this slot, block all versions in this slot
469 # slot
470 if [[ ${!var} == "unset" ]] || _greater_max_in_slot ${!var#<} ${slot}; then 464 if [[ ${!var} == "unset" ]] || [[ -z ${!var} ]] || _greater_max_in_slot ${!var#<} ${slot}; then
471 atom=${pkg} 465 atom=${pkg}
472 # If the version is "0" or less than the minimum possible version in 466 # If the version is "0" or less than the minimum possible version in
473 # this slot, do nothing 467 # this slot, do nothing
474 elif [[ ${!var} == "0" ]] || _less_min_in_slot ${!var#<} ${slot}; then 468 elif [[ ${!var} == "0" ]] || _less_min_in_slot ${!var#<} ${slot}; then
475 continue 469 continue
510# adding SLOT when needed (and *only* when needed). 504# adding SLOT when needed (and *only* when needed).
511# This takes 1 or 2 arguments. The first being the package 505# This takes 1 or 2 arguments. The first being the package
512# name, the optional second, is additional USE flags to append. 506# name, the optional second, is additional USE flags to append.
513# The output of this should be added directly to DEPEND/RDEPEND, and 507# The output of this should be added directly to DEPEND/RDEPEND, and
514# may be wrapped in a USE conditional (but not an || conditional 508# may be wrapped in a USE conditional (but not an || conditional
515# without an extra set of parentheses. 509# without an extra set of parentheses).
516add_kdebase_dep() { 510add_kdebase_dep() {
517 debug-print-function ${FUNCNAME} "$@" 511 debug-print-function ${FUNCNAME} "$@"
518 512
519 [[ -z ${1} ]] && die "Missing parameter" 513 [[ -z ${1} ]] && die "Missing parameter"
520 514

Legend:
Removed from v.1.25  
changed lines
  Added in v.1.26

  ViewVC Help
Powered by ViewVC 1.1.20