tree-sitter-c: initial commit, version 0.20.2

This commit is contained in:
Tim Biermann 2022-11-27 17:59:17 +00:00
parent d1864112bd
commit 73656d1036
3 changed files with 36 additions and 0 deletions

8
tree-sitter-c/.footprint Normal file
View File

@ -0,0 +1,8 @@
drwxr-xr-x root/root usr/
drwxr-xr-x root/root usr/lib/
-rw-r--r-- root/root usr/lib/libtree-sitter-c.so
drwxr-xr-x root/root usr/share/
drwxr-xr-x root/root usr/share/nvim/
drwxr-xr-x root/root usr/share/nvim/runtime/
drwxr-xr-x root/root usr/share/nvim/runtime/parser/
lrwxrwxrwx root/root usr/share/nvim/runtime/parser/c.so -> /usr/lib/libtree-sitter-c.so

5
tree-sitter-c/.signature Normal file
View File

@ -0,0 +1,5 @@
untrusted comment: verify with /etc/ports/contrib.pub
RWSagIOpLGJF3+FjPgyQC4Bx90CA7ri2dMU9+2duXsebXKt/evjWUurEgdhVe0XllNS/J3i6AqmFz/dOiYPXSpYGGvGZVLowbgw=
SHA256 (Pkgfile) = 6473f1700e4d20f96d5f333646f797e201167d8645fdcc03f4e05394f2baf186
SHA256 (.footprint) = 1045ba851cb0a5641a5ff8f98bd2615634daef27bfba2c9ddc0bd6feea3f7130
SHA256 (tree-sitter-c-0.20.2.tar.gz) = af66fde03feb0df4faf03750102a0d265b007e5d957057b6b293c13116a70af2

23
tree-sitter-c/Pkgfile Normal file
View File

@ -0,0 +1,23 @@
# Description: C grammar for tree-sitter
# URL: https://github.com/tree-sitter/tree-sitter-c
# Maintainer: Tim Biermann, tbier at posteo dot de
# Depends on: npm tree-sitter
name=tree-sitter-c
version=0.20.2
release=1
source=(https://github.com/tree-sitter/tree-sitter-c/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 $LDFLAGS -shared parser.o -o parser.so
install -Dm 644 parser.so $PKG/usr/lib/libtree-sitter-c.so
install -d $PKG/usr/share/nvim/runtime/parser/
ln -s /usr/lib/libtree-sitter-c.so $PKG/usr/share/nvim/runtime/parser/c.so
}