new bblfs: app-editors/neovim-0.11.5

This commit is contained in:
2026-01-31 20:33:50 -05:00
parent 3cc11ba53f
commit c16bbf9b04
3 changed files with 196 additions and 0 deletions

View File

@@ -0,0 +1,90 @@
pkgname=neovim
pkgver=0.11.5
pkgdesc="Vim-fork focused on extensibility and agility"
homepage="https://neovim.io"
license=("Apache-2.0" "vim")
bdepends=(luajit gperf gettext glibc)
depends=(
luajit
luv
lpeg
mpack
libutf8proc
libuv
libvterm
msgpack
tree-sitter
tree-sitter-c
tree-sitter-lua
tree-sitter-markdown
tree-sitter-query
tree-sitter-vim
tree-sitter-vimdoc
unibilium
)
sources=("${pkgname}-${pkgver}.tar.gz"
"sysinit.vim"
"nvimdoc.HOOK"
)
urls=("https://github.com/neovim/neovim/archive/v${pkgver}.tar.gz"
"sysinit.vim"
"nvimdoc.HOOK"
)
sha512sums=("1b2bb241261eefd195275e28bb9ebe4102261d61d8b7fe38ccebad7131ccc38d29fae8494d511b4c440ad71ef95dc405a2ba6e98b5d47426f215c8137c8bc91f"
"d485765ff5161c2a79f1d0f944588448b94cd7bf8d72ca021312e755f13d241a11c796f117148624a8d66809caebbd747da56367a6805f1d37a4956e112cb325"
"657d3a9e872481e04428f86e8412139998de41395f1b050cc79daecaa247d004118fa718246a1ea7e70112b7d84876f2d70a896d7e52a278eefba7c54ea09ba5"
)
xdg_environment_reset ()
{
export XDG_DATA_HOME="${HOME}/.local/share";
export XDG_CONFIG_HOME="${HOME}/.config";
export XDG_CACHE_HOME="${HOME}/.cache";
export XDG_STATE_HOME="${HOME}/.local/state";
export XDG_RUNTIME_DIR="${TMPDIR}/run";
mkdir -p "${XDG_DATA_HOME}" "${XDG_CONFIG_HOME}" "${XDG_CACHE_HOME}" "${XDG_STATE_HOME}" "${XDG_RUNTIME_DIR}";
chmod 0700 "${XDG_RUNTIME_DIR}";
unset DBUS_SESSION_BUS_ADDRESS
}
xdg_environment_reset
src_prepare() {
tar -xf ${distdir}/${sources[0]} --strip-components=1
# Use our system vim dir
sed -e "/^# define SYS_VIMRC_FILE/s|\$VIM|${EPREFIX}/etc/vim|" \
-i src/nvim/globals.h
}
src_build() {
local cmake_args=(
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_INSTALL_PREFIX=/usr
# appends -flto
-DENABLE_LTO=OFF
-DPREFER_LUA=no
-DLUA_PRG="/usr/bin/luajit"
# bug 906019: fix hardcoded usage of ccache
-DCACHE_PRG=OFF
)
cmake -B build "${cmake_args[@]}"
cmake --build build
}
src_install() {
DESTDIR="$pkgdir" cmake --install build
install -vDm644 "${filedir}/sysinit.vim" -t "${pkgdir}/etc/vim/"
install -dv "${pkgdir}/usr/share/nvim/runtime/parser"
for parser in c lua markdown query vim vimdoc; do
ln -vs ../../../../lib/libtree-sitter-${parser}.so "${pkgdir}"/usr/share/nvim/runtime/parser/${parser}.so
done
ln -vs ../share/nvim/runtime/scripts/less.sh ${pkgdir}/usr/bin/nvimpager
leaf_install_hook "${filedir}/nvimdoc.HOOK"
}
# vim:ft=sh syn=sh et sw=2:

View File

@@ -0,0 +1,9 @@
target=("/usr/share/nvim/site/pack/dist/start/*/doc/")
triggers=("install" "remove")
operation() {
for f in /usr/share/nvim/site/pack/dist/start/*/doc/; do
/usr/bin/nvim -es "+helptags $f" +q
done
}
# vim:ft=sh syn=sh et sw=2:

View File

@@ -0,0 +1,97 @@
" Default Gentoo configuration file for neovim
" Based on the default vimrc shipped by Gentoo with app-editors/vim-core
" You can override any of these settings on a global basis via the
" "/etc/vim/nvimrc.local" file, and on a per-user basis via "~/.nvimrc".
" You may need to create these.
" Neovim comes with sensible defaults, see:
" https://github.com/neovim/neovim/issues/2676
" Most of the general settings from Gentoo's vimrc have been dropped here.
" We add only some necessary fixes and a few Gentoo specific settings.
" {{{ Locale settings
" If we have a BOM, always honour that rather than trying to guess.
if &fileencodings !~? "ucs-bom"
set fileencodings^=ucs-bom
endif
" Always check for UTF-8 when trying to determine encodings.
if &fileencodings !~? "utf-8"
" If we have to add this, the default encoding is not Unicode.
let g:added_fenc_utf8 = 1
set fileencodings+=utf-8
endif
" }}}
" {{{ Fix &shell, see bug #101665.
if "" == &shell
if executable("/bin/bash")
set shell=/bin/bash
elseif executable("/bin/sh")
set shell=/bin/sh
endif
endif
"}}}
" {{{ Our default /bin/sh is bash, not ksh, so syntax highlighting for .sh
" files should default to bash. See :help sh-syntax and bug #101819.
if has("eval")
let is_bash=1
endif
" }}}
" {{{ Autocommands
if has("autocmd")
augroup gentoo
au!
" Gentoo-specific settings for ebuilds. These are the federally-mandated
" required tab settings. See the following for more information:
" http://www.gentoo.org/proj/en/devrel/handbook/handbook.xml
" Note that the rules below are very minimal and don't cover everything.
" Better to emerge app-vim/gentoo-syntax, which provides full syntax,
" filetype and indent settings for all things Gentoo.
au BufRead,BufNewFile *.e{build,class} set ts=4 sw=4 noexpandtab
" When editing a file, always jump to the last cursor position
autocmd BufReadPost *
\ if ! exists("g:leave_my_cursor_position_alone") |
\ if line("'\"") > 0 && line ("'\"") <= line("$") |
\ exe "normal g'\"" |
\ endif |
\ endif
" When editing a crontab file, set backupcopy to yes rather than auto. See
" :help crontab and bug #53437.
autocmd FileType crontab set backupcopy=yes
" If we previously detected that the default encoding is not UTF-8
" (g:added_fenc_utf8), assume that a file with only ASCII characters (or no
" characters at all) isn't a Unicode file, but is in the default encoding.
" Except of course if a byte-order mark is in effect.
autocmd BufReadPost *
\ if exists("g:added_fenc_utf8") && &fileencoding == "utf-8" &&
\ ! &bomb && search('[\x80-\xFF]','nw') == 0 && &modifiable |
\ set fileencoding= |
\ endif
" Strip trailing spaces on write
autocmd BufWritePre *.e{build,class}
\ if ! exists("g:leave_my_trailing_space_alone") |
\ :%s/\s\+$//e |
\ endif
augroup END
endif " has("autocmd")
" }}}
" {{{ nvimrc.local
if filereadable("/etc/vim/nvimrc.local")
source /etc/vim/nvimrc.local
endif
" }}}
" vim: set tw=80 sw=2 sts=2 et foldmethod=marker :