eclass/vim-plugin: Sync with Gentoo

It's from Gentoo commit 2cba2db27919bc449ed2a7bf7ed3259c6b96e65f.
This commit is contained in:
Flatcar Buildbot 2023-03-20 07:25:35 +00:00
parent a23b80f3db
commit 1e28faef28

View File

@ -1,4 +1,4 @@
# Copyright 1999-2022 Gentoo Authors # Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2 # Distributed under the terms of the GNU General Public License v2
# @ECLASS: vim-plugin.eclass # @ECLASS: vim-plugin.eclass
@ -13,15 +13,17 @@
# documentation, for which we make a special case via vim-doc.eclass. # documentation, for which we make a special case via vim-doc.eclass.
case ${EAPI} in case ${EAPI} in
6|7) ;; 6|7|8) ;;
8) _DEFINE_VIM_PLUGIN_SRC_PREPARE=true ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac esac
if [[ ! ${_VIM_PLUGIN_ECLASS} ]]; then if [[ -z ${_VIM_PLUGIN_ECLASS} ]]; then
_VIM_PLUGIN_ECLASS=1
inherit vim-doc inherit vim-doc
[[ ${EAPI} != [67] ]] && _DEFINE_VIM_PLUGIN_SRC_PREPARE=true
# @ECLASS_VARIABLE: VIM_PLUGIN_VIM_VERSION # @ECLASS_VARIABLE: VIM_PLUGIN_VIM_VERSION
# @DESCRIPTION: # @DESCRIPTION:
# Minimum Vim version the plugin supports. # Minimum Vim version the plugin supports.
@ -230,13 +232,9 @@ display_vim_plugin_help() {
fi fi
} }
_VIM_PLUGIN_ECLASS=1
fi fi
EXPORT_FUNCTIONS src_install pkg_postinst pkg_postrm
# src_prepare is only exported in EAPI >= 8 # src_prepare is only exported in EAPI >= 8
case ${EAPI} in [[ ${_DEFINE_VIM_PLUGIN_SRC_PREPARE} ]] && EXPORT_FUNCTIONS src_prepare
6|7) ;;
*) EXPORT_FUNCTIONS src_prepare ;; EXPORT_FUNCTIONS src_install pkg_postinst pkg_postrm
esac