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 D1FFF58973 for ; Thu, 21 Jan 2016 16:31:57 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 77C8521C031; Thu, 21 Jan 2016 16:31:52 +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 5FE2521C00E for ; Thu, 21 Jan 2016 16:31:51 +0000 (UTC) Received: from [IPv6:2a00:f41:303c:477f:7685:563b:4bf9:167f] (unknown [IPv6:2a00:f41:303c:477f:7685:563b:4bf9:167f]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: mgorny) by smtp.gentoo.org (Postfix) with ESMTPSA id 14B16340813; Thu, 21 Jan 2016 16:31:48 +0000 (UTC) User-Agent: K-9 Mail for Android In-Reply-To: <1453286593-26823-14-git-send-email-kensington@gentoo.org> References: <1453286593-26823-1-git-send-email-kensington@gentoo.org> <1453286593-26823-14-git-send-email-kensington@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Subject: Re: [gentoo-dev] [PATCH 13/15] cmake-utils.eclass: ban helper functions in EAPI 6 and later From: =?UTF-8?Q?Micha=C5=82_G=C3=B3rny?= Date: Thu, 21 Jan 2016 17:31:44 +0100 To: gentoo-dev@lists.gentoo.org,Michael Palimaka CC: Michael Palimaka Message-ID: <6DF1EA97-301C-4449-81EA-7DA0A79C3582@gentoo.org> X-Archives-Salt: 38110773-c639-4ccf-9022-23015ed5b2f7 X-Archives-Hash: f4c3295437006c8d556f848889f79f39 Dnia 20 stycznia 2016 11:43:11 CET, Michael Palimaka napisał(a): >https://archives.gentoo.org/gentoo-dev/message/6ff6dedb44fff4289764dc5eb960e1c6 > >Gentoo-bug: 514384 >--- > eclass/cmake-utils.eclass | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > >diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass >index 960b34b..507d27d 100644 >--- a/eclass/cmake-utils.eclass >+++ b/eclass/cmake-utils.eclass >@@ -161,6 +161,11 @@ unset CMAKEDEPEND > _cmake_use_me_now() { > debug-print-function ${FUNCNAME} "$@" > >+ local arg=$2 >+ [[ ! -z $3 ]] && arg=$3 >+ >+ has "${EAPI:-0}" 2 3 4 5 || die "${FUNCNAME[1]} is banned in EAPI 6 >and later: use -D$1${arg}=\"\$(usex $2)\" instead" >+ > local uper capitalised x > [[ -z $2 ]] && die "cmake-utils_use-$1 []" > if [[ ! -z $3 ]]; then >@@ -178,6 +183,13 @@ _cmake_use_me_now() { > _cmake_use_me_now_inverted() { > debug-print-function ${FUNCNAME} "$@" > >+ local arg=$2 >+ [[ ! -z $3 ]] && arg=$3 >+ >+ if ! has "${EAPI:-0}" 2 3 4 5 && [[ "${FUNCNAME[1]}" != >cmake-utils_use_find_package ]] ; then >+ die "${FUNCNAME[1]} is banned in EAPI 6 and later: use >-D$1${arg}=\"\$(usex $2)\" insteadss" >+ fi >+ > local uper capitalised x > [[ -z $2 ]] && die "cmake-utils_use-$1 []" > if [[ ! -z $3 ]]; then I suggest making it more explicit what kind of helper functions are banned in the commit message. -- Best regards, Michał Górny (by phone)