Gentoo Archives: gentoo-commits

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