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 04E54138247 for ; Wed, 13 Nov 2013 16:33:20 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2B73CE0AC3; Wed, 13 Nov 2013 16:33:17 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B55DAE0AC3 for ; Wed, 13 Nov 2013 16:33:16 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B7DEF33F329 for ; Wed, 13 Nov 2013 16:33:15 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id C5751E530A for ; Wed, 13 Nov 2013 16:33:12 +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: <1384360089.02e77a004b3c3dca66b8e1e542397fa893aaa737.kensington@gentoo> Subject: [gentoo-commits] proj/kde:frameworks commit in: eclass/ X-VCS-Repository: proj/kde X-VCS-Files: eclass/kde4-functions.eclass X-VCS-Directories: eclass/ X-VCS-Committer: kensington X-VCS-Committer-Name: Michael Palimaka X-VCS-Revision: 02e77a004b3c3dca66b8e1e542397fa893aaa737 X-VCS-Branch: frameworks Date: Wed, 13 Nov 2013 16:33:12 +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: 2ad8f632-c331-49fe-8713-18d6f4bc8804 X-Archives-Hash: c995db31ba62923d1b7f636850c42887 commit: 02e77a004b3c3dca66b8e1e542397fa893aaa737 Author: Michael Palimaka gentoo org> AuthorDate: Wed Nov 13 16:28:09 2013 +0000 Commit: Michael Palimaka gentoo org> CommitDate: Wed Nov 13 16:28:09 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=02e77a00 [eclass] Add add_frameworks_dep function. --- eclass/kde4-functions.eclass | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/eclass/kde4-functions.eclass b/eclass/kde4-functions.eclass index 9079fc2..cb6d331 100644 --- a/eclass/kde4-functions.eclass +++ b/eclass/kde4-functions.eclass @@ -39,6 +39,9 @@ esac if [[ ${CATEGORY} = kde-base ]]; then debug-print "${ECLASS}: KDEBASE ebuild recognized" KDEBASE=kde-base +elif [[ ${CATEGORY} = kde-frameworks ]]; then + debug-print "${ECLASS}: KDEFRAMEWORKS ebuild recognized" + KDEBASE=kde-frameworks elif [[ ${KMNAME-${PN}} = kdevelop ]]; then debug-print "${ECLASS}: KDEVELOP ebuild recognized" KDEBASE=kdevelop @@ -358,6 +361,44 @@ add_kdebase_dep() { echo " >=kde-base/${1}-${ver}:4[aqua=${2:+,${2}}]" } +# @FUNCTION: add_frameworks_dep +# @DESCRIPTION: +# Create proper dependency for kde-frameworks/ 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_frameworks_dep() { + debug-print-function ${FUNCNAME} "$@" + + local ver + + if [[ -n ${3} ]]; then + ver=${3} + elif [[ -n ${KDE_OVERRIDE_MINIMAL} ]]; then + ver=${KDE_OVERRIDE_MINIMAL} + elif [[ ${KDEBASE} != kde-frameworks ]]; then + ver=${KDE_MINIMAL} + # if building stable-live version depend just on the raw KDE version + # to allow merging packages against more stable basic stuff + elif [[ ${PV} == *.9999 ]]; then + ver=$(get_kde_version) + else + ver=${PV} + fi + + [[ -z ${1} ]] && die "Missing parameter" + + local usedep= + if [[ -n ${2} ]] ; then + usedep="[${2}]" + fi + + echo " >=kde-frameworks/${1}-${ver}:5${usedep}" +} + # local function to enable specified translations for specified directory # used from kde4-functions_enable_selected_linguas function _enable_selected_linguas_dir() {