From d14d5c76dc748555c6e34a18dc6442d7298a8149 Mon Sep 17 00:00:00 2001 From: Sam James Date: Sun, 20 Jun 2021 23:15:58 +0200 Subject: 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 Signed-off-by: David Seifert --- eclass/xemacs-packages.eclass | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'eclass') 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 -- cgit v1.2.3-65-gdbad