#!/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 ` # 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 " 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