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