From: Anna Vyalkova <cyber+gentoo@sysrq.in>
To: gentoo-dev@lists.gentoo.org
Cc: vim@gentoo.org
Subject: [gentoo-dev] [PATCH v2 3/8] vim-plugin.eclass: EAPI 8: install allowed dirs only
Date: Wed, 6 Apr 2022 17:27:45 +0500 [thread overview]
Message-ID: <20220406122750.17436-4-cyber+gentoo@sysrq.in> (raw)
In-Reply-To: <20220406122750.17436-1-cyber+gentoo@sysrq.in>
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
next prev parent reply other threads:[~2022-04-06 12:29 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Anna Vyalkova [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220406122750.17436-4-cyber+gentoo@sysrq.in \
--to=cyber+gentoo@sysrq.in \
--cc=gentoo-dev@lists.gentoo.org \
--cc=vim@gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox