summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-06-20 23:15:58 +0200
committerDavid Seifert <soap@gentoo.org>2021-06-20 23:15:58 +0200
commitd14d5c76dc748555c6e34a18dc6442d7298a8149 (patch)
tree1f125751e62337db1e955e89fae5dbc0cef1b439 /eclass
parentwebapp.eclass: [QA] add EAPI guard (diff)
downloadgentoo-d14d5c76dc748555c6e34a18dc6442d7298a8149.tar.gz
gentoo-d14d5c76dc748555c6e34a18dc6442d7298a8149.tar.bz2
gentoo-d14d5c76dc748555c6e34a18dc6442d7298a8149.zip
xemacs-packages.eclass: [QA] add EAPI guard
* Declare supported EAPIs as: EAPI 6, EAPI 7. There are no EAPI 5 consumers in tree. * Add EAPI guard to prevent newer/older unsupported EAPIs from using this eclass when they've not been tested/eclass isn't adapted for it. * Add inherit guard as is convention. Closes: https://github.com/gentoo/gentoo/pull/21346 Signed-off-by: Sam James <sam@gentoo.org> Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/xemacs-packages.eclass13
1 files changed, 12 insertions, 1 deletions
diff --git a/eclass/xemacs-packages.eclass b/eclass/xemacs-packages.eclass
index 372e4c5301cf..99c6b63014c7 100644
--- a/eclass/xemacs-packages.eclass
+++ b/eclass/xemacs-packages.eclass
@@ -4,6 +4,7 @@
# @ECLASS: xemacs-packages.eclass
# @MAINTAINER:
# xemacs@gentoo.org
+# @SUPPORTED_EAPIS: 6 7
# @BLURB: Eclass to support elisp packages distributed by XEmacs.
# @DESCRIPTION:
# This eclass supports ebuilds for packages distributed by XEmacs.
@@ -23,8 +24,16 @@
# in the experimental repository are auto-generated from XEmacs VCS, so
# they may not be well-tested.
+case ${EAPI:-0} in
+ [67]) ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
+esac
+
EXPORT_FUNCTIONS src_unpack src_install
+if [[ -z ${_XEMACS_PACKAGES_ECLASS} ]] ; then
+_XEMACS_PACKAGES_ECLASS=1
+
RDEPEND="app-editors/xemacs"
S="${WORKDIR}"
@@ -55,6 +64,8 @@ xemacs-packages_src_install() {
debug-print "install_dir is ${install_dir}"
dodir "${install_dir}"
- cd "${D}${EPREFIX}${install_dir}" || die
+ cd "${ED}${install_dir}" || die
unpack ${A}
}
+
+fi