aboutsummaryrefslogtreecommitdiffstats
path: root/community/helix/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/helix/APKBUILD')
-rw-r--r--community/helix/APKBUILD55
1 files changed, 32 insertions, 23 deletions
diff --git a/community/helix/APKBUILD b/community/helix/APKBUILD
index f31aa2e1d1a..5f3c0bd6f56 100644
--- a/community/helix/APKBUILD
+++ b/community/helix/APKBUILD
@@ -1,29 +1,23 @@
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=helix
-pkgver=22.03
+pkgver=24.03
pkgrel=0
pkgdesc="A post-modern modal text editor"
url="https://helix-editor.com/"
-arch="aarch64 armhf armv7 ppc64le x86 x86_64" # blocked by rust/cargo
+arch="aarch64 armhf armv7 ppc64le x86 x86_64" # blocked by rust/cargo
license="MPL-2.0"
-makedepends="cargo"
-checkdepends="tree-sitter-rust"
+makedepends="cargo cargo-auditable"
+checkdepends="tree-sitter-rust tree-sitter-ruby"
+options="net"
install="$pkgname.post-install"
# This is needed just for tests.
-_tsrust_ver="0.20.0"
+_tsrust_ver="0.20.4"
source="https://github.com/helix-editor/helix/archive/$pkgver/helix-$pkgver.tar.gz
https://github.com/tree-sitter/tree-sitter-rust/archive/v$_tsrust_ver/tree-sitter-rust-$_tsrust_ver.tar.gz
runtime-dir-fhs-location.patch
- ungit.patch
"
-# Reduce the binary size - 9.6 -> 5.4 MiB (v0.6.0).
-export CARGO_PROFILE_RELEASE_CODEGEN_UNITS=1
-export CARGO_PROFILE_RELEASE_LTO="true"
-export CARGO_PROFILE_RELEASE_OPT_LEVEL="s"
-export CARGO_PROFILE_RELEASE_PANIC="abort"
-
# Don't build tree-sitter languages, we provide them in standalone aports.
export HELIX_DISABLE_AUTO_GRAMMAR_BUILD=1
@@ -32,33 +26,48 @@ prepare() {
# This is needed for running tests.
mkdir -p runtime/grammars/sources
- ln -s /usr/lib/tree-sitter/rust.so runtime/grammars/
+ ln -s /usr/lib/tree-sitter/rust.so runtime/grammars/rust.so
+ ln -s /usr/lib/tree-sitter/ruby.so runtime/grammars/ruby.so
ln -s "$srcdir"/tree-sitter-rust-$_tsrust_ver runtime/grammars/sources/rust
- cargo fetch --locked
+ cargo fetch --target="$CTARGET" --locked
}
build() {
- cargo build --frozen --release
+ cargo auditable build --frozen --release
}
check() {
- cargo test --frozen --workspace
+ # This is needed for following tests:
+ # helix-vcs::src::git::test::modified_file
+ # helix-vcs::src::git::test::symlink
+ # helix-vcs::src::git::test::unmodified_file
+ unset GIT_CEILING_DIRECTORIES
+
+ # XXX: test_treesitter_indent_cpp is somehow broken
+ cargo test --frozen --workspace -- \
+ --skip test_treesitter_indent_cpp
}
package() {
install -D -m755 target/release/hx -t "$pkgdir"/usr/bin/
- install -d -m755 "$pkgdir"/usr/share/$pkgname
- cp -r runtime "$pkgdir"/usr/share/$pkgname/
+ install -D -m644 contrib/Helix.desktop -t "$pkgdir"/usr/share/applications/
+ install -D -m644 logo.svg "$pkgdir"/usr/share/icons/hicolor/scalable/apps/Helix.svg
+
+ # Remove helix grammars and queries, use system ones instead.
+ rm -rf runtime/queries
+ rm -rf runtime/grammars
+
+ install -d -m755 "$pkgdir"/usr/share/"$pkgname"
+ cp -r runtime "$pkgdir"/usr/share/"$pkgname"
- rm -rf "$pkgdir"/usr/share/$pkgname/runtime/grammars
ln -Ts ../../../lib/tree-sitter "$pkgdir"/usr/share/$pkgname/runtime/grammars
+ ln -Ts ../../tree-sitter/queries "$pkgdir"/usr/share/$pkgname/runtime/queries
}
sha512sums="
-17cb95f1f0e7fde37b3b25bd214db9555db537e637839701baaaff0cfcf4e71b2f957fddeb2f06f28afa6adec71f03bb383d6796fb6fe11761d658cee1ccfad9 helix-22.03.tar.gz
-1c7283e973f50989980a5a05217d664e87665c5ea2338978deaf0cf88f624c45fde8162848c68bb3b8836d32cbf9be80b1da6fa7aa03fa3cab8d8efb49e3694c tree-sitter-rust-0.20.0.tar.gz
-2b372ab19c6b30d5edb0ff9084bfd67ce339ea76583347214f827b41ce9caeb4fac48ea9f8dc5497e9c0cfe05fc13b758711a9ec0a76cbe459f406e47fce2a23 runtime-dir-fhs-location.patch
-229119f877a4270ca543df6a00e4acc160dc8dfc28c27b28eff22999d66cdc650ed74f12c28cf114a1bd5536f010fbfaab02fc3eefb301a966758bcb6817bb18 ungit.patch
+d9815e4dbcc897b4f6cd394a1e9060ed56832f18b2cf9542aa03b78f4d49213b2d74d748197b25df3d459dbeefb68915f67511b402504185d64908c10eb9377e helix-24.03.tar.gz
+f1b2e9537286921056eda4e96faa9f61131b9ca5684e7ab8aa7bd07e46d91e5eab18e6e292cfad7cdcb7ba195e80f7f1e35f04992cb8011bbd29dd2d95116f9d tree-sitter-rust-0.20.4.tar.gz
+0d72f5528106df006764a201caf7fefa860e67646198818fd744257050ac566082569b289f0a1815dd14f0b1364e344f8841e3c6757377d8452d8ebd5b022d29 runtime-dir-fhs-location.patch
"