blob: 5002729cde70fa171507943ae4866cc6839ae513 (
plain)
1 # Description: Tree-sitter parser for VimL
2 # URL: https://github.com/vigoux/tree-sitter-viml
3 # Maintainer: Tim Biermann, tbier at posteo dot de
4 # Depends on: npm tree-sitter
5
6 name=tree-sitter-viml
7 version=0.2.0
8 release=1
9 source=(https://github.com/vigoux/tree-sitter-viml/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 $CFLAGS -c scanner.c
19 cc $LDFLAGS -shared parser.o scanner.o -o parser.so
20
21 install -Dm 644 parser.so $PKG/usr/lib/libtree-sitter-viml.so
22 install -d $PKG/usr/share/nvim/runtime/parser/
23 ln -s /usr/lib/libtree-sitter-viml.so $PKG/usr/share/nvim/runtime/parser/viml.so
24 }
|