mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-05-01 03:00:26 -04:00
* tree_sitter -> 0.26.8 in updater-tree_sitter-0.26.8 * updater-tree_sitter-0.26.8: Package File Update Run on linux/386 container. * updater-tree_sitter-0.26.8: Package File Update Run on linux/amd64 container. * updater-tree_sitter-0.26.8: Package File Update Run on linux/arm/v7 container. --------- Co-authored-by: github-merge-queue <github-merge-queue@users.noreply.github.com> Co-authored-by: chromebrew-actions[bot] <chromebrew-actions[bot]@users.noreply.github.com>
42 lines
1.3 KiB
Ruby
42 lines
1.3 KiB
Ruby
# Adapted from Arch Linux tree-sitter PKGBUILD at:
|
|
# https://github.com/archlinux/svntogit-community/raw/packages/tree-sitter/trunk/PKGBUILD
|
|
|
|
require 'package'
|
|
|
|
class Tree_sitter < Package
|
|
description 'An incremental parsing system for programming tools'
|
|
homepage 'https://github.com/tree-sitter/tree-sitter'
|
|
version '0.26.8'
|
|
license 'MIT'
|
|
compatibility 'all'
|
|
source_url 'https://github.com/tree-sitter/tree-sitter.git'
|
|
git_hashtag "v#{version.split('-').first}"
|
|
binary_compression 'tar.zst'
|
|
|
|
binary_sha256({
|
|
aarch64: '254d04b1e29a58015d0cd9efe605a4a0cbc1bf1c71371487f67f943f0021b5ba',
|
|
armv7l: '254d04b1e29a58015d0cd9efe605a4a0cbc1bf1c71371487f67f943f0021b5ba',
|
|
i686: 'ac35ef12ba48177bbc325e030cd4fc14b5729b5972e803ab983ee051be3f07d7',
|
|
x86_64: '4ff0ea218e624831f760be2c003683a724110f6dd278c84402a53c765dc97d05'
|
|
})
|
|
|
|
depends_on 'gcc_lib' => :executable
|
|
depends_on 'git' => :build
|
|
depends_on 'glibc' => :library
|
|
depends_on 'llvm' => :build
|
|
depends_on 'rust' => :build
|
|
|
|
def self.patch
|
|
system "sed -i 's,PREFIX)/lib,PREFIX)/#{ARCH_LIB},' Makefile"
|
|
end
|
|
|
|
def self.install
|
|
system "make DESTDIR=#{CREW_DEST_DIR} PREFIX=#{CREW_PREFIX} install"
|
|
system "cargo install \
|
|
--no-track \
|
|
--profile=release \
|
|
--root #{CREW_DEST_PREFIX}\
|
|
tree-sitter-cli"
|
|
end
|
|
end
|