void-packages/srcpkgs/neovim/template

47 lines
1.4 KiB
Bash

# Template file for 'neovim'
pkgname=neovim
version=0.9.4
revision=1
build_style=cmake
build_helper="qemu"
configure_args="-DCI_BUILD=OFF -DCOMPILE_LUA=OFF -DPREFER_LUA=$(vopt_if luajit OFF ON)"
hostmakedepends="pkg-config gettext gperf lua51-lpeg lua51-mpack lua51-BitOp
$(vopt_if luajit LuaJIT lua51)"
makedepends="libtermkey-devel libuv-devel libvterm-devel msgpack-devel
libluv-devel tree-sitter-devel $(vopt_if luajit LuaJIT-devel lua51-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, Vim"
homepage="https://neovim.io"
distfiles="https://github.com/neovim/neovim/archive/refs/tags/v${version}.tar.gz"
checksum=148356027ee8d586adebb6513a94d76accc79da9597109ace5c445b09d383093
build_options=luajit
case "$XBPS_TARGET_MACHINE" in
riscv64*) build_options_default="" ;;
*) build_options_default="luajit" ;;
esac
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"
# They want assertion
CFLAGS=-UNDEBUG
pre_configure() {
vsed -i runtime/CMakeLists.txt \
-e "s|\".*/bin/nvim|\${CMAKE_CROSSCOMPILING_EMULATOR} &|g"
vsed -i src/nvim/po/CMakeLists.txt \
-e "s|\$<TARGET_FILE:nvim|\${CMAKE_CROSSCOMPILING_EMULATOR} &|g"
}
post_install() {
vlicense LICENSE.txt
}