* [gentoo-dev] [PATCH 1/2] vim-doc.eclass: support EAPI 8
@ 2022-04-06 9:10 Thomas Bracht Laumann Jespersen
2022-04-06 9:10 ` [gentoo-dev] [PATCH 2/2] vim-plugin.eclass: " Thomas Bracht Laumann Jespersen
` (4 more replies)
0 siblings, 5 replies; 28+ messages in thread
From: Thomas Bracht Laumann Jespersen @ 2022-04-06 9:10 UTC (permalink / raw
To: gentoo-dev; +Cc: vim, Thomas Bracht Laumann Jespersen
Signed-off-by: Thomas Bracht Laumann Jespersen <t@laumann.xyz>
---
Already merged, but posting here in case anyone wants to double-check.
eclass/vim-doc.eclass | 40 ++++++++++++++++++++--------------------
1 file changed, 20 insertions(+), 20 deletions(-)
diff --git a/eclass/vim-doc.eclass b/eclass/vim-doc.eclass
index ba9d00f4f5e..de28ddfdfee 100644
--- a/eclass/vim-doc.eclass
+++ b/eclass/vim-doc.eclass
@@ -1,10 +1,10 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: vim-doc.eclass
# @MAINTAINER:
# vim@gentoo.org
-# @SUPPORTED_EAPIS: 6 7
+# @SUPPORTED_EAPIS: 6 7 8
# @BLURB: Eclass for vim{,-plugin}.eclass to update documentation tags.
# @DESCRIPTION:
# This eclass is used by vim.eclass and vim-plugin.eclass to update
@@ -16,8 +16,8 @@
# DEPEND in vim-plugin or by whatever version of vim is being
# installed by the eclass.
-case ${EAPI:-0} in
- [67]) ;;
+case ${EAPI} in
+ 6|7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
@@ -30,12 +30,12 @@ update_vim_helptags() {
# This is where vim plugins are installed
vimfiles="${EROOT}"/usr/share/vim/vimfiles
- if [[ $PN != vim-core ]]; then
+ if [[ ${PN} != vim-core ]]; then
# Find a suitable vim binary for updating tags :helptags
vim=$(type -P vim 2>/dev/null)
- [[ -z "$vim" ]] && vim=$(type -P gvim 2>/dev/null)
- [[ -z "$vim" ]] && vim=$(type -P kvim 2>/dev/null)
- if [[ -z "$vim" ]]; then
+ [[ -z "${vim}" ]] && vim=$(type -P gvim 2>/dev/null)
+ [[ -z "${vim}" ]] && vim=$(type -P kvim 2>/dev/null)
+ if [[ -z "${vim}" ]]; then
ewarn "No suitable vim binary to rebuild documentation tags"
fi
fi
@@ -50,32 +50,32 @@ update_vim_helptags() {
# Install the documentation symlinks into the versioned vim
# directory and run :helptags
for d in "${EROOT%/}"/usr/share/vim/vim[0-9]*; do
- [[ -d "$d/doc" ]] || continue # catch a failed glob
+ [[ -d "${d}/doc" ]] || continue # catch a failed glob
# Remove links, and possibly remove stale dirs
- find $d/doc -name \*.txt -type l | while read s; do
- [[ $(readlink "$s") = $vimfiles/* ]] && rm -f "$s"
+ find ${d}/doc -name \*.txt -type l | while read s; do
+ [[ $(readlink "${s}") = $vimfiles/* ]] && rm -f "${s}"
done
- if [[ -f "$d/doc/tags" && $(find "$d" | wc -l | tr -d ' ') = 3 ]]; then
+ if [[ -f "${d}/doc/tags" && $(find "${d}" | wc -l | tr -d ' ') = 3 ]]; then
# /usr/share/vim/vim61
# /usr/share/vim/vim61/doc
# /usr/share/vim/vim61/doc/tags
- einfo "Removing $d"
- rm -r "$d"
+ einfo "Removing ${d}"
+ rm -r "${d}"
continue
fi
# Re-create / install new links
- if [[ -d $vimfiles/doc ]]; then
- ln -s $vimfiles/doc/*.txt $d/doc 2>/dev/null
+ if [[ -d "${vimfiles}"/doc ]]; then
+ ln -s "${vimfiles}"/doc/*.txt "${d}/doc" 2>/dev/null
fi
# Update tags; need a vim binary for this
- if [[ -n "$vim" ]]; then
- einfo "Updating documentation tags in $d"
- DISPLAY= $vim -u NONE -U NONE -T xterm -X -n -f \
+ if [[ -n "${vim}" ]]; then
+ einfo "Updating documentation tags in ${d}"
+ DISPLAY= "${vim}" -u NONE -U NONE -T xterm -X -n -f \
'+set nobackup nomore' \
- "+helptags $d/doc" \
+ "+helptags ${d}/doc" \
'+qa!' </dev/null &>/dev/null
fi
done
--
2.34.1
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [gentoo-dev] [PATCH 2/2] vim-plugin.eclass: support EAPI 8
2022-04-06 9:10 [gentoo-dev] [PATCH 1/2] vim-doc.eclass: support EAPI 8 Thomas Bracht Laumann Jespersen
@ 2022-04-06 9:10 ` Thomas Bracht Laumann Jespersen
2022-04-06 9:56 ` Anna Vyalkova
2022-04-06 9:58 ` [gentoo-dev] [PATCH 1/2] vim-doc.eclass: " Anna Vyalkova
` (3 subsequent siblings)
4 siblings, 1 reply; 28+ messages in thread
From: Thomas Bracht Laumann Jespersen @ 2022-04-06 9:10 UTC (permalink / raw
To: gentoo-dev; +Cc: vim, Thomas Bracht Laumann Jespersen
* Drop EAPI 0, 1, 2 workarounds
* Move EXPORT_FUNCTIONS to end of file
* Add required @USAGE on functions
Bug: https://bugs.gentoo.org/830867
Bug: https://bugs.gentoo.org/830866
Signed-off-by: Thomas Bracht Laumann Jespersen <t@laumann.xyz>
---
Already merged, but posting here in case anyone wants to double-check.
eclass/vim-plugin.eclass | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/eclass/vim-plugin.eclass b/eclass/vim-plugin.eclass
index 50e727e98f4..d5cc5e7b4db 100644
--- a/eclass/vim-plugin.eclass
+++ b/eclass/vim-plugin.eclass
@@ -1,10 +1,10 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: vim-plugin.eclass
# @MAINTAINER:
# vim@gentoo.org
-# @SUPPORTED_EAPIS: 6 7
+# @SUPPORTED_EAPIS: 6 7 8
# @BLURB: used for installing vim plugins
# @DESCRIPTION:
# This eclass simplifies installation of app-vim plugins into
@@ -13,12 +13,11 @@
# documentation, for which we make a special case via vim-doc.eclass.
case ${EAPI} in
- 6|7);;
- *) die "EAPI ${EAPI:-0} unsupported (too old)";;
+ 6|7|8);;
+ *) die "${ECLASS}: 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}"
@@ -32,13 +31,13 @@ fi
SLOT="0"
# @FUNCTION: vim-plugin_src_install
+# @USAGE:
# @DESCRIPTION:
# Overrides the default src_install phase. In order, this function:
# * fixes file permission across all files in ${S}.
# * installs help and documentation files.
# * installs all files in "${ED}"/usr/share/vim/vimfiles.
vim-plugin_src_install() {
- has "${EAPI:-0}" 0 1 2 && ! use prefix && ED="${D}"
# Install non-vim-help-docs
einstalldocs
@@ -53,6 +52,7 @@ vim-plugin_src_install() {
}
# @FUNCTION: vim-plugin_pkg_postinst
+# @USAGE:
# @DESCRIPTION:
# Overrides the pkg_postinst phase for this eclass.
# The following functions are called:
@@ -71,7 +71,6 @@ vim-plugin_pkg_postinst() {
# This function calls the update_vim_helptags and update_vim_afterscripts
# functions and eventually removes a bunch of empty directories.
vim-plugin_pkg_postrm() {
- has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX=
update_vim_helptags # from vim-doc
update_vim_afterscripts # see below
@@ -82,12 +81,11 @@ vim-plugin_pkg_postrm() {
}
# @FUNCTION: update_vim_afterscripts
+# @USAGE:
# @DESCRIPTION:
# Creates scripts in /usr/share/vim/vimfiles/after/*
# comprised of the snippets in /usr/share/vim/vimfiles/after/*/*.d
update_vim_afterscripts() {
- has "${EAPI:-0}" 0 1 2 && ! use prefix && EROOT="${ROOT}"
- has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX=
local d f afterdir="${EROOT}"/usr/share/vim/vimfiles/after
# Nothing to do if the dir isn't there
@@ -115,6 +113,7 @@ update_vim_afterscripts() {
}
# @FUNCTION: display_vim_plugin_help
+# @USAGE:
# @DESCRIPTION:
# Displays a message with the plugin's help file if one is available. Uses the
# VIM_PLUGIN_HELPFILES env var. If multiple help files are available, they
@@ -160,3 +159,5 @@ display_vim_plugin_help() {
fi
fi
}
+
+EXPORT_FUNCTIONS src_install pkg_postinst pkg_postrm
--
2.34.1
^ permalink raw reply related [flat|nested] 28+ messages in thread
* Re: [gentoo-dev] [PATCH 2/2] vim-plugin.eclass: support EAPI 8
2022-04-06 9:10 ` [gentoo-dev] [PATCH 2/2] vim-plugin.eclass: " Thomas Bracht Laumann Jespersen
@ 2022-04-06 9:56 ` Anna Vyalkova
2022-04-06 10:02 ` Anna Vyalkova
0 siblings, 1 reply; 28+ messages in thread
From: Anna Vyalkova @ 2022-04-06 9:56 UTC (permalink / raw
To: gentoo-dev
Current vim eclass is supposed to use distfiles from Gentoo devspaces
but not from GitHub and forges.
Could you change vim-plugin_src_install behavior for EAPI 8? So it
installs not all directories but only whitelisted ones? I'd appreciate
this change.
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [gentoo-dev] [PATCH 1/2] vim-doc.eclass: support EAPI 8
2022-04-06 9:10 [gentoo-dev] [PATCH 1/2] vim-doc.eclass: support EAPI 8 Thomas Bracht Laumann Jespersen
2022-04-06 9:10 ` [gentoo-dev] [PATCH 2/2] vim-plugin.eclass: " Thomas Bracht Laumann Jespersen
@ 2022-04-06 9:58 ` Anna Vyalkova
2022-04-06 10:54 ` Ulrich Mueller
` (2 subsequent siblings)
4 siblings, 0 replies; 28+ messages in thread
From: Anna Vyalkova @ 2022-04-06 9:58 UTC (permalink / raw
To: gentoo-dev
On 2022-04-06 11:10, Thomas Bracht Laumann Jespersen wrote:
> Already merged, but posting here in case anyone wants to double-check.
Please follow what devmanual says:
> Before updating any eclass, email patches to the gentoo-dev list. It
> may be that your proposed change is broken in a way you had not
> anticipated, or that there is an existing function which performs the
> same purpose, or that your function may be better off in its own
> eclass. If you don't email gentoo-dev first, and end up breaking
> something, expect to be in a lot of trouble.
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [gentoo-dev] [PATCH 2/2] vim-plugin.eclass: support EAPI 8
2022-04-06 9:56 ` Anna Vyalkova
@ 2022-04-06 10:02 ` Anna Vyalkova
0 siblings, 0 replies; 28+ messages in thread
From: Anna Vyalkova @ 2022-04-06 10:02 UTC (permalink / raw
To: gentoo-dev
On 2022-04-06 14:56, Anna Vyalkova wrote:
> Current vim eclass is supposed to use distfiles from Gentoo devspaces
> but not from GitHub and forges.
>
> Could you change vim-plugin_src_install behavior for EAPI 8? So it
> installs not all directories but only whitelisted ones? I'd appreciate
> this change.
P.S. Also I propose a function that helps to avoid file conflicts with
other plugins. See what I'm using in ebuilds now for reference.
src_prepare() {
default
# avoid collision with other packages
cd after/syntax || die
for file in *.vim; do
mkdir "${file%.vim}" || die
mv "${file}" "${file%.vim}/${PN}.vim" || die
done
}
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [gentoo-dev] [PATCH 1/2] vim-doc.eclass: support EAPI 8
2022-04-06 9:10 [gentoo-dev] [PATCH 1/2] vim-doc.eclass: support EAPI 8 Thomas Bracht Laumann Jespersen
2022-04-06 9:10 ` [gentoo-dev] [PATCH 2/2] vim-plugin.eclass: " Thomas Bracht Laumann Jespersen
2022-04-06 9:58 ` [gentoo-dev] [PATCH 1/2] vim-doc.eclass: " Anna Vyalkova
@ 2022-04-06 10:54 ` Ulrich Mueller
2022-04-06 12:01 ` Anna Vyalkova
2022-04-06 12:27 ` [gentoo-dev] [PATCH v2 0/8] Vim eclasses Anna Vyalkova
2022-04-06 13:51 ` [gentoo-dev] [PATCH v3 0/8] Vim eclasses Anna Vyalkova
4 siblings, 1 reply; 28+ messages in thread
From: Ulrich Mueller @ 2022-04-06 10:54 UTC (permalink / raw
To: Thomas Bracht Laumann Jespersen; +Cc: gentoo-dev, vim
>>>>> On Wed, 06 Apr 2022, Thomas Bracht Laumann Jespersen wrote:
> - find $d/doc -name \*.txt -type l | while read s; do
> - [[ $(readlink "$s") = $vimfiles/* ]] && rm -f "$s"
> + find ${d}/doc -name \*.txt -type l | while read s; do
> + [[ $(readlink "${s}") = $vimfiles/* ]] && rm -f "${s}"
This would profit from a "|| die" statement.
> - einfo "Removing $d"
> - rm -r "$d"
> + einfo "Removing ${d}"
> + rm -r "${d}"
Ditto.
> - if [[ -d $vimfiles/doc ]]; then
> - ln -s $vimfiles/doc/*.txt $d/doc 2>/dev/null
> + if [[ -d "${vimfiles}"/doc ]]; then
> + ln -s "${vimfiles}"/doc/*.txt "${d}/doc" 2>/dev/null
Ditto.
Ulrich
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [gentoo-dev] [PATCH 1/2] vim-doc.eclass: support EAPI 8
2022-04-06 10:54 ` Ulrich Mueller
@ 2022-04-06 12:01 ` Anna Vyalkova
2022-04-06 12:06 ` Anna Vyalkova
0 siblings, 1 reply; 28+ messages in thread
From: Anna Vyalkova @ 2022-04-06 12:01 UTC (permalink / raw
To: gentoo-dev
On 2022-04-06 12:54, Ulrich Mueller wrote:
> >>>>> On Wed, 06 Apr 2022, Thomas Bracht Laumann Jespersen wrote:
>
> > - find $d/doc -name \*.txt -type l | while read s; do
> > - [[ $(readlink "$s") = $vimfiles/* ]] && rm -f "$s"
> > + find ${d}/doc -name \*.txt -type l | while read s; do
> > + [[ $(readlink "${s}") = $vimfiles/* ]] && rm -f "${s}"
>
> This would profit from a "|| die" statement.
This needs to be nonfatal.
> > - einfo "Removing $d"
> > - rm -r "$d"
> > + einfo "Removing ${d}"
> > + rm -r "${d}"
>
> Ditto.
>
> > - if [[ -d $vimfiles/doc ]]; then
> > - ln -s $vimfiles/doc/*.txt $d/doc 2>/dev/null
> > + if [[ -d "${vimfiles}"/doc ]]; then
> > + ln -s "${vimfiles}"/doc/*.txt "${d}/doc" 2>/dev/null
>
> Ditto.
This one only works when nonfatal too.
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [gentoo-dev] [PATCH 1/2] vim-doc.eclass: support EAPI 8
2022-04-06 12:01 ` Anna Vyalkova
@ 2022-04-06 12:06 ` Anna Vyalkova
0 siblings, 0 replies; 28+ messages in thread
From: Anna Vyalkova @ 2022-04-06 12:06 UTC (permalink / raw
To: gentoo-dev
On 2022-04-06 17:01, Anna Vyalkova wrote:
> On 2022-04-06 12:54, Ulrich Mueller wrote:
> > >>>>> On Wed, 06 Apr 2022, Thomas Bracht Laumann Jespersen wrote:
> >
> > > - find $d/doc -name \*.txt -type l | while read s; do
> > > - [[ $(readlink "$s") = $vimfiles/* ]] && rm -f "$s"
> > > + find ${d}/doc -name \*.txt -type l | while read s; do
> > > + [[ $(readlink "${s}") = $vimfiles/* ]] && rm -f "${s}"
> >
> > This would profit from a "|| die" statement.
>
> This needs to be nonfatal.
No, it works fine with "|| die" too. I messed up with the syntax.
^ permalink raw reply [flat|nested] 28+ messages in thread
* [gentoo-dev] [PATCH v2 0/8] Vim eclasses
2022-04-06 9:10 [gentoo-dev] [PATCH 1/2] vim-doc.eclass: support EAPI 8 Thomas Bracht Laumann Jespersen
` (2 preceding siblings ...)
2022-04-06 10:54 ` Ulrich Mueller
@ 2022-04-06 12:27 ` Anna Vyalkova
2022-04-06 12:27 ` [gentoo-dev] [PATCH v2 1/8] vim-doc.eclass: support EAPI 8 Anna Vyalkova
` (7 more replies)
2022-04-06 13:51 ` [gentoo-dev] [PATCH v3 0/8] Vim eclasses Anna Vyalkova
4 siblings, 8 replies; 28+ messages in thread
From: Anna Vyalkova @ 2022-04-06 12:27 UTC (permalink / raw
To: gentoo-dev; +Cc: vim
I made changed requested by ulm and wrote my own patches.
^ permalink raw reply [flat|nested] 28+ messages in thread
* [gentoo-dev] [PATCH v2 1/8] vim-doc.eclass: support EAPI 8
2022-04-06 12:27 ` [gentoo-dev] [PATCH v2 0/8] Vim eclasses Anna Vyalkova
@ 2022-04-06 12:27 ` Anna Vyalkova
2022-04-06 12:27 ` [gentoo-dev] [PATCH v2 2/8] vim-plugin.eclass: " Anna Vyalkova
` (6 subsequent siblings)
7 siblings, 0 replies; 28+ messages in thread
From: Anna Vyalkova @ 2022-04-06 12:27 UTC (permalink / raw
To: gentoo-dev; +Cc: vim, Thomas Bracht Laumann Jespersen
From: Thomas Bracht Laumann Jespersen <t@laumann.xyz>
Signed-off-by: Thomas Bracht Laumann Jespersen <t@laumann.xyz>
Signed-off-by: Anna Vyalkova <cyber+gentoo@sysrq.in>
---
Added "|| die" where appropriate.
eclass/vim-doc.eclass | 48 ++++++++++++++++++++++---------------------
1 file changed, 25 insertions(+), 23 deletions(-)
diff --git a/eclass/vim-doc.eclass b/eclass/vim-doc.eclass
index ba9d00f4f5..be66d6159a 100644
--- a/eclass/vim-doc.eclass
+++ b/eclass/vim-doc.eclass
@@ -1,10 +1,10 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: vim-doc.eclass
# @MAINTAINER:
# vim@gentoo.org
-# @SUPPORTED_EAPIS: 6 7
+# @SUPPORTED_EAPIS: 6 7 8
# @BLURB: Eclass for vim{,-plugin}.eclass to update documentation tags.
# @DESCRIPTION:
# This eclass is used by vim.eclass and vim-plugin.eclass to update
@@ -16,13 +16,12 @@
# DEPEND in vim-plugin or by whatever version of vim is being
# installed by the eclass.
-case ${EAPI:-0} in
- [67]) ;;
+case ${EAPI} in
+ 6|7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-if [[ -z ${_VIM_DOC_ECLASS} ]] ; then
-_VIM_DOC_ECLASS=1
+if [[ ! ${_VIM_DOC_ECLASS} ]] ; then
update_vim_helptags() {
local vimfiles vim d s
@@ -30,12 +29,12 @@ update_vim_helptags() {
# This is where vim plugins are installed
vimfiles="${EROOT}"/usr/share/vim/vimfiles
- if [[ $PN != vim-core ]]; then
+ if [[ ${PN} != vim-core ]]; then
# Find a suitable vim binary for updating tags :helptags
vim=$(type -P vim 2>/dev/null)
- [[ -z "$vim" ]] && vim=$(type -P gvim 2>/dev/null)
- [[ -z "$vim" ]] && vim=$(type -P kvim 2>/dev/null)
- if [[ -z "$vim" ]]; then
+ [[ -z "${vim}" ]] && vim=$(type -P gvim 2>/dev/null)
+ [[ -z "${vim}" ]] && vim=$(type -P kvim 2>/dev/null)
+ if [[ -z "${vim}" ]]; then
ewarn "No suitable vim binary to rebuild documentation tags"
fi
fi
@@ -43,39 +42,41 @@ update_vim_helptags() {
# Make vim not try to connect to X. See :help gui-x11-start
# in vim for how this evil trickery works.
if [[ -n "${vim}" ]] ; then
- ln -s "${vim}" "${T}/tagvim"
+ ln -s "${vim}" "${T}/tagvim" || die
vim="${T}/tagvim"
fi
# Install the documentation symlinks into the versioned vim
# directory and run :helptags
for d in "${EROOT%/}"/usr/share/vim/vim[0-9]*; do
- [[ -d "$d/doc" ]] || continue # catch a failed glob
+ [[ -d "${d}/doc" ]] || continue # catch a failed glob
# Remove links, and possibly remove stale dirs
- find $d/doc -name \*.txt -type l | while read s; do
- [[ $(readlink "$s") = $vimfiles/* ]] && rm -f "$s"
+ find ${d}/doc -name \*.txt -type l | while read s; do
+ if [[ $(readlink "${s}") = $vimfiles/* ]]; then
+ rm -f "${s}" || die
+ fi
done
- if [[ -f "$d/doc/tags" && $(find "$d" | wc -l | tr -d ' ') = 3 ]]; then
+ if [[ -f "${d}/doc/tags" && $(find "${d}" | wc -l | tr -d ' ') = 3 ]]; then
# /usr/share/vim/vim61
# /usr/share/vim/vim61/doc
# /usr/share/vim/vim61/doc/tags
- einfo "Removing $d"
- rm -r "$d"
+ einfo "Removing ${d}"
+ rm -r "${d}" || die
continue
fi
# Re-create / install new links
- if [[ -d $vimfiles/doc ]]; then
- ln -s $vimfiles/doc/*.txt $d/doc 2>/dev/null
+ if [[ -d "${vimfiles}"/doc ]]; then
+ ln -s "${vimfiles}"/doc/*.txt "${d}/doc" 2>/dev/null
fi
# Update tags; need a vim binary for this
- if [[ -n "$vim" ]]; then
- einfo "Updating documentation tags in $d"
- DISPLAY= $vim -u NONE -U NONE -T xterm -X -n -f \
+ if [[ -n "${vim}" ]]; then
+ einfo "Updating documentation tags in ${d}"
+ DISPLAY= "${vim}" -u NONE -U NONE -T xterm -X -n -f \
'+set nobackup nomore' \
- "+helptags $d/doc" \
+ "+helptags ${d}/doc" \
'+qa!' </dev/null &>/dev/null
fi
done
@@ -83,4 +84,5 @@ update_vim_helptags() {
[[ -n "${vim}" && -f "${vim}" ]] && rm "${vim}"
}
+_VIM_DOC_ECLASS=1
fi
--
2.35.1
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [gentoo-dev] [PATCH v2 2/8] vim-plugin.eclass: support EAPI 8
2022-04-06 12:27 ` [gentoo-dev] [PATCH v2 0/8] Vim eclasses Anna Vyalkova
2022-04-06 12:27 ` [gentoo-dev] [PATCH v2 1/8] vim-doc.eclass: support EAPI 8 Anna Vyalkova
@ 2022-04-06 12:27 ` Anna Vyalkova
2022-04-06 12:27 ` [gentoo-dev] [PATCH v2 3/8] vim-plugin.eclass: EAPI 8: install allowed dirs only Anna Vyalkova
` (5 subsequent siblings)
7 siblings, 0 replies; 28+ messages in thread
From: Anna Vyalkova @ 2022-04-06 12:27 UTC (permalink / raw
To: gentoo-dev; +Cc: vim, Thomas Bracht Laumann Jespersen
From: Thomas Bracht Laumann Jespersen <t@laumann.xyz>
* Drop EAPI 0, 1, 2 workarounds
* Move EXPORT_FUNCTIONS to end of file
* Add required @USAGE on functions
* Add _VIM_PLUGIN_ECLASS guard
Bug: https://bugs.gentoo.org/830867
Bug: https://bugs.gentoo.org/830866
Signed-off-by: Thomas Bracht Laumann Jespersen <t@laumann.xyz>
Signed-off-by: Anna Vyalkova <cyber+gentoo@sysrq.in>
---
Added _VIM_PLUGIN_ECLASS.
eclass/vim-plugin.eclass | 23 ++++++++++++++---------
1 file changed, 14 insertions(+), 9 deletions(-)
diff --git a/eclass/vim-plugin.eclass b/eclass/vim-plugin.eclass
index 50e727e98f..eac7dea52d 100644
--- a/eclass/vim-plugin.eclass
+++ b/eclass/vim-plugin.eclass
@@ -1,10 +1,10 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: vim-plugin.eclass
# @MAINTAINER:
# vim@gentoo.org
-# @SUPPORTED_EAPIS: 6 7
+# @SUPPORTED_EAPIS: 6 7 8
# @BLURB: used for installing vim plugins
# @DESCRIPTION:
# This eclass simplifies installation of app-vim plugins into
@@ -13,12 +13,12 @@
# documentation, for which we make a special case via vim-doc.eclass.
case ${EAPI} in
- 6|7);;
- *) die "EAPI ${EAPI:-0} unsupported (too old)";;
+ 6|7|8);;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} unsupported (too old)";;
esac
+if [[ ! ${_VIM_PLUGIN_ECLASS} ]]; then
inherit vim-doc
-EXPORT_FUNCTIONS src_install pkg_postinst pkg_postrm
VIM_PLUGIN_VIM_VERSION="${VIM_PLUGIN_VIM_VERSION:-7.3}"
@@ -32,13 +32,13 @@ fi
SLOT="0"
# @FUNCTION: vim-plugin_src_install
+# @USAGE:
# @DESCRIPTION:
# Overrides the default src_install phase. In order, this function:
# * fixes file permission across all files in ${S}.
# * installs help and documentation files.
# * installs all files in "${ED}"/usr/share/vim/vimfiles.
vim-plugin_src_install() {
- has "${EAPI:-0}" 0 1 2 && ! use prefix && ED="${D}"
# Install non-vim-help-docs
einstalldocs
@@ -53,6 +53,7 @@ vim-plugin_src_install() {
}
# @FUNCTION: vim-plugin_pkg_postinst
+# @USAGE:
# @DESCRIPTION:
# Overrides the pkg_postinst phase for this eclass.
# The following functions are called:
@@ -71,7 +72,6 @@ vim-plugin_pkg_postinst() {
# This function calls the update_vim_helptags and update_vim_afterscripts
# functions and eventually removes a bunch of empty directories.
vim-plugin_pkg_postrm() {
- has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX=
update_vim_helptags # from vim-doc
update_vim_afterscripts # see below
@@ -82,12 +82,11 @@ vim-plugin_pkg_postrm() {
}
# @FUNCTION: update_vim_afterscripts
+# @USAGE:
# @DESCRIPTION:
# Creates scripts in /usr/share/vim/vimfiles/after/*
# comprised of the snippets in /usr/share/vim/vimfiles/after/*/*.d
update_vim_afterscripts() {
- has "${EAPI:-0}" 0 1 2 && ! use prefix && EROOT="${ROOT}"
- has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX=
local d f afterdir="${EROOT}"/usr/share/vim/vimfiles/after
# Nothing to do if the dir isn't there
@@ -115,6 +114,7 @@ update_vim_afterscripts() {
}
# @FUNCTION: display_vim_plugin_help
+# @USAGE:
# @DESCRIPTION:
# Displays a message with the plugin's help file if one is available. Uses the
# VIM_PLUGIN_HELPFILES env var. If multiple help files are available, they
@@ -160,3 +160,8 @@ display_vim_plugin_help() {
fi
fi
}
+
+EXPORT_FUNCTIONS src_install pkg_postinst pkg_postrm
+
+_VIM_PLUGIN_ECLASS=1
+fi
--
2.35.1
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [gentoo-dev] [PATCH v2 3/8] vim-plugin.eclass: EAPI 8: install allowed dirs only
2022-04-06 12:27 ` [gentoo-dev] [PATCH v2 0/8] Vim eclasses Anna Vyalkova
2022-04-06 12:27 ` [gentoo-dev] [PATCH v2 1/8] vim-doc.eclass: support EAPI 8 Anna Vyalkova
2022-04-06 12:27 ` [gentoo-dev] [PATCH v2 2/8] vim-plugin.eclass: " Anna Vyalkova
@ 2022-04-06 12:27 ` Anna Vyalkova
2022-04-06 12:27 ` [gentoo-dev] [PATCH v2 4/8] vim-plugin.eclass: EAPI 8: add src_prepare Anna Vyalkova
` (4 subsequent siblings)
7 siblings, 0 replies; 28+ messages in thread
From: Anna Vyalkova @ 2022-04-06 12:27 UTC (permalink / raw
To: gentoo-dev; +Cc: vim
Signed-off-by: Anna Vyalkova <cyber+gentoo@sysrq.in>
---
Some ebuilds will need to override src_install as shown in example.
eclass/vim-plugin.eclass | 38 +++++++++++++++++++++++++++++++-------
1 file changed, 31 insertions(+), 7 deletions(-)
diff --git a/eclass/vim-plugin.eclass b/eclass/vim-plugin.eclass
index eac7dea52d..cbf4525354 100644
--- a/eclass/vim-plugin.eclass
+++ b/eclass/vim-plugin.eclass
@@ -31,13 +31,29 @@ if [[ ${PV} != 9999* ]] ; then
fi
SLOT="0"
-# @FUNCTION: vim-plugin_src_install
+# @ECLASS_VARIABLE: _VIM_PLUGIN_ALLOWED_DIRS
+# @INTERNAL
+# @DESCRIPTION:
+# Vanilla Vim dirs.
+# See /usr/share/vim/vim* for reference.
+_VIM_PLUGIN_ALLOWED_DIRS=(
+ after autoload colors compiler doc ftdetect ftplugin indent keymap
+ macros plugin spell syntax
+)
+
+# @FUNCTION: vim-plugin_src_install [<dir>...]
# @USAGE:
# @DESCRIPTION:
# Overrides the default src_install phase. In order, this function:
-# * fixes file permission across all files in ${S}.
# * installs help and documentation files.
-# * installs all files in "${ED}"/usr/share/vim/vimfiles.
+# * installs all files recognized by default Vim installation and directories
+# passed to this function as arguments in "${ED}"/usr/share/vim/vimfiles.
+# @EXAMPLE:
+# @CODE
+# src_install() {
+# vim-plugin_src_install syntax_checkers
+# }
+# @CODE
vim-plugin_src_install() {
# Install non-vim-help-docs
@@ -46,10 +62,18 @@ vim-plugin_src_install() {
# Install remainder of plugin
insinto /usr/share/vim/vimfiles/
local d
- for d in *; do
- [[ -d "${d}" ]] || continue
- doins -r "${d}"
- done
+ case ${EAPI:-0} in
+ 6|7)
+ for d in *; do
+ [[ -d "${d}" ]] || continue
+ doins -r "${d}"
+ done ;;
+ *)
+ for d in "${_VIM_PLUGIN_ALLOWED_DIRS[@]}" "${@}"; do
+ [[ -d "${d}" ]] || continue
+ doins -r "${d}"
+ done ;;
+ esac
}
# @FUNCTION: vim-plugin_pkg_postinst
--
2.35.1
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [gentoo-dev] [PATCH v2 4/8] vim-plugin.eclass: EAPI 8: add src_prepare
2022-04-06 12:27 ` [gentoo-dev] [PATCH v2 0/8] Vim eclasses Anna Vyalkova
` (2 preceding siblings ...)
2022-04-06 12:27 ` [gentoo-dev] [PATCH v2 3/8] vim-plugin.eclass: EAPI 8: install allowed dirs only Anna Vyalkova
@ 2022-04-06 12:27 ` Anna Vyalkova
2022-04-06 12:27 ` [gentoo-dev] [PATCH v2 5/8] vim-plugin.eclass: document VIM_PLUGIN_VIM_VERSION Anna Vyalkova
` (3 subsequent siblings)
7 siblings, 0 replies; 28+ messages in thread
From: Anna Vyalkova @ 2022-04-06 12:27 UTC (permalink / raw
To: gentoo-dev; +Cc: vim
Signed-off-by: Anna Vyalkova <cyber+gentoo@sysrq.in>
---
Rationale: no more repeating the same code in ebuilds.
eclass/vim-plugin.eclass | 31 ++++++++++++++++++++++++++++++-
1 file changed, 30 insertions(+), 1 deletion(-)
diff --git a/eclass/vim-plugin.eclass b/eclass/vim-plugin.eclass
index cbf4525354..32d0b6c6ff 100644
--- a/eclass/vim-plugin.eclass
+++ b/eclass/vim-plugin.eclass
@@ -13,7 +13,8 @@
# documentation, for which we make a special case via vim-doc.eclass.
case ${EAPI} in
- 6|7|8);;
+ 6|7) ;;
+ 8) _DEFINE_VIM_PLUGIN_SRC_PREPARE=true ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} unsupported (too old)";;
esac
@@ -31,6 +32,28 @@ if [[ ${PV} != 9999* ]] ; then
fi
SLOT="0"
+if ${_DEFINE_VIM_PLUGIN_SRC_PREPARE}; then
+# @FUNCTION: vim-plugin_src_prepare
+# @DESCRIPTION:
+# Moves "after/syntax" plugins to directories to avoid file collisions with
+# other packages.
+# Note that this function is only defined and exported in EAPIs >= 8.
+vim-plugin_src_prepare() {
+ default_src_prepare
+
+ # return if there's nothing to do
+ [[ -d after/syntax ]] || return
+
+ pushd after/syntax >/dev/null || die
+ for file in *.vim; do
+ [[ -f "${file}" ]] || continue
+ mkdir "${file%.vim}" || die
+ mv "${file}" "${file%.vim}/${PN}.vim" || die
+ done
+ popd >/dev/null || die
+}
+fi
+
# @ECLASS_VARIABLE: _VIM_PLUGIN_ALLOWED_DIRS
# @INTERNAL
# @DESCRIPTION:
@@ -187,5 +210,11 @@ display_vim_plugin_help() {
EXPORT_FUNCTIONS src_install pkg_postinst pkg_postrm
+# src_prepare is only exported in EAPI >= 8
+case ${EAPI:-0} in
+ 6|7) ;;
+ 8) EXPORT_FUNCTIONS src_prepare ;;
+esac
+
_VIM_PLUGIN_ECLASS=1
fi
--
2.35.1
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [gentoo-dev] [PATCH v2 5/8] vim-plugin.eclass: document VIM_PLUGIN_VIM_VERSION
2022-04-06 12:27 ` [gentoo-dev] [PATCH v2 0/8] Vim eclasses Anna Vyalkova
` (3 preceding siblings ...)
2022-04-06 12:27 ` [gentoo-dev] [PATCH v2 4/8] vim-plugin.eclass: EAPI 8: add src_prepare Anna Vyalkova
@ 2022-04-06 12:27 ` Anna Vyalkova
2022-04-06 12:27 ` [gentoo-dev] [PATCH v2 6/8] vim-doc.eclass: add debug-print-function call Anna Vyalkova
` (2 subsequent siblings)
7 siblings, 0 replies; 28+ messages in thread
From: Anna Vyalkova @ 2022-04-06 12:27 UTC (permalink / raw
To: gentoo-dev; +Cc: vim
Signed-off-by: Anna Vyalkova <cyber+gentoo@sysrq.in>
---
eclass/vim-plugin.eclass | 3 +++
1 file changed, 3 insertions(+)
diff --git a/eclass/vim-plugin.eclass b/eclass/vim-plugin.eclass
index 32d0b6c6ff..65a8fb0f73 100644
--- a/eclass/vim-plugin.eclass
+++ b/eclass/vim-plugin.eclass
@@ -21,6 +21,9 @@ esac
if [[ ! ${_VIM_PLUGIN_ECLASS} ]]; then
inherit vim-doc
+# @ECLASS_VARIABLE: VIM_PLUGIN_VIM_VERSION
+# @DESCRIPTION:
+# Minimum Vim version the plugin supports.
VIM_PLUGIN_VIM_VERSION="${VIM_PLUGIN_VIM_VERSION:-7.3}"
DEPEND="|| ( >=app-editors/vim-${VIM_PLUGIN_VIM_VERSION}
--
2.35.1
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [gentoo-dev] [PATCH v2 6/8] vim-doc.eclass: add debug-print-function call
2022-04-06 12:27 ` [gentoo-dev] [PATCH v2 0/8] Vim eclasses Anna Vyalkova
` (4 preceding siblings ...)
2022-04-06 12:27 ` [gentoo-dev] [PATCH v2 5/8] vim-plugin.eclass: document VIM_PLUGIN_VIM_VERSION Anna Vyalkova
@ 2022-04-06 12:27 ` Anna Vyalkova
2022-04-06 12:27 ` [gentoo-dev] [PATCH v2 7/8] vim-doc.eclass: document update_vim_helptags Anna Vyalkova
2022-04-06 12:27 ` [gentoo-dev] [PATCH v2 8/8] vim-plugin.eclass: add debug-print-function calls Anna Vyalkova
7 siblings, 0 replies; 28+ messages in thread
From: Anna Vyalkova @ 2022-04-06 12:27 UTC (permalink / raw
To: gentoo-dev; +Cc: vim
Signed-off-by: Anna Vyalkova <cyber+gentoo@sysrq.in>
---
eclass/vim-doc.eclass | 2 ++
1 file changed, 2 insertions(+)
diff --git a/eclass/vim-doc.eclass b/eclass/vim-doc.eclass
index be66d6159a..7485a33512 100644
--- a/eclass/vim-doc.eclass
+++ b/eclass/vim-doc.eclass
@@ -24,6 +24,8 @@ esac
if [[ ! ${_VIM_DOC_ECLASS} ]] ; then
update_vim_helptags() {
+ debug-print-function ${FUNCNAME} "${@}"
+
local vimfiles vim d s
# This is where vim plugins are installed
--
2.35.1
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [gentoo-dev] [PATCH v2 7/8] vim-doc.eclass: document update_vim_helptags
2022-04-06 12:27 ` [gentoo-dev] [PATCH v2 0/8] Vim eclasses Anna Vyalkova
` (5 preceding siblings ...)
2022-04-06 12:27 ` [gentoo-dev] [PATCH v2 6/8] vim-doc.eclass: add debug-print-function call Anna Vyalkova
@ 2022-04-06 12:27 ` Anna Vyalkova
2022-04-06 12:27 ` [gentoo-dev] [PATCH v2 8/8] vim-plugin.eclass: add debug-print-function calls Anna Vyalkova
7 siblings, 0 replies; 28+ messages in thread
From: Anna Vyalkova @ 2022-04-06 12:27 UTC (permalink / raw
To: gentoo-dev; +Cc: vim
Signed-off-by: Anna Vyalkova <cyber+gentoo@sysrq.in>
---
eclass/vim-doc.eclass | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/eclass/vim-doc.eclass b/eclass/vim-doc.eclass
index 7485a33512..f4f268c38b 100644
--- a/eclass/vim-doc.eclass
+++ b/eclass/vim-doc.eclass
@@ -23,6 +23,10 @@ esac
if [[ ! ${_VIM_DOC_ECLASS} ]] ; then
+# @FUNCTION: update_vim_helptags
+# @USAGE:
+# @DESCRIPTION:
+# Update the documentation tags in the versioned Vim directory.
update_vim_helptags() {
debug-print-function ${FUNCNAME} "${@}"
--
2.35.1
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [gentoo-dev] [PATCH v2 8/8] vim-plugin.eclass: add debug-print-function calls
2022-04-06 12:27 ` [gentoo-dev] [PATCH v2 0/8] Vim eclasses Anna Vyalkova
` (6 preceding siblings ...)
2022-04-06 12:27 ` [gentoo-dev] [PATCH v2 7/8] vim-doc.eclass: document update_vim_helptags Anna Vyalkova
@ 2022-04-06 12:27 ` Anna Vyalkova
7 siblings, 0 replies; 28+ messages in thread
From: Anna Vyalkova @ 2022-04-06 12:27 UTC (permalink / raw
To: gentoo-dev; +Cc: vim
Signed-off-by: Anna Vyalkova <cyber+gentoo@sysrq.in>
---
eclass/vim-plugin.eclass | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/eclass/vim-plugin.eclass b/eclass/vim-plugin.eclass
index 65a8fb0f73..265427071e 100644
--- a/eclass/vim-plugin.eclass
+++ b/eclass/vim-plugin.eclass
@@ -42,6 +42,8 @@ if ${_DEFINE_VIM_PLUGIN_SRC_PREPARE}; then
# other packages.
# Note that this function is only defined and exported in EAPIs >= 8.
vim-plugin_src_prepare() {
+ debug-print-function ${FUNCNAME} "${@}"
+
default_src_prepare
# return if there's nothing to do
@@ -81,6 +83,7 @@ _VIM_PLUGIN_ALLOWED_DIRS=(
# }
# @CODE
vim-plugin_src_install() {
+ debug-print-function ${FUNCNAME} "${@}"
# Install non-vim-help-docs
einstalldocs
@@ -111,6 +114,8 @@ vim-plugin_src_install() {
# * update_vim_afterscripts
# * display_vim_plugin_help
vim-plugin_pkg_postinst() {
+ debug-print-function ${FUNCNAME} "${@}"
+
update_vim_helptags # from vim-doc
update_vim_afterscripts # see below
display_vim_plugin_help # see below
@@ -122,6 +127,8 @@ vim-plugin_pkg_postinst() {
# This function calls the update_vim_helptags and update_vim_afterscripts
# functions and eventually removes a bunch of empty directories.
vim-plugin_pkg_postrm() {
+ debug-print-function ${FUNCNAME} "${@}"
+
update_vim_helptags # from vim-doc
update_vim_afterscripts # see below
@@ -137,6 +144,8 @@ vim-plugin_pkg_postrm() {
# Creates scripts in /usr/share/vim/vimfiles/after/*
# comprised of the snippets in /usr/share/vim/vimfiles/after/*/*.d
update_vim_afterscripts() {
+ debug-print-function ${FUNCNAME} "${@}"
+
local d f afterdir="${EROOT}"/usr/share/vim/vimfiles/after
# Nothing to do if the dir isn't there
@@ -174,6 +183,8 @@ update_vim_afterscripts() {
# extra message regarding enabling filetype plugins is displayed if
# VIM_PLUGIN_MESSAGES includes the word "filetype".
display_vim_plugin_help() {
+ debug-print-function ${FUNCNAME} "${@}"
+
local h
if [[ -z ${REPLACING_VERSIONS} ]]; then
--
2.35.1
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [gentoo-dev] [PATCH v3 0/8] Vim eclasses
2022-04-06 9:10 [gentoo-dev] [PATCH 1/2] vim-doc.eclass: support EAPI 8 Thomas Bracht Laumann Jespersen
` (3 preceding siblings ...)
2022-04-06 12:27 ` [gentoo-dev] [PATCH v2 0/8] Vim eclasses Anna Vyalkova
@ 2022-04-06 13:51 ` Anna Vyalkova
2022-04-06 13:51 ` [gentoo-dev] [PATCH v3 1/8] vim-doc.eclass: support EAPI 8 Anna Vyalkova
` (8 more replies)
4 siblings, 9 replies; 28+ messages in thread
From: Anna Vyalkova @ 2022-04-06 13:51 UTC (permalink / raw
To: gentoo-dev; +Cc: vim
I was told that EXPORT_FUNCTIONS needs to be outside the inherit guard.
^ permalink raw reply [flat|nested] 28+ messages in thread
* [gentoo-dev] [PATCH v3 1/8] vim-doc.eclass: support EAPI 8
2022-04-06 13:51 ` [gentoo-dev] [PATCH v3 0/8] Vim eclasses Anna Vyalkova
@ 2022-04-06 13:51 ` Anna Vyalkova
2022-04-06 13:51 ` [gentoo-dev] [PATCH v3 2/8] vim-plugin.eclass: " Anna Vyalkova
` (7 subsequent siblings)
8 siblings, 0 replies; 28+ messages in thread
From: Anna Vyalkova @ 2022-04-06 13:51 UTC (permalink / raw
To: gentoo-dev; +Cc: vim, Thomas Bracht Laumann Jespersen
From: Thomas Bracht Laumann Jespersen <t@laumann.xyz>
Signed-off-by: Thomas Bracht Laumann Jespersen <t@laumann.xyz>
Signed-off-by: Anna Vyalkova <cyber+gentoo@sysrq.in>
---
eclass/vim-doc.eclass | 48 ++++++++++++++++++++++---------------------
1 file changed, 25 insertions(+), 23 deletions(-)
diff --git a/eclass/vim-doc.eclass b/eclass/vim-doc.eclass
index ba9d00f4f5..be66d6159a 100644
--- a/eclass/vim-doc.eclass
+++ b/eclass/vim-doc.eclass
@@ -1,10 +1,10 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: vim-doc.eclass
# @MAINTAINER:
# vim@gentoo.org
-# @SUPPORTED_EAPIS: 6 7
+# @SUPPORTED_EAPIS: 6 7 8
# @BLURB: Eclass for vim{,-plugin}.eclass to update documentation tags.
# @DESCRIPTION:
# This eclass is used by vim.eclass and vim-plugin.eclass to update
@@ -16,13 +16,12 @@
# DEPEND in vim-plugin or by whatever version of vim is being
# installed by the eclass.
-case ${EAPI:-0} in
- [67]) ;;
+case ${EAPI} in
+ 6|7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-if [[ -z ${_VIM_DOC_ECLASS} ]] ; then
-_VIM_DOC_ECLASS=1
+if [[ ! ${_VIM_DOC_ECLASS} ]] ; then
update_vim_helptags() {
local vimfiles vim d s
@@ -30,12 +29,12 @@ update_vim_helptags() {
# This is where vim plugins are installed
vimfiles="${EROOT}"/usr/share/vim/vimfiles
- if [[ $PN != vim-core ]]; then
+ if [[ ${PN} != vim-core ]]; then
# Find a suitable vim binary for updating tags :helptags
vim=$(type -P vim 2>/dev/null)
- [[ -z "$vim" ]] && vim=$(type -P gvim 2>/dev/null)
- [[ -z "$vim" ]] && vim=$(type -P kvim 2>/dev/null)
- if [[ -z "$vim" ]]; then
+ [[ -z "${vim}" ]] && vim=$(type -P gvim 2>/dev/null)
+ [[ -z "${vim}" ]] && vim=$(type -P kvim 2>/dev/null)
+ if [[ -z "${vim}" ]]; then
ewarn "No suitable vim binary to rebuild documentation tags"
fi
fi
@@ -43,39 +42,41 @@ update_vim_helptags() {
# Make vim not try to connect to X. See :help gui-x11-start
# in vim for how this evil trickery works.
if [[ -n "${vim}" ]] ; then
- ln -s "${vim}" "${T}/tagvim"
+ ln -s "${vim}" "${T}/tagvim" || die
vim="${T}/tagvim"
fi
# Install the documentation symlinks into the versioned vim
# directory and run :helptags
for d in "${EROOT%/}"/usr/share/vim/vim[0-9]*; do
- [[ -d "$d/doc" ]] || continue # catch a failed glob
+ [[ -d "${d}/doc" ]] || continue # catch a failed glob
# Remove links, and possibly remove stale dirs
- find $d/doc -name \*.txt -type l | while read s; do
- [[ $(readlink "$s") = $vimfiles/* ]] && rm -f "$s"
+ find ${d}/doc -name \*.txt -type l | while read s; do
+ if [[ $(readlink "${s}") = $vimfiles/* ]]; then
+ rm -f "${s}" || die
+ fi
done
- if [[ -f "$d/doc/tags" && $(find "$d" | wc -l | tr -d ' ') = 3 ]]; then
+ if [[ -f "${d}/doc/tags" && $(find "${d}" | wc -l | tr -d ' ') = 3 ]]; then
# /usr/share/vim/vim61
# /usr/share/vim/vim61/doc
# /usr/share/vim/vim61/doc/tags
- einfo "Removing $d"
- rm -r "$d"
+ einfo "Removing ${d}"
+ rm -r "${d}" || die
continue
fi
# Re-create / install new links
- if [[ -d $vimfiles/doc ]]; then
- ln -s $vimfiles/doc/*.txt $d/doc 2>/dev/null
+ if [[ -d "${vimfiles}"/doc ]]; then
+ ln -s "${vimfiles}"/doc/*.txt "${d}/doc" 2>/dev/null
fi
# Update tags; need a vim binary for this
- if [[ -n "$vim" ]]; then
- einfo "Updating documentation tags in $d"
- DISPLAY= $vim -u NONE -U NONE -T xterm -X -n -f \
+ if [[ -n "${vim}" ]]; then
+ einfo "Updating documentation tags in ${d}"
+ DISPLAY= "${vim}" -u NONE -U NONE -T xterm -X -n -f \
'+set nobackup nomore' \
- "+helptags $d/doc" \
+ "+helptags ${d}/doc" \
'+qa!' </dev/null &>/dev/null
fi
done
@@ -83,4 +84,5 @@ update_vim_helptags() {
[[ -n "${vim}" && -f "${vim}" ]] && rm "${vim}"
}
+_VIM_DOC_ECLASS=1
fi
--
2.35.1
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [gentoo-dev] [PATCH v3 2/8] vim-plugin.eclass: support EAPI 8
2022-04-06 13:51 ` [gentoo-dev] [PATCH v3 0/8] Vim eclasses Anna Vyalkova
2022-04-06 13:51 ` [gentoo-dev] [PATCH v3 1/8] vim-doc.eclass: support EAPI 8 Anna Vyalkova
@ 2022-04-06 13:51 ` Anna Vyalkova
2022-04-06 13:51 ` [gentoo-dev] [PATCH v3 3/8] vim-plugin.eclass: EAPI 8: install allowed dirs only Anna Vyalkova
` (6 subsequent siblings)
8 siblings, 0 replies; 28+ messages in thread
From: Anna Vyalkova @ 2022-04-06 13:51 UTC (permalink / raw
To: gentoo-dev; +Cc: vim, Thomas Bracht Laumann Jespersen
From: Thomas Bracht Laumann Jespersen <t@laumann.xyz>
* Drop EAPI 0, 1, 2 workarounds
* Move EXPORT_FUNCTIONS to end of file
* Add required @USAGE on functions
* Add _VIM_PLUGIN_ECLASS guard
Bug: https://bugs.gentoo.org/830867
Bug: https://bugs.gentoo.org/830866
Signed-off-by: Thomas Bracht Laumann Jespersen <t@laumann.xyz>
Signed-off-by: Anna Vyalkova <cyber+gentoo@sysrq.in>
---
eclass/vim-plugin.eclass | 24 +++++++++++++++---------
1 file changed, 15 insertions(+), 9 deletions(-)
diff --git a/eclass/vim-plugin.eclass b/eclass/vim-plugin.eclass
index 50e727e98f..a29991129c 100644
--- a/eclass/vim-plugin.eclass
+++ b/eclass/vim-plugin.eclass
@@ -1,10 +1,10 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: vim-plugin.eclass
# @MAINTAINER:
# vim@gentoo.org
-# @SUPPORTED_EAPIS: 6 7
+# @SUPPORTED_EAPIS: 6 7 8
# @BLURB: used for installing vim plugins
# @DESCRIPTION:
# This eclass simplifies installation of app-vim plugins into
@@ -13,12 +13,13 @@
# documentation, for which we make a special case via vim-doc.eclass.
case ${EAPI} in
- 6|7);;
- *) die "EAPI ${EAPI:-0} unsupported (too old)";;
+ 6|7|8);;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} unsupported (too old)";;
esac
+if [[ ! ${_VIM_PLUGIN_ECLASS} ]]; then
+
inherit vim-doc
-EXPORT_FUNCTIONS src_install pkg_postinst pkg_postrm
VIM_PLUGIN_VIM_VERSION="${VIM_PLUGIN_VIM_VERSION:-7.3}"
@@ -32,13 +33,13 @@ fi
SLOT="0"
# @FUNCTION: vim-plugin_src_install
+# @USAGE:
# @DESCRIPTION:
# Overrides the default src_install phase. In order, this function:
# * fixes file permission across all files in ${S}.
# * installs help and documentation files.
# * installs all files in "${ED}"/usr/share/vim/vimfiles.
vim-plugin_src_install() {
- has "${EAPI:-0}" 0 1 2 && ! use prefix && ED="${D}"
# Install non-vim-help-docs
einstalldocs
@@ -53,6 +54,7 @@ vim-plugin_src_install() {
}
# @FUNCTION: vim-plugin_pkg_postinst
+# @USAGE:
# @DESCRIPTION:
# Overrides the pkg_postinst phase for this eclass.
# The following functions are called:
@@ -71,7 +73,6 @@ vim-plugin_pkg_postinst() {
# This function calls the update_vim_helptags and update_vim_afterscripts
# functions and eventually removes a bunch of empty directories.
vim-plugin_pkg_postrm() {
- has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX=
update_vim_helptags # from vim-doc
update_vim_afterscripts # see below
@@ -82,12 +83,11 @@ vim-plugin_pkg_postrm() {
}
# @FUNCTION: update_vim_afterscripts
+# @USAGE:
# @DESCRIPTION:
# Creates scripts in /usr/share/vim/vimfiles/after/*
# comprised of the snippets in /usr/share/vim/vimfiles/after/*/*.d
update_vim_afterscripts() {
- has "${EAPI:-0}" 0 1 2 && ! use prefix && EROOT="${ROOT}"
- has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX=
local d f afterdir="${EROOT}"/usr/share/vim/vimfiles/after
# Nothing to do if the dir isn't there
@@ -115,6 +115,7 @@ update_vim_afterscripts() {
}
# @FUNCTION: display_vim_plugin_help
+# @USAGE:
# @DESCRIPTION:
# Displays a message with the plugin's help file if one is available. Uses the
# VIM_PLUGIN_HELPFILES env var. If multiple help files are available, they
@@ -160,3 +161,8 @@ display_vim_plugin_help() {
fi
fi
}
+
+_VIM_PLUGIN_ECLASS=1
+fi
+
+EXPORT_FUNCTIONS src_install pkg_postinst pkg_postrm
--
2.35.1
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [gentoo-dev] [PATCH v3 3/8] vim-plugin.eclass: EAPI 8: install allowed dirs only
2022-04-06 13:51 ` [gentoo-dev] [PATCH v3 0/8] Vim eclasses Anna Vyalkova
2022-04-06 13:51 ` [gentoo-dev] [PATCH v3 1/8] vim-doc.eclass: support EAPI 8 Anna Vyalkova
2022-04-06 13:51 ` [gentoo-dev] [PATCH v3 2/8] vim-plugin.eclass: " Anna Vyalkova
@ 2022-04-06 13:51 ` Anna Vyalkova
2022-04-06 13:51 ` [gentoo-dev] [PATCH v3 4/8] vim-plugin.eclass: EAPI 8: add src_prepare Anna Vyalkova
` (5 subsequent siblings)
8 siblings, 0 replies; 28+ messages in thread
From: Anna Vyalkova @ 2022-04-06 13:51 UTC (permalink / raw
To: gentoo-dev; +Cc: vim
Signed-off-by: Anna Vyalkova <cyber+gentoo@sysrq.in>
---
eclass/vim-plugin.eclass | 38 +++++++++++++++++++++++++++++++-------
1 file changed, 31 insertions(+), 7 deletions(-)
diff --git a/eclass/vim-plugin.eclass b/eclass/vim-plugin.eclass
index a29991129c..abd5b326d5 100644
--- a/eclass/vim-plugin.eclass
+++ b/eclass/vim-plugin.eclass
@@ -32,13 +32,29 @@ if [[ ${PV} != 9999* ]] ; then
fi
SLOT="0"
-# @FUNCTION: vim-plugin_src_install
+# @ECLASS_VARIABLE: _VIM_PLUGIN_ALLOWED_DIRS
+# @INTERNAL
+# @DESCRIPTION:
+# Vanilla Vim dirs.
+# See /usr/share/vim/vim* for reference.
+_VIM_PLUGIN_ALLOWED_DIRS=(
+ after autoload colors compiler doc ftdetect ftplugin indent keymap
+ macros plugin spell syntax
+)
+
+# @FUNCTION: vim-plugin_src_install [<dir>...]
# @USAGE:
# @DESCRIPTION:
# Overrides the default src_install phase. In order, this function:
-# * fixes file permission across all files in ${S}.
# * installs help and documentation files.
-# * installs all files in "${ED}"/usr/share/vim/vimfiles.
+# * installs all files recognized by default Vim installation and directories
+# passed to this function as arguments in "${ED}"/usr/share/vim/vimfiles.
+# @EXAMPLE:
+# @CODE
+# src_install() {
+# vim-plugin_src_install syntax_checkers
+# }
+# @CODE
vim-plugin_src_install() {
# Install non-vim-help-docs
@@ -47,10 +63,18 @@ vim-plugin_src_install() {
# Install remainder of plugin
insinto /usr/share/vim/vimfiles/
local d
- for d in *; do
- [[ -d "${d}" ]] || continue
- doins -r "${d}"
- done
+ case ${EAPI:-0} in
+ 6|7)
+ for d in *; do
+ [[ -d "${d}" ]] || continue
+ doins -r "${d}"
+ done ;;
+ *)
+ for d in "${_VIM_PLUGIN_ALLOWED_DIRS[@]}" "${@}"; do
+ [[ -d "${d}" ]] || continue
+ doins -r "${d}"
+ done ;;
+ esac
}
# @FUNCTION: vim-plugin_pkg_postinst
--
2.35.1
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [gentoo-dev] [PATCH v3 4/8] vim-plugin.eclass: EAPI 8: add src_prepare
2022-04-06 13:51 ` [gentoo-dev] [PATCH v3 0/8] Vim eclasses Anna Vyalkova
` (2 preceding siblings ...)
2022-04-06 13:51 ` [gentoo-dev] [PATCH v3 3/8] vim-plugin.eclass: EAPI 8: install allowed dirs only Anna Vyalkova
@ 2022-04-06 13:51 ` Anna Vyalkova
2022-04-06 14:26 ` Thomas Bracht Laumann Jespersen
2022-04-06 13:52 ` [gentoo-dev] [PATCH v3 5/8] vim-plugin.eclass: document VIM_PLUGIN_VIM_VERSION Anna Vyalkova
` (4 subsequent siblings)
8 siblings, 1 reply; 28+ messages in thread
From: Anna Vyalkova @ 2022-04-06 13:51 UTC (permalink / raw
To: gentoo-dev; +Cc: vim
Signed-off-by: Anna Vyalkova <cyber+gentoo@sysrq.in>
---
eclass/vim-plugin.eclass | 38 +++++++++++++++++++++++++++++++++++---
1 file changed, 35 insertions(+), 3 deletions(-)
diff --git a/eclass/vim-plugin.eclass b/eclass/vim-plugin.eclass
index abd5b326d5..0df323b143 100644
--- a/eclass/vim-plugin.eclass
+++ b/eclass/vim-plugin.eclass
@@ -13,7 +13,8 @@
# documentation, for which we make a special case via vim-doc.eclass.
case ${EAPI} in
- 6|7|8);;
+ 6|7) ;;
+ 8) _DEFINE_VIM_PLUGIN_SRC_PREPARE=true ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} unsupported (too old)";;
esac
@@ -21,6 +22,17 @@ if [[ ! ${_VIM_PLUGIN_ECLASS} ]]; then
inherit vim-doc
+fi
+
+EXPORT_FUNCTIONS src_install pkg_postinst pkg_postrm
+
+# src_prepare is only exported in EAPI >= 8
+case ${EAPI:-0} in
+ 6|7) ;;
+ 8) EXPORT_FUNCTIONS src_prepare ;;
+esac
+
+if [[ ! ${_VIM_PLUGIN_ECLASS} ]]; then
VIM_PLUGIN_VIM_VERSION="${VIM_PLUGIN_VIM_VERSION:-7.3}"
DEPEND="|| ( >=app-editors/vim-${VIM_PLUGIN_VIM_VERSION}
@@ -32,6 +44,28 @@ if [[ ${PV} != 9999* ]] ; then
fi
SLOT="0"
+if ${_DEFINE_VIM_PLUGIN_SRC_PREPARE}; then
+# @FUNCTION: vim-plugin_src_prepare
+# @DESCRIPTION:
+# Moves "after/syntax" plugins to directories to avoid file collisions with
+# other packages.
+# Note that this function is only defined and exported in EAPIs >= 8.
+vim-plugin_src_prepare() {
+ default_src_prepare
+
+ # return if there's nothing to do
+ [[ -d after/syntax ]] || return
+
+ pushd after/syntax >/dev/null || die
+ for file in *.vim; do
+ [[ -f "${file}" ]] || continue
+ mkdir "${file%.vim}" || die
+ mv "${file}" "${file%.vim}/${PN}.vim" || die
+ done
+ popd >/dev/null || die
+}
+fi
+
# @ECLASS_VARIABLE: _VIM_PLUGIN_ALLOWED_DIRS
# @INTERNAL
# @DESCRIPTION:
@@ -188,5 +222,3 @@ display_vim_plugin_help() {
_VIM_PLUGIN_ECLASS=1
fi
-
-EXPORT_FUNCTIONS src_install pkg_postinst pkg_postrm
--
2.35.1
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [gentoo-dev] [PATCH v3 5/8] vim-plugin.eclass: document VIM_PLUGIN_VIM_VERSION
2022-04-06 13:51 ` [gentoo-dev] [PATCH v3 0/8] Vim eclasses Anna Vyalkova
` (3 preceding siblings ...)
2022-04-06 13:51 ` [gentoo-dev] [PATCH v3 4/8] vim-plugin.eclass: EAPI 8: add src_prepare Anna Vyalkova
@ 2022-04-06 13:52 ` Anna Vyalkova
2022-04-06 13:52 ` [gentoo-dev] [PATCH v3 6/8] vim-doc.eclass: add debug-print-function call Anna Vyalkova
` (3 subsequent siblings)
8 siblings, 0 replies; 28+ messages in thread
From: Anna Vyalkova @ 2022-04-06 13:52 UTC (permalink / raw
To: gentoo-dev; +Cc: vim
Signed-off-by: Anna Vyalkova <cyber+gentoo@sysrq.in>
---
eclass/vim-plugin.eclass | 3 +++
1 file changed, 3 insertions(+)
diff --git a/eclass/vim-plugin.eclass b/eclass/vim-plugin.eclass
index 0df323b143..063893ad41 100644
--- a/eclass/vim-plugin.eclass
+++ b/eclass/vim-plugin.eclass
@@ -33,6 +33,9 @@ case ${EAPI:-0} in
esac
if [[ ! ${_VIM_PLUGIN_ECLASS} ]]; then
+# @ECLASS_VARIABLE: VIM_PLUGIN_VIM_VERSION
+# @DESCRIPTION:
+# Minimum Vim version the plugin supports.
VIM_PLUGIN_VIM_VERSION="${VIM_PLUGIN_VIM_VERSION:-7.3}"
DEPEND="|| ( >=app-editors/vim-${VIM_PLUGIN_VIM_VERSION}
--
2.35.1
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [gentoo-dev] [PATCH v3 6/8] vim-doc.eclass: add debug-print-function call
2022-04-06 13:51 ` [gentoo-dev] [PATCH v3 0/8] Vim eclasses Anna Vyalkova
` (4 preceding siblings ...)
2022-04-06 13:52 ` [gentoo-dev] [PATCH v3 5/8] vim-plugin.eclass: document VIM_PLUGIN_VIM_VERSION Anna Vyalkova
@ 2022-04-06 13:52 ` Anna Vyalkova
2022-04-06 13:52 ` [gentoo-dev] [PATCH v3 7/8] vim-doc.eclass: document update_vim_helptags Anna Vyalkova
` (2 subsequent siblings)
8 siblings, 0 replies; 28+ messages in thread
From: Anna Vyalkova @ 2022-04-06 13:52 UTC (permalink / raw
To: gentoo-dev; +Cc: vim
Signed-off-by: Anna Vyalkova <cyber+gentoo@sysrq.in>
---
eclass/vim-doc.eclass | 2 ++
1 file changed, 2 insertions(+)
diff --git a/eclass/vim-doc.eclass b/eclass/vim-doc.eclass
index be66d6159a..7485a33512 100644
--- a/eclass/vim-doc.eclass
+++ b/eclass/vim-doc.eclass
@@ -24,6 +24,8 @@ esac
if [[ ! ${_VIM_DOC_ECLASS} ]] ; then
update_vim_helptags() {
+ debug-print-function ${FUNCNAME} "${@}"
+
local vimfiles vim d s
# This is where vim plugins are installed
--
2.35.1
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [gentoo-dev] [PATCH v3 7/8] vim-doc.eclass: document update_vim_helptags
2022-04-06 13:51 ` [gentoo-dev] [PATCH v3 0/8] Vim eclasses Anna Vyalkova
` (5 preceding siblings ...)
2022-04-06 13:52 ` [gentoo-dev] [PATCH v3 6/8] vim-doc.eclass: add debug-print-function call Anna Vyalkova
@ 2022-04-06 13:52 ` Anna Vyalkova
2022-04-06 13:52 ` [gentoo-dev] [PATCH v3 8/8] vim-plugin.eclass: add debug-print-function calls Anna Vyalkova
2022-04-07 11:40 ` [gentoo-dev] [PATCH v3 0/8] Vim eclasses Thomas Bracht Laumann Jespersen
8 siblings, 0 replies; 28+ messages in thread
From: Anna Vyalkova @ 2022-04-06 13:52 UTC (permalink / raw
To: gentoo-dev; +Cc: vim
Signed-off-by: Anna Vyalkova <cyber+gentoo@sysrq.in>
---
eclass/vim-doc.eclass | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/eclass/vim-doc.eclass b/eclass/vim-doc.eclass
index 7485a33512..f4f268c38b 100644
--- a/eclass/vim-doc.eclass
+++ b/eclass/vim-doc.eclass
@@ -23,6 +23,10 @@ esac
if [[ ! ${_VIM_DOC_ECLASS} ]] ; then
+# @FUNCTION: update_vim_helptags
+# @USAGE:
+# @DESCRIPTION:
+# Update the documentation tags in the versioned Vim directory.
update_vim_helptags() {
debug-print-function ${FUNCNAME} "${@}"
--
2.35.1
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [gentoo-dev] [PATCH v3 8/8] vim-plugin.eclass: add debug-print-function calls
2022-04-06 13:51 ` [gentoo-dev] [PATCH v3 0/8] Vim eclasses Anna Vyalkova
` (6 preceding siblings ...)
2022-04-06 13:52 ` [gentoo-dev] [PATCH v3 7/8] vim-doc.eclass: document update_vim_helptags Anna Vyalkova
@ 2022-04-06 13:52 ` Anna Vyalkova
2022-04-07 11:40 ` [gentoo-dev] [PATCH v3 0/8] Vim eclasses Thomas Bracht Laumann Jespersen
8 siblings, 0 replies; 28+ messages in thread
From: Anna Vyalkova @ 2022-04-06 13:52 UTC (permalink / raw
To: gentoo-dev; +Cc: vim
Signed-off-by: Anna Vyalkova <cyber+gentoo@sysrq.in>
---
eclass/vim-plugin.eclass | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/eclass/vim-plugin.eclass b/eclass/vim-plugin.eclass
index 063893ad41..4f0ee3c815 100644
--- a/eclass/vim-plugin.eclass
+++ b/eclass/vim-plugin.eclass
@@ -54,6 +54,8 @@ if ${_DEFINE_VIM_PLUGIN_SRC_PREPARE}; then
# other packages.
# Note that this function is only defined and exported in EAPIs >= 8.
vim-plugin_src_prepare() {
+ debug-print-function ${FUNCNAME} "${@}"
+
default_src_prepare
# return if there's nothing to do
@@ -93,6 +95,7 @@ _VIM_PLUGIN_ALLOWED_DIRS=(
# }
# @CODE
vim-plugin_src_install() {
+ debug-print-function ${FUNCNAME} "${@}"
# Install non-vim-help-docs
einstalldocs
@@ -123,6 +126,8 @@ vim-plugin_src_install() {
# * update_vim_afterscripts
# * display_vim_plugin_help
vim-plugin_pkg_postinst() {
+ debug-print-function ${FUNCNAME} "${@}"
+
update_vim_helptags # from vim-doc
update_vim_afterscripts # see below
display_vim_plugin_help # see below
@@ -134,6 +139,8 @@ vim-plugin_pkg_postinst() {
# This function calls the update_vim_helptags and update_vim_afterscripts
# functions and eventually removes a bunch of empty directories.
vim-plugin_pkg_postrm() {
+ debug-print-function ${FUNCNAME} "${@}"
+
update_vim_helptags # from vim-doc
update_vim_afterscripts # see below
@@ -149,6 +156,8 @@ vim-plugin_pkg_postrm() {
# Creates scripts in /usr/share/vim/vimfiles/after/*
# comprised of the snippets in /usr/share/vim/vimfiles/after/*/*.d
update_vim_afterscripts() {
+ debug-print-function ${FUNCNAME} "${@}"
+
local d f afterdir="${EROOT}"/usr/share/vim/vimfiles/after
# Nothing to do if the dir isn't there
@@ -186,6 +195,8 @@ update_vim_afterscripts() {
# extra message regarding enabling filetype plugins is displayed if
# VIM_PLUGIN_MESSAGES includes the word "filetype".
display_vim_plugin_help() {
+ debug-print-function ${FUNCNAME} "${@}"
+
local h
if [[ -z ${REPLACING_VERSIONS} ]]; then
--
2.35.1
^ permalink raw reply related [flat|nested] 28+ messages in thread
* Re: [gentoo-dev] [PATCH v3 4/8] vim-plugin.eclass: EAPI 8: add src_prepare
2022-04-06 13:51 ` [gentoo-dev] [PATCH v3 4/8] vim-plugin.eclass: EAPI 8: add src_prepare Anna Vyalkova
@ 2022-04-06 14:26 ` Thomas Bracht Laumann Jespersen
0 siblings, 0 replies; 28+ messages in thread
From: Thomas Bracht Laumann Jespersen @ 2022-04-06 14:26 UTC (permalink / raw
To: gentoo-dev; +Cc: vim
> +if ${_DEFINE_VIM_PLUGIN_SRC_PREPARE}; then
> +# @FUNCTION: vim-plugin_src_prepare
> +# @DESCRIPTION:
> +# Moves "after/syntax" plugins to directories to avoid file collisions with
> +# other packages.
> +# Note that this function is only defined and exported in EAPIs >= 8.
> +vim-plugin_src_prepare() {
The eclass writing guide [0] says that @USAGE is always required. But I see it
commonly omitted from phase function overrides.
[0]: https://devmanual.gentoo.org/eclass-writing/index.html#eclass-functions
-- Thomas
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [gentoo-dev] [PATCH v3 0/8] Vim eclasses
2022-04-06 13:51 ` [gentoo-dev] [PATCH v3 0/8] Vim eclasses Anna Vyalkova
` (7 preceding siblings ...)
2022-04-06 13:52 ` [gentoo-dev] [PATCH v3 8/8] vim-plugin.eclass: add debug-print-function calls Anna Vyalkova
@ 2022-04-07 11:40 ` Thomas Bracht Laumann Jespersen
8 siblings, 0 replies; 28+ messages in thread
From: Thomas Bracht Laumann Jespersen @ 2022-04-07 11:40 UTC (permalink / raw
To: gentoo-dev; +Cc: vim
Could you post a v4 as a separate thread, and not as a reply to the previous
patches? For some reason, neomutt is ordering patches 1 and 2 _after_ the other
six making it hard to apply from the mailbox :-) Feel free to drop my initial
patches, I think you rework is so much better.
I looked over sam's requested changes from last year [0], and I think you've
addressed all the points. Only one I don't know if was addressed was this one:
> - In update_vim_afterscripts, the einfo seems (at first glance) to be misleading. \
> Should it be printing ${afterdir} instead?
[0]: https://marc.info/?l=gentoo-dev&m=162692547126278&w=2
^ permalink raw reply [flat|nested] 28+ messages in thread
end of thread, other threads:[~2022-04-07 11:40 UTC | newest]
Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-06 9:10 [gentoo-dev] [PATCH 1/2] vim-doc.eclass: support EAPI 8 Thomas Bracht Laumann Jespersen
2022-04-06 9:10 ` [gentoo-dev] [PATCH 2/2] vim-plugin.eclass: " Thomas Bracht Laumann Jespersen
2022-04-06 9:56 ` Anna Vyalkova
2022-04-06 10:02 ` Anna Vyalkova
2022-04-06 9:58 ` [gentoo-dev] [PATCH 1/2] vim-doc.eclass: " Anna Vyalkova
2022-04-06 10:54 ` Ulrich Mueller
2022-04-06 12:01 ` Anna Vyalkova
2022-04-06 12:06 ` Anna Vyalkova
2022-04-06 12:27 ` [gentoo-dev] [PATCH v2 0/8] Vim eclasses Anna Vyalkova
2022-04-06 12:27 ` [gentoo-dev] [PATCH v2 1/8] vim-doc.eclass: support EAPI 8 Anna Vyalkova
2022-04-06 12:27 ` [gentoo-dev] [PATCH v2 2/8] vim-plugin.eclass: " Anna Vyalkova
2022-04-06 12:27 ` [gentoo-dev] [PATCH v2 3/8] vim-plugin.eclass: EAPI 8: install allowed dirs only Anna Vyalkova
2022-04-06 12:27 ` [gentoo-dev] [PATCH v2 4/8] vim-plugin.eclass: EAPI 8: add src_prepare Anna Vyalkova
2022-04-06 12:27 ` [gentoo-dev] [PATCH v2 5/8] vim-plugin.eclass: document VIM_PLUGIN_VIM_VERSION Anna Vyalkova
2022-04-06 12:27 ` [gentoo-dev] [PATCH v2 6/8] vim-doc.eclass: add debug-print-function call Anna Vyalkova
2022-04-06 12:27 ` [gentoo-dev] [PATCH v2 7/8] vim-doc.eclass: document update_vim_helptags Anna Vyalkova
2022-04-06 12:27 ` [gentoo-dev] [PATCH v2 8/8] vim-plugin.eclass: add debug-print-function calls Anna Vyalkova
2022-04-06 13:51 ` [gentoo-dev] [PATCH v3 0/8] Vim eclasses Anna Vyalkova
2022-04-06 13:51 ` [gentoo-dev] [PATCH v3 1/8] vim-doc.eclass: support EAPI 8 Anna Vyalkova
2022-04-06 13:51 ` [gentoo-dev] [PATCH v3 2/8] vim-plugin.eclass: " Anna Vyalkova
2022-04-06 13:51 ` [gentoo-dev] [PATCH v3 3/8] vim-plugin.eclass: EAPI 8: install allowed dirs only Anna Vyalkova
2022-04-06 13:51 ` [gentoo-dev] [PATCH v3 4/8] vim-plugin.eclass: EAPI 8: add src_prepare Anna Vyalkova
2022-04-06 14:26 ` Thomas Bracht Laumann Jespersen
2022-04-06 13:52 ` [gentoo-dev] [PATCH v3 5/8] vim-plugin.eclass: document VIM_PLUGIN_VIM_VERSION Anna Vyalkova
2022-04-06 13:52 ` [gentoo-dev] [PATCH v3 6/8] vim-doc.eclass: add debug-print-function call Anna Vyalkova
2022-04-06 13:52 ` [gentoo-dev] [PATCH v3 7/8] vim-doc.eclass: document update_vim_helptags Anna Vyalkova
2022-04-06 13:52 ` [gentoo-dev] [PATCH v3 8/8] vim-plugin.eclass: add debug-print-function calls Anna Vyalkova
2022-04-07 11:40 ` [gentoo-dev] [PATCH v3 0/8] Vim eclasses Thomas Bracht Laumann Jespersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox