# Template file for 'neovim'
pkgname=neovim
version=0.8.2
revision=2
build_style=cmake
build_helper="qemu"
configure_args="-DCOMPILE_LUA=OFF"
hostmakedepends="pkg-config gettext gperf LuaJIT lua51-lpeg lua51-mpack"
makedepends="libtermkey-devel libuv-devel libvterm-devel msgpack-devel
 LuaJIT-devel libluv-devel tree-sitter-devel"
short_desc="Fork of Vim aiming to improve user experience, plugins and GUIs"
maintainer="Marcin Puc <tranzystorek.io@protonmail.com>"
license="Apache-2.0, custom:Vim"
homepage="https://neovim.io"
distfiles="https://github.com/neovim/neovim/archive/refs/tags/v${version}.tar.gz"
checksum=c516c8db73e1b12917a6b2e991b344d0914c057cef8266bce61a2100a28ffcc9

alternatives="
 vi:vi:/usr/bin/nvim
 vi:vi.1:/usr/share/man/man1/nvim.1
 vi:view:/usr/bin/nvim
 vi:view.1:/usr/share/man/man1/nvim.1
 vim:vim:/usr/bin/nvim
 vim:vim.1:/usr/share/man/man1/nvim.1"

pre_configure() {
	vsed -i runtime/CMakeLists.txt \
		-e "s|\".*/bin/nvim|\${CMAKE_CROSSCOMPILING_EMULATOR} &|g"
}

post_install() {
	vlicense LICENSE.txt
}
