1 |
commit: d14d5c76dc748555c6e34a18dc6442d7298a8149 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jun 20 21:15:58 2021 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jun 20 21:15:58 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d14d5c76 |
7 |
|
8 |
xemacs-packages.eclass: [QA] add EAPI guard |
9 |
|
10 |
* Declare supported EAPIs as: EAPI 6, EAPI 7. There are no EAPI 5 consumers in |
11 |
tree. |
12 |
* Add EAPI guard to prevent newer/older unsupported EAPIs from using this |
13 |
eclass when they've not been tested/eclass isn't adapted for it. |
14 |
* Add inherit guard as is convention. |
15 |
|
16 |
Closes: https://github.com/gentoo/gentoo/pull/21346 |
17 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
18 |
Signed-off-by: David Seifert <soap <AT> gentoo.org> |
19 |
|
20 |
eclass/xemacs-packages.eclass | 13 ++++++++++++- |
21 |
1 file changed, 12 insertions(+), 1 deletion(-) |
22 |
|
23 |
diff --git a/eclass/xemacs-packages.eclass b/eclass/xemacs-packages.eclass |
24 |
index 372e4c5301c..99c6b63014c 100644 |
25 |
--- a/eclass/xemacs-packages.eclass |
26 |
+++ b/eclass/xemacs-packages.eclass |
27 |
@@ -4,6 +4,7 @@ |
28 |
# @ECLASS: xemacs-packages.eclass |
29 |
# @MAINTAINER: |
30 |
# xemacs@g.o |
31 |
+# @SUPPORTED_EAPIS: 6 7 |
32 |
# @BLURB: Eclass to support elisp packages distributed by XEmacs. |
33 |
# @DESCRIPTION: |
34 |
# This eclass supports ebuilds for packages distributed by XEmacs. |
35 |
@@ -23,8 +24,16 @@ |
36 |
# in the experimental repository are auto-generated from XEmacs VCS, so |
37 |
# they may not be well-tested. |
38 |
|
39 |
+case ${EAPI:-0} in |
40 |
+ [67]) ;; |
41 |
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; |
42 |
+esac |
43 |
+ |
44 |
EXPORT_FUNCTIONS src_unpack src_install |
45 |
|
46 |
+if [[ -z ${_XEMACS_PACKAGES_ECLASS} ]] ; then |
47 |
+_XEMACS_PACKAGES_ECLASS=1 |
48 |
+ |
49 |
RDEPEND="app-editors/xemacs" |
50 |
S="${WORKDIR}" |
51 |
|
52 |
@@ -55,6 +64,8 @@ xemacs-packages_src_install() { |
53 |
debug-print "install_dir is ${install_dir}" |
54 |
|
55 |
dodir "${install_dir}" |
56 |
- cd "${D}${EPREFIX}${install_dir}" || die |
57 |
+ cd "${ED}${install_dir}" || die |
58 |
unpack ${A} |
59 |
} |
60 |
+ |
61 |
+fi |