diff options
author | Marco Sirabella <marco@sirabella.org> | 2021-04-18 00:54:32 -0700 |
---|---|---|
committer | Patrice Clement <monsieurp@gentoo.org> | 2021-05-02 22:22:28 +0200 |
commit | 47cf99c7325d56fd8e455c157c1ec1dcdc8da368 (patch) | |
tree | 8e1fda0298d39de94da9bb03bec92b6fde660c86 /eclass/vim-plugin.eclass | |
parent | vim-plugin.eclass: don't remove files on install. (diff) | |
download | gentoo-47cf99c7325d56fd8e455c157c1ec1dcdc8da368.tar.gz gentoo-47cf99c7325d56fd8e455c157c1ec1dcdc8da368.tar.bz2 gentoo-47cf99c7325d56fd8e455c157c1ec1dcdc8da368.zip |
vim-{plugin,spell}: use einstalldocs.
Signed-off-by: Marco Sirabella <marco@sirabella.org>
Signed-off-by: Patrice Clement <monsieurp@gentoo.org>
Diffstat (limited to 'eclass/vim-plugin.eclass')
-rw-r--r-- | eclass/vim-plugin.eclass | 38 |
1 files changed, 8 insertions, 30 deletions
diff --git a/eclass/vim-plugin.eclass b/eclass/vim-plugin.eclass index 8b3ddf80ffd9..77cceb47ebe9 100644 --- a/eclass/vim-plugin.eclass +++ b/eclass/vim-plugin.eclass @@ -4,6 +4,7 @@ # @ECLASS: vim-plugin.eclass # @MAINTAINER: # vim@gentoo.org +# @SUPPORTED_EAPIS: 6 7 # @BLURB: used for installing vim plugins # @DESCRIPTION: # This eclass simplifies installation of app-vim plugins into @@ -11,7 +12,12 @@ # which is read automatically by vim. The only exception is # documentation, for which we make a special case via vim-doc.eclass. -inherit estack vim-doc +case ${EAPI} in + 6|7);; + *) die "EAPI ${EAPI:-0} unsupported (too old)";; +esac + +inherit vim-doc EXPORT_FUNCTIONS src_install pkg_postinst pkg_postrm VIM_PLUGIN_VIM_VERSION="${VIM_PLUGIN_VIM_VERSION:-7.3}" @@ -33,37 +39,9 @@ SLOT="0" # * installs all files in "${ED}"/usr/share/vim/vimfiles. vim-plugin_src_install() { has "${EAPI:-0}" 0 1 2 && ! use prefix && ED="${D}" - local f - - # When globbing, if nothing exists, the shell literally returns the glob - # pattern. So turn on nullglob and extglob options to avoid this. - eshopts_push -s extglob - eshopts_push -s nullglob - - ebegin "Cleaning up unwanted files and directories" - # We're looking for dotfiles, dotdirectories and Makefiles here. - local obj - eval "local matches=(@(.[^.]|.??*|Makefile*))" - for obj in "${matches[@]}"; do - rm -rv "${obj}" || die "cannot remove ${obj}" - done - eend $? - - # Turn those options back off. - eshopts_pop - eshopts_pop # Install non-vim-help-docs - cd "${S}" || die "couldn't cd in ${S}" - local f - for f in *; do - [[ -f "${f}" ]] || continue - if [[ "${f}" = *.html ]]; then - dohtml "${f}" - else - dodoc "${f}" - fi - done + einstalldocs # Install remainder of plugin insinto /usr/share/vim/vimfiles/ |