Gentoo Archives: gentoo-dev

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

Replies

Subject Author
Re: [gentoo-dev] [PATCH] gkrellm-plugin.eclass: Support EAPI 8 Anna Vyalkova <cyber+gentoo@×××××.in>