mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-15 00:46:58 +02:00
eclass/vim-plugin: Sync with Gentoo
It's from Gentoo commit c8af7eb1285a2683460618b71e2e9a14ca6badcd.
This commit is contained in:
parent
3df97f3d73
commit
2046dcbd97
@ -4,7 +4,7 @@
|
|||||||
# @ECLASS: vim-plugin.eclass
|
# @ECLASS: vim-plugin.eclass
|
||||||
# @MAINTAINER:
|
# @MAINTAINER:
|
||||||
# vim@gentoo.org
|
# vim@gentoo.org
|
||||||
# @SUPPORTED_EAPIS: 6 7 8
|
# @SUPPORTED_EAPIS: 7 8
|
||||||
# @BLURB: used for installing vim plugins
|
# @BLURB: used for installing vim plugins
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# This eclass simplifies installation of app-vim plugins into
|
# This eclass simplifies installation of app-vim plugins into
|
||||||
@ -16,17 +16,13 @@ if [[ -z ${_VIM_PLUGIN_ECLASS} ]]; then
|
|||||||
_VIM_PLUGIN_ECLASS=1
|
_VIM_PLUGIN_ECLASS=1
|
||||||
|
|
||||||
case ${EAPI} in
|
case ${EAPI} in
|
||||||
6)
|
|
||||||
ewarn "${CATEGORY}/${PF}: ebuild uses ${ECLASS} with deprecated EAPI ${EAPI}!"
|
|
||||||
ewarn "${CATEGORY}/${PF}: Support will be removed on 2024-10-08. Please port to newer EAPI."
|
|
||||||
;;
|
|
||||||
7|8) ;;
|
7|8) ;;
|
||||||
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
|
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
inherit vim-doc
|
inherit vim-doc
|
||||||
|
|
||||||
[[ ${EAPI} != [67] ]] && _DEFINE_VIM_PLUGIN_SRC_PREPARE=true
|
[[ ${EAPI} != 7 ]] && _DEFINE_VIM_PLUGIN_SRC_PREPARE=true
|
||||||
|
|
||||||
# @ECLASS_VARIABLE: VIM_PLUGIN_VIM_VERSION
|
# @ECLASS_VARIABLE: VIM_PLUGIN_VIM_VERSION
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
@ -50,7 +46,7 @@ if [[ ${_DEFINE_VIM_PLUGIN_SRC_PREPARE} ]]; then
|
|||||||
# other packages.
|
# other packages.
|
||||||
# Note that this function is only defined and exported in EAPIs >= 8.
|
# Note that this function is only defined and exported in EAPIs >= 8.
|
||||||
vim-plugin_src_prepare() {
|
vim-plugin_src_prepare() {
|
||||||
debug-print-function ${FUNCNAME} "${@}"
|
debug-print-function ${FUNCNAME} "$@"
|
||||||
|
|
||||||
default_src_prepare
|
default_src_prepare
|
||||||
|
|
||||||
@ -94,7 +90,7 @@ _VIM_PLUGIN_ALLOWED_DIRS=(
|
|||||||
# }
|
# }
|
||||||
# @CODE
|
# @CODE
|
||||||
vim-plugin_src_install() {
|
vim-plugin_src_install() {
|
||||||
debug-print-function ${FUNCNAME} "${@}"
|
debug-print-function ${FUNCNAME} "$@"
|
||||||
|
|
||||||
# Install non-vim-help-docs
|
# Install non-vim-help-docs
|
||||||
einstalldocs
|
einstalldocs
|
||||||
@ -102,8 +98,8 @@ vim-plugin_src_install() {
|
|||||||
# Install remainder of plugin
|
# Install remainder of plugin
|
||||||
insinto /usr/share/vim/vimfiles/
|
insinto /usr/share/vim/vimfiles/
|
||||||
local d
|
local d
|
||||||
case ${EAPI:-0} in
|
case ${EAPI} in
|
||||||
6|7)
|
7)
|
||||||
for d in *; do
|
for d in *; do
|
||||||
[[ -d "${d}" ]] || continue
|
[[ -d "${d}" ]] || continue
|
||||||
doins -r "${d}"
|
doins -r "${d}"
|
||||||
@ -128,7 +124,7 @@ vim-plugin_src_install() {
|
|||||||
#
|
#
|
||||||
# * display_vim_plugin_help
|
# * display_vim_plugin_help
|
||||||
vim-plugin_pkg_postinst() {
|
vim-plugin_pkg_postinst() {
|
||||||
debug-print-function ${FUNCNAME} "${@}"
|
debug-print-function ${FUNCNAME} "$@"
|
||||||
|
|
||||||
update_vim_helptags # from vim-doc
|
update_vim_helptags # from vim-doc
|
||||||
update_vim_afterscripts # see below
|
update_vim_afterscripts # see below
|
||||||
@ -141,7 +137,7 @@ vim-plugin_pkg_postinst() {
|
|||||||
# This function calls the update_vim_helptags and update_vim_afterscripts
|
# This function calls the update_vim_helptags and update_vim_afterscripts
|
||||||
# functions and eventually removes a bunch of empty directories.
|
# functions and eventually removes a bunch of empty directories.
|
||||||
vim-plugin_pkg_postrm() {
|
vim-plugin_pkg_postrm() {
|
||||||
debug-print-function ${FUNCNAME} "${@}"
|
debug-print-function ${FUNCNAME} "$@"
|
||||||
|
|
||||||
update_vim_helptags # from vim-doc
|
update_vim_helptags # from vim-doc
|
||||||
update_vim_afterscripts # see below
|
update_vim_afterscripts # see below
|
||||||
@ -158,7 +154,7 @@ vim-plugin_pkg_postrm() {
|
|||||||
# Creates scripts in /usr/share/vim/vimfiles/after/*
|
# Creates scripts in /usr/share/vim/vimfiles/after/*
|
||||||
# comprised of the snippets in /usr/share/vim/vimfiles/after/*/*.d
|
# comprised of the snippets in /usr/share/vim/vimfiles/after/*/*.d
|
||||||
update_vim_afterscripts() {
|
update_vim_afterscripts() {
|
||||||
debug-print-function ${FUNCNAME} "${@}"
|
debug-print-function ${FUNCNAME} "$@"
|
||||||
|
|
||||||
local d f afterdir="${EROOT}"/usr/share/vim/vimfiles/after
|
local d f afterdir="${EROOT}"/usr/share/vim/vimfiles/after
|
||||||
|
|
||||||
@ -197,7 +193,7 @@ update_vim_afterscripts() {
|
|||||||
# extra message regarding enabling filetype plugins is displayed if
|
# extra message regarding enabling filetype plugins is displayed if
|
||||||
# VIM_PLUGIN_MESSAGES includes the word "filetype".
|
# VIM_PLUGIN_MESSAGES includes the word "filetype".
|
||||||
display_vim_plugin_help() {
|
display_vim_plugin_help() {
|
||||||
debug-print-function ${FUNCNAME} "${@}"
|
debug-print-function ${FUNCNAME} "$@"
|
||||||
|
|
||||||
local h
|
local h
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user