summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <andreas.sturmlechner@gmail.com>2016-01-25 23:50:20 +0100
committerMichael Palimaka <kensington@gentoo.org>2016-02-15 03:46:00 +1100
commit22a1d52757839047e6edaee3f84731d2e50ca064 (patch)
tree82372da9fb4a0dfec272e217a50e14b6810071a7 /eclass/kde5-functions.eclass
parentkde5-functions.eclass: Introduce add_qt_dep for consistent Qt version deps (diff)
downloadgentoo-22a1d52757839047e6edaee3f84731d2e50ca064.tar.gz
gentoo-22a1d52757839047e6edaee3f84731d2e50ca064.tar.bz2
gentoo-22a1d52757839047e6edaee3f84731d2e50ca064.zip
kde5-functions.eclass: add_category_dep: Implement slot/op override
Also fixes subslot awareness.
Diffstat (limited to 'eclass/kde5-functions.eclass')
-rw-r--r--eclass/kde5-functions.eclass16
1 files changed, 10 insertions, 6 deletions
diff --git a/eclass/kde5-functions.eclass b/eclass/kde5-functions.eclass
index 74a3e2447f07..68607ff6c5d5 100644
--- a/eclass/kde5-functions.eclass
+++ b/eclass/kde5-functions.eclass
@@ -105,7 +105,7 @@ _add_category_dep() {
local package=${2}
local use=${3}
local version=${4}
- local slot=
+ local slot=${5}
if [[ -n ${use} ]] ; then
local use="[${use}]"
@@ -116,8 +116,10 @@ _add_category_dep() {
local version="-$(get_version_component_range 1-3 ${version})"
fi
- if [[ ${SLOT} = 4 || ${SLOT} = 5 ]] && ! has kde5-meta-pkg ${INHERITED} ; then
- slot=":${SLOT}"
+ if [[ -n ${slot} ]] ; then
+ slot=":${slot}"
+ elif [[ ${SLOT%\/*} = 4 || ${SLOT%\/*} = 5 ]] && ! has kde5-meta-pkg ${INHERITED} ; then
+ slot=":${SLOT%\/*}"
fi
echo " ${operator}${category}/${package}${version}${slot}${use}"
@@ -210,9 +212,11 @@ add_kdeapps_dep() {
# @USAGE: <package> [USE flags] [minimum version]
# @DESCRIPTION:
# Create proper dependency for dev-qt/ dependencies.
-# This takes 1 to 3 arguments. The first being the package name, the optional
+# This takes 1 to 4 arguments. The first being the package name, the optional
# second is additional USE flags to append, and the optional third is the
-# version to use instead of the automatic version (use sparingly).
+# version to use instead of the automatic version (use sparingly). In addition,
+# the optional fourth argument defines slot+operator instead of automatic slot
+# (use even more sparingly).
# 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).
@@ -227,7 +231,7 @@ add_qt_dep() {
version=${QT_MINIMAL}
fi
- _add_category_dep dev-qt "${1}" "${2}" "${version}"
+ _add_category_dep dev-qt "${1}" "${2}" "${version}" "${4}"
}
# @FUNCTION: get_kde_version