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/
Date: Sun, 20 Jun 2021 21:16:22
Message-Id: 1624223749.1106f26ff50738702b656c14259eafe543ff7abd.soap@gentoo
1 commit: 1106f26ff50738702b656c14259eafe543ff7abd
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jun 20 21:15:49 2021 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Sun Jun 20 21:15:49 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1106f26f
7
8 vim-spell.eclass: [QA] add EAPI guard, drop support for < EAPI 6
9
10 * Declare supported EAPIs as: [QA] 6, 7
11 * Add inherit guards to die on unsupported/untested EAPIs
12 * Add guard to prevent multiple inherits
13 * Drop obsolete EAPI 0, 1, 2 workarounds
14
15 Signed-off-by: Sam James <sam <AT> gentoo.org>
16 Signed-off-by: David Seifert <soap <AT> gentoo.org>
17
18 eclass/vim-spell.eclass | 12 +++++++++++-
19 1 file changed, 11 insertions(+), 1 deletion(-)
20
21 diff --git a/eclass/vim-spell.eclass b/eclass/vim-spell.eclass
22 index baf77221bc9..54bf6b879f7 100644
23 --- a/eclass/vim-spell.eclass
24 +++ b/eclass/vim-spell.eclass
25 @@ -6,6 +6,7 @@
26 # Vim Maintainers <vim@g.o>
27 # @AUTHOR:
28 # Ciaran McCreesh <ciaranm@g.o>
29 +# @SUPPORTED_EAPIS: 6 7
30 # @BLURB: Eclass for managing Vim spell files.
31 # @DESCRIPTION:
32 # How to make a vim spell file package using prebuilt spell lists
33 @@ -62,8 +63,16 @@
34 # spell files. It's best to let upstream know if you've generated spell files
35 # for another language rather than keeping them Gentoo-specific.
36
37 +case ${EAPI:-0} in
38 + [67]) ;;
39 + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
40 +esac
41 +
42 EXPORT_FUNCTIONS src_install pkg_postinst
43
44 +if [[ -z ${_VIM_SPELL_ECLASS} ]] ; then
45 +_VIM_SPELL_ECLASS=1
46 +
47 SRC_URI="mirror://gentoo/${P}.tar.bz2"
48 SLOT="0"
49
50 @@ -128,7 +137,6 @@ vim-spell_src_install() {
51 # @DESCRIPTION:
52 # This function displays installed Vim spell files.
53 vim-spell_pkg_postinst() {
54 - has "${EAPI:-0}" 0 1 2 && ! use prefix && EROOT="${ROOT}"
55 echo
56 elog "To enable ${VIM_SPELL_LANGUAGE} spell checking, use"
57 elog " :setlocal spell spelllang=${VIM_SPELL_LOCALE}"
58 @@ -147,3 +155,5 @@ vim-spell_pkg_postinst() {
59 elog " :help spell"
60 echo
61 }
62 +
63 +fi