blob: 8950c08fcdc2e34397b9295101efe6bea82341c3 (
plain)
1 # Description: Tree-sitter parser for Vim help files
2 # URL: https://github.com/neovim/tree-sitter-vimdoc
3 # Maintainer: Tim Biermann, tbier at posteo dot de
4 # Depends on: npm tree-sitter
5
6 name=tree-sitter-vimdoc
7 version=1.2.5
8 release=1
9 source=(https://github.com/neovim/tree-sitter-vimdoc/archive/v$version/$name-$version.tar.gz)
10
11 build() {
12 cd $name-$version
13
14 tree-sitter generate --log
15 cd src
16 export CFLAGS+=' -fPIC'
17 cc $CFLAGS -std=c99 -c parser.c
18 cc $LDFLAGS -shared parser.o -o parser.so
19
20 install -Dm 644 parser.so $PKG/usr/lib/libtree-sitter-vimdoc.so
21 install -d $PKG/usr/share/nvim/runtime/parser/
22 ln -s /usr/lib/libtree-sitter-vimdoc.so $PKG/usr/share/nvim/runtime/parser/vimdoc.so
23 }
|