25 lines
722 B
Plaintext
25 lines
722 B
Plaintext
# Description: Tree-sitter parser for VimL
|
|
# URL: https://github.com/vigoux/tree-sitter-viml
|
|
# Maintainer: Tim Biermann, tbier at posteo dot de
|
|
# Depends on: npm tree-sitter
|
|
|
|
name=tree-sitter-viml
|
|
version=0.2.0
|
|
release=1
|
|
source=(https://github.com/vigoux/tree-sitter-viml/archive/v$version/$name-$version.tar.gz)
|
|
|
|
build() {
|
|
cd $name-$version
|
|
|
|
tree-sitter generate --log
|
|
cd src
|
|
export CFLAGS+=' -fPIC'
|
|
cc $CFLAGS -std=c99 -c parser.c
|
|
cc $CFLAGS -c scanner.c
|
|
cc $LDFLAGS -shared parser.o scanner.o -o parser.so
|
|
|
|
install -Dm 644 parser.so $PKG/usr/lib/libtree-sitter-viml.so
|
|
install -d $PKG/usr/share/nvim/runtime/parser/
|
|
ln -s /usr/lib/libtree-sitter-viml.so $PKG/usr/share/nvim/runtime/parser/viml.so
|
|
}
|