mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-02-22 00:02:23 +01:00
35 lines
1.1 KiB
Plaintext
35 lines
1.1 KiB
Plaintext
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
|
|
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
|
|
pkgname=tree-sitter-cpp
|
|
pkgver=0.20.0
|
|
pkgrel=0
|
|
pkgdesc="C++ grammar for tree-sitter"
|
|
url="https://github.com/tree-sitter/tree-sitter-cpp"
|
|
arch="all"
|
|
license="MIT"
|
|
makedepends="tree-sitter-dev"
|
|
install_if="tree-sitter-grammars"
|
|
source="https://github.com/tree-sitter/tree-sitter-cpp/archive/v$pkgver/tree-sitter-cpp-$pkgver.tar.gz"
|
|
options="!check" # no tests for shared lib
|
|
|
|
build() {
|
|
cd src
|
|
|
|
cc $CFLAGS -fPIC -Wall -std=c99 -c ./*.c
|
|
c++ $CXXFLAGS -fPIC -Wall -c ./*.cc
|
|
c++ $LDFLAGS -shared -Wl,--no-undefined -o lib$pkgname.so ./*.o
|
|
}
|
|
|
|
package() {
|
|
install -D -m755 src/lib$pkgname.so -t "$pkgdir"/usr/lib/
|
|
|
|
# Create symlink for Neovim
|
|
install -d "$pkgdir"/usr/share/nvim/runtime/parser
|
|
ln -s ../../../../lib/lib$pkgname.so \
|
|
"$pkgdir"/usr/share/nvim/runtime/parser/${pkgname#tree-sitter-}.so
|
|
}
|
|
|
|
sha512sums="
|
|
c97d02c8250c93721ed5b951c97cdb1cf6558e20cbef353a33c9937f6b3116e328bbdd4e9e7a70a23dba3e144cbd6318e37ebbb9b6345ac085c62100d09ff34d tree-sitter-cpp-0.20.0.tar.gz
|
|
"
|