From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 189941389F5 for ; Mon, 17 Nov 2014 09:44:28 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9E7E4E0E9B; Mon, 17 Nov 2014 09:44:26 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 54014E0E9B for ; Mon, 17 Nov 2014 09:44:26 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 1CD55340417 for ; Mon, 17 Nov 2014 09:44:25 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id AE152A4D3 for ; Mon, 17 Nov 2014 09:44:23 +0000 (UTC) From: "Michael Palimaka" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michael Palimaka" Message-ID: <1416217465.2781dad2e0f8b2bd9e2f21aa5473e4a326d7991a.kensington@gentoo> Subject: [gentoo-commits] proj/kde:apps-scratch commit in: eclass/ X-VCS-Repository: proj/kde X-VCS-Files: eclass/kde5-functions.eclass X-VCS-Directories: eclass/ X-VCS-Committer: kensington X-VCS-Committer-Name: Michael Palimaka X-VCS-Revision: 2781dad2e0f8b2bd9e2f21aa5473e4a326d7991a X-VCS-Branch: apps-scratch Date: Mon, 17 Nov 2014 09:44:23 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 43a08e81-0c11-49da-aa06-7d8606d1cfd9 X-Archives-Hash: dd0c75ec45692c25097009add9f76e8c commit: 2781dad2e0f8b2bd9e2f21aa5473e4a326d7991a Author: Michael Palimaka gentoo org> AuthorDate: Mon Nov 17 09:44:25 2014 +0000 Commit: Michael Palimaka gentoo org> CommitDate: Mon Nov 17 09:44:25 2014 +0000 URL: http://sources.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=2781dad2 [eclass] Add add_kdeapps_dep function. --- eclass/kde5-functions.eclass | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/eclass/kde5-functions.eclass b/eclass/kde5-functions.eclass index 4466276..830cacc 100644 --- a/eclass/kde5-functions.eclass +++ b/eclass/kde5-functions.eclass @@ -131,6 +131,30 @@ add_frameworks_dep() { _add_kdecategory_dep kde-frameworks "${1}" "${2}" "${version}" } +# @FUNCTION: add_kdeapps_dep +# @USAGE: [USE flags] [minimum version] +# @DESCRIPTION: +# Create proper dependency for kde-apps/ dependencies. +# This takes 1 to 3 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). +# 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_kdeapps_dep() { + debug-print-function ${FUNCNAME} "$@" + + local version + + if [[ -n ${3} ]]; then + version=${3} + elif [[ ${CATEGORY} = kde-apps ]]; then + version=${PV} + fi + + _add_kdecategory_dep kde-apps "${1}" "${2}" "${version}" +} + # @FUNCTION: add_kdebase_dep # @USAGE: [USE flags] [minimum version] # @DESCRIPTION: