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