ports/contrib (3.7): tree-sitter-c: initial commit, version 0.20.2
commit 73656d1036d53941d82a362ca82cf1c22213cc2c Author: Tim Biermann <tbier@posteo.de> Date: Sun Nov 27 17:59:17 2022 +0000 tree-sitter-c: initial commit, version 0.20.2 diff --git a/tree-sitter-c/.footprint b/tree-sitter-c/.footprint new file mode 100644 index 000000000..04c452c2e --- /dev/null +++ b/tree-sitter-c/.footprint @@ -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 diff --git a/tree-sitter-c/.signature b/tree-sitter-c/.signature new file mode 100644 index 000000000..4d631de76 --- /dev/null +++ b/tree-sitter-c/.signature @@ -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 diff --git a/tree-sitter-c/Pkgfile b/tree-sitter-c/Pkgfile new file mode 100644 index 000000000..1fb0317ff --- /dev/null +++ b/tree-sitter-c/Pkgfile @@ -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-$versio...) + +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 +}
participants (1)
-
crux@crux.nu