diff --git a/build/meta/extra-build-tools.p5m b/build/meta/extra-build-tools.p5m index 0f6b29ea0..cbbe0f64a 100644 --- a/build/meta/extra-build-tools.p5m +++ b/build/meta/extra-build-tools.p5m @@ -67,6 +67,7 @@ depend fmri=ooce/library/security/libsasl2 type=require depend fmri=ooce/library/serf type=require depend fmri=ooce/library/slang type=require depend fmri=ooce/library/tiff type=require +depend fmri=ooce/library/tree-sitter type=require depend fmri=ooce/library/unbound type=require depend fmri=ooce/library/yaml type=require depend fmri=ooce/multimedia/dav1d type=require diff --git a/build/tree-sitter/build.sh b/build/tree-sitter/build.sh new file mode 100755 index 000000000..85933d99e --- /dev/null +++ b/build/tree-sitter/build.sh @@ -0,0 +1,58 @@ +#!/usr/bin/bash +# +# {{{ CDDL HEADER +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# }}} + +# Copyright 2024 OmniOS Community Edition (OmniOSce) Association. + +. ../../lib/build.sh + +PROG=tree-sitter +VER=0.22.2 +PKG=ooce/library/tree-sitter +SUMMARY="$PROG" +DESC="$PROG - parser generator tool and an incremental parsing library" + +set_clangver + +pre_configure() { + typeset arch=$1 + + save_variables CFLAGS LDFLAGS + subsume_arch $arch CFLAGS LDFLAGS + + MAKE_ARGS_WS=" + CFLAGS=\"$CFLAGS\" + LDFLAGS=\"$LDFLAGS\" + " + + export PREFIX + export LIBDIR=$PREFIX/${LIBDIRS[$arch]} + + restore_variables CFLAGS LDFLAGS + + # No configure + false +} + +LDFLAGS[i386]+=" -lssp_ns" + +init +download_source $PROG v$VER +patch_source +prep_build +build +make_package +clean_up + +# Vim hints +# vim:ts=4:sw=4:et:fdm=marker diff --git a/build/tree-sitter/local.mog b/build/tree-sitter/local.mog new file mode 100644 index 000000000..5eab9a2b4 --- /dev/null +++ b/build/tree-sitter/local.mog @@ -0,0 +1,17 @@ +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. + +# Copyright 2024 OmniOS Community Edition (OmniOSce) Association. + +# Drop static libraries + drop> + +license LICENSE license=MIT + diff --git a/doc/baseline b/doc/baseline index 12891800c..d5eed81f3 100644 --- a/doc/baseline +++ b/doc/baseline @@ -175,6 +175,7 @@ extra.omnios ooce/library/security/libsasl2 extra.omnios ooce/library/serf extra.omnios ooce/library/slang extra.omnios ooce/library/tiff +extra.omnios ooce/library/tree-sitter extra.omnios ooce/library/unbound extra.omnios ooce/library/unistring extra.omnios ooce/library/yaml diff --git a/doc/baseline.aarch64 b/doc/baseline.aarch64 index 9a20b09a4..390cebb27 100644 --- a/doc/baseline.aarch64 +++ b/doc/baseline.aarch64 @@ -33,6 +33,7 @@ extra.omnios ooce/library/popt extra.omnios ooce/library/postgresql-14 extra.omnios ooce/library/slang extra.omnios ooce/library/tiff +extra.omnios ooce/library/tree-sitter extra.omnios ooce/library/unbound extra.omnios ooce/library/yaml extra.omnios ooce/multimedia/dav1d diff --git a/doc/packages.md b/doc/packages.md index afdc69e6c..11a5c1cc4 100644 --- a/doc/packages.md +++ b/doc/packages.md @@ -139,6 +139,7 @@ | ooce/library/serf | 1.3.10 | https://downloads.apache.org/serf/ | [omniosorg](https://github.com/omniosorg) | ooce/library/slang | 2.3.3 | https://www.jedsoft.org/releases/slang/ | [omniosorg](https://github.com/omniosorg) | ooce/library/tiff | 4.6.0 | https://download.osgeo.org/libtiff/ https://libtiff.gitlab.io/libtiff/ | [omniosorg](https://github.com/omniosorg) +| ooce/library/tree-sitter | 0.22.2 | https://github.com/tree-sitter/tree-sitter/releases | [omniosorg](https://github.com/omniosorg) | ooce/library/unistring | 1.1 | https://ftp.gnu.org/gnu/libunistring/ | [omniosorg](https://github.com/omniosorg) | ooce/library/yaml | 0.2.5 | https://github.com/yaml/libyaml/releases | [omniosorg](https://github.com/omniosorg) | ooce/multimedia/dav1d | 1.4.1 | https://downloads.videolan.org/pub/videolan/dav1d/ https://www.videolan.org/projects/dav1d.html | [omniosorg](https://github.com/omniosorg) diff --git a/doc/pkglist.aarch64 b/doc/pkglist.aarch64 index faa70f0d7..49599d15e 100644 --- a/doc/pkglist.aarch64 +++ b/doc/pkglist.aarch64 @@ -45,6 +45,7 @@ ooce/util/stress-ng ooce/library/libarchive ooce/library/yaml ooce/library/popt +ooce/library/tree-sitter ############################################################################### .SYSROOT ooce/audio/flac