Update package version to 0.26.8

This commit is contained in:
2026-04-30 17:58:43 +03:00
parent b9250d93fe
commit aaedb01477
2 changed files with 28 additions and 17 deletions
+9 -3
View File
@@ -1,24 +1,30 @@
name: tree-sitter name: tree-sitter
description: An incremental parsing system for programming tools description: An incremental parsing system for programming tools
version: 0.25.10 version: 0.26.8
revision: 1 revision: 1
url: https://github.com/tree-sitter/tree-sitter url: https://github.com/tree-sitter/tree-sitter
license: MIT license: MIT
maintainers:
- [email protected]
architecture: any architecture: any
type: source type: source
depends:
- glibc
make_depends: make_depends:
- clang
- cmake - cmake
- rustc - rustc
downloads: downloads:
- url: https://github.com/tree-sitter/tree-sitter/archive/refs/tags/v${BPM_PKG_VERSION}.tar.gz - url: https://github.com/tree-sitter/tree-sitter/archive/refs/tags/v${BPM_PKG_VERSION}.tar.gz
extract_to: ${BPM_SOURCE} extract_to: ${BPM_SOURCE}
extract_strip_components: 1 extract_strip_components: 1
checksum: ad5040537537012b16ef6e1210a572b927c7cdc2b99d1ee88d44a7dcdc3ff44c checksum: e6826b7533ec3a885aba598377a6d20b5a6321ff3db76968e960c2352d3a5077
split_packages: split_packages:
- name: tree-sitter - name: tree-sitter
- name: tree-sitter-cli - name: tree-sitter-cli
description: CLI tool for tree-sitter description: CLI tool for tree-sitter
depends: depends:
- glibc
- gcc-libs - gcc-libs
optional_depends: optional_depends:
- nodejs - nodejs:For the generate subcommand
+19 -14
View File
@@ -5,31 +5,30 @@
# The prepare function is executed in the root of the temp directory # The prepare function is executed in the root of the temp directory
# This function is used for putting downloaded files to the correct location or applying patches # This function is used for putting downloaded files to the correct location or applying patches
prepare() { prepare() {
cd "$BPM_SOURCE"/cli cd "$BPM_SOURCE"/crates/cli
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')" cargo fetch --locked --target "$(rustc --print host-tuple)"
} }
# The build function is executed in the source directory # The build function is executed in the source directory
# This function is used to compile the source code # This function is used to compile the source code
build() { build() {
# Build library # Build library
mkdir lib/build cmake -B build -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON
cd lib/build cmake --build build
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON ..
make
# Build command-line interface # Build command-line interface
cd "$BPM_SOURCE"/cli cd "$BPM_SOURCE"/crates/cli
cargo build --release --locked --offline cargo build --release --locked --offline
# Build shell completions
for completion in bash elvish fish nushell zsh; do
cargo run --frozen --release -- complete --shell $completion > $completion-completions
done
} }
# Function for packaging the main tree sitter library # Function for packaging the main tree sitter library
package_tree-sitter() { package_tree-sitter() {
cd lib/build DESTDIR="$BPM_OUTPUT" cmake --install build
make DESTDIR="$BPM_OUTPUT" install
# Install package license # Install package license
install -Dm644 "$BPM_SOURCE"/LICENSE "$BPM_OUTPUT"/usr/share/licenses/tree-sitter/LICENSE install -Dm644 "$BPM_SOURCE"/LICENSE "$BPM_OUTPUT"/usr/share/licenses/tree-sitter/LICENSE
@@ -37,10 +36,16 @@ package_tree-sitter() {
# Function for packaging the tree sitter cli tools # Function for packaging the tree sitter cli tools
package_tree-sitter-cli() { package_tree-sitter-cli() {
cd cli
install -D "$BPM_SOURCE"/target/release/tree-sitter "$BPM_OUTPUT"/usr/bin/tree-sitter install -D "$BPM_SOURCE"/target/release/tree-sitter "$BPM_OUTPUT"/usr/bin/tree-sitter
# Install shell completions
cd crates/cli
install -Dm644 bash-completions "$BPM_OUTPUT"/usr/share/bash-completion/completions/tree-sitter
install -Dm644 elvish-completions "$BPM_OUTPUT"/usr/share/elvish/lib/tree-sitter.elv
install -Dm644 fish-completions "$BPM_OUTPUT"/usr/share/fish/vendor_completions.d/tree-sitter.fish
install -Dm644 nushell-completions "$BPM_OUTPUT"/usr/share/nushell/vendor/autoload/tree-sitter.nu
install -Dm644 zsh-completions "$BPM_OUTPUT"/usr/share/zsh/site-functions/_tree-sitter
# Install package license # Install package license
install -Dm644 "$BPM_SOURCE"/LICENSE "$BPM_OUTPUT"/usr/share/licenses/tree-sitter/LICENSE install -Dm644 "$BPM_SOURCE"/LICENSE "$BPM_OUTPUT"/usr/share/licenses/tree-sitter/LICENSE
} }