mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 04:00:05 +02:00
tree_sitter, bump to version 0.27.0~git (#13810)
* tree_sitter, bump to version 0.27.0~git this drops fs4 and hence doesn't pull in old rustix version * Update dev-libs/tree-sitter/tree_sitter-0.27.0~git.recipe Co-authored-by: augiedoggie <augiedoggie@users.noreply.github.com> --------- Co-authored-by: augiedoggie <augiedoggie@users.noreply.github.com>
This commit is contained in:
@@ -1,21 +0,0 @@
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 764f411a..86aaefd8 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -41,7 +41,7 @@ ifneq (,$(filter $(shell uname),FreeBSD NetBSD DragonFly))
|
||||
PCLIBDIR := $(PREFIX)/libdata/pkgconfig
|
||||
endif
|
||||
|
||||
-all: libtree-sitter.a libtree-sitter.$(SOEXTVER)
|
||||
+all: libtree-sitter.$(SOEXTVER)
|
||||
|
||||
libtree-sitter.a: $(OBJ)
|
||||
$(AR) rcs $@ $^
|
||||
@@ -53,7 +53,6 @@ libtree-sitter.$(SOEXTVER): $(OBJ)
|
||||
|
||||
install: all
|
||||
install -d '$(DESTDIR)$(LIBDIR)'
|
||||
- install -m755 libtree-sitter.a '$(DESTDIR)$(LIBDIR)'/libtree-sitter.a
|
||||
install -m755 libtree-sitter.$(SOEXTVER) '$(DESTDIR)$(LIBDIR)'/libtree-sitter.$(SOEXTVER)
|
||||
ln -sf libtree-sitter.$(SOEXTVER) '$(DESTDIR)$(LIBDIR)'/libtree-sitter.$(SOEXTVER_MAJOR)
|
||||
ln -sf libtree-sitter.$(SOEXTVER) '$(DESTDIR)$(LIBDIR)'/libtree-sitter.$(SOEXT)
|
||||
@@ -1,30 +0,0 @@
|
||||
From 46a5c1cce2765a7731ed30865f4cd8bb98c01c89 Mon Sep 17 00:00:00 2001
|
||||
From: Chris Roberts <cpr420@gmail.com>
|
||||
Date: Sat, 14 Oct 2023 21:58:18 -0600
|
||||
Subject: don't install static library
|
||||
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index eb4075f..f6bf6fa 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -41,7 +41,7 @@ ifneq (,$(filter $(shell uname),FreeBSD NetBSD DragonFly))
|
||||
PCLIBDIR := $(PREFIX)/libdata/pkgconfig
|
||||
endif
|
||||
|
||||
-all: libtree-sitter.a libtree-sitter.$(SOEXTVER)
|
||||
+all: libtree-sitter.$(SOEXTVER)
|
||||
|
||||
libtree-sitter.a: $(OBJ)
|
||||
$(AR) rcs $@ $^
|
||||
@@ -61,7 +61,6 @@ install: all
|
||||
tree-sitter.pc.in > tree-sitter.pc
|
||||
|
||||
install -d '$(DESTDIR)$(LIBDIR)'
|
||||
- install -m644 libtree-sitter.a '$(DESTDIR)$(LIBDIR)'/
|
||||
install -m755 libtree-sitter.$(SOEXTVER) '$(DESTDIR)$(LIBDIR)'/
|
||||
ln -sf libtree-sitter.$(SOEXTVER) '$(DESTDIR)$(LIBDIR)'/libtree-sitter.$(SOEXTVER_MAJOR)
|
||||
ln -sf libtree-sitter.$(SOEXTVER) '$(DESTDIR)$(LIBDIR)'/libtree-sitter.$(SOEXT)
|
||||
--
|
||||
2.42.0
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
From feb2da7b3a6b8d5962786b667847a3e781263505 Mon Sep 17 00:00:00 2001
|
||||
From: PulkoMandy <pulkomandy@pulkomandy.tk>
|
||||
Date: Tue, 9 Sep 2025 20:07:53 +0200
|
||||
Subject: Fixes for Haiku:
|
||||
|
||||
- Use newer version of fs4 which pulls Rustix 1.x, that includes Haiku
|
||||
support
|
||||
- Define what to do for Haiku in endian.h
|
||||
|
||||
diff --git a/Cargo.toml b/Cargo.toml
|
||||
index 134bb08..e19b4d9 100644
|
||||
--- a/Cargo.toml
|
||||
+++ b/Cargo.toml
|
||||
@@ -118,7 +118,7 @@ ctrlc = { version = "3.4.5", features = ["termination"] }
|
||||
dialoguer = { version = "0.11.0", features = ["fuzzy-select"] }
|
||||
etcetera = "0.8.0"
|
||||
filetime = "0.2.25"
|
||||
-fs4 = "0.12.0"
|
||||
+fs4 = "0.13.1"
|
||||
git2 = "0.20.0"
|
||||
glob = "0.3.2"
|
||||
heck = "0.5.0"
|
||||
diff --git a/lib/src/portable/endian.h b/lib/src/portable/endian.h
|
||||
index f467ec5..5f88b5d 100644
|
||||
--- a/lib/src/portable/endian.h
|
||||
+++ b/lib/src/portable/endian.h
|
||||
@@ -18,6 +18,7 @@
|
||||
#if defined(HAVE_ENDIAN_H) || \
|
||||
defined(__linux__) || \
|
||||
defined(__GNU__) || \
|
||||
+ defined(__HAIKU__) || \
|
||||
defined(__illumos__) || \
|
||||
defined(__NetBSD__) || \
|
||||
defined(__OpenBSD__) || \
|
||||
--
|
||||
2.50.1
|
||||
|
||||
80
dev-libs/tree-sitter/patches/tree_sitter-0.27.0~git.patchset
Normal file
80
dev-libs/tree-sitter/patches/tree_sitter-0.27.0~git.patchset
Normal file
@@ -0,0 +1,80 @@
|
||||
From eee25f5f002b4c7a77267f80bab086946912a0fa Mon Sep 17 00:00:00 2001
|
||||
From: Luc Schrijvers <begasus@gmail.com>
|
||||
Date: Sun, 8 Mar 2026 10:13:27 +0100
|
||||
Subject: Reset rust version requirement
|
||||
|
||||
|
||||
diff --git a/Cargo.toml b/Cargo.toml
|
||||
index 1ae5b95..9ab33fb 100644
|
||||
--- a/Cargo.toml
|
||||
+++ b/Cargo.toml
|
||||
@@ -21,7 +21,7 @@ homepage = "https://tree-sitter.github.io/tree-sitter"
|
||||
keywords = [ "incremental", "parsing" ]
|
||||
license = "MIT"
|
||||
repository = "https://github.com/tree-sitter/tree-sitter"
|
||||
-rust-version = "1.90"
|
||||
+rust-version = "1.89"
|
||||
version = "0.27.0"
|
||||
|
||||
[workspace.lints.clippy]
|
||||
diff --git a/crates/language/Cargo.toml b/crates/language/Cargo.toml
|
||||
index 0e1cb8a..2d1456f 100644
|
||||
--- a/crates/language/Cargo.toml
|
||||
+++ b/crates/language/Cargo.toml
|
||||
@@ -4,7 +4,7 @@ description = "The tree-sitter Language type, used by the library and b
|
||||
version = "0.1.8"
|
||||
authors.workspace = true
|
||||
edition.workspace = true
|
||||
-rust-version = "1.90"
|
||||
+rust-version = "1.89"
|
||||
readme = "README.md"
|
||||
homepage.workspace = true
|
||||
repository.workspace = true
|
||||
diff --git a/lib/Cargo.toml b/lib/Cargo.toml
|
||||
index 3715a38..fa7e358 100644
|
||||
--- a/lib/Cargo.toml
|
||||
+++ b/lib/Cargo.toml
|
||||
@@ -4,7 +4,7 @@ version.workspace = true
|
||||
description = "Rust bindings to the Tree-sitter parsing library"
|
||||
authors.workspace = true
|
||||
edition.workspace = true
|
||||
-rust-version = "1.90"
|
||||
+rust-version = "1.89"
|
||||
readme = "binding_rust/README.md"
|
||||
homepage.workspace = true
|
||||
repository.workspace = true
|
||||
--
|
||||
2.52.0
|
||||
|
||||
|
||||
From 68b1adf6063e60c9b0bc0a35e3c2b9ee822a1f4f Mon Sep 17 00:00:00 2001
|
||||
From: Luc Schrijvers <begasus@gmail.com>
|
||||
Date: Sun, 8 Mar 2026 19:32:21 +0100
|
||||
Subject: don't install static library
|
||||
|
||||
https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-libs/tree-sitter/files/tree-sitter-0.22.2-no-static.patch
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 13f33e1..e0fceba 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
|
||||
--
|
||||
2.52.0
|
||||
|
||||
@@ -1,66 +0,0 @@
|
||||
SUMMARY="An incremental parsing system for programming tools"
|
||||
DESCRIPTION="Tree-sitter is an extendable parsing system for various programming tools."
|
||||
HOMEPAGE="https://tree-sitter.github.io/"
|
||||
COPYRIGHT="2018-2021 Max Brunsfeld"
|
||||
LICENSE="MIT"
|
||||
REVISION="7"
|
||||
SOURCE_URI="https://github.com/tree-sitter/tree-sitter/archive/refs/tags/v$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="4d37eaef8a402a385998ff9aca3e1043b4a3bba899bceeff27a7178e1165b9de"
|
||||
SOURCE_DIR="tree-sitter-$portVersion"
|
||||
PATCHES="tree-sitter-No-static-libs-gentoo.patch"
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
libVersion="0.0"
|
||||
libVersionCompat="$libVersion compat >= 0"
|
||||
|
||||
PROVIDES="
|
||||
tree_sitter$secondaryArchSuffix = $portVersion
|
||||
lib:libtree_sitter$secondaryArchSuffix = $libVersionCompat
|
||||
cmd:tree_sitter
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
tree_sitter${secondaryArchSuffix}_devel
|
||||
devel:libtree_sitter$secondaryArchSuffix = $libVersionCompat
|
||||
"
|
||||
REQUIRES_devel="
|
||||
tree_sitter$secondaryArchSuffix == $portVersion base
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:cargo$secondaryArchSuffix >= 0.61.0
|
||||
cmd:make
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
cargo fetch --locked
|
||||
make
|
||||
|
||||
cd cli
|
||||
cargo build --release --locked --offline --all-features
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make PREFIX=$prefix INCLUDEDIR=$includeDir \
|
||||
LIBDIR=$libDir install
|
||||
|
||||
install -Dm 755 target/release/tree-sitter -t $prefix/bin
|
||||
|
||||
prepareInstalledDevelLib libtree-sitter
|
||||
fixPkgconfig
|
||||
|
||||
packageEntries devel \
|
||||
"$developDir"
|
||||
}
|
||||
|
||||
@@ -1,73 +0,0 @@
|
||||
SUMMARY="An incremental parsing system for programming tools"
|
||||
DESCRIPTION="Tree-sitter is an extendable parsing system for various programming tools."
|
||||
HOMEPAGE="https://tree-sitter.github.io/"
|
||||
COPYRIGHT="2018-2025 Max Brunsfeld"
|
||||
LICENSE="MIT"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/tree-sitter/tree-sitter/archive/v$portVersion.tar.gz"
|
||||
SOURCE_DIR="tree-sitter-$portVersion"
|
||||
CHECKSUM_SHA256="178b575244d967f4920a4642408dc4edf6de96948d37d7f06e5b78acee9c0b4e"
|
||||
PATCHES="tree_sitter-$portVersion.patchset"
|
||||
|
||||
# Disabled:
|
||||
# - Needs fixes in rustix, https://github.com/bytecodealliance/rustix/pull/1515
|
||||
# - rustc crashes during build
|
||||
ARCHITECTURES="!all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="!x86"
|
||||
|
||||
libVersion="0.0"
|
||||
libVersionCompat="$libVersion compat >= 0"
|
||||
|
||||
PROVIDES="
|
||||
tree_sitter$secondaryArchSuffix = $portVersion
|
||||
lib:libtree_sitter$secondaryArchSuffix = $libVersionCompat
|
||||
cmd:tree_sitter
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
tree_sitter${secondaryArchSuffix}_devel
|
||||
devel:libtree_sitter$secondaryArchSuffix = $libVersionCompat
|
||||
"
|
||||
REQUIRES_devel="
|
||||
tree_sitter$secondaryArchSuffix == $portVersion base
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:cargo$secondaryArchSuffix >= 0.70.0
|
||||
cmd:cmake
|
||||
cmd:make
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
export CARGO_HOME=$sourceDir/.cargo
|
||||
|
||||
cargo fetch --locked
|
||||
make
|
||||
|
||||
cd cli
|
||||
cargo build --release --locked --offline --all-features
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
export CARGO_HOME=$sourceDir/.cargo
|
||||
|
||||
make PREFIX=$prefix INCLUDEDIR=$includeDir LIBDIR=$libDir install
|
||||
|
||||
install -Dm 755 target/release/tree-sitter -t $prefix/bin
|
||||
|
||||
prepareInstalledDevelLib libtree-sitter
|
||||
fixPkgconfig
|
||||
|
||||
packageEntries devel \
|
||||
"$developDir"
|
||||
}
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
SUMMARY="An incremental parsing system for programming tools"
|
||||
DESCRIPTION="Tree-sitter is an extendable parsing system for various programming tools."
|
||||
HOMEPAGE="https://tree-sitter.github.io/"
|
||||
COPYRIGHT="2018-2023 Max Brunsfeld"
|
||||
COPYRIGHT="2018-2026 Max Brunsfeld"
|
||||
LICENSE="MIT"
|
||||
REVISION="1"
|
||||
srcGitRev="20924fa4cdeb10d82ac308481e39bf8519334e55"
|
||||
srcGitRev="cf302b07d1cae984068b7eb44a6e44529566a8c9"
|
||||
SOURCE_URI="https://github.com/tree-sitter/tree-sitter/archive/$srcGitRev.tar.gz"
|
||||
CHECKSUM_SHA256="8aa9b4ad2d8ab69177912e6872dc94bb973b295e8718d62a599a49b62f9a9e5d"
|
||||
CHECKSUM_SHA256="c6654f52b0d3eddc9cdc734e44faf3919994951f3feb663f0861eddd1ee4e63f"
|
||||
SOURCE_DIR="tree-sitter-$srcGitRev"
|
||||
PATCHES="tree_sitter-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
libVersion="0.0"
|
||||
libVersion="0.27"
|
||||
libVersionCompat="$libVersion compat >= 0"
|
||||
|
||||
PROVIDES="
|
||||
tree_sitter$secondaryArchSuffix = $portVersion
|
||||
cmd:tree_sitter = $portVersion
|
||||
lib:libtree_sitter$secondaryArchSuffix = $libVersionCompat
|
||||
cmd:tree_sitter
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
@@ -35,10 +35,12 @@ REQUIRES_devel="
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libclang$secondaryArchSuffix >= 21
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:cargo$secondaryArchSuffix
|
||||
cmd:cmake
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:cargo$secondaryArchSuffix >= 0.70.0
|
||||
cmd:make
|
||||
"
|
||||
|
||||
@@ -46,14 +48,11 @@ BUILD()
|
||||
{
|
||||
export CARGO_HOME=$sourceDir/.cargo
|
||||
|
||||
# will become the default with rust 1.70
|
||||
export CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse
|
||||
|
||||
cargo fetch --locked
|
||||
cargo fetch
|
||||
make
|
||||
|
||||
cd cli
|
||||
cargo build --release --locked --offline --all-features
|
||||
cd crates/cli
|
||||
cargo -v build --release --offline --no-default-features
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
@@ -65,9 +64,12 @@ INSTALL()
|
||||
|
||||
install -Dm 755 target/release/tree-sitter -t $prefix/bin
|
||||
|
||||
prepareInstalledDevelLib libtree-sitter
|
||||
prepareInstalledDevelLib \
|
||||
libtree-sitter
|
||||
fixPkgconfig
|
||||
|
||||
ln -s $libDir/libtree-sitter.so.0.27 $libDir/libtree-sitter.so.0
|
||||
|
||||
packageEntries devel \
|
||||
"$developDir"
|
||||
}
|
||||
Reference in New Issue
Block a user