From 3dfdc588922ed381fb8cf731e689c499db98d89a Mon Sep 17 00:00:00 2001 From: Ben de Groot Date: Fri, 14 Aug 2015 17:36:03 +0800 Subject: app-editors/neovim: implement nvimpager useflag Package-Manager: portage-2.2.20.1 --- app-editors/neovim/metadata.xml | 3 +++ app-editors/neovim/neovim-0.0.0_pre20150814.ebuild | 11 ++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) (limited to 'app-editors/neovim') 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 @@ vim + + Install nvimpager symlink to less.sh macro + neovim/neovim 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 } -- cgit v1.2.3-65-gdbad