Gentoo Archives: gentoo-dev

From: Anna Vyalkova <cyber+gentoo@×××××.in>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [PATCH] gkrellm-plugin.eclass: Support EAPI 8
Date: Fri, 18 Mar 2022 20:32:53
Message-Id: YjTsasapY3gcvB4j@sysrq.in
In Reply to: [gentoo-dev] [PATCH] gkrellm-plugin.eclass: Support EAPI 8 by Thomas Bracht Laumann Jespersen
1 On 2022-03-18 20:38, Thomas Bracht Laumann Jespersen wrote:
2 > The most notable changes are:
3 >
4 > * BDEPEND on "virtual/pkgconfig" instead of DEPEND
5 >
6 > * Add @DEFAULT_UNSET to the variables PLUGIN_SERVER_SO and PLUGIN_DOCS
7 >
8 > Looking over the eclass, it doesn't appear to use any functionality that was
9 > modified or banned in EAPI 7 or 8.
10 >
11 > Signed-off-by: Thomas Bracht Laumann Jespersen <t@×××××××.xyz>
12 > ---
13 > eclass/gkrellm-plugin.eclass | 30 +++++++++++++++++++++---------
14 > 1 file changed, 21 insertions(+), 9 deletions(-)
15 >
16 > diff --git a/eclass/gkrellm-plugin.eclass b/eclass/gkrellm-plugin.eclass
17 > index fb3800f56b7..7ae124fb67e 100644
18 > --- a/eclass/gkrellm-plugin.eclass
19 > +++ b/eclass/gkrellm-plugin.eclass
20 > @@ -7,7 +7,8 @@
21 > # @AUTHOR:
22 > # Original author: Jim Ramsay <lack@g.o>
23 > # EAPI 6 author: David Seifert <soap@g.o>
24 > -# @SUPPORTED_EAPIS: 6
25 > +# EAPI 8 author: Thomas Bracht Laumann Jespersen <t@×××××××.xyz>
26 > +# @SUPPORTED_EAPIS: 6 8
27 > # @PROVIDES: multilib
28 > # @BLURB: Provides src_install used by (almost) all gkrellm plugins
29 > # @DESCRIPTION:
30 > @@ -15,6 +16,8 @@
31 > # - Provides a common src_install method to avoid code duplication
32 > #
33 > # Changelog:
34 > +# 17 March 2022: Thomas Bracht Laumann Jespersen <t@×××××××.xyz>
35 > +# - Port to EAPI 8
36 > # 03 January 2018: David Seifert <soap@g.o>
37 > # - Port to EAPI 6, remove built_with_use, simplify a lot
38 > # 12 March 2007: Jim Ramsay <lack@g.o>
39 > @@ -29,20 +32,25 @@
40 > # the plugin dir. Defaults to "${PN}$(get_modname)". Has to be a bash array.
41 >
42 > # @ECLASS-VARIABLE: PLUGIN_SERVER_SO
43 > +# @DEFAULT_UNSET
44 > # @DESCRIPTION:
45 > # The name of the plugin's server plugin $(get_modname) portion.
46 > # Unset by default. Has to be a bash array.
47 >
48 > # @ECLASS-VARIABLE: PLUGIN_DOCS
49 > +# @DEFAULT_UNSET
50 > # @DESCRIPTION:
51 > # An optional list of docs to be installed, in addition to the default
52 > # DOCS variable which is respected too. Has to be a bash array.
53 >
54 > -case ${EAPI:-0} in
55 > +case ${EAPI} in
56 > [0-5])
57 > - die "${ECLASS} is banned in EAPI ${EAPI:-0}"
58 > + die "${ECLASS} is banned in EAPI ${EAPI}"
59 > ;;
60 > - 6)
61 > + 7)
62 > + die "${ECLASS}: EAPI ${EAPI} not supported"
63 > + ;;
64 > + 6|8)
65 > ;;
66 > *)
67 > die "Unknown EAPI ${EAPI:-0}"
68
69 Could you standartize EAPI guard?
70 https://devmanual.gentoo.org/eclass-writing/index.html#handling-incorrect-usage-of-an-eclass
71
72 > @@ -51,13 +59,17 @@ esac
73 >
74 > inherit multilib
75 >
76 > -EXPORT_FUNCTIONS src_install
77 > -
78 > if [[ ! ${_GKRELLM_PLUGIN_R1} ]]; then
79 > +_GKRELLM_PLUGIN_R1=1
80 >
81 > -DEPEND="virtual/pkgconfig"
82 > +if [[ ${EAPI} == 6 ]]; then
83 > + DEPEND="virtual/pkgconfig"
84 > +else
85 > + BDEPEND="virtual/pkgconfig"
86 > +fi
87 >
88 > # @FUNCTION: gkrellm-plugin_src_install
89 > +# @USAGE:
90 > # @DESCRIPTION:
91 > # Install the plugins and call einstalldocs
92 > gkrellm-plugin_src_install() {
93 > @@ -71,7 +83,6 @@ gkrellm-plugin_src_install() {
94 > die "PLUGIN_SO has to be a bash array!"
95 > fi
96 >
97 > -
98 > if [[ -n ${PLUGIN_SERVER_SO} ]]; then
99 > exeinto /usr/$(get_libdir)/gkrellm2/plugins-gkrellmd
100 >
101 > @@ -97,5 +108,6 @@ gkrellm-plugin_src_install() {
102 > fi
103 > }
104 >
105 > -_GKRELLM_PLUGIN_R1=1
106 > fi
107 > +
108 > +EXPORT_FUNCTIONS src_install
109 > --
110 > 2.34.1
111 >
112 >

Replies

Subject Author
Re: [gentoo-dev] [PATCH] gkrellm-plugin.eclass: Support EAPI 8 Thomas Bracht Laumann Jespersen <t@×××××××.xyz>