mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-05 21:37:15 +02:00
69 lines
1.7 KiB
Plaintext
69 lines
1.7 KiB
Plaintext
# Contributor: Aleks Bunin <alpinelinux@compuix.com>
|
|
# Maintainer: Aleks Bunin <alpinelinux@compuix.com>
|
|
pkgname=delta
|
|
pkgver=0.18.2
|
|
pkgrel=0
|
|
pkgdesc="Syntax-highlighting pager for git and diff output"
|
|
url="https://dandavison.github.io/delta/"
|
|
license="MIT"
|
|
# s390x: incompatible with nix crate
|
|
arch="all !s390x"
|
|
makedepends="
|
|
cargo
|
|
cargo-auditable
|
|
libgit2-dev
|
|
oniguruma-dev
|
|
"
|
|
subpackages="
|
|
$pkgname-bash-completion
|
|
$pkgname-fish-completion
|
|
$pkgname-zsh-completion
|
|
"
|
|
source="$pkgname-$pkgver.tar.gz::https://github.com/dandavison/delta/archive/refs/tags/$pkgver.tar.gz"
|
|
options="net"
|
|
|
|
# secfixes:
|
|
# 0.13.0-r0:
|
|
# - CVE-2022-24713
|
|
|
|
export RUSTONIG_SYSTEM_LIBONIG="true"
|
|
|
|
prepare() {
|
|
default_prepare
|
|
|
|
# Rust target triple.
|
|
local target=$(rustc -vV | sed -n 's/host: //p')
|
|
|
|
# Build against system-provided libs
|
|
mkdir -p .cargo
|
|
cat >> .cargo/config.toml <<-EOF
|
|
[target.$target]
|
|
git2 = { rustc-link-lib = ["git2"] }
|
|
EOF
|
|
|
|
cargo fetch --target="$CTARGET" --locked
|
|
}
|
|
|
|
build() {
|
|
cargo auditable build --release --frozen
|
|
|
|
local i; for i in bash fish zsh; do
|
|
./target/release/delta --generate-completion $i > target/delta.$i
|
|
done
|
|
}
|
|
|
|
check() {
|
|
cargo test --frozen -- --test-threads=1
|
|
}
|
|
|
|
package() {
|
|
install -Dm755 target/release/delta -t "$pkgdir"/usr/bin/
|
|
install -D -m644 target/delta.bash "$pkgdir"/usr/share/bash-completion/completions/delta
|
|
install -D -m644 target/delta.fish "$pkgdir"/usr/share/fish/vendor_completions.d/delta.fish
|
|
install -D -m644 target/delta.zsh "$pkgdir"/usr/share/zsh/site-functions/_delta
|
|
}
|
|
|
|
sha512sums="
|
|
c096e22e07945f004f4ef8e805d6dfe45ae53a2e9bcb46736f9764d76fcfa556ce1622157ab66021b8fa36a1e322f80fee217e7f3d9d3489ec4df1f8fc61ca67 delta-0.18.2.tar.gz
|
|
"
|