summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-06-20 23:15:49 +0200
committerDavid Seifert <soap@gentoo.org>2021-06-20 23:15:49 +0200
commit1106f26ff50738702b656c14259eafe543ff7abd (patch)
tree99d3951ca77a8b5e638dc4f38087d8c4aa1161e6
parentvim-doc.eclass: [QA] add EAPI guard, drop support for < EAPI 6, add basic ecl... (diff)
downloadgentoo-1106f26ff50738702b656c14259eafe543ff7abd.tar.gz
gentoo-1106f26ff50738702b656c14259eafe543ff7abd.tar.bz2
gentoo-1106f26ff50738702b656c14259eafe543ff7abd.zip
vim-spell.eclass: [QA] add EAPI guard, drop support for < EAPI 6
* Declare supported EAPIs as: [QA] 6, 7 * Add inherit guards to die on unsupported/untested EAPIs * Add guard to prevent multiple inherits * Drop obsolete EAPI 0, 1, 2 workarounds Signed-off-by: Sam James <sam@gentoo.org> Signed-off-by: David Seifert <soap@gentoo.org>
-rw-r--r--eclass/vim-spell.eclass12
1 files changed, 11 insertions, 1 deletions
diff --git a/eclass/vim-spell.eclass b/eclass/vim-spell.eclass
index baf77221bc9..54bf6b879f7 100644
--- a/eclass/vim-spell.eclass
+++ b/eclass/vim-spell.eclass
@@ -6,6 +6,7 @@
# Vim Maintainers <vim@gentoo.org>
# @AUTHOR:
# Ciaran McCreesh <ciaranm@gentoo.org>
+# @SUPPORTED_EAPIS: 6 7
# @BLURB: Eclass for managing Vim spell files.
# @DESCRIPTION:
# How to make a vim spell file package using prebuilt spell lists
@@ -62,8 +63,16 @@
# spell files. It's best to let upstream know if you've generated spell files
# for another language rather than keeping them Gentoo-specific.
+case ${EAPI:-0} in
+ [67]) ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
+esac
+
EXPORT_FUNCTIONS src_install pkg_postinst
+if [[ -z ${_VIM_SPELL_ECLASS} ]] ; then
+_VIM_SPELL_ECLASS=1
+
SRC_URI="mirror://gentoo/${P}.tar.bz2"
SLOT="0"
@@ -128,7 +137,6 @@ vim-spell_src_install() {
# @DESCRIPTION:
# This function displays installed Vim spell files.
vim-spell_pkg_postinst() {
- has "${EAPI:-0}" 0 1 2 && ! use prefix && EROOT="${ROOT}"
echo
elog "To enable ${VIM_SPELL_LANGUAGE} spell checking, use"
elog " :setlocal spell spelllang=${VIM_SPELL_LOCALE}"
@@ -147,3 +155,5 @@ vim-spell_pkg_postinst() {
elog " :help spell"
echo
}
+
+fi