From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-974998-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 661471396D0
	for <garchives@archives.gentoo.org>; Mon, 25 Sep 2017 15:51:02 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 9101BE0DC4;
	Mon, 25 Sep 2017 15:51:01 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 6F52DE0DC4
	for <gentoo-commits@lists.gentoo.org>; Mon, 25 Sep 2017 15:51:01 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 75CF6341669
	for <gentoo-commits@lists.gentoo.org>; Mon, 25 Sep 2017 15:51:00 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id D0DAF746E
	for <gentoo-commits@lists.gentoo.org>; Mon, 25 Sep 2017 15:50:58 +0000 (UTC)
From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Andreas Sturmlechner" <asturm@gentoo.org>
Message-ID: <1506354637.54f1b16262cee137d0efd1d4f3e56e05cda48260.asturm@gentoo>
Subject: [gentoo-commits] proj/kde:master commit in: eclass/
X-VCS-Repository: proj/kde
X-VCS-Files: eclass/kde5-functions.eclass
X-VCS-Directories: eclass/
X-VCS-Committer: asturm
X-VCS-Committer-Name: Andreas Sturmlechner
X-VCS-Revision: 54f1b16262cee137d0efd1d4f3e56e05cda48260
X-VCS-Branch: master
Date: Mon, 25 Sep 2017 15:50:58 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Archives-Salt: 7d4b4682-9067-4647-bc59-5d53ea82a49b
X-Archives-Hash: 6d0886a3340fc544511e54ddbe564e07

commit:     54f1b16262cee137d0efd1d4f3e56e05cda48260
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Mon Sep 25 15:41:53 2017 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Mon Sep 25 15:50:37 2017 +0000
URL:        https://gitweb.gentoo.org/proj/kde.git/commit/?id=54f1b162

kde5-functions.eclass: Fix default version handling

- don't cut off version components in add_category_dep, instead do it
  in add_plasma_dep and add_kdeapps_dep

 eclass/kde5-functions.eclass | 19 ++++++++-----------
 1 file changed, 8 insertions(+), 11 deletions(-)

diff --git a/eclass/kde5-functions.eclass b/eclass/kde5-functions.eclass
index 0b49851f45..95eac433ab 100644
--- a/eclass/kde5-functions.eclass
+++ b/eclass/kde5-functions.eclass
@@ -141,7 +141,7 @@ _add_category_dep() {
 
 	if [[ -n ${version} ]] ; then
 		local operator=">="
-		local version="-$(get_version_component_range 1-3 ${version})"
+		local version="-${version}"
 	fi
 
 	if [[ -n ${slot} ]] ; then
@@ -178,7 +178,7 @@ add_frameworks_dep() {
 		version=${3}
 	elif [[ ${CATEGORY} = kde-frameworks ]]; then
 		version=$(get_version_component_range 1-2)
-	elif [[ -z "${version}" ]] ; then
+	elif [[ -z ${3} ]] ; then
 		version=${FRAMEWORKS_MINIMAL}
 	fi
 
@@ -209,8 +209,8 @@ add_plasma_dep() {
 	if [[ -n ${3} ]]; then
 		version=${3}
 	elif [[ ${CATEGORY} = kde-plasma ]]; then
-		version=${PV}
-	elif [[ -z "${version}" ]] ; then
+		version=$(get_version_component_range 1-3)
+	elif [[ -z ${3} ]] ; then
 		version=${PLASMA_MINIMAL}
 	fi
 
@@ -241,8 +241,8 @@ add_kdeapps_dep() {
 	if [[ -n ${3} ]]; then
 		version=${3}
 	elif [[ ${CATEGORY} = kde-apps ]]; then
-		version=${PV}
-	elif [[ -z "${version}" ]] ; then
+		version=$(get_version_component_range 1-3)
+	elif [[ -z ${3} ]] ; then
 		version=${KDE_APPS_MINIMAL}
 	fi
 
@@ -268,15 +268,12 @@ add_qt_dep() {
 		die "${FUNCNAME} was called with too many arguments"
 	fi
 
-	local version
+	local version=${3}
 	local slot=${4}
 
-	if [[ -n ${3} ]]; then
-		version=${3}
-	elif [[ -z "${version}" ]]; then
+	if [[ -z ${version} ]]; then
 		version=${QT_MINIMAL}
 	fi
-
 	if [[ -z ${slot} ]]; then
 		slot="5"
 	fi