From: Michael Palimaka <kensington@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: [gentoo-dev] Re: [PATCH 13/15] cmake-utils.eclass: ban helper functions in EAPI 6 and later
Date: Fri, 22 Jan 2016 20:36:53 +1100 [thread overview]
Message-ID: <n7st7s$rgp$3@ger.gmane.org> (raw)
In-Reply-To: <6DF1EA97-301C-4449-81EA-7DA0A79C3582@gentoo.org>
On 01/22/2016 03:31 AM, Michał Górny wrote:
> Dnia 20 stycznia 2016 11:43:11 CET, Michael Palimaka <kensington@gentoo.org> 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 <USE flag> [<flag name>]"
>> 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 <USE flag> [<flag name>]"
>> if [[ ! -z $3 ]]; then
>
> I suggest making it more explicit what kind of helper functions are banned in the commit message.
>
I'll add the full list of affected functions.
next prev parent reply other threads:[~2016-01-22 9:40 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-20 10:42 [gentoo-dev] [PATCH 00/15] EAPI 6 support for cmake-utils.eclas Michael Palimaka
2016-01-20 10:42 ` [gentoo-dev] [PATCH 01/15] cmake-utils.eclass: reorder a bit Michael Palimaka
2016-01-20 10:43 ` [gentoo-dev] [PATCH 02/15] cmake-utils.eclass: declare some variables local Michael Palimaka
2016-01-20 10:43 ` [gentoo-dev] [PATCH 03/15] cmake-utils.eclass: check exit codes of executed commands Michael Palimaka
2016-01-20 10:43 ` [gentoo-dev] [PATCH 04/15] cmake-utils.eclass: use a proper if statement Michael Palimaka
2016-01-20 10:43 ` [gentoo-dev] [PATCH 05/15] cmake-utils.eclass: remove duplicate CMAKE_REMOVE_MODULES Michael Palimaka
2016-01-20 10:43 ` [gentoo-dev] [PATCH 06/15] cmake-utils.eclass: ban WANT_CMAKE in EAPI 6 and later Michael Palimaka
2016-01-20 10:43 ` [gentoo-dev] [PATCH 07/15] cmake-utils.eclass: replace replace comment_add_subdirectory with a namespaced version Michael Palimaka
2016-01-21 16:29 ` Michał Górny
2016-01-22 9:36 ` [gentoo-dev] " Michael Palimaka
2016-01-20 10:43 ` [gentoo-dev] [PATCH 08/15] cmake-utils.eclass: namespace some private functions Michael Palimaka
2016-01-20 10:43 ` [gentoo-dev] [PATCH 09/15] cmake-utils.eclass: move $S modifications to src_prepare in EAPI 6 and later Michael Palimaka
2016-01-20 10:43 ` [gentoo-dev] [PATCH 10/15] cmake-utils.eclass: ban non-array usage of mycmakeargs " Michael Palimaka
2016-01-20 10:43 ` [gentoo-dev] [PATCH 11/15] cmake-utils.eclass: use default_src_prepare " Michael Palimaka
2016-01-20 10:43 ` [gentoo-dev] [PATCH 12/15] cmake-utils.eclass: require two arguments for cmake-utils_use_find_package " Michael Palimaka
2016-01-20 10:43 ` [gentoo-dev] [PATCH 13/15] cmake-utils.eclass: ban helper functions " Michael Palimaka
2016-01-21 16:31 ` Michał Górny
2016-01-22 9:36 ` Michael Palimaka [this message]
2016-01-20 10:43 ` [gentoo-dev] [PATCH 14/15] cmake-utils.eclass: enable EAPI 6 Michael Palimaka
2016-01-20 10:43 ` [gentoo-dev] [PATCH 15/15] cmake-utils.eclass: update copyright year Michael Palimaka
2016-01-21 16:32 ` Michał Górny
2016-01-22 9:34 ` [gentoo-dev] " Michael Palimaka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='n7st7s$rgp$3@ger.gmane.org' \
--to=kensington@gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox