summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen de Groot <yngwin@gentoo.org>2015-08-14 17:36:03 +0800
committerBen de Groot <yngwin@gentoo.org>2015-08-14 17:36:37 +0800
commit3dfdc588922ed381fb8cf731e689c499db98d89a (patch)
tree536628eed03edcd633e92dabb29d727d06896ee4 /app-editors/neovim
parentapp-editors/neovim: new snapshot (diff)
downloadgentoo-3dfdc588922ed381fb8cf731e689c499db98d89a.tar.gz
gentoo-3dfdc588922ed381fb8cf731e689c499db98d89a.tar.bz2
gentoo-3dfdc588922ed381fb8cf731e689c499db98d89a.zip
app-editors/neovim: implement nvimpager useflag
Package-Manager: portage-2.2.20.1
Diffstat (limited to 'app-editors/neovim')
-rw-r--r--app-editors/neovim/metadata.xml3
-rw-r--r--app-editors/neovim/neovim-0.0.0_pre20150814.ebuild11
2 files changed, 13 insertions, 1 deletions
diff --git a/app-editors/neovim/metadata.xml b/app-editors/neovim/metadata.xml
index d5a0b7af40f6..4ead8c2a61bf 100644
--- a/app-editors/neovim/metadata.xml
+++ b/app-editors/neovim/metadata.xml
@@ -2,6 +2,9 @@
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<herd>vim</herd>
+ <use>
+ <flag name='nvimpager'>Install nvimpager symlink to less.sh macro</flag>
+ </use>
<upstream>
<remote-id type="github">neovim/neovim</remote-id>
</upstream>
diff --git a/app-editors/neovim/neovim-0.0.0_pre20150814.ebuild b/app-editors/neovim/neovim-0.0.0_pre20150814.ebuild
index 0dd499e107d2..27615d2a9f9e 100644
--- a/app-editors/neovim/neovim-0.0.0_pre20150814.ebuild
+++ b/app-editors/neovim/neovim-0.0.0_pre20150814.ebuild
@@ -17,7 +17,7 @@ fi
LICENSE="Apache-2.0 vim"
SLOT="0"
-IUSE="perl python"
+IUSE="+nvimpager perl python"
CDEPEND="dev-lang/luajit:2
>=dev-libs/libtermkey-0.17
@@ -42,6 +42,9 @@ src_prepare() {
# add eclass to bash filetypes
sed -e 's|*.ebuild|*.ebuild,*.eclass|' -i runtime/filetype.vim || die
+ # make less.sh macro actually work with neovim
+ sed -e 's|vim |nvim |g' -i runtime/macros/less.sh || die
+
cmake-utils_src_prepare
}
@@ -60,7 +63,13 @@ src_configure() {
src_install() {
cmake-utils_src_install
+
# install a default configuration file
insinto /etc/vim
doins "${FILESDIR}"/nvimrc
+
+ # conditionally install a symlink for nvimpager
+ if use nvimpager; then
+ dosym /usr/share/nvim/runtime/macros/less.sh /usr/bin/nvimpager
+ fi
}