dev-libs/tree-sitter: Sync with Gentoo

It's from Gentoo commit 3d0ea530037307459b3f24fda21921b8b92470cd.

Signed-off-by: Flatcar Buildbot <buildbot@flatcar-linux.org>
This commit is contained in:
Flatcar Buildbot 2026-03-02 07:24:38 +00:00 committed by Krzesimir Nowak
parent 70655e827c
commit 88cd38720a
6 changed files with 154 additions and 2 deletions

View File

@ -2,3 +2,6 @@ DIST tree-sitter-0.24.3.tar.gz 3018668 BLAKE2B fa703b6250e11274d0c5ebccb741cc41f
DIST tree-sitter-0.25.10.tar.gz 864648 BLAKE2B ae80d0e995cc5e3b40198caa3a7845f209f7df87948020d6b0a6669899bbeb113d852e2197cdaf1fe54944cdc8362cb73487af33960969fac087f45d33025c48 SHA512 f0465a2fabe303c1b62f1f55ed08aa57372ac11370d229adcccd99b5e8067be53e92da281cdfbcd034e2ecefb33ac90a119eeac9035670ac8fbaa4242cb87a11
DIST tree-sitter-0.25.6.tar.gz 857070 BLAKE2B 3bb6b6130e1a96c96b5af4608bf60f8bbd00cbf1fdc9905b7a6169db52351c2ae3a907eca444363ab2b3185a54d0080aa487cbe252e6e015c1cd7a735e420679 SHA512 47213b68233d376e145e3f42b4674d64e7ff27436f4a028e751d9ad8494469ff67b002ce184346d3f6848df2c91386c28127827c43a8bea34da5e84f2530f02f
DIST tree-sitter-0.25.8.tar.gz 857462 BLAKE2B aa3f0d9056544bb6ef1127723563449c7672e06b5289e1596f2c1b5826905c578830c7e6c3bc58a91e388d647a5a5629e71f5f0af2a431e73c3be4f93ce5b6f4 SHA512 0d26d0699f61fa27b5adbc298ff53f8e0f5b9f2f1b216744200f6f50cff777c9c5a5a5b92304a4d1889fccd9d8a6dd6b7d4947bac907a91850322281f754ea53
DIST tree-sitter-0.26.3.tar.gz 900789 BLAKE2B 8532bd460f3fd4e1cec9daecc45fcc85638e5ebde474fc32ccbb9ba77611cf8aff41653295b9b1c267aac62f8e2cf23345193271cc64c975895dd04a3d988c11 SHA512 ae2b59938ce41f6936d98e454adfc05a3890b2b3d24485b0d992e6f1d2dd1e8d9124e6a3eddc3d594f0cdb831362ff2c9b44b72364b22d3526150d23a9d15781
DIST tree-sitter-0.26.5.tar.gz 905701 BLAKE2B 3771c0b31704f6182ae10c2629566984883a9bfcfc914e40a3d30889eb3ef30f19213a45e9732b067042893dd89e27b51b8f5fa50f2d7d8cec81aeb8666ebece SHA512 c8ffa86caf5841208dd2c987c6437111c7514635ebc76e910deb38ba64252caa99ae8453f1acd8af8e167cc2c7fe7194d481cd53533802601b331c60d20f2a49
DIST tree-sitter-0.26.6.tar.gz 906770 BLAKE2B c6fcbc901f86795d6e5de5e22d4b7f34425f1f25ff9134de27baa0a68d917c376accd4a7a9d33faaee4e82e4dd7440085a06b55d5f57e5fe9756c195147867d5 SHA512 33ce5617ac53e276cccc8fa34e3a6b3e29a5bd572b381da4a7d6d78cbb7485d85120be8c0e25e02d3fbae4c36793b02bcfd788a2cdfe73f026742b184e16d572

View File

