40 lines
1.3 KiB
Bash
40 lines
1.3 KiB
Bash
# Template file for 'bat'
|
|
pkgname=bat
|
|
version=0.21.0
|
|
revision=1
|
|
build_style=cargo
|
|
hostmakedepends="cmake llvm clang"
|
|
makedepends="libcurl-devel libssh2-devel oniguruma-devel"
|
|
short_desc="Cat(1) clone with syntax highlighting and Git integration"
|
|
maintainer="John <me@johnnynator.dev>"
|
|
license="Apache-2.0, MIT"
|
|
homepage="https://github.com/sharkdp/bat"
|
|
distfiles="https://github.com/sharkdp/bat/archive/v${version}.tar.gz"
|
|
checksum=3dff1e52d577d0a105f4afe3fe7722a4a2b8bb2eb3e7a6a5284ac7add586a3ee
|
|
|
|
post_patch() {
|
|
# fixes an indexmap error when cross compiling
|
|
cargo update --package autocfg --precise 1.1.0
|
|
}
|
|
|
|
pre_build() {
|
|
export CFLAGS_${RUST_BUILD//-/_}="${CFLAGS_host}"
|
|
export CC_${RUST_BUILD//-/_}="${BUILD_CC}"
|
|
}
|
|
|
|
post_install() {
|
|
local manpage
|
|
vlicense LICENSE-MIT
|
|
vdoc README.md
|
|
# The manual page is hidden somewhere deep in the build tree
|
|
manpage=$(find ${wrksrc}/target -name bat.1 | head -n1)
|
|
vman ${manpage}
|
|
# Completions are also hidden somewhere deep in the build tree
|
|
fish_completion=$(find ${wrksrc}/target -name bat.fish -print -quit)
|
|
vcompletion ${fish_completion} fish
|
|
zsh_completion=$(find ${wrksrc}/target -name bat.zsh -print -quit)
|
|
vcompletion ${zsh_completion} zsh
|
|
bash_completion=$(find ${wrksrc}/target -name bat.bash -print -quit)
|
|
vcompletion ${bash_completion} bash
|
|
}
|