1 |
On Thu, 01 Apr 2021 11:57:01 +0200 |
2 |
Andreas Sturmlechner <asturm@g.o> wrote: |
3 |
|
4 |
> From 0bdac63ac30fdbe2d1293d0ecbdbc2a5ea673112 Mon Sep 17 00:00:00 2001 |
5 |
> From: Andreas Sturmlechner <asturm@g.o> |
6 |
> Date: Sun, 28 Mar 2021 11:41:32 +0200 |
7 |
> Subject: [PATCH 1/5] flag-o-matic.eclass: SUPPORTED_EAPIS: 5,6,7; drop eutils, |
8 |
> multilib |
9 |
> |
10 |
> - eutils was only used for eqawarn in old EAPI |
11 |
> - multilib usage unknown, but is inherited by toolchain-funcs anyway |
12 |
> |
13 |
> Signed-off-by: Andreas Sturmlechner <asturm@g.o> |
14 |
> --- |
15 |
> eclass/flag-o-matic.eclass | 11 +++++++++-- |
16 |
> 1 file changed, 9 insertions(+), 2 deletions(-) |
17 |
> |
18 |
> diff --git a/eclass/flag-o-matic.eclass b/eclass/flag-o-matic.eclass |
19 |
> index 20ee39d98ba..ab79f70392d 100644 |
20 |
> --- a/eclass/flag-o-matic.eclass |
21 |
> +++ b/eclass/flag-o-matic.eclass |
22 |
> @@ -1,9 +1,10 @@ |
23 |
> -# Copyright 1999-2020 Gentoo Authors |
24 |
> +# Copyright 1999-2021 Gentoo Authors |
25 |
> # Distributed under the terms of the GNU General Public License v2 |
26 |
> |
27 |
> # @ECLASS: flag-o-matic.eclass |
28 |
> # @MAINTAINER: |
29 |
> # toolchain@g.o |
30 |
> +# @SUPPORTED_EAPIS: 5 6 7 |
31 |
> # @BLURB: common functions to manipulate and query toolchain flags |
32 |
> # @DESCRIPTION: |
33 |
> # This eclass contains a suite of functions to help developers sanely |
34 |
> @@ -12,7 +13,13 @@ |
35 |
> if [[ -z ${_FLAG_O_MATIC_ECLASS} ]]; then |
36 |
> _FLAG_O_MATIC_ECLASS=1 |
37 |
> |
38 |
> -inherit eutils toolchain-funcs multilib |
39 |
> +inherit toolchain-funcs |
40 |
> + |
41 |
> +case ${EAPI} in |
42 |
> + [0-4]) die "flag-o-matic.eclass: EAPI ${EAPI} is too old." ;; |
43 |
> + [5-7]) inherit eutils ;; |
44 |
> + *) die "EAPI ${EAPI} is not supported by flag-o-matic.eclass." ;; |
45 |
> +esac |
46 |
|
47 |
Minor nit: I'd prefer more typical '|' style for string enumerations. |
48 |
case ${EAPI:-0} in |
49 |
0|1|2|3|4) ... |
50 |
5|6|7) ... |
51 |
|
52 |
Otherwise patch is good. |
53 |
|
54 |
> # Return all the flag variables that our high level funcs operate on. |
55 |
> all-flag-vars() { |
56 |
> -- |
57 |
> 2.31.0 |
58 |
> |
59 |
|
60 |
-- |
61 |
|
62 |
Sergei |