@ -0,0 +1,21 @@
diff --git a/Makefile b/Makefile
index 2098d27..0bbacaf 100644
--- a/Makefile
+++ b/Makefile
@@ -52,7 +52,7 @@ ifneq ($(filter $(shell uname),FreeBSD NetBSD DragonFly),)
endif
endif
-all: libtree-sitter.a libtree-sitter.$(SOEXT) tree-sitter.pc
+all: libtree-sitter.$(SOEXT) tree-sitter.pc
libtree-sitter.a: $(OBJ)
$(AR) $(ARFLAGS) $@ $^
@@ -86,7 +86,6 @@ install: all
install -d '$(DESTDIR)$(INCLUDEDIR)'/tree_sitter '$(DESTDIR)$(PCLIBDIR)' '$(DESTDIR)$(LIBDIR)'
install -m644 lib/include/tree_sitter/api.h '$(DESTDIR)$(INCLUDEDIR)'/tree_sitter/api.h
install -m644 tree-sitter.pc '$(DESTDIR)$(PCLIBDIR)'/tree-sitter.pc
- install -m644 libtree-sitter.a '$(DESTDIR)$(LIBDIR)'/libtree-sitter.a
ifneq ($(findstring mingw32,$(MACHINE)),)
install -d '$(DESTDIR)$(BINDIR)'
install -m755 libtree-sitter.dll '$(DESTDIR)$(BINDIR)'/libtree-sitter.dll

View File

@ -0,0 +1,50 @@
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit optfeature toolchain-funcs
DESCRIPTION="Tree-sitter is a parser generator tool and an incremental parsing library"
HOMEPAGE="https://github.com/tree-sitter/tree-sitter"
if [[ ${PV} == *9999* ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/${PN}/${PN}"
else
SRC_URI="https://github.com/${PN}/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos"
fi
LICENSE="MIT"
# ABI is not stable. Revisit after tree-sitter-1.0.
# https://bugs.gentoo.org/930039
# https://github.com/tree-sitter/tree-sitter/pull/3302
SLOT="0/${PV}"
RESTRICT="test" # tests are for CLI and not the lib
PATCHES=(
"${FILESDIR}/${PN}-0.26.3-no-static.patch"
)
src_prepare() {
default
tc-export CC
}
src_compile() {
emake \
PREFIX="${EPREFIX}/usr" \
LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
STRIP="" # bug 930020
}
src_install() {
emake DESTDIR="${D}" \
PREFIX="${EPREFIX}/usr" \
LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
install
}
pkg_postinst() {
optfeature "building and testing grammars" dev-util/tree-sitter-cli
}

View File

@ -0,0 +1,50 @@
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit optfeature toolchain-funcs
DESCRIPTION="Tree-sitter is a parser generator tool and an incremental parsing library"
HOMEPAGE="https://github.com/tree-sitter/tree-sitter"
if [[ ${PV} == *9999* ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/${PN}/${PN}"
else
SRC_URI="https://github.com/${PN}/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos"
fi
LICENSE="MIT"
# ABI is not stable. Revisit after tree-sitter-1.0.
# https://bugs.gentoo.org/930039
# https://github.com/tree-sitter/tree-sitter/pull/3302
SLOT="0/${PV}"
RESTRICT="test" # tests are for CLI and not the lib
PATCHES=(
"${FILESDIR}/${PN}-0.26.3-no-static.patch"
)
src_prepare() {
default
tc-export CC
}
src_compile() {
emake \
PREFIX="${EPREFIX}/usr" \
LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
STRIP="" # bug 930020
}
src_install() {
emake DESTDIR="${D}" \
PREFIX="${EPREFIX}/usr" \
LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
install
}
pkg_postinst() {
optfeature "building and testing grammars" dev-util/tree-sitter-cli
}

View File

@ -0,0 +1,28 @@
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake optfeature
DESCRIPTION="Tree-sitter is a parser generator tool and an incremental parsing library"
HOMEPAGE="https://github.com/tree-sitter/tree-sitter"
if [[ ${PV} == *9999* ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/${PN}/${PN}"
else
SRC_URI="https://github.com/${PN}/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos"
fi
LICENSE="MIT"
# ABI is not stable. Revisit after tree-sitter-1.0.
# https://bugs.gentoo.org/930039
# https://github.com/tree-sitter/tree-sitter/pull/3302
SLOT="0/${PV}"
RESTRICT="test" # tests are for CLI and not the lib
pkg_postinst() {
optfeature "building and testing grammars" dev-util/tree-sitter-cli
}

View File

@ -1,4 +1,4 @@
# Copyright 1999-2024 Gentoo Authors
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@ -23,7 +23,7 @@ SLOT="0/${PV}"
RESTRICT="test" # tests are for CLI and not the lib
PATCHES=(
"${FILESDIR}/${PN}-0.22.2-no-static.patch"
"${FILESDIR}/${PN}-0.26.3-no-static.patch"
)
src_prepare() {