# Contributor: Daniel Sabogal # Maintainer: Jakub Jirutka # # TODO: Try to trim the base package to include only common syntax files etc. pkgname=neovim pkgver=0.8.3 pkgrel=1 pkgdesc="Vim-fork focused on extensibility and agility" url="https://neovim.io/" arch="all" license="Apache-2.0 AND Vim" makedepends=" cmake gettext-dev gperf libtermkey-dev libuv-dev libvterm-dev lua-luv-dev lua5.1-lpeg lua5.1-mpack msgpack-c-dev samurai tree-sitter-dev unibilium-dev " # Build neovim with lua instead of luajit on s390x # See https://github.com/neovim/neovim/issues/7879 case "$CARCH" in riscv64 | s390x) makedepends="$makedepends lua5.1-dev lua5.1-bitop" ;; *) makedepends="$makedepends luajit-dev" ;; esac subpackages="$pkgname-lang $pkgname-doc" source="https://github.com/neovim/neovim/archive/v$pkgver/neovim-$pkgver.tar.gz msgpack-c.patch nodoc.txt " # secfixes: # 0.3.6-r0: # - CVE-2019-12735 # 0.2.0-r0: # - CVE-2017-5953 # - CVE-2017-6349 # - CVE-2017-6350 # 0.1.6-r1: # - CVE-2016-1248 build() { local cmakeoptions= case "$CARCH" in riscv64 | s390x) cmakeoptions="-DPREFER_LUA=ON" ;; esac cmake -B build -G Ninja \ -DCMAKE_BUILD_TYPE=MinSizeRel \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_LIBDIR=lib \ -DENABLE_JEMALLOC=FALSE \ -DENABLE_LTO=TRUE \ -DCMAKE_VERBOSE_MAKEFILE=TRUE \ $cmakeoptions cmake --build build } package() { DESTDIR="$pkgdir" cmake --install build # Tree-sitter grammars are packaged separately and installed into # /usr/lib/tree-sitter. ln -s ../../../lib/tree-sitter "$pkgdir"/usr/share/nvim/runtime/parser } doc() { default_doc pkgdesc="$pkgdesc (documentation and help pages)" replaces="$pkgname" local docdir="usr/share/nvim/runtime/doc" mkdir -p "$subpkgdir"/$docdir mv "$pkgdir"/$docdir/*.txt "$subpkgdir"/$docdir/ # When user execute ":help ", neovim will open nodoc.txt # with information why docs are not available and how to install them. install -D "$srcdir"/nodoc.txt \ "$pkgdir"/$docdir/nodoc.txt local f; for f in "$subpkgdir"/$docdir/*.txt; do ln -s nodoc.txt "$pkgdir"/$docdir/$(basename $f) done } sha512sums=" 0ecf60b564a323eb95eb2e67f7dc7e1c1e7bfc70b08466a66eb668d1b75a7362ca42901cd5a64fda22292375e2921ba61c299ac846f820ac146dc55426813eb8 neovim-0.8.3.tar.gz a8a404ddab9364bb74652c157232788715b330a623b33d0b09800f267ec935d19b545f30794d19f166ebb4ee1429ef8c4ec75ce705ebe7bf3f70c93cc0df8348 msgpack-c.patch 72ab288f53acddc088c567aafe8c5afa6835325fab7879e782d1d62f87a662f3a6bac123c450debbae1b32336cc60b2830b429838ee3dfcc7524773b5069f4f0 nodoc.txt "