diff options
| author | Jonathan Callen <abcd@gentoo.org> | 2009-09-11 17:14:35 -0400 |
|---|---|---|
| committer | Jonathan Callen <abcd@gentoo.org> | 2009-09-11 23:52:47 -0400 |
| commit | 6658447f57b455e0534415f667137c57691a48ea (patch) | |
| tree | 52a477bfc7f165ee6379b7731085da538e8842cf /eclass/kde4-functions.eclass | |
| parent | ed65ebc4f4cd1bb5c19ec56f3db9ac01c5e61ab8 (diff) | |
| download | kde-6658447f57b455e0534415f667137c57691a48ea.tar.gz kde-6658447f57b455e0534415f667137c57691a48ea.tar.bz2 kde-6658447f57b455e0534415f667137c57691a48ea.zip | |
Add a new add_kdebase_dep() function, and inject it everywhere
The add_kdebase_dep function takes 1-2 arguments, the first being the
name of the package to depend upon, and the second being (optionally)
extra USE deps.
When given 1 argument, this function will output
!kdeprefix? ( >=kde-base/$1-${PV}[-kdeprefix] )
kdeprefix? ( >=kde-base/$1-${PV}:${SLOT}[kdeprefix] )
And 2 arguments outputs
!kdeprefix? ( >=kde-base/$1-${PV}[-kdeprefix,$2] )
kdeprefix? ( >=kde-base/$1-${PV}:${SLOT}[kdeprefix,$2] )
These are the proper deps to replace
>=kde-base/PKG-${PV}:${SLOT}[kdeprefix=,USEDEPS]
as it does not force an all-at-once upgrade of everything.
Some of the deps (the ones from kde4-base.eclass) were already in
this form, so there was an odd combination of packages that could be
installed in separate slots with -kdeprefix, and packages that couldn't.
Diffstat (limited to 'eclass/kde4-functions.eclass')
| -rw-r--r-- | eclass/kde4-functions.eclass | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/eclass/kde4-functions.eclass b/eclass/kde4-functions.eclass index ca143ff8c96..419272a6f58 100644 --- a/eclass/kde4-functions.eclass +++ b/eclass/kde4-functions.eclass @@ -399,3 +399,23 @@ add_blocker() { # on kdeprefix we block only our slot RDEPEND+=" kdeprefix? ( !<=kde-base/${1}-${2}:${SLOT}[kdeprefix] )" } + +# @FUNCTION: add_kdebase_dep +# @DESCRIPTION: +# Create proper dependency for kde-base/ dependencies, +# adding SLOT when needed (and *only* when needed). +# This takes 1 or 2 arguments. The first being the package +# name, the optional second, is additional USE flags to append. +# The output of this should be added directly to DEPEND/RDEPEND, and +# may be wrapped in a USE conditional (but not an || conditional +# without an extra set of parentheses. +add_kdebase_dep() { + debug-print-function ${FUNCNAME} "$@" + + [[ -z ${1} ]] && die "Missing parameter" + + local use=${2:+,${2}} + + echo "!kdeprefix? ( >=kde-base/${1}-${PV}[-kdeprefix${use}] )" + echo "kdeprefix? ( >=kde-base/${1}-${PV}:${SLOT}[kdeprefix${use}] )" +} |
