commit:     d1d130bae55780d7a710dcaef4df63b8bf6192fa
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Jun 20 21:15:46 2021 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sun Jun 20 21:15:46 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d1d130ba

vim-doc.eclass: [QA] add EAPI guard, drop support for < EAPI 6, add basic 
eclassdoc

* Add missing eclassdoc block
* 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 <AT> gentoo.org>
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 eclass/vim-doc.eclass | 20 +++++++++++++++++---
 1 file changed, 17 insertions(+), 3 deletions(-)

diff --git a/eclass/vim-doc.eclass b/eclass/vim-doc.eclass
index 70a6e943e85..ba9d00f4f5e 100644
--- a/eclass/vim-doc.eclass
+++ b/eclass/vim-doc.eclass
@@ -1,6 +1,12 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
-#
+
+# @ECLASS: vim-doc.eclass
+# @MAINTAINER:
+# v...@gentoo.org
+# @SUPPORTED_EAPIS: 6 7
+# @BLURB: Eclass for vim{,-plugin}.eclass to update documentation tags.
+# @DESCRIPTION:
 # This eclass is used by vim.eclass and vim-plugin.eclass to update
 # the documentation tags.  This is necessary since vim doesn't look in
 # /usr/share/vim/vimfiles/doc for documentation; it only uses the
@@ -10,9 +16,15 @@
 # DEPEND in vim-plugin or by whatever version of vim is being
 # installed by the eclass.
 
+case ${EAPI:-0} in
+       [67]) ;;
+       *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
+esac
+
+if [[ -z ${_VIM_DOC_ECLASS} ]] ; then
+_VIM_DOC_ECLASS=1
 
 update_vim_helptags() {
-       has "${EAPI:-0}" 0 1 2 && ! use prefix && EROOT="${ROOT}"
        local vimfiles vim d s
 
        # This is where vim plugins are installed
@@ -70,3 +82,5 @@ update_vim_helptags() {
 
        [[ -n "${vim}" && -f "${vim}" ]] && rm "${vim}"
 }
+
+fi

Reply via email to