mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
74 lines
1.7 KiB
Bash
74 lines
1.7 KiB
Bash
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"
|
|
}
|
|
|