|
root / base / tree-sitter
tree-sitter Plain Text 44 lines 1.5 KB
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/sh
# Build script for tree-sitter (plain Makefile, no deps, no libtool - links
# the shared object directly via $(CC) -shared, gated on `$(CC) -dumpmachine`
# rather than `uname`, so it already falls through cleanly to the generic
# ELF .so branch on Hammerhead).
#
# GOTCHA (1b-2): lib/src/portable/endian.h picks its `#include <endian.h>`
# branch only when __illumos__ (or __linux__/etc) is defined; Hammerhead's
# GCC predefines __sun/__sun__, not __illumos__, so unpatched it falls to
# the final `#error platform not supported`. illumos's own
# /usr/include/endian.h already declares htobe16/le16toh/etc as libc
# externs (confirmed present) - just needs the macro to select that arm.
set -e
cd "$SRCDIR"

export CFLAGS="${CFLAGS} -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS -D__illumos__"

gmake -j${JOBS:-1} PREFIX="$PREFIX"
gmake install PREFIX="$PREFIX" DESTDIR="$PKGDIR"
# tree-sitter - incremental parsing library (neovim's syntax/highlight engine)
# https://tree-sitter.github.io/tree-sitter/

[package]
name = "tree-sitter"
version = "0.26.11"
release = 1
description = "An incremental parsing system for programming tools"
url = "https://tree-sitter.github.io/tree-sitter/"
license = "MIT"
maintainer = "Chris Tusa <chris.tusa@leafscale.com>"
arch = "x86_64"

[dependencies]
runtime = []
build = []

[[source]]
file = "tree-sitter-0.26.11.tar.gz"
urls = ["https://github.com/tree-sitter/tree-sitter/archive/refs/tags/v0.26.11.tar.gz"]
checksum = "1bab01ed21464f3272665b9c60e39ee79f68da1333e80b23f2c9356569d06971"

[build]
parallel = true