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 BC75458974 for ; Sun, 31 Jan 2016 16:22:07 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9721821C135; Sun, 31 Jan 2016 16:22:05 +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 0CC7B21C132 for ; Sun, 31 Jan 2016 16:22:04 +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 C9EBE340BDA for ; Sun, 31 Jan 2016 16:22:03 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 7275E8EC for ; Sun, 31 Jan 2016 16:22:01 +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: <1454257307.7e4a53919ff347857cb86bddc887f686185831cb.kensington@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: kensington X-VCS-Committer-Name: Michael Palimaka X-VCS-Revision: 7e4a53919ff347857cb86bddc887f686185831cb X-VCS-Branch: master Date: Sun, 31 Jan 2016 16:22:01 +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: 46403324-ab64-42c4-bb4e-1cb92e93170a X-Archives-Hash: 56ac87bd6a0ce57b2e69624fa147443c commit: 7e4a53919ff347857cb86bddc887f686185831cb Author: Andreas Sturmlechner gmail com> AuthorDate: Thu Jan 7 17:40:12 2016 +0000 Commit: Michael Palimaka gentoo org> CommitDate: Sun Jan 31 16:21:47 2016 +0000 URL: https://gitweb.gentoo.org/proj/kde.git/commit/?id=7e4a5391 kde5-functions.eclass: Introduce add_qt_dep for consistent Qt version deps _add_kdecategory_dep -> _add_category_dep eclass/kde5-functions.eclass | 37 +++++++++++++++++++++++++++++++------ 1 file changed, 31 insertions(+), 6 deletions(-) diff --git a/eclass/kde5-functions.eclass b/eclass/kde5-functions.eclass index 7b021d2..f8b3b30 100644 --- a/eclass/kde5-functions.eclass +++ b/eclass/kde5-functions.eclass @@ -93,11 +93,12 @@ _check_gcc_version() { fi } -# @FUNCTION: _add_kdecategory_dep +# @FUNCTION: _add_category_dep # @INTERNAL # @DESCRIPTION: -# Implementation of add_plasma_dep and add_frameworks_dep. -_add_kdecategory_dep() { +# Implementation of add_plasma_dep, add_frameworks_dep, add_kdeapps_dep, +# and finally, add_qt_dep. +_add_category_dep() { debug-print-function ${FUNCNAME} "$@" local category=${1} @@ -145,7 +146,7 @@ add_frameworks_dep() { version=${FRAMEWORKS_MINIMAL} fi - _add_kdecategory_dep kde-frameworks "${1}" "${2}" "${version}" + _add_category_dep kde-frameworks "${1}" "${2}" "${version}" } # @FUNCTION: add_plasma_dep @@ -171,7 +172,7 @@ add_plasma_dep() { version=${PLASMA_MINIMAL} fi - _add_kdecategory_dep kde-plasma "${1}" "${2}" "${version}" + _add_category_dep kde-plasma "${1}" "${2}" "${version}" } # @FUNCTION: add_kdeapps_dep @@ -202,7 +203,31 @@ add_kdeapps_dep() { fi fi - _add_kdecategory_dep kde-apps "${1}" "${2}" "${version}" + _add_category_dep kde-apps "${1}" "${2}" "${version}" +} + +# @FUNCTION: add_qt_dep +# @USAGE: [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 +# 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_qt_dep() { + debug-print-function ${FUNCNAME} "$@" + + local version + + if [[ -n ${3} ]]; then + version=${3} + elif [[ -z "${version}" ]] ; then + version=${QT_MINIMAL} + fi + + _add_category_dep dev-qt "${1}" "${2}" "${version}" } # @FUNCTION: get_kde_version