diff options
author | Tim Biermann <tbier@posteo.de> | 2022-11-27 17:59:17 +0000 |
---|---|---|
committer | Tim Biermann <tbier@posteo.de> | 2022-11-27 18:02:43 +0000 |
commit | 73656d1036d53941d82a362ca82cf1c22213cc2c (patch) | |
tree | 4f82917c7546bbf60a8d7c2bf19e108a78767761 /tree-sitter-c | |
parent | d1864112bd69432ba3c6d649ca4d304d09021388 (diff) | |
download | contrib-73656d1036d53941d82a362ca82cf1c22213cc2c.tar.gz contrib-73656d1036d53941d82a362ca82cf1c22213cc2c.tar.xz |
tree-sitter-c: initial commit, version 0.20.2
Diffstat (limited to 'tree-sitter-c')
-rw-r--r-- | tree-sitter-c/.footprint | 8 | ||||
-rw-r--r-- | tree-sitter-c/.signature | 5 | ||||
-rw-r--r-- | tree-sitter-c/Pkgfile | 23 |
3 files changed, 36 insertions, 0 deletions
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-$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 +} |