Gentoo Archives: gentoo-dev

From: David Seifert <soap@g.o>
To: gentoo-dev@l.g.o
Cc: David Seifert <soap@g.o>
Subject: [gentoo-dev] [PATCH 22/22] eclass: standardize prologue/epilogue
Date: Tue, 14 Mar 2023 20:05:12
Message-Id: 20230314195826.35239-22-soap@gentoo.org
In Reply to: [gentoo-dev] [PATCH 01/22] apache-module.eclass: remove EAPI 5 by David Seifert
1 Signed-off-by: David Seifert <soap@g.o>
2 ---
3 eclass/acct-group.eclass | 9 +++++----
4 eclass/acct-user.eclass | 10 +++++-----
5 eclass/ada.eclass | 7 ++++++-
6 eclass/ant-tasks.eclass | 11 ++++++++---
7 eclass/autotools.eclass | 16 +++++++---------
8 eclass/bzr.eclass | 8 ++++----
9 eclass/cargo.eclass | 23 +++++++++++------------
10 eclass/check-reqs.eclass | 10 +++++-----
11 eclass/chromium-2.eclass | 4 ++--
12 eclass/cmake-multilib.eclass | 4 ++--
13 eclass/cmake.eclass | 2 +-
14 eclass/common-lisp-3.eclass | 10 +++++-----
15 eclass/cuda.eclass | 25 +++++++++----------------
16 eclass/cvs.eclass | 12 ++++++------
17 eclass/distutils-r1.eclass | 20 ++++++++------------
18 eclass/docs.eclass | 4 ++--
19 eclass/ecm.eclass | 4 ++--
20 eclass/elisp.eclass | 8 ++++----
21 eclass/fcaps.eclass | 6 +++---
22 eclass/font-ebdftopcf.eclass | 8 ++++----
23 eclass/font.eclass | 14 +++++++-------
24 eclass/fortran-2.eclass | 20 +++++++++-----------
25 eclass/frameworks.kde.org.eclass | 4 ++--
26 eclass/freedict.eclass | 16 ++++++++--------
27 eclass/gear.kde.org.eclass | 4 ++--
28 eclass/gnustep-2.eclass | 4 ++--
29 eclass/go-module.eclass | 13 +++++++------
30 eclass/haskell-cabal.eclass | 15 ++++++++++-----
31 eclass/java-ant-2.eclass | 12 ++++++------
32 eclass/java-vm-2.eclass | 17 +++++++++++------
33 eclass/kde.org.eclass | 4 ++--
34 eclass/kodi-addon.eclass | 6 +++---
35 eclass/llvm.org.eclass | 13 +++++--------
36 eclass/lua-single.eclass | 19 +++++++------------
37 eclass/lua-utils.eclass | 13 ++++++-------
38 eclass/lua.eclass | 19 +++++++------------
39 eclass/mate-desktop.org.eclass | 12 ++++++++----
40 eclass/mate.eclass | 11 ++++++++---
41 eclass/meson-multilib.eclass | 6 +++---
42 eclass/meson.eclass | 6 +++---
43 eclass/mount-boot.eclass | 8 ++++----
44 eclass/myspell-r2.eclass | 13 +++++--------
45 eclass/netsurf.eclass | 6 +++---
46 eclass/optfeature.eclass | 4 ++--
47 eclass/out-of-source.eclass | 4 ++--
48 eclass/php-pear-r2.eclass | 24 ++++++++++++------------
49 eclass/plasma-mobile.kde.org.eclass | 4 ++--
50 eclass/plasma.kde.org.eclass | 4 ++--
51 eclass/python-r1.eclass | 4 ++--
52 eclass/qt5-build.eclass | 16 ++++++++++------
53 eclass/qt6-build.eclass | 22 +++++++++++++---------
54 eclass/rebar.eclass | 9 +++++++--
55 eclass/ruby-ng.eclass | 25 +++++++++++--------------
56 eclass/savedconfig.eclass | 17 +++++++++++------
57 eclass/sgml-catalog-r1.eclass | 14 +++++++-------
58 eclass/ssl-cert.eclass | 8 ++++----
59 eclass/tests/distutils-r1.sh | 2 +-
60 eclass/tests/distutils-r1_single.sh | 2 +-
61 eclass/texlive-common.eclass | 13 ++++++-------
62 eclass/texlive-module.eclass | 17 +++++++++--------
63 eclass/toolchain.eclass | 11 +++++------
64 eclass/tree-sitter-grammar.eclass | 19 +++++++++----------
65 eclass/unpacker.eclass | 8 ++++----
66 eclass/verify-sig.eclass | 8 ++++----
67 eclass/vim-plugin.eclass | 20 +++++++++-----------
68 eclass/vim-spell.eclass | 10 +++++-----
69 eclass/virtualx.eclass | 6 +++---
70 eclass/xorg-3.eclass | 28 ++++++++++++++--------------
71 68 files changed, 382 insertions(+), 373 deletions(-)
72
73 diff --git a/eclass/acct-group.eclass b/eclass/acct-group.eclass
74 index f55c9f4c9587..47e2d278f73e 100644
75 --- a/eclass/acct-group.eclass
76 +++ b/eclass/acct-group.eclass
77 @@ -1,4 +1,4 @@
78 -# Copyright 2019-2022 Gentoo Authors
79 +# Copyright 2019-2023 Gentoo Authors
80 # Distributed under the terms of the GNU General Public License v2
81
82 # @ECLASS: acct-group.eclass
83 @@ -36,9 +36,9 @@
84 if [[ -z ${_ACCT_GROUP_ECLASS} ]]; then
85 _ACCT_GROUP_ECLASS=1
86
87 -case ${EAPI:-0} in
88 +case ${EAPI} in
89 7|8) ;;
90 - *) die "EAPI=${EAPI:-0} not supported";;
91 + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
92 esac
93
94 inherit user-info
95 @@ -83,7 +83,6 @@ S=${WORKDIR}
96
97
98 # << Phase functions >>
99 -EXPORT_FUNCTIONS pkg_pretend src_install pkg_preinst
100
101 # @FUNCTION: acct-group_pkg_pretend
102 # @DESCRIPTION:
103 @@ -184,3 +183,5 @@ acct-group_pkg_preinst() {
104 }
105
106 fi
107 +
108 +EXPORT_FUNCTIONS pkg_pretend src_install pkg_preinst
109 diff --git a/eclass/acct-user.eclass b/eclass/acct-user.eclass
110 index 14fda76ced73..145fdb41aaf8 100644
111 --- a/eclass/acct-user.eclass
112 +++ b/eclass/acct-user.eclass
113 @@ -1,4 +1,4 @@
114 -# Copyright 2019-2022 Gentoo Authors
115 +# Copyright 2019-2023 Gentoo Authors
116 # Distributed under the terms of the GNU General Public License v2
117
118 # @ECLASS: acct-user.eclass
119 @@ -44,9 +44,9 @@
120 if [[ -z ${_ACCT_USER_ECLASS} ]]; then
121 _ACCT_USER_ECLASS=1
122
123 -case ${EAPI:-0} in
124 +case ${EAPI} in
125 7|8) ;;
126 - *) die "EAPI=${EAPI:-0} not supported";;
127 + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
128 esac
129
130 inherit user-info
131 @@ -212,8 +212,6 @@ eislocked() {
132 }
133
134 # << Phase functions >>
135 -EXPORT_FUNCTIONS pkg_pretend src_install pkg_preinst pkg_postinst \
136 - pkg_prerm
137
138 # @FUNCTION: acct-user_pkg_pretend
139 # @DESCRIPTION:
140 @@ -490,3 +488,5 @@ acct-user_pkg_prerm() {
141 }
142
143 fi
144 +
145 +EXPORT_FUNCTIONS pkg_pretend src_install pkg_preinst pkg_postinst pkg_prerm
146 diff --git a/eclass/ada.eclass b/eclass/ada.eclass
147 index 39f76854e4fc..eea41c0cff48 100644
148 --- a/eclass/ada.eclass
149 +++ b/eclass/ada.eclass
150 @@ -28,7 +28,8 @@ case ${EAPI} in
151 *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
152 esac
153
154 -EXPORT_FUNCTIONS pkg_setup
155 +if [[ -z ${_ADA_ECLASS} ]]; then
156 +_ADA_ECLASS=1
157
158 # @ECLASS_VARIABLE: ADA_DEPS
159 # @OUTPUT_VARIABLE
160 @@ -523,3 +524,7 @@ ada_pkg_setup() {
161
162 [[ ${MERGE_TYPE} != binary ]] && ada_setup
163 }
164 +
165 +fi
166 +
167 +EXPORT_FUNCTIONS pkg_setup
168 diff --git a/eclass/ant-tasks.eclass b/eclass/ant-tasks.eclass
169 index 98a35dd40c4d..d599238ba253 100644
170 --- a/eclass/ant-tasks.eclass
171 +++ b/eclass/ant-tasks.eclass
172 @@ -1,4 +1,4 @@
173 -# Copyright 2007-2022 Gentoo Authors
174 +# Copyright 2007-2023 Gentoo Authors
175 # Distributed under the terms of the GNU General Public License v2
176
177 # @ECLASS: ant-tasks.eclass
178 @@ -18,14 +18,15 @@ case ${EAPI} in
179 *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
180 esac
181
182 +if [[ -z ${_ANT_TASKS_ECLASS} ]]; then
183 +_ANT_TASKS_ECLASS=1
184 +
185 # we set ant-core dep ourselves, restricted
186 JAVA_ANT_DISABLE_ANT_CORE_DEP=true
187 # rewriting build.xml for are the testcases has no reason atm
188 JAVA_PKG_BSFIX_ALL=no
189 inherit java-pkg-2 java-ant-2
190
191 -EXPORT_FUNCTIONS src_unpack src_compile src_install
192 -
193 # @ECLASS_VARIABLE: ANT_TASK_JDKVER
194 # @PRE_INHERIT
195 # @DESCRIPTION:
196 @@ -164,3 +165,7 @@ ant-tasks_src_install() {
197 dodir /usr/share/ant/lib
198 dosym /usr/share/${PN}/lib/${PN}.jar /usr/share/ant/lib/${PN}.jar
199 }
200 +
201 +fi
202 +
203 +EXPORT_FUNCTIONS src_unpack src_compile src_install
204 diff --git a/eclass/autotools.eclass b/eclass/autotools.eclass
205 index e93338ac6b97..3a9119856abc 100644
206 --- a/eclass/autotools.eclass
207 +++ b/eclass/autotools.eclass
208 @@ -1,4 +1,4 @@
209 -# Copyright 1999-2022 Gentoo Authors
210 +# Copyright 1999-2023 Gentoo Authors
211 # Distributed under the terms of the GNU General Public License v2
212
213 # @ECLASS: autotools.eclass
214 @@ -13,6 +13,11 @@
215 # Note: We require GNU m4, as does autoconf. So feel free to use any features
216 # from the GNU version of m4 without worrying about other variants (i.e. BSD).
217
218 +case ${EAPI} in
219 + 6|7|8) ;;
220 + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
221 +esac
222 +
223 if [[ ${_AUTOTOOLS_AUTO_DEPEND+set} == "set" ]] ; then
224 # See if we were included already, but someone changed the value
225 # of AUTOTOOLS_AUTO_DEPEND on us. We could reload the entire
226 @@ -26,14 +31,7 @@ fi
227 if [[ -z ${_AUTOTOOLS_ECLASS} ]] ; then
228 _AUTOTOOLS_ECLASS=1
229
230 -case ${EAPI} in
231 - 6)
232 - # Needed for eqawarn
233 - inherit eutils
234 - ;;
235 - 7|8) ;;
236 - *) die "${ECLASS}: EAPI ${EAPI} not supported" ;;
237 -esac
238 +[[ ${EAPI} == 6 ]] && inherit eqawarn
239
240 inherit gnuconfig libtool
241
242 diff --git a/eclass/bzr.eclass b/eclass/bzr.eclass
243 index ba4ddad45f18..552990e3a581 100644
244 --- a/eclass/bzr.eclass
245 +++ b/eclass/bzr.eclass
246 @@ -1,4 +1,4 @@
247 -# Copyright 1999-2021 Gentoo Authors
248 +# Copyright 1999-2023 Gentoo Authors
249 # Distributed under the terms of the GNU General Public License v2
250
251 # @ECLASS: bzr.eclass
252 @@ -21,15 +21,13 @@
253
254 case ${EAPI} in
255 7|8) ;;
256 - *) die "${ECLASS}: EAPI ${EAPI:-0} is not supported" ;;
257 + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
258 esac
259
260 PROPERTIES+=" live"
261
262 BDEPEND="dev-vcs/breezy"
263
264 -EXPORT_FUNCTIONS src_unpack
265 -
266 # @ECLASS_VARIABLE: EBZR_STORE_DIR
267 # @USER_VARIABLE
268 # @DESCRIPTION:
269 @@ -255,3 +253,5 @@ bzr_fetch() {
270 bzr_src_unpack() {
271 bzr_fetch
272 }
273 +
274 +EXPORT_FUNCTIONS src_unpack
275 diff --git a/eclass/cargo.eclass b/eclass/cargo.eclass
276 index 911ddabced14..e3f36fc6ad9b 100644
277 --- a/eclass/cargo.eclass
278 +++ b/eclass/cargo.eclass
279 @@ -10,6 +10,11 @@
280 # @SUPPORTED_EAPIS: 7 8
281 # @BLURB: common functions and variables for cargo builds
282
283 +case ${EAPI} in
284 + 7|8) ;;
285 + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
286 +esac
287 +
288 if [[ -z ${_CARGO_ECLASS} ]]; then
289 _CARGO_ECLASS=1
290
291 @@ -17,15 +22,11 @@ _CARGO_ECLASS=1
292 # https://github.com/rust-lang/cargo/blob/master/CHANGELOG.md
293 RUST_DEPEND="virtual/rust"
294
295 -case "${EAPI:-0}" in
296 - 0|1|2|3|4|5|6)
297 - die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}"
298 - ;;
299 +case ${EAPI} in
300 7)
301 # 1.37 added 'cargo vendor' subcommand and net.offline config knob
302 RUST_DEPEND=">=virtual/rust-1.37.0"
303 ;;
304 -
305 8)
306 # 1.39 added --workspace
307 # 1.46 added --target dir
308 @@ -40,17 +41,11 @@ case "${EAPI:-0}" in
309 die "CRATES variable not defined"
310 fi
311 ;;
312 - *)
313 - die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"
314 - ;;
315 esac
316
317 inherit multiprocessing toolchain-funcs
318
319 -if [[ ! ${CARGO_OPTIONAL} ]]; then
320 - BDEPEND="${RUST_DEPEND}"
321 - EXPORT_FUNCTIONS src_unpack src_configure src_compile src_install src_test
322 -fi
323 +[[ ! ${CARGO_OPTIONAL} ]] && BDEPEND="${RUST_DEPEND}"
324
325 IUSE="${IUSE} debug"
326
327 @@ -549,3 +544,7 @@ cargo_src_test() {
328 }
329
330 fi
331 +
332 +if [[ ! ${CARGO_OPTIONAL} ]]; then
333 + EXPORT_FUNCTIONS src_unpack src_configure src_compile src_install src_test
334 +fi
335 diff --git a/eclass/check-reqs.eclass b/eclass/check-reqs.eclass
336 index ddf0a47775ae..f6409e9a02c5 100644
337 --- a/eclass/check-reqs.eclass
338 +++ b/eclass/check-reqs.eclass
339 @@ -1,4 +1,4 @@
340 -# Copyright 2004-2022 Gentoo Authors
341 +# Copyright 2004-2023 Gentoo Authors
342 # Distributed under the terms of the GNU General Public License v2
343
344 # @ECLASS: check-reqs.eclass
345 @@ -40,12 +40,10 @@
346
347 case ${EAPI} in
348 6|7|8) ;;
349 - *) die "${ECLASS}: EAPI=${EAPI:-0} is not supported" ;;
350 + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
351 esac
352
353 -EXPORT_FUNCTIONS pkg_pretend pkg_setup
354 -
355 -if [[ ! ${_CHECK_REQS_ECLASS} ]]; then
356 +if [[ -z ${_CHECK_REQS_ECLASS} ]]; then
357 _CHECK_REQS_ECLASS=1
358
359 # @ECLASS_VARIABLE: CHECKREQS_MEMORY
360 @@ -467,3 +465,5 @@ _check-reqs_unsatisfied() {
361 }
362
363 fi
364 +
365 +EXPORT_FUNCTIONS pkg_pretend pkg_setup
366 diff --git a/eclass/chromium-2.eclass b/eclass/chromium-2.eclass
367 index cd4495767e58..0831f1f17aa5 100644
368 --- a/eclass/chromium-2.eclass
369 +++ b/eclass/chromium-2.eclass
370 @@ -1,4 +1,4 @@
371 -# Copyright 1999-2022 Gentoo Authors
372 +# Copyright 1999-2023 Gentoo Authors
373 # Distributed under the terms of the GNU General Public License v2
374
375 # @ECLASS: chromium-2.eclass
376 @@ -11,7 +11,7 @@
377
378 case ${EAPI} in
379 7|8) ;;
380 - *) die "${ECLASS}: EAPI=${EAPI:-0} is not supported" ;;
381 + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
382 esac
383
384 inherit linux-info
385 diff --git a/eclass/cmake-multilib.eclass b/eclass/cmake-multilib.eclass
386 index 4dd3eab3cd28..c8fad94ac0a9 100644
387 --- a/eclass/cmake-multilib.eclass
388 +++ b/eclass/cmake-multilib.eclass
389 @@ -1,4 +1,4 @@
390 -# Copyright 1999-2022 Gentoo Authors
391 +# Copyright 1999-2023 Gentoo Authors
392 # Distributed under the terms of the GNU General Public License v2
393
394 # @ECLASS: cmake-multilib.eclass
395 @@ -36,7 +36,7 @@ case ${EAPI} in
396 ;;
397 esac
398 ;;
399 - *) die "${ECLASS}: EAPI=${EAPI:-0} is not supported" ;;
400 + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
401 esac
402
403 if [[ ${CMAKE_IN_SOURCE_BUILD} ]]; then
404 diff --git a/eclass/cmake.eclass b/eclass/cmake.eclass
405 index 46659867b1a8..76c63977aa07 100644
406 --- a/eclass/cmake.eclass
407 +++ b/eclass/cmake.eclass
408 @@ -20,7 +20,7 @@
409
410 case ${EAPI} in
411 7|8) ;;
412 - *) die "${ECLASS}: EAPI=${EAPI:-0} is not supported" ;;
413 + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
414 esac
415
416 if [[ -z ${_CMAKE_ECLASS} ]]; then
417 diff --git a/eclass/common-lisp-3.eclass b/eclass/common-lisp-3.eclass
418 index df624d51607c..6c87ef3db842 100644
419 --- a/eclass/common-lisp-3.eclass
420 +++ b/eclass/common-lisp-3.eclass
421 @@ -1,4 +1,4 @@
422 -# Copyright 1999-2022 Gentoo Authors
423 +# Copyright 1999-2023 Gentoo Authors
424 # Distributed under the terms of the GNU General Public License v2
425
426 # @ECLASS: common-lisp-3.eclass
427 @@ -11,15 +11,15 @@
428 # to provide a simple way to write ebuilds with these characteristics.
429
430 case ${EAPI} in
431 - [67]) ;;
432 - *) die "EAPI=${EAPI:-0} is not supported" ;;
433 + 6|7) ;;
434 + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
435 esac
436
437 -inherit eutils
438 -
439 if [[ -z ${_COMMON_LISP_3_ECLASS} ]]; then
440 _COMMON_LISP_3_ECLASS=1
441
442 +inherit eutils
443 +
444 # @ECLASS_VARIABLE: CLIMPLEMENTATIONS
445 # @DESCRIPTION:
446 # Common Lisp implementations
447 diff --git a/eclass/cuda.eclass b/eclass/cuda.eclass
448 index 81c8c1f2fc59..d885e77d0616 100644
449 --- a/eclass/cuda.eclass
450 +++ b/eclass/cuda.eclass
451 @@ -1,17 +1,6 @@
452 -# Copyright 1999-2022 Gentoo Authors
453 +# Copyright 1999-2023 Gentoo Authors
454 # Distributed under the terms of the GNU General Public License v2
455
456 -case "${EAPI:-0}" in
457 - [0-6])
458 - die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}"
459 - ;;
460 - 7|8)
461 - ;;
462 - *)
463 - die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"
464 - ;;
465 -esac
466 -
467 # @ECLASS: cuda.eclass
468 # @MAINTAINER:
469 # Gentoo Science Project <sci@g.o>
470 @@ -25,10 +14,15 @@ esac
471 # @EXAMPLE:
472 # inherit cuda
473
474 +case ${EAPI} in
475 + 7|8) ;;
476 + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
477 +esac
478 +
479 if [[ -z ${_CUDA_ECLASS} ]]; then
480 +_CUDA_ECLASS=1
481
482 inherit flag-o-matic toolchain-funcs
483 -[[ ${EAPI} == [56] ]] && inherit eapi7-ver
484
485 # @ECLASS_VARIABLE: NVCCFLAGS
486 # @DESCRIPTION:
487 @@ -195,7 +189,6 @@ cuda_src_prepare() {
488 cuda_sanitize
489 }
490
491 -EXPORT_FUNCTIONS src_prepare
492 -
493 -_CUDA_ECLASS=1
494 fi
495 +
496 +EXPORT_FUNCTIONS src_prepare
497 diff --git a/eclass/cvs.eclass b/eclass/cvs.eclass
498 index a90a4d87f1c5..5ba2197f5174 100644
499 --- a/eclass/cvs.eclass
500 +++ b/eclass/cvs.eclass
501 @@ -1,4 +1,4 @@
502 -# Copyright 1999-2021 Gentoo Authors
503 +# Copyright 1999-2023 Gentoo Authors
504 # Distributed under the terms of the GNU General Public License v2
505
506 # @ECLASS: cvs.eclass
507 @@ -13,14 +13,14 @@
508 # cvs_src_unpack. If you find that you need to call the cvs_* functions
509 # directly, I'd be interested to hear about it.
510
511 -if [[ -z ${_CVS_ECLASS} ]]; then
512 -_CVS_ECLASS=1
513 -
514 case ${EAPI} in
515 7|8) ;;
516 *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
517 esac
518
519 +if [[ -z ${_CVS_ECLASS} ]]; then
520 +_CVS_ECLASS=1
521 +
522 # TODO:
523
524 # Implement more auth types (gserver?, kserver?)
525 @@ -536,6 +536,6 @@ cvs_src_unpack() {
526 einfo "CVS module ${ECVS_MODULE} is now in ${WORKDIR}"
527 }
528
529 -EXPORT_FUNCTIONS src_unpack
530 -
531 fi
532 +
533 +EXPORT_FUNCTIONS src_unpack
534 diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
535 index 95911f912ca0..78f53658285e 100644
536 --- a/eclass/distutils-r1.eclass
537 +++ b/eclass/distutils-r1.eclass
538 @@ -44,9 +44,9 @@
539 # For more information, please see the Python Guide:
540 # https://projects.gentoo.org/python/guide/
541
542 -case ${EAPI:-0} in
543 +case ${EAPI} in
544 7|8) ;;
545 - *) die "EAPI=${EAPI:-0} not supported";;
546 + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
547 esac
548
549 # @ECLASS_VARIABLE: DISTUTILS_OPTIONAL
550 @@ -169,7 +169,8 @@ esac
551 # ${DISTUTILS_DEPS}"
552 # @CODE
553
554 -if [[ ! ${_DISTUTILS_R1} ]]; then
555 +if [[ -z ${_DISTUTILS_R1_ECLASS} ]]; then
556 +_DISTUTILS_R1_ECLASS=1
557
558 inherit multibuild multilib multiprocessing ninja-utils toolchain-funcs
559
560 @@ -179,14 +180,6 @@ else
561 inherit python-single-r1
562 fi
563
564 -fi
565 -
566 -if [[ ! ${DISTUTILS_OPTIONAL} ]]; then
567 - EXPORT_FUNCTIONS src_prepare src_configure src_compile src_test src_install
568 -fi
569 -
570 -if [[ ! ${_DISTUTILS_R1} ]]; then
571 -
572 _distutils_set_globals() {
573 local rdep bdep
574 if [[ ${DISTUTILS_USE_PEP517} ]]; then
575 @@ -2107,5 +2100,8 @@ distutils-r1_src_install() {
576 return ${ret}
577 }
578
579 -_DISTUTILS_R1=1
580 +fi
581 +
582 +if [[ ! ${DISTUTILS_OPTIONAL} ]]; then
583 + EXPORT_FUNCTIONS src_prepare src_configure src_compile src_test src_install
584 fi
585 diff --git a/eclass/docs.eclass b/eclass/docs.eclass
586 index cbf35068de3a..810b56460f3f 100644
587 --- a/eclass/docs.eclass
588 +++ b/eclass/docs.eclass
589 @@ -146,7 +146,7 @@ esac
590 # will initialize a dummy git repository before compiling. A dependency
591 # on dev-vcs/git is automatically added.
592
593 -if [[ ! ${_DOCS_ECLASS} ]]; then
594 +if [[ -z ${_DOCS_ECLASS} ]]; then
595 _DOCS_ECLASS=1
596
597 # For the python based DOCS_BUILDERS we need to inherit any python eclass
598 @@ -424,7 +424,7 @@ BDEPEND+=" doc? ( ${DOCS_DEPEND} )"
599 # then put the compile function in the specific
600 # python function, else docs_compile should be manually
601 # added to src_compile
602 -if [[ ${_DISTUTILS_R1} && ( ${DOCS_BUILDER}="mkdocs" || ${DOCS_BUILDER}="sphinx" ) ]]; then
603 +if [[ ${_DISTUTILS_R1_ECLASS} && ( ${DOCS_BUILDER}="mkdocs" || ${DOCS_BUILDER}="sphinx" ) ]]; then
604 python_compile_all() { docs_compile; }
605 fi
606
607 diff --git a/eclass/ecm.eclass b/eclass/ecm.eclass
608 index d9215a534398..9fca1647778c 100644
609 --- a/eclass/ecm.eclass
610 +++ b/eclass/ecm.eclass
611 @@ -1,4 +1,4 @@
612 -# Copyright 1999-2022 Gentoo Authors
613 +# Copyright 1999-2023 Gentoo Authors
614 # Distributed under the terms of the GNU General Public License v2
615
616 # @ECLASS: ecm.eclass
617 @@ -23,7 +23,7 @@
618
619 case ${EAPI} in
620 8) ;;
621 - *) die "${ECLASS}: EAPI=${EAPI:-0} is not supported" ;;
622 + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
623 esac
624
625 if [[ -z ${_ECM_ECLASS} ]]; then
626 diff --git a/eclass/elisp.eclass b/eclass/elisp.eclass
627 index 7c05948c0f57..9d157c23d5b1 100644
628 --- a/eclass/elisp.eclass
629 +++ b/eclass/elisp.eclass
630 @@ -1,4 +1,4 @@
631 -# Copyright 2002-2022 Gentoo Authors
632 +# Copyright 2002-2023 Gentoo Authors
633 # Distributed under the terms of the GNU General Public License v2
634
635 # @ECLASS: elisp.eclass
636 @@ -69,9 +69,6 @@ case ${EAPI} in
637 *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
638 esac
639
640 -EXPORT_FUNCTIONS src_{unpack,prepare,configure,compile,install} \
641 - pkg_{setup,postinst,postrm}
642 -
643 RDEPEND=">=app-editors/emacs-${NEED_EMACS}:*"
644 BDEPEND="${RDEPEND}"
645
646 @@ -189,3 +186,6 @@ elisp_pkg_postinst() {
647 elisp_pkg_postrm() {
648 elisp-site-regen
649 }
650 +
651 +EXPORT_FUNCTIONS src_{unpack,prepare,configure,compile,install} \
652 + pkg_{setup,postinst,postrm}
653 diff --git a/eclass/fcaps.eclass b/eclass/fcaps.eclass
654 index 349e72a63af2..477e1e954ab8 100644
655 --- a/eclass/fcaps.eclass
656 +++ b/eclass/fcaps.eclass
657 @@ -1,4 +1,4 @@
658 -# Copyright 1999-2022 Gentoo Authors
659 +# Copyright 1999-2023 Gentoo Authors
660 # Distributed under the terms of the GNU General Public License v2
661
662 # @ECLASS: fcaps.eclass
663 @@ -191,6 +191,6 @@ fcaps_pkg_postinst() {
664 done
665 }
666
667 -EXPORT_FUNCTIONS pkg_postinst
668 -
669 fi
670 +
671 +EXPORT_FUNCTIONS pkg_postinst
672 diff --git a/eclass/font-ebdftopcf.eclass b/eclass/font-ebdftopcf.eclass
673 index 88256c3231bd..afd77e083bee 100644
674 --- a/eclass/font-ebdftopcf.eclass
675 +++ b/eclass/font-ebdftopcf.eclass
676 @@ -1,4 +1,4 @@
677 -# Copyright 1999-2021 Gentoo Authors
678 +# Copyright 1999-2023 Gentoo Authors
679 # Distributed under the terms of the GNU General Public License v2
680
681 # @ECLASS: font-ebdftopcf.eclass
682 @@ -14,11 +14,9 @@
683
684 case ${EAPI} in
685 7) ;;
686 - *) die "EAPI=${EAPI:-0} is not supported" ;;
687 + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
688 esac
689
690 -EXPORT_FUNCTIONS src_compile
691 -
692 if [[ -z ${_FONT_EBDFTOPCF_ECLASS} ]]; then
693 _FONT_EBDFTOPCF_ECLASS=1
694
695 @@ -57,3 +55,5 @@ font-ebdftopcf_src_compile() {
696 }
697
698 fi
699 +
700 +EXPORT_FUNCTIONS src_compile
701 diff --git a/eclass/font.eclass b/eclass/font.eclass
702 index e772409fe201..3d2578172bc9 100644
703 --- a/eclass/font.eclass
704 +++ b/eclass/font.eclass
705 @@ -1,4 +1,4 @@
706 -# Copyright 1999-2022 Gentoo Authors
707 +# Copyright 1999-2023 Gentoo Authors
708 # Distributed under the terms of the GNU General Public License v2
709
710 # @ECLASS: font.eclass
711 @@ -7,16 +7,14 @@
712 # @SUPPORTED_EAPIS: 7 8
713 # @BLURB: Eclass to make font installation uniform
714
715 -case ${EAPI:-0} in
716 - [7-8]) ;;
717 - *) die "EAPI ${EAPI} is not supported by font.eclass." ;;
718 +case ${EAPI} in
719 + 7|8) ;;
720 + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
721 esac
722
723 -if [[ ! ${_FONT_ECLASS} ]]; then
724 +if [[ -z ${_FONT_ECLASS} ]]; then
725 _FONT_ECLASS=1
726
727 -EXPORT_FUNCTIONS pkg_setup src_install pkg_postinst pkg_postrm
728 -
729 # @ECLASS_VARIABLE: FONT_SUFFIX
730 # @DEFAULT_UNSET
731 # @REQUIRED
732 @@ -264,3 +262,5 @@ font_pkg_postrm() {
733 }
734
735 fi
736 +
737 +EXPORT_FUNCTIONS pkg_setup src_install pkg_postinst pkg_postrm
738 diff --git a/eclass/fortran-2.eclass b/eclass/fortran-2.eclass
739 index e26dd700f7cf..72b3d2d1857b 100644
740 --- a/eclass/fortran-2.eclass
741 +++ b/eclass/fortran-2.eclass
742 @@ -1,4 +1,4 @@
743 -# Copyright 1999-2021 Gentoo Authors
744 +# Copyright 1999-2023 Gentoo Authors
745 # Distributed under the terms of the GNU General Public License v2
746
747 # @ECLASS: fortran-2.eclass
748 @@ -26,18 +26,15 @@
749 #
750 # FORTRAN_NEED_OPENMP=1
751
752 -inherit toolchain-funcs
753 -
754 -case ${EAPI:-0} in
755 - # not used in the eclass, but left for backward compatibility with legacy users
756 - 5|6) inherit eutils ;;
757 - 7|8) ;;
758 - *) die "EAPI=${EAPI} is not supported" ;;
759 +case ${EAPI} in
760 + 6|7|8) ;;
761 + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
762 esac
763
764 -EXPORT_FUNCTIONS pkg_setup
765 +if [[ -z ${_FORTRAN_2_ECLASS} ]]; then
766 +_FORTRAN_2_ECLASS=1
767
768 -if [[ ! ${_FORTRAN_2_CLASS} ]]; then
769 +inherit toolchain-funcs
770
771 # @ECLASS_VARIABLE: FORTRAN_NEED_OPENMP
772 # @DESCRIPTION:
773 @@ -293,5 +290,6 @@ fortran-2_pkg_setup() {
774 fi
775 }
776
777 -_FORTRAN_2_ECLASS=1
778 fi
779 +
780 +EXPORT_FUNCTIONS pkg_setup
781 diff --git a/eclass/frameworks.kde.org.eclass b/eclass/frameworks.kde.org.eclass
782 index 876c05c9b6af..5201464a76c8 100644
783 --- a/eclass/frameworks.kde.org.eclass
784 +++ b/eclass/frameworks.kde.org.eclass
785 @@ -1,4 +1,4 @@
786 -# Copyright 1999-2022 Gentoo Authors
787 +# Copyright 1999-2023 Gentoo Authors
788 # Distributed under the terms of the GNU General Public License v2
789
790 # @ECLASS: frameworks.kde.org.eclass
791 @@ -19,7 +19,7 @@
792
793 case ${EAPI} in
794 8) ;;
795 - *) die "EAPI=${EAPI:-0} is not supported" ;;
796 + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
797 esac
798
799 if [[ -z ${_FRAMEWORKS_KDE_ORG_ECLASS} ]]; then
800 diff --git a/eclass/freedict.eclass b/eclass/freedict.eclass
801 index f38ce93edc82..7a49a5f19778 100644
802 --- a/eclass/freedict.eclass
803 +++ b/eclass/freedict.eclass
804 @@ -1,4 +1,4 @@
805 -# Copyright 1999-2021 Gentoo Authors
806 +# Copyright 1999-2023 Gentoo Authors
807 # Distributed under the terms of the GNU General Public License v2
808
809 # @ECLASS: freedict.eclass
810 @@ -12,6 +12,11 @@
811 # This eclass exists to ease the installation of freedict translation
812 # dictionaries.
813
814 +case ${EAPI} in
815 + 7) ;;
816 + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
817 +esac
818 +
819 if [[ -z ${_FREEDICT_ECLASS} ]]; then
820 _FREEDICT_ECLASS=1
821
822 @@ -20,11 +25,6 @@ _FREEDICT_ECLASS=1
823 # Strips PN of 'freedict' prefix, to be used in SRC_URI and doins
824 FREEDICT_P=${PN/freedict-/}
825
826 -case ${EAPI:-0} in
827 - 7) ;;
828 - *) die "${ECLASS}.eclass is banned in EAPI=${EAPI}" ;;
829 -esac
830 -
831 [[ ${FORLANG} ]] && die "FORLANG is banned, set DESCRIPTION instead"
832 [[ ${TOLANG} ]] && die "TOLANG is banned, set DESCRIPTION instead"
833
834 @@ -47,6 +47,6 @@ freedict_src_install() {
835 doins ${FREEDICT_P}.index
836 }
837
838 -EXPORT_FUNCTIONS src_install
839 -
840 fi
841 +
842 +EXPORT_FUNCTIONS src_install
843 diff --git a/eclass/gear.kde.org.eclass b/eclass/gear.kde.org.eclass
844 index 66c86b59fa32..5977c0f72e3c 100644
845 --- a/eclass/gear.kde.org.eclass
846 +++ b/eclass/gear.kde.org.eclass
847 @@ -1,4 +1,4 @@
848 -# Copyright 1999-2022 Gentoo Authors
849 +# Copyright 1999-2023 Gentoo Authors
850 # Distributed under the terms of the GNU General Public License v2
851
852 # @ECLASS: gear.kde.org.eclass
853 @@ -19,7 +19,7 @@
854
855 case ${EAPI} in
856 8) ;;
857 - *) die "EAPI=${EAPI:-0} is not supported" ;;
858 + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
859 esac
860
861 if [[ -z ${_GEAR_KDE_ORG_ECLASS} ]]; then
862 diff --git a/eclass/gnustep-2.eclass b/eclass/gnustep-2.eclass
863 index e1d7f00da080..9750efa8d5c8 100644
864 --- a/eclass/gnustep-2.eclass
865 +++ b/eclass/gnustep-2.eclass
866 @@ -1,4 +1,4 @@
867 -# Copyright 1999-2022 Gentoo Authors
868 +# Copyright 1999-2023 Gentoo Authors
869 # Distributed under the terms of the GNU General Public License v2
870
871 # @ECLASS: gnustep-2.eclass
872 @@ -33,7 +33,7 @@ esac
873 DEPEND+=" virtual/gnustep-back"
874 RDEPEND="${DEPEND}"
875
876 -# The following gnustep-based EXPORT_FUNCTIONS are available:
877 +# The following gnustep-based exported functions are available:
878 # * gnustep-base_pkg_setup
879 # * gnustep-base_src_prepare
880 # * gnustep-base_src_configure
881 diff --git a/eclass/go-module.eclass b/eclass/go-module.eclass
882 index bcdd521619ac..d4e62b9283a4 100644
883 --- a/eclass/go-module.eclass
884 +++ b/eclass/go-module.eclass
885 @@ -65,11 +65,10 @@ case ${EAPI} in
886 *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
887 esac
888
889 -inherit multiprocessing
890 -
891 -if [[ -z ${_GO_MODULE} ]]; then
892 +if [[ -z ${_GO_MODULE_ECLASS} ]]; then
893 +_GO_MODULE_ECLASS=1
894
895 -_GO_MODULE=1
896 +inherit multiprocessing
897
898 if [[ ! ${GO_OPTIONAL} ]]; then
899 BDEPEND=">=dev-lang/go-1.18"
900 @@ -79,8 +78,6 @@ if [[ ! ${GO_OPTIONAL} ]]; then
901 # Added here rather than to each affected package, so it can be cleaned up just
902 # once when pkgcheck is improved.
903 BDEPEND+=" app-arch/unzip"
904 -
905 - EXPORT_FUNCTIONS src_unpack
906 fi
907
908 # Force go to build in module mode.
909 @@ -526,3 +523,7 @@ _go-module_gomod_encode() {
910 }
911
912 fi
913 +
914 +if [[ ! ${GO_OPTIONAL} ]]; then
915 + EXPORT_FUNCTIONS src_unpack
916 +fi
917 diff --git a/eclass/haskell-cabal.eclass b/eclass/haskell-cabal.eclass
918 index 086e05426cda..12251a268b45 100644
919 --- a/eclass/haskell-cabal.eclass
920 +++ b/eclass/haskell-cabal.eclass
921 @@ -41,15 +41,16 @@
922 # is fixed.
923
924 case ${EAPI} in
925 - # eutils is for eqawarn
926 - 6|7) inherit eutils ;;
927 - 8) ;;
928 + 6|7|8) ;;
929 *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
930 esac
931
932 -inherit ghc-package multilib toolchain-funcs
933 +if [[ -z ${_HASKELL_CABAL_ECLASS} ]]; then
934 +_HASKELL_CABAL_ECLASS=1
935
936 -EXPORT_FUNCTIONS pkg_setup src_prepare src_configure src_compile src_test src_install pkg_postinst pkg_postrm
937 +[[ ${EAPI} == 6 ]] && inherit eqawarn
938 +
939 +inherit ghc-package multilib toolchain-funcs
940
941 # @ECLASS_VARIABLE: CABAL_EXTRA_CONFIGURE_FLAGS
942 # @USER_VARIABLE
943 @@ -910,3 +911,7 @@ replace-hcflags() {
944
945 return 0
946 }
947 +
948 +fi
949 +
950 +EXPORT_FUNCTIONS pkg_setup src_prepare src_configure src_compile src_test src_install pkg_postinst pkg_postrm
951 diff --git a/eclass/java-ant-2.eclass b/eclass/java-ant-2.eclass
952 index c0c94f15e338..61a90f3f3196 100644
953 --- a/eclass/java-ant-2.eclass
954 +++ b/eclass/java-ant-2.eclass
955 @@ -15,18 +15,16 @@
956 # manual manipulation of build.xml files. Should be inherited after java-pkg-2
957 # or java-pkg-opt-2 eclass.
958
959 -inherit java-utils-2 multilib
960 -
961 -case ${EAPI:-0} in
962 - [678]) ;;
963 +case ${EAPI} in
964 + 6|7|8) ;;
965 *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
966 esac
967
968 -EXPORT_FUNCTIONS src_configure
969 -
970 if [[ -z ${_JAVA_ANT_2_ECLASS} ]] ; then
971 _JAVA_ANT_2_ECLASS=1
972
973 +inherit java-utils-2 multilib
974 +
975 # This eclass provides functionality for Java packages which use
976 # ant to build. In particular, it will attempt to fix build.xml files, so that
977 # they use the appropriate 'target' and 'source' attributes.
978 @@ -439,3 +437,5 @@ java-ant_rewrite-bootclasspath() {
979 }
980
981 fi
982 +
983 +EXPORT_FUNCTIONS src_configure
984 diff --git a/eclass/java-vm-2.eclass b/eclass/java-vm-2.eclass
985 index ad814d7efd1a..01bbcf697fb4 100644
986 --- a/eclass/java-vm-2.eclass
987 +++ b/eclass/java-vm-2.eclass
988 @@ -1,4 +1,4 @@
989 -# Copyright 1999-2022 Gentoo Authors
990 +# Copyright 1999-2023 Gentoo Authors
991 # Distributed under the terms of the GNU General Public License v2
992
993 # @ECLASS: java-vm-2.eclass
994 @@ -10,14 +10,15 @@
995 # This eclass provides functionality which assists with installing
996 # virtual machines, and ensures that they are recognized by java-config.
997
998 -case ${EAPI:-0} in
999 - [678]) ;;
1000 - *) die "EAPI=${EAPI} is not supported" ;;
1001 +case ${EAPI} in
1002 + 6|7|8) ;;
1003 + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
1004 esac
1005
1006 -inherit multilib pax-utils prefix xdg-utils
1007 +if [[ -z ${_JAVA_VM_2_ECLASS} ]]; then
1008 +_JAVA_VM_2_ECLASS=1
1009
1010 -EXPORT_FUNCTIONS pkg_setup pkg_postinst pkg_prerm pkg_postrm
1011 +inherit multilib pax-utils prefix xdg-utils
1012
1013 RDEPEND="
1014 dev-java/java-config
1015 @@ -350,3 +351,7 @@ java-vm_sandbox-predict() {
1016 echo "SANDBOX_PREDICT=\"${path}\"" > "${ED}/etc/sandbox.d/20${VMHANDLE}" \
1017 || die "Failed to write sandbox control file"
1018 }
1019 +
1020 +fi
1021 +
1022 +EXPORT_FUNCTIONS pkg_setup pkg_postinst pkg_prerm pkg_postrm
1023 diff --git a/eclass/kde.org.eclass b/eclass/kde.org.eclass
1024 index efe3186f286c..629c57d9a082 100644
1025 --- a/eclass/kde.org.eclass
1026 +++ b/eclass/kde.org.eclass
1027 @@ -1,4 +1,4 @@
1028 -# Copyright 1999-2022 Gentoo Authors
1029 +# Copyright 1999-2023 Gentoo Authors
1030 # Distributed under the terms of the GNU General Public License v2
1031
1032 # @ECLASS: kde.org.eclass
1033 @@ -17,7 +17,7 @@
1034
1035 case ${EAPI} in
1036 8) ;;
1037 - *) die "EAPI=${EAPI:-0} is not supported" ;;
1038 + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
1039 esac
1040
1041 if [[ -z ${_KDE_ORG_ECLASS} ]]; then
1042 diff --git a/eclass/kodi-addon.eclass b/eclass/kodi-addon.eclass
1043 index 6e7fa26f3c8a..b7678485795e 100644
1044 --- a/eclass/kodi-addon.eclass
1045 +++ b/eclass/kodi-addon.eclass
1046 @@ -1,4 +1,4 @@
1047 -# Copyright 1999-2022 Gentoo Authors
1048 +# Copyright 1999-2023 Gentoo Authors
1049 # Distributed under the terms of the GNU General Public License v2
1050
1051 # @ECLASS: kodi-addon.eclass
1052 @@ -17,8 +17,6 @@ esac
1053
1054 inherit cmake
1055
1056 -EXPORT_FUNCTIONS src_configure
1057 -
1058 # @FUNCTION: kodi-addon_src_configure
1059 # @DESCRIPTION:
1060 # Configure handling for Kodi addons
1061 @@ -30,3 +28,5 @@ kodi-addon_src_configure() {
1062
1063 cmake_src_configure
1064 }
1065 +
1066 +EXPORT_FUNCTIONS src_configure
1067 diff --git a/eclass/llvm.org.eclass b/eclass/llvm.org.eclass
1068 index 94302ea1b4af..c6084673d5dc 100644
1069 --- a/eclass/llvm.org.eclass
1070 +++ b/eclass/llvm.org.eclass
1071 @@ -30,12 +30,9 @@
1072 # llvm.org_set_globals
1073 # @CODE
1074
1075 -case "${EAPI:-0}" in
1076 - 7|8)
1077 - ;;
1078 - *)
1079 - die "Unsupported EAPI=${EAPI} for ${ECLASS}"
1080 - ;;
1081 +case ${EAPI} in
1082 + 7|8) ;;
1083 + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
1084 esac
1085
1086 # == version substrings ==
1087 @@ -334,8 +331,6 @@ llvm.org_set_globals() {
1088
1089 # == phase functions ==
1090
1091 -EXPORT_FUNCTIONS src_unpack src_prepare
1092 -
1093 # @FUNCTION: llvm.org_src_unpack
1094 # @DESCRIPTION:
1095 # Unpack or checkout requested LLVM components.
1096 @@ -481,3 +476,5 @@ llvm_install_manpages() {
1097 doins "${WORKDIR}/llvm-${PV}-manpages/${LLVM_COMPONENTS[0]}"/*.1
1098 fi
1099 }
1100 +
1101 +EXPORT_FUNCTIONS src_unpack src_prepare
1102 diff --git a/eclass/lua-single.eclass b/eclass/lua-single.eclass
1103 index aadd3b4ea675..8432df0583bb 100644
1104 --- a/eclass/lua-single.eclass
1105 +++ b/eclass/lua-single.eclass
1106 @@ -1,4 +1,4 @@
1107 -# Copyright 1999-2022 Gentoo Authors
1108 +# Copyright 1999-2023 Gentoo Authors
1109 # Distributed under the terms of the GNU General Public License v2
1110
1111 # @ECLASS: lua-single.eclass
1112 @@ -64,23 +64,19 @@
1113 # @CODE
1114
1115 case ${EAPI} in
1116 - 7|8)
1117 - ;;
1118 + 7|8) ;;
1119 *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
1120 esac
1121
1122 -if [[ ! ${_LUA_SINGLE_R0} ]]; then
1123 +if [[ -z ${_LUA_SINGLE_ECLASS} ]]; then
1124 +_LUA_SINGLE_ECLASS=1
1125
1126 -if [[ ${_LUA_R0} ]]; then
1127 +if [[ ${_LUA_ECLASS} ]]; then
1128 die 'lua-single.eclass cannot be used with lua.eclass.'
1129 fi
1130
1131 inherit lua-utils
1132
1133 -fi
1134 -
1135 -EXPORT_FUNCTIONS pkg_setup
1136 -
1137 # @ECLASS_VARIABLE: LUA_COMPAT
1138 # @REQUIRED
1139 # @PRE_INHERIT
1140 @@ -276,8 +272,6 @@ _lua_single_set_globals() {
1141 _lua_single_set_globals
1142 unset -f _lua_single_set_globals
1143
1144 -if [[ ! ${_LUA_SINGLE_R0} ]]; then
1145 -
1146 # @FUNCTION: _lua_gen_usedep
1147 # @USAGE: [<pattern>...]
1148 # @INTERNAL
1149 @@ -532,5 +526,6 @@ lua-single_pkg_setup() {
1150 [[ ${MERGE_TYPE} != binary ]] && lua_setup
1151 }
1152
1153 -_LUA_SINGLE_R0=1
1154 fi
1155 +
1156 +EXPORT_FUNCTIONS pkg_setup
1157 diff --git a/eclass/lua-utils.eclass b/eclass/lua-utils.eclass
1158 index 475bd993894b..0ff36734dc8f 100644
1159 --- a/eclass/lua-utils.eclass
1160 +++ b/eclass/lua-utils.eclass
1161 @@ -1,4 +1,4 @@
1162 -# Copyright 1999-2021 Gentoo Authors
1163 +# Copyright 1999-2023 Gentoo Authors
1164 # Distributed under the terms of the GNU General Public License v2
1165
1166 # @ECLASS: lua-utils.eclass
1167 @@ -18,12 +18,12 @@
1168 # functions. It can be inherited safely.
1169
1170 case ${EAPI} in
1171 - 7|8)
1172 - ;;
1173 + 7|8) ;;
1174 *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
1175 esac
1176
1177 -if [[ ! ${_LUA_UTILS_R0} ]]; then
1178 +if [[ -z ${_LUA_UTILS_ECLASS} ]]; then
1179 +_LUA_UTILS_ECLASS=1
1180
1181 inherit toolchain-funcs
1182
1183 @@ -384,7 +384,7 @@ lua_enable_tests() {
1184 busted)
1185 test_directory="${2:-spec}"
1186 test_pkg="dev-lua/busted"
1187 - if [[ ! ${_LUA_SINGLE_R0} ]]; then
1188 + if [[ ! ${_LUA_SINGLE_ECLASS} ]]; then
1189 eval "lua_src_test() {
1190 busted --lua=\"\${ELUA}\" --output=\"plainTerminal\" \"${test_directory}\" || die \"Tests fail with \${ELUA}\"
1191 }"
1192 @@ -403,7 +403,7 @@ lua_enable_tests() {
1193
1194 local test_deps=${RDEPEND}
1195 if [[ -n ${test_pkg} ]]; then
1196 - if [[ ! ${_LUA_SINGLE_R0} ]]; then
1197 + if [[ ! ${_LUA_SINGLE_ECLASS} ]]; then
1198 test_deps+=" ${test_pkg}[${LUA_USEDEP}]"
1199 else
1200 test_deps+=" $(lua_gen_cond_dep "
1201 @@ -536,5 +536,4 @@ lua_get_version() {
1202 echo "${LUA_VERSION}"
1203 }
1204
1205 -_LUA_UTILS_R0=1
1206 fi
1207 diff --git a/eclass/lua.eclass b/eclass/lua.eclass
1208 index 29b8b6ec6348..bb2e41ef1061 100644
1209 --- a/eclass/lua.eclass
1210 +++ b/eclass/lua.eclass
1211 @@ -1,4 +1,4 @@
1212 -# Copyright 1999-2021 Gentoo Authors
1213 +# Copyright 1999-2023 Gentoo Authors
1214 # Distributed under the terms of the GNU General Public License v2
1215
1216 # @ECLASS: lua.eclass
1217 @@ -52,21 +52,19 @@
1218 # @CODE
1219
1220 case ${EAPI} in
1221 - 7|8)
1222 - ;;
1223 + 7|8) ;;
1224 *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
1225 esac
1226
1227 -if [[ ! ${_LUA_R0} ]]; then
1228 +if [[ -z ${_LUA_ECLASS} ]]; then
1229 +_LUA_ECLASS=1
1230
1231 -if [[ ${_LUA_SINGLE_R0} ]]; then
1232 +if [[ ${_LUA_SINGLE_ECLASS} ]]; then
1233 die 'lua.eclass cannot be used with lua-single.eclass.'
1234 fi
1235
1236 inherit multibuild lua-utils
1237
1238 -fi
1239 -
1240 # @ECLASS_VARIABLE: LUA_COMPAT
1241 # @REQUIRED
1242 # @PRE_INHERIT
1243 @@ -197,8 +195,6 @@ fi
1244 # lua_targets_lua5-1(-)?,lua_targets_lua5-3(-)?
1245 # @CODE
1246
1247 -if [[ ! ${_LUA_R0} ]]; then
1248 -
1249 # @FUNCTION: _lua_validate_useflags
1250 # @INTERNAL
1251 # @DESCRIPTION:
1252 @@ -314,9 +310,6 @@ lua_foreach_impl() {
1253 multibuild_foreach_variant _lua_multibuild_wrapper "${@}"
1254 }
1255
1256 -_LUA_R0=1
1257 -fi
1258 -
1259 # @FUNCTION: _lua_set_globals
1260 # @INTERNAL
1261 # @DESCRIPTION:
1262 @@ -375,3 +368,5 @@ _lua_set_globals() {
1263
1264 _lua_set_globals
1265 unset -f _lua_set_globals
1266 +
1267 +fi
1268 diff --git a/eclass/mate-desktop.org.eclass b/eclass/mate-desktop.org.eclass
1269 index 2e45d864dd74..875e4615773c 100644
1270 --- a/eclass/mate-desktop.org.eclass
1271 +++ b/eclass/mate-desktop.org.eclass
1272 @@ -1,4 +1,4 @@
1273 -# Copyright 1999-2022 Gentoo Authors
1274 +# Copyright 1999-2023 Gentoo Authors
1275 # Distributed under the terms of the GNU General Public License v2
1276
1277 # @ECLASS: mate-desktop.org.eclass
1278 @@ -12,12 +12,14 @@
1279 # Provide a default SRC_URI and EGIT_REPO_URI for MATE packages as well as
1280 # exporting some useful values like the MATE_BRANCH
1281
1282 -# EAPIs < 7 are banned.
1283 -case "${EAPI:-0}" in
1284 +case ${EAPI} in
1285 7) ;;
1286 - *) die "EAPI=${EAPI:-0} is not supported" ;;
1287 + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
1288 esac
1289
1290 +if [[ -z ${_MATE_DESKTOP_ORG_ECLASS} ]]; then
1291 +_MATE_DESKTOP_ORG_ECLASS=1
1292 +
1293 if [[ ${PV} == 9999 ]]; then
1294 inherit git-r3
1295 fi
1296 @@ -57,3 +59,5 @@ fi
1297
1298 # Set HOMEPAGE for all ebuilds
1299 HOMEPAGE="https://mate-desktop.org"
1300 +
1301 +fi
1302 diff --git a/eclass/mate.eclass b/eclass/mate.eclass
1303 index c1886648140e..21c94dd478d7 100644
1304 --- a/eclass/mate.eclass
1305 +++ b/eclass/mate.eclass
1306 @@ -1,4 +1,4 @@
1307 -# Copyright 1999-2022 Gentoo Authors
1308 +# Copyright 1999-2023 Gentoo Authors
1309 # Distributed under the terms of the GNU General Public License v2
1310
1311 # @ECLASS: mate.eclass
1312 @@ -16,11 +16,14 @@
1313 # fact that MATE is a GNOME fork. For additional functions, see gnome2-utils.eclass.
1314
1315 # Check EAPI only
1316 -case "${EAPI:-0}" in
1317 +case ${EAPI} in
1318 7) ;;
1319 - *) die "EAPI=${EAPI:-0} is not supported" ;;
1320 + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
1321 esac
1322
1323 +if [[ -z ${_MATE_ECLASS} ]]; then
1324 +_MATE_ECLASS=1
1325 +
1326 # Inherit happens below after declaration of GNOME2_LA_PUNT
1327
1328 # @ECLASS_VARIABLE: MATE_LA_PUNT
1329 @@ -157,4 +160,6 @@ mate_pkg_postrm() {
1330 gnome2_pkg_postrm "$@"
1331 }
1332
1333 +fi
1334 +
1335 EXPORT_FUNCTIONS src_prepare src_configure src_install pkg_preinst pkg_postinst pkg_postrm
1336 diff --git a/eclass/meson-multilib.eclass b/eclass/meson-multilib.eclass
1337 index 49c64418727e..0c069af11930 100644
1338 --- a/eclass/meson-multilib.eclass
1339 +++ b/eclass/meson-multilib.eclass
1340 @@ -1,4 +1,4 @@
1341 -# Copyright 1999-2021 Gentoo Authors
1342 +# Copyright 1999-2023 Gentoo Authors
1343 # Distributed under the terms of the GNU General Public License v2
1344
1345 # @ECLASS: meson-multilib.eclass
1346 @@ -31,8 +31,6 @@ _MESON_MULTILIB_ECLASS=1
1347
1348 inherit meson multilib-minimal
1349
1350 -EXPORT_FUNCTIONS src_configure src_compile src_test src_install
1351 -
1352 # @FUNCTION: meson_native_use_bool
1353 # @USAGE: <USE flag> [option name]
1354 # @DESCRIPTION:
1355 @@ -130,3 +128,5 @@ multilib_src_install() {
1356 }
1357
1358 fi
1359 +
1360 +EXPORT_FUNCTIONS src_configure src_compile src_test src_install
1361 diff --git a/eclass/meson.eclass b/eclass/meson.eclass
1362 index a79019ccfd35..881e24700053 100644
1363 --- a/eclass/meson.eclass
1364 +++ b/eclass/meson.eclass
1365 @@ -1,4 +1,4 @@
1366 -# Copyright 2017-2022 Gentoo Authors
1367 +# Copyright 2017-2023 Gentoo Authors
1368 # Distributed under the terms of the GNU General Public License v2
1369
1370 # @ECLASS: meson.eclass
1371 @@ -44,8 +44,6 @@ _MESON_ECLASS=1
1372
1373 inherit multiprocessing ninja-utils python-utils-r1 toolchain-funcs
1374
1375 -EXPORT_FUNCTIONS src_configure src_compile src_test src_install
1376 -
1377 BDEPEND=">=dev-util/meson-0.62.2
1378 ${NINJA_DEPEND}
1379 dev-util/meson-format-array
1380 @@ -449,3 +447,5 @@ meson_src_install() {
1381 }
1382
1383 fi
1384 +
1385 +EXPORT_FUNCTIONS src_configure src_compile src_test src_install
1386 diff --git a/eclass/mount-boot.eclass b/eclass/mount-boot.eclass
1387 index 3111d9dcb9b5..73beb9adea67 100644
1388 --- a/eclass/mount-boot.eclass
1389 +++ b/eclass/mount-boot.eclass
1390 @@ -1,4 +1,4 @@
1391 -# Copyright 1999-2021 Gentoo Authors
1392 +# Copyright 1999-2023 Gentoo Authors
1393 # Distributed under the terms of the GNU General Public License v2
1394
1395 # @ECLASS: mount-boot.eclass
1396 @@ -13,13 +13,11 @@
1397 # function tries to ensure that it's mounted in rw mode, exiting with an
1398 # error if it can't. It does nothing if /boot isn't a separate partition.
1399
1400 -case ${EAPI:-0} in
1401 +case ${EAPI} in
1402 6|7|8) ;;
1403 *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
1404 esac
1405
1406 -EXPORT_FUNCTIONS pkg_pretend pkg_preinst pkg_postinst pkg_prerm pkg_postrm
1407 -
1408 # @FUNCTION: mount-boot_is_disabled
1409 # @INTERNAL
1410 # @DESCRIPTION:
1411 @@ -111,3 +109,5 @@ mount-boot_pkg_prerm() {
1412 mount-boot_pkg_postinst() { :; }
1413
1414 mount-boot_pkg_postrm() { :; }
1415 +
1416 +EXPORT_FUNCTIONS pkg_pretend pkg_preinst pkg_postinst pkg_prerm pkg_postrm
1417 diff --git a/eclass/myspell-r2.eclass b/eclass/myspell-r2.eclass
1418 index 965327ac1b58..05d48dc97dee 100644
1419 --- a/eclass/myspell-r2.eclass
1420 +++ b/eclass/myspell-r2.eclass
1421 @@ -1,4 +1,4 @@
1422 -# Copyright 1999-2022 Gentoo Authors
1423 +# Copyright 1999-2023 Gentoo Authors
1424 # Distributed under the terms of the GNU General Public License v2
1425
1426 # @ECLASS: myspell-r2.eclass
1427 @@ -37,15 +37,10 @@
1428 # @CODE
1429
1430 case ${EAPI} in
1431 - 7|8)
1432 - ;;
1433 - *)
1434 - die "${ECLASS}: EAPI ${EAPI:-0} not supported"
1435 - ;;
1436 + 7|8) ;;
1437 + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
1438 esac
1439
1440 -EXPORT_FUNCTIONS src_unpack src_install
1441 -
1442 # Basically no extra deps needed.
1443 # Unzip is required for .oxt libreoffice extensions
1444 # which are just fancy zip files.
1445 @@ -133,3 +128,5 @@ myspell-r2_src_install() {
1446 fi
1447 done
1448 }
1449 +
1450 +EXPORT_FUNCTIONS src_unpack src_install
1451 diff --git a/eclass/netsurf.eclass b/eclass/netsurf.eclass
1452 index 07b5ab3b5284..293f439e9715 100644
1453 --- a/eclass/netsurf.eclass
1454 +++ b/eclass/netsurf.eclass
1455 @@ -1,4 +1,4 @@
1456 -# Copyright 1999-2021 Gentoo Authors
1457 +# Copyright 1999-2023 Gentoo Authors
1458 # Distributed under the terms of the GNU General Public License v2
1459
1460 # @ECLASS: netsurf.eclass
1461 @@ -9,9 +9,9 @@
1462 # @DESCRIPTION:
1463 # Handle settings build environment for netsurf build system
1464
1465 -case "${EAPI:-0}" in
1466 +case ${EAPI} in
1467 7) ;;
1468 - *) die "EAPI=${EAPI} is not supported" ;;
1469 + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
1470 esac
1471
1472 inherit toolchain-funcs
1473 diff --git a/eclass/optfeature.eclass b/eclass/optfeature.eclass
1474 index b44fc1b85251..c8b4911320d3 100644
1475 --- a/eclass/optfeature.eclass
1476 +++ b/eclass/optfeature.eclass
1477 @@ -1,4 +1,4 @@
1478 -# Copyright 1999-2022 Gentoo Authors
1479 +# Copyright 1999-2023 Gentoo Authors
1480 # Distributed under the terms of the GNU General Public License v2
1481
1482 # @ECLASS: optfeature.eclass
1483 @@ -9,7 +9,7 @@
1484
1485 case ${EAPI} in
1486 7|8) ;;
1487 - *) die "${ECLASS}: EAPI=${EAPI:-0} is not supported" ;;
1488 + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
1489 esac
1490
1491 if [[ -z ${_OPTFEATURE_ECLASS} ]]; then
1492 diff --git a/eclass/out-of-source.eclass b/eclass/out-of-source.eclass
1493 index 06de39e6fc60..dd54c8933d4e 100644
1494 --- a/eclass/out-of-source.eclass
1495 +++ b/eclass/out-of-source.eclass
1496 @@ -34,10 +34,10 @@
1497
1498 case ${EAPI} in
1499 7|8);;
1500 - *) die "EAPI ${EAPI:-0} unsupported (too old)";;
1501 + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
1502 esac
1503
1504 -if [[ ! ${_OUT_OF_SOURCE_ECLASS} ]]; then
1505 +if [[ -z ${_OUT_OF_SOURCE_ECLASS} ]]; then
1506 _OUT_OF_SOURCE_ECLASS=1
1507
1508 # @ECLASS_VARIABLE: BUILD_DIR
1509 diff --git a/eclass/php-pear-r2.eclass b/eclass/php-pear-r2.eclass
1510 index 2d204ed24c3c..29bcf1e6fce8 100644
1511 --- a/eclass/php-pear-r2.eclass
1512 +++ b/eclass/php-pear-r2.eclass
1513 @@ -1,4 +1,4 @@
1514 -# Copyright 1999-2021 Gentoo Authors
1515 +# Copyright 1999-2023 Gentoo Authors
1516 # Distributed under the terms of the GNU General Public License v2
1517
1518 # @ECLASS: php-pear-r2.eclass
1519 @@ -14,20 +14,16 @@
1520 # Note that this eclass doesn't handle dependencies of PEAR packages
1521 # on purpose; please use (R)DEPEND to define them correctly!
1522
1523 -EXPORT_FUNCTIONS src_install pkg_postinst pkg_postrm
1524 -
1525 -case "${EAPI:-0}" in
1526 - 6|7)
1527 - ;;
1528 - 8)
1529 - IDEPEND=">=dev-php/pear-1.8.1"
1530 - ;;
1531 - *)
1532 - die "Unsupported EAPI=${EAPI} for ${ECLASS}"
1533 - ;;
1534 +case ${EAPI} in
1535 + 6|7|8) ;;
1536 + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
1537 esac
1538
1539 +if [[ -z ${_PHP_PEAR_R2_ECLASS} ]]; then
1540 +_PHP_PEAR_R2_ECLASS=1
1541 +
1542 RDEPEND=">=dev-php/pear-1.8.1"
1543 +[[ ${EAPI} != [67] ]] && IDEPEND=">=dev-php/pear-1.8.1"
1544
1545 # @ECLASS_VARIABLE: PHP_PEAR_PKG_NAME
1546 # @DESCRIPTION:
1547 @@ -129,3 +125,7 @@ php-pear-r2_pkg_postrm() {
1548 # Uninstall known dependency
1549 "${EROOT%/}/usr/bin/peardev" uninstall -nrO "${PHP_PEAR_DOMAIN}/${PHP_PEAR_PKG_NAME}"
1550 }
1551 +
1552 +fi
1553 +
1554 +EXPORT_FUNCTIONS src_install pkg_postinst pkg_postrm
1555 diff --git a/eclass/plasma-mobile.kde.org.eclass b/eclass/plasma-mobile.kde.org.eclass
1556 index 73cb98a3c153..1e2c5b6eb4fe 100644
1557 --- a/eclass/plasma-mobile.kde.org.eclass
1558 +++ b/eclass/plasma-mobile.kde.org.eclass
1559 @@ -1,4 +1,4 @@
1560 -# Copyright 1999-2022 Gentoo Authors
1561 +# Copyright 1999-2023 Gentoo Authors
1562 # Distributed under the terms of the GNU General Public License v2
1563
1564 # @ECLASS: plasma-mobile.kde.org.eclass
1565 @@ -19,7 +19,7 @@
1566
1567 case ${EAPI} in
1568 8) ;;
1569 - *) die "EAPI=${EAPI:-0} is not supported" ;;
1570 + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
1571 esac
1572
1573 if [[ -z ${_PLASMA_MOBILE_KDE_ORG_ECLASS} ]]; then
1574 diff --git a/eclass/plasma.kde.org.eclass b/eclass/plasma.kde.org.eclass
1575 index b0aad867ec1d..8fcf087896f1 100644
1576 --- a/eclass/plasma.kde.org.eclass
1577 +++ b/eclass/plasma.kde.org.eclass
1578 @@ -1,4 +1,4 @@
1579 -# Copyright 1999-2022 Gentoo Authors
1580 +# Copyright 1999-2023 Gentoo Authors
1581 # Distributed under the terms of the GNU General Public License v2
1582
1583 # @ECLASS: plasma.kde.org.eclass
1584 @@ -19,7 +19,7 @@
1585
1586 case ${EAPI} in
1587 8) ;;
1588 - *) die "EAPI=${EAPI:-0} is not supported" ;;
1589 + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
1590 esac
1591
1592 if [[ -z ${_PLASMA_KDE_ORG_ECLASS} ]]; then
1593 diff --git a/eclass/python-r1.eclass b/eclass/python-r1.eclass
1594 index 657922fe646d..4758defe6493 100644
1595 --- a/eclass/python-r1.eclass
1596 +++ b/eclass/python-r1.eclass
1597 @@ -35,7 +35,7 @@ case ${EAPI} in
1598 *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
1599 esac
1600
1601 -if [[ ! ${_PYTHON_R1_ECLASS} ]]; then
1602 +if [[ -z ${_PYTHON_R1_ECLASS} ]]; then
1603 _PYTHON_R1_ECLASS=1
1604
1605 if [[ ${_PYTHON_SINGLE_R1_ECLASS} ]]; then
1606 @@ -616,7 +616,7 @@ _python_multibuild_wrapper() {
1607 python_foreach_impl() {
1608 debug-print-function ${FUNCNAME} "${@}"
1609
1610 - if [[ ${_DISTUTILS_R1} ]]; then
1611 + if [[ ${_DISTUTILS_R1_ECLASS} ]]; then
1612 if has "${EBUILD_PHASE}" prepare configure compile test install &&
1613 [[ ! ${_DISTUTILS_CALLING_FOREACH_IMPL} &&
1614 ! ${_DISTUTILS_FOREACH_IMPL_WARNED} ]]
1615 diff --git a/eclass/qt5-build.eclass b/eclass/qt5-build.eclass
1616 index a3a7c88142b9..ae74c2e0540b 100644
1617 --- a/eclass/qt5-build.eclass
1618 +++ b/eclass/qt5-build.eclass
1619 @@ -11,15 +11,17 @@
1620 # @DESCRIPTION:
1621 # This eclass contains various functions that are used when building Qt5.
1622
1623 -if [[ ${CATEGORY} != dev-qt ]]; then
1624 - die "${ECLASS} is only to be used for building Qt 5"
1625 -fi
1626 -
1627 case ${EAPI} in
1628 8) ;;
1629 *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
1630 esac
1631
1632 +if [[ -z ${_QT5_BUILD_ECLASS} ]]; then
1633 +_QT5_BUILD_ECLASS=1
1634 +
1635 +[[ ${CATEGORY} != dev-qt ]] &&
1636 + die "${ECLASS} is only to be used for building Qt 5"
1637 +
1638 # @ECLASS_VARIABLE: QT5_BUILD_TYPE
1639 # @DESCRIPTION:
1640 # Default value is "release".
1641 @@ -171,8 +173,6 @@ fi
1642
1643 ###### Phase functions ######
1644
1645 -EXPORT_FUNCTIONS src_prepare src_configure src_compile src_install src_test pkg_postinst pkg_postrm
1646 -
1647 # @FUNCTION: qt5-build_src_prepare
1648 # @DESCRIPTION:
1649 # Prepares the environment and patches the sources if necessary.
1650 @@ -971,3 +971,7 @@ qt5_regenerate_global_configs() {
1651 ewarn "${qmodule_pri} or ${qmodule_pri_orig} does not exist or is not a regular file"
1652 fi
1653 }
1654 +
1655 +fi
1656 +
1657 +EXPORT_FUNCTIONS src_prepare src_configure src_compile src_install src_test pkg_postinst pkg_postrm
1658 diff --git a/eclass/qt6-build.eclass b/eclass/qt6-build.eclass
1659 index b7e062e6ef54..f92d37eba2f3 100644
1660 --- a/eclass/qt6-build.eclass
1661 +++ b/eclass/qt6-build.eclass
1662 @@ -1,4 +1,4 @@
1663 -# Copyright 2021-2022 Gentoo Authors
1664 +# Copyright 2021-2023 Gentoo Authors
1665 # Distributed under the terms of the GNU General Public License v2
1666
1667 # @ECLASS: qt6-build.eclass
1668 @@ -10,15 +10,17 @@
1669 # This eclass contains various functions that are used when building Qt6.
1670 # Requires EAPI 8.
1671
1672 -if [[ ${CATEGORY} != dev-qt ]]; then
1673 - die "qt6-build.eclass is only to be used for building Qt 6"
1674 -fi
1675 -
1676 case ${EAPI} in
1677 - 8) : ;;
1678 - *) die "qt6-build.eclass: unsupported EAPI=${EAPI:-0}" ;;
1679 + 8) ;;
1680 + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
1681 esac
1682
1683 +if [[ -z ${_QT6_BUILD_ECLASS} ]]; then
1684 +_QT6_BUILD_ECLASS=1
1685 +
1686 +[[ ${CATEGORY} != dev-qt ]] &&
1687 + die "${ECLASS} is only to be used for building Qt 6"
1688 +
1689 # @ECLASS_VARIABLE: QT6_MODULE
1690 # @PRE_INHERIT
1691 # @DESCRIPTION:
1692 @@ -99,8 +101,6 @@ BDEPEND="
1693 # DEPEND+=" test? ( ~dev-qt/qttest-${PV} )"
1694 #fi
1695
1696 -EXPORT_FUNCTIONS src_prepare src_configure
1697 -
1698 ###### Phase functions ######
1699
1700 # @FUNCTION: qt6-build_src_prepare
1701 @@ -166,3 +166,7 @@ qt6_prepare_env() {
1702 QT6_QMLDIR QT6_DATADIR QT6_DOCDIR QT6_TRANSLATIONDIR \
1703 QT6_EXAMPLESDIR QT6_TESTSDIR QT6_SYSCONFDIR
1704 }
1705 +
1706 +fi
1707 +
1708 +EXPORT_FUNCTIONS src_prepare src_configure
1709 diff --git a/eclass/rebar.eclass b/eclass/rebar.eclass
1710 index 1c7bc20def14..4c4c90fbcc11 100644
1711 --- a/eclass/rebar.eclass
1712 +++ b/eclass/rebar.eclass
1713 @@ -1,4 +1,4 @@
1714 -# Copyright 1999-2022 Gentoo Authors
1715 +# Copyright 1999-2023 Gentoo Authors
1716 # Distributed under the terms of the GNU General Public License v2
1717
1718 # @ECLASS: rebar.eclass
1719 @@ -24,7 +24,8 @@ case ${EAPI} in
1720 *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
1721 esac
1722
1723 -EXPORT_FUNCTIONS src_prepare src_compile src_test src_install
1724 +if [[ -z ${_REBAR_ECLASS} ]]; then
1725 +_REBAR_ECLASS=1
1726
1727 RDEPEND="dev-lang/erlang:="
1728 DEPEND="${RDEPEND}"
1729 @@ -256,3 +257,7 @@ rebar_src_install() {
1730
1731 einstalldocs
1732 }
1733 +
1734 +fi
1735 +
1736 +EXPORT_FUNCTIONS src_prepare src_compile src_test src_install
1737 diff --git a/eclass/ruby-ng.eclass b/eclass/ruby-ng.eclass
1738 index d6b3d2a0669a..67c22d518a31 100644
1739 --- a/eclass/ruby-ng.eclass
1740 +++ b/eclass/ruby-ng.eclass
1741 @@ -1,4 +1,4 @@
1742 -# Copyright 1999-2022 Gentoo Authors
1743 +# Copyright 1999-2023 Gentoo Authors
1744 # Distributed under the terms of the GNU General Public License v2
1745
1746 # @ECLASS: ruby-ng.eclass
1747 @@ -67,26 +67,19 @@
1748 # passed to "grep -E" to remove reporting of these shared objects.
1749
1750 case ${EAPI} in
1751 - 6)
1752 - inherit eqawarn estack toolchain-funcs
1753 - ;;
1754 - *)
1755 - inherit estack
1756 - ;;
1757 + 6|7|8) ;;
1758 + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
1759 esac
1760
1761 -inherit multilib ruby-utils
1762 +if [[ -z ${_RUBY_NG_ECLASS} ]]; then
1763 +_RUBY_NG_ECLASS=1
1764
1765 -EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_test src_install pkg_setup
1766 +[[ ${EAPI} == 6 ]] && inherit eqawarn toolchain-funcs
1767 +inherit estack multilib ruby-utils
1768
1769 # S is no longer automatically assigned when it doesn't exist.
1770 S="${WORKDIR}"
1771
1772 -case ${EAPI} in
1773 - 6|7|8) ;;
1774 - *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
1775 -esac
1776 -
1777 # @FUNCTION: ruby_implementation_depend
1778 # @USAGE: target [comparator [version]]
1779 # @RETURN: Package atom of a Ruby implementation to be used in dependencies.
1780 @@ -799,3 +792,7 @@ ruby-ng_testrb-2() {
1781
1782 ${RUBY} -S testrb-2 ${testrb_params} "$@" || die "testrb-2 failed"
1783 }
1784 +
1785 +fi
1786 +
1787 +EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_test src_install pkg_setup
1788 diff --git a/eclass/savedconfig.eclass b/eclass/savedconfig.eclass
1789 index 4681fd25328b..cc5748543078 100644
1790 --- a/eclass/savedconfig.eclass
1791 +++ b/eclass/savedconfig.eclass
1792 @@ -1,4 +1,4 @@
1793 -# Copyright 1999-2022 Gentoo Authors
1794 +# Copyright 1999-2023 Gentoo Authors
1795 # Distributed under the terms of the GNU General Public License v2
1796
1797 # @ECLASS: savedconfig.eclass
1798 @@ -30,15 +30,18 @@
1799 # 4. Emerge the package with just USE=savedconfig to get the custom
1800 # build.
1801
1802 -inherit portability
1803 -
1804 -IUSE="savedconfig"
1805 -
1806 case ${EAPI} in
1807 6|7|8) ;;
1808 - *) die "EAPI=${EAPI:-0} is not supported" ;;
1809 + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
1810 esac
1811
1812 +if [[ -z ${_SAVEDCONFIG_ECLASS} ]]; then
1813 +_SAVEDCONFIG_ECLASS=1
1814 +
1815 +inherit portability
1816 +
1817 +IUSE="savedconfig"
1818 +
1819 # @FUNCTION: save_config
1820 # @USAGE: <config files to save>
1821 # @DESCRIPTION:
1822 @@ -152,4 +155,6 @@ savedconfig_pkg_postinst() {
1823 fi
1824 }
1825
1826 +fi
1827 +
1828 EXPORT_FUNCTIONS pkg_postinst
1829 diff --git a/eclass/sgml-catalog-r1.eclass b/eclass/sgml-catalog-r1.eclass
1830 index 9f8bb13d6095..2258b3e2bf0f 100644
1831 --- a/eclass/sgml-catalog-r1.eclass
1832 +++ b/eclass/sgml-catalog-r1.eclass
1833 @@ -1,4 +1,4 @@
1834 -# Copyright 2019-2021 Gentoo Authors
1835 +# Copyright 2019-2023 Gentoo Authors
1836 # Distributed under the terms of the GNU General Public License v2
1837
1838 # @ECLASS: sgml-catalog-r1.eclass
1839 @@ -12,14 +12,13 @@
1840 # This eclass regenerates /etc/sgml/catalog as necessary for the DocBook
1841 # tooling. This is done via exported pkg_postinst and pkg_postrm phases.
1842
1843 -case ${EAPI:-0} in
1844 +case ${EAPI} in
1845 7) ;;
1846 - *) die "Unsupported EAPI=${EAPI} for ${ECLASS}";;
1847 + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
1848 esac
1849
1850 -EXPORT_FUNCTIONS pkg_postinst pkg_postrm
1851 -
1852 -if [[ ! ${_SGML_CATALOG_R1} ]]; then
1853 +if [[ -z ${_SGML_CATALOG_R1_ECLASS} ]]; then
1854 +_SGML_CATALOG_R1_ECLASS=1
1855
1856 if [[ ${CATEGORY}/${PN} != app-text/sgml-common ]]; then
1857 RDEPEND=">=app-text/sgml-common-0.6.3-r7"
1858 @@ -64,5 +63,6 @@ sgml-catalog-r1_pkg_postrm() {
1859 sgml-catalog-r1_update_env
1860 }
1861
1862 -_SGML_CATALOG_R1=1
1863 fi
1864 +
1865 +EXPORT_FUNCTIONS pkg_postinst pkg_postrm
1866 diff --git a/eclass/ssl-cert.eclass b/eclass/ssl-cert.eclass
1867 index 4b016ea82c87..83fbcf6143d1 100644
1868 --- a/eclass/ssl-cert.eclass
1869 +++ b/eclass/ssl-cert.eclass
1870 @@ -1,4 +1,4 @@
1871 -# Copyright 1999-2021 Gentoo Authors
1872 +# Copyright 1999-2023 Gentoo Authors
1873 # Distributed under the terms of the GNU General Public License v2
1874
1875 # @ECLASS: ssl-cert.eclass
1876 @@ -14,12 +14,12 @@
1877 # @EXAMPLE:
1878 # "install_cert /foo/bar" installs ${ROOT}/foo/bar.{key,csr,crt,pem}
1879
1880 -case "${EAPI}" in
1881 +case ${EAPI} in
1882 6|7|8) ;;
1883 - *) die "EAPI=${EAPI:-0} is not supported" ;;
1884 + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
1885 esac
1886
1887 -if [[ ! ${_SSL_CERT_ECLASS} ]]; then
1888 +if [[ -z ${_SSL_CERT_ECLASS} ]]; then
1889 _SSL_CERT_ECLASS=1
1890
1891 # @ECLASS_VARIABLE: SSL_CERT_MANDATORY
1892 diff --git a/eclass/tests/distutils-r1.sh b/eclass/tests/distutils-r1.sh
1893 index a42d4cc4641a..c895af3fc9a0 100755
1894 --- a/eclass/tests/distutils-r1.sh
1895 +++ b/eclass/tests/distutils-r1.sh
1896 @@ -59,7 +59,7 @@ test-DISTUTILS_USE_SETUPTOOLS() {
1897
1898 local BDEPEND=
1899 local RDEPEND=
1900 - unset _DISTUTILS_R1
1901 + unset _DISTUTILS_R1_ECLASS
1902 inherit distutils-r1
1903
1904 local ret var val
1905 diff --git a/eclass/tests/distutils-r1_single.sh b/eclass/tests/distutils-r1_single.sh
1906 index 0a671e2b739b..2035f1454c60 100755
1907 --- a/eclass/tests/distutils-r1_single.sh
1908 +++ b/eclass/tests/distutils-r1_single.sh
1909 @@ -48,7 +48,7 @@ test-DISTUTILS_USE_SETUPTOOLS() {
1910
1911 local BDEPEND=
1912 local RDEPEND=
1913 - unset _DISTUTILS_R1
1914 + unset _DISTUTILS_R1_ECLASS
1915 inherit distutils-r1
1916
1917 local ret var val
1918 diff --git a/eclass/texlive-common.eclass b/eclass/texlive-common.eclass
1919 index 40e2c3530510..f43d10926857 100644
1920 --- a/eclass/texlive-common.eclass
1921 +++ b/eclass/texlive-common.eclass
1922 @@ -1,4 +1,4 @@
1923 -# Copyright 1999-2022 Gentoo Authors
1924 +# Copyright 1999-2023 Gentoo Authors
1925 # Distributed under the terms of the GNU General Public License v2
1926
1927 # @ECLASS: texlive-common.eclass
1928 @@ -14,15 +14,14 @@
1929 #
1930 # Note that this eclass *must* not assume the presence of any standard tex too
1931
1932 +case ${EAPI} in
1933 + 7) inherit eapi8-dosym ;;
1934 + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
1935 +esac
1936 +
1937 if [[ -z ${_TEXLIVE_COMMON_ECLASS} ]]; then
1938 _TEXLIVE_COMMON_ECLASS=1
1939
1940 -case ${EAPI:-0} in
1941 - [0-6]) die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}" ;;
1942 - 7) inherit eapi8-dosym ;;
1943 - *) die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}" ;;
1944 -esac
1945 -
1946 TEXMF_PATH=/usr/share/texmf
1947 TEXMF_DIST_PATH=/usr/share/texmf-dist
1948 TEXMF_VAR_PATH=/var/lib/texmf
1949 diff --git a/eclass/texlive-module.eclass b/eclass/texlive-module.eclass
1950 index 68276714a4bc..a53c22dde205 100644
1951 --- a/eclass/texlive-module.eclass
1952 +++ b/eclass/texlive-module.eclass
1953 @@ -1,4 +1,4 @@
1954 -# Copyright 1999-2021 Gentoo Authors
1955 +# Copyright 1999-2023 Gentoo Authors
1956 # Distributed under the terms of the GNU General Public License v2
1957
1958 # @ECLASS: texlive-module.eclass
1959 @@ -71,14 +71,15 @@
1960 # Information to display about the package.
1961 # e.g. for enabling/disabling a feature
1962
1963 +case ${EAPI} in
1964 + 7) ;;
1965 + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
1966 +esac
1967 +
1968 if [[ -z ${_TEXLIVE_MODULE_ECLASS} ]]; then
1969 _TEXLIVE_MODULE_ECLASS=1
1970
1971 -case ${EAPI:-0} in
1972 - [0-6]) die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}" ;;
1973 - 7) inherit texlive-common ;;
1974 - *) die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}" ;;
1975 -esac
1976 +inherit texlive-common
1977
1978 HOMEPAGE="http://www.tug.org/texlive/"
1979
1980 @@ -447,6 +448,6 @@ texlive-module_pkg_postrm() {
1981 etexmf-update
1982 }
1983
1984 -EXPORT_FUNCTIONS src_unpack src_compile src_install pkg_postinst pkg_postrm
1985 -
1986 fi
1987 +
1988 +EXPORT_FUNCTIONS src_unpack src_compile src_install pkg_postinst pkg_postrm
1989 diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
1990 index 06c044fd1d38..2d7801259019 100644
1991 --- a/eclass/toolchain.eclass
1992 +++ b/eclass/toolchain.eclass
1993 @@ -12,17 +12,17 @@
1994 # instead.
1995
1996 case ${EAPI} in
1997 - 7) inherit eutils ;;
1998 - 8) ;;
1999 + 7|8) ;;
2000 *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
2001 esac
2002
2003 -if [[ ! ${_TOOLCHAIN_ECLASS} ]]; then
2004 +if [[ -z ${_TOOLCHAIN_ECLASS} ]]; then
2005 _TOOLCHAIN_ECLASS=1
2006
2007 DESCRIPTION="The GNU Compiler Collection"
2008 HOMEPAGE="https://gcc.gnu.org/"
2009
2010 +[[ ${EAPI} == 7 ]] && inherit eutils
2011 inherit edo flag-o-matic gnuconfig libtool multilib pax-utils toolchain-funcs prefix
2012
2013 tc_is_live() {
2014 @@ -2828,9 +2828,6 @@ toolchain_death_notice() {
2015
2016 fi
2017
2018 -EXPORT_FUNCTIONS pkg_pretend pkg_setup src_unpack src_prepare src_configure \
2019 - src_compile src_test src_install pkg_postinst pkg_postrm
2020 -
2021 # Note [implicitly enabled flags]
2022 # -------------------------------
2023 # Usually configure-based packages handle explicit feature requests
2024 @@ -2848,3 +2845,5 @@ EXPORT_FUNCTIONS pkg_pretend pkg_setup src_unpack src_prepare src_configure \
2025 # Thus safer way to enable/disable the feature is to rely on implicit
2026 # enabled-by-default state:
2027 # econf $(usex foo '' --disable-foo)
2028 +
2029 +EXPORT_FUNCTIONS pkg_pretend pkg_setup src_unpack src_prepare src_configure src_compile src_test src_install pkg_postinst pkg_postrm
2030 diff --git a/eclass/tree-sitter-grammar.eclass b/eclass/tree-sitter-grammar.eclass
2031 index c607ea9ddfb7..e74d18653b8a 100644
2032 --- a/eclass/tree-sitter-grammar.eclass
2033 +++ b/eclass/tree-sitter-grammar.eclass
2034 @@ -1,4 +1,4 @@
2035 -# Copyright 1999-2022 Gentoo Authors
2036 +# Copyright 1999-2023 Gentoo Authors
2037 # Distributed under the terms of the GNU General Public License v2
2038
2039 # @ECLASS: tree-sitter-grammar.eclass
2040 @@ -10,17 +10,15 @@
2041 # @SUPPORTED_EAPIS: 8
2042 # @BLURB: Common functions and variables for Tree Sitter grammars
2043
2044 -inherit edo
2045 -
2046 -if [[ -z ${_TREE_SITTER_GRAMMAR_ECLASS} ]]; then
2047 -_TREE_SITTER_GRAMMAR_ECLASS=1
2048 -
2049 case ${EAPI} in
2050 8) ;;
2051 - *) die "EAPI=${EAPI:-0} is not supported" ;;
2052 + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
2053 esac
2054
2055 -inherit multilib toolchain-funcs
2056 +if [[ -z ${_TREE_SITTER_GRAMMAR_ECLASS} ]]; then
2057 +_TREE_SITTER_GRAMMAR_ECLASS=1
2058 +
2059 +inherit edo multilib toolchain-funcs
2060
2061 SRC_URI="https://github.com/tree-sitter/${PN}/archive/${TS_PV:-v${PV}}.tar.gz
2062 -> ${P}.tar.gz"
2063 @@ -33,8 +31,6 @@ BDEPEND+=" test? ( dev-util/tree-sitter-cli )"
2064 IUSE+=" test"
2065 RESTRICT+=" !test? ( test )"
2066
2067 -EXPORT_FUNCTIONS src_compile src_test src_install
2068 -
2069 # @ECLASS_VARIABLE: TS_PV
2070 # @PRE_INHERIT
2071 # @DEFAULT_UNSET
2072 @@ -115,4 +111,7 @@ tree-sitter-grammar_src_install() {
2073 dosym "${soname}" \
2074 /usr/$(get_libdir)/lib${PN}$(get_libname)
2075 }
2076 +
2077 fi
2078 +
2079 +EXPORT_FUNCTIONS src_compile src_test src_install
2080 diff --git a/eclass/unpacker.eclass b/eclass/unpacker.eclass
2081 index 44ff2af5acf3..2a0dcf45d76a 100644
2082 --- a/eclass/unpacker.eclass
2083 +++ b/eclass/unpacker.eclass
2084 @@ -15,8 +15,8 @@
2085 # - merge rpm unpacking
2086 # - support partial unpacks?
2087
2088 -case ${EAPI:-0} in
2089 - [678]) ;;
2090 +case ${EAPI} in
2091 + 6|7|8) ;;
2092 *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
2093 esac
2094
2095 @@ -642,6 +642,6 @@ unpacker_src_uri_depends() {
2096 echo "${deps[*]}"
2097 }
2098
2099 -EXPORT_FUNCTIONS src_unpack
2100 -
2101 fi
2102 +
2103 +EXPORT_FUNCTIONS src_unpack
2104 diff --git a/eclass/verify-sig.eclass b/eclass/verify-sig.eclass
2105 index f67a3b10a0bf..5e757cdd6038 100644
2106 --- a/eclass/verify-sig.eclass
2107 +++ b/eclass/verify-sig.eclass
2108 @@ -45,9 +45,8 @@ case ${EAPI} in
2109 *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
2110 esac
2111
2112 -EXPORT_FUNCTIONS src_unpack
2113 -
2114 -if [[ ! ${_VERIFY_SIG_ECLASS} ]]; then
2115 +if [[ -z ${_VERIFY_SIG_ECLASS} ]]; then
2116 +_VERIFY_SIG_ECLASS=1
2117
2118 IUSE="verify-sig"
2119
2120 @@ -390,5 +389,6 @@ verify-sig_src_unpack() {
2121 default_src_unpack
2122 }
2123
2124 -_VERIFY_SIG_ECLASS=1
2125 fi
2126 +
2127 +EXPORT_FUNCTIONS src_unpack
2128 diff --git a/eclass/vim-plugin.eclass b/eclass/vim-plugin.eclass
2129 index edf1c94d31b1..81e1e54f638d 100644
2130 --- a/eclass/vim-plugin.eclass
2131 +++ b/eclass/vim-plugin.eclass
2132 @@ -1,4 +1,4 @@
2133 -# Copyright 1999-2022 Gentoo Authors
2134 +# Copyright 1999-2023 Gentoo Authors
2135 # Distributed under the terms of the GNU General Public License v2
2136
2137 # @ECLASS: vim-plugin.eclass
2138 @@ -13,15 +13,17 @@
2139 # documentation, for which we make a special case via vim-doc.eclass.
2140
2141 case ${EAPI} in
2142 - 6|7) ;;
2143 - 8) _DEFINE_VIM_PLUGIN_SRC_PREPARE=true ;;
2144 + 6|7|8) ;;
2145 *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
2146 esac
2147
2148 -if [[ ! ${_VIM_PLUGIN_ECLASS} ]]; then
2149 +if [[ -z ${_VIM_PLUGIN_ECLASS} ]]; then
2150 +_VIM_PLUGIN_ECLASS=1
2151
2152 inherit vim-doc
2153
2154 +[[ ${EAPI} != [67] ]] && _DEFINE_VIM_PLUGIN_SRC_PREPARE=true
2155 +
2156 # @ECLASS_VARIABLE: VIM_PLUGIN_VIM_VERSION
2157 # @DESCRIPTION:
2158 # Minimum Vim version the plugin supports.
2159 @@ -230,13 +232,9 @@ display_vim_plugin_help() {
2160 fi
2161 }
2162
2163 -_VIM_PLUGIN_ECLASS=1
2164 fi
2165
2166 -EXPORT_FUNCTIONS src_install pkg_postinst pkg_postrm
2167 -
2168 # src_prepare is only exported in EAPI >= 8
2169 -case ${EAPI} in
2170 - 6|7) ;;
2171 - *) EXPORT_FUNCTIONS src_prepare ;;
2172 -esac
2173 +[[ ${_DEFINE_VIM_PLUGIN_SRC_PREPARE} ]] && EXPORT_FUNCTIONS src_prepare
2174 +
2175 +EXPORT_FUNCTIONS src_install pkg_postinst pkg_postrm
2176 diff --git a/eclass/vim-spell.eclass b/eclass/vim-spell.eclass
2177 index 8acf29a5580d..38db4ccda13f 100644
2178 --- a/eclass/vim-spell.eclass
2179 +++ b/eclass/vim-spell.eclass
2180 @@ -1,4 +1,4 @@
2181 -# Copyright 1999-2021 Gentoo Authors
2182 +# Copyright 1999-2023 Gentoo Authors
2183 # Distributed under the terms of the GNU General Public License v2
2184
2185 # @ECLASS: vim-spell.eclass
2186 @@ -63,13 +63,11 @@
2187 # spell files. It's best to let upstream know if you've generated spell files
2188 # for another language rather than keeping them Gentoo-specific.
2189
2190 -case ${EAPI:-0} in
2191 - [67]) ;;
2192 +case ${EAPI} in
2193 + 6|7) ;;
2194 *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
2195 esac
2196
2197 -EXPORT_FUNCTIONS src_install pkg_postinst
2198 -
2199 if [[ -z ${_VIM_SPELL_ECLASS} ]] ; then
2200 _VIM_SPELL_ECLASS=1
2201
2202 @@ -157,3 +155,5 @@ vim-spell_pkg_postinst() {
2203 }
2204
2205 fi
2206 +
2207 +EXPORT_FUNCTIONS src_install pkg_postinst
2208 diff --git a/eclass/virtualx.eclass b/eclass/virtualx.eclass
2209 index e04834d39bd1..2513f4e16256 100644
2210 --- a/eclass/virtualx.eclass
2211 +++ b/eclass/virtualx.eclass
2212 @@ -1,4 +1,4 @@
2213 -# Copyright 1999-2021 Gentoo Authors
2214 +# Copyright 1999-2023 Gentoo Authors
2215 # Distributed under the terms of the GNU General Public License v2
2216
2217 # @ECLASS: virtualx.eclass
2218 @@ -11,10 +11,10 @@
2219
2220 case ${EAPI} in
2221 6|7|8) ;;
2222 - *) die "${ECLASS}: EAPI ${EAPI:-0} is not supported." ;;
2223 + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
2224 esac
2225
2226 -if [[ ! ${_VIRTUALX_ECLASS} ]]; then
2227 +if [[ -z ${_VIRTUALX_ECLASS} ]]; then
2228 _VIRTUALX_ECLASS=1
2229
2230 # @ECLASS_VARIABLE: VIRTUALX_REQUIRED
2231 diff --git a/eclass/xorg-3.eclass b/eclass/xorg-3.eclass
2232 index a63655e10ece..a68341591edd 100644
2233 --- a/eclass/xorg-3.eclass
2234 +++ b/eclass/xorg-3.eclass
2235 @@ -1,4 +1,4 @@
2236 -# Copyright 1999-2022 Gentoo Authors
2237 +# Copyright 1999-2023 Gentoo Authors
2238 # Distributed under the terms of the GNU General Public License v2
2239
2240 # @ECLASS: xorg-3.eclass
2241 @@ -22,6 +22,14 @@
2242 # with the other X packages, you don't need to set SRC_URI. Pretty much
2243 # everything else should be automatic.
2244
2245 +case ${EAPI} in
2246 + 7|8) ;;
2247 + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
2248 +esac
2249 +
2250 +if [[ -z ${_XORG_3_ECLASS} ]]; then
2251 +_XORG_3_ECLASS=1
2252 +
2253 GIT_ECLASS=""
2254 if [[ ${PV} == *9999* ]]; then
2255 GIT_ECLASS="git-r3"
2256 @@ -54,19 +62,7 @@ inherit autotools libtool multilib toolchain-funcs flag-o-matic \
2257 ${FONT_ECLASS} ${GIT_ECLASS}
2258 unset FONT_ECLASS GIT_ECLASS
2259
2260 -if [[ ${XORG_MULTILIB} == yes ]]; then
2261 - inherit multilib-minimal
2262 -fi
2263 -
2264 -case "${EAPI:-0}" in
2265 - [7-8]) ;;
2266 - *) die "EAPI=${EAPI} is not supported" ;;
2267 -esac
2268 -
2269 -# exports must be ALWAYS after inherit
2270 -EXPORT_FUNCTIONS src_prepare src_configure src_unpack src_compile src_install pkg_postinst pkg_postrm
2271 -
2272 -IUSE=""
2273 +[[ ${XORG_MULTILIB} == yes ]] && inherit multilib-minimal
2274
2275 # @ECLASS_VARIABLE: XORG_EAUTORECONF
2276 # @PRE_INHERIT
2277 @@ -546,3 +542,7 @@ create_fonts_dir() {
2278 -- "${EROOT}/usr/share/fonts/${FONT_DIR}"
2279 eend $?
2280 }
2281 +
2282 +fi
2283 +
2284 +EXPORT_FUNCTIONS src_prepare src_configure src_unpack src_compile src_install pkg_postinst pkg_postrm
2285 --
2286 2.40.0