void-packages/srcpkgs/choosenim/template

40 lines
891 B
Bash
Raw Normal View History

# Template file for 'choosenim'
pkgname=choosenim
2018-02-28 14:28:01 +01:00
version=0.3.2
revision=2
hostmakedepends="git nim"
makedepends="libressl-devel zlib-devel"
depends="gcc"
short_desc="The Nim toolchain installer"
maintainer="SolitudeSF <solitudesf@protonmail.com>"
license="MIT"
homepage="https://github.com/dom96/choosenim"
distfiles="${homepage}/archive/v${version}.tar.gz"
2018-02-28 14:28:01 +01:00
checksum=2478fcc75c5a147f63f755f700601ce25f8e2ca964b39ac3cb0d903d2fa22a2b
if [ -n "$CROSS_BUILD" ]; then
hostmakedepends+=" libressl-devel"
fi
do_build() {
local arch args
case "$XBPS_TARGET_MACHINE" in
2018-02-28 14:28:01 +01:00
aarch64*) arch=arm64;;
arm*) arch=arm;;
mips*) arch=mips;;
esac
if [ -n "$arch" ]; then
cat > nim.cfg <<EOF
$arch.linux.gcc.exe = "$CC"
$arch.linux.gcc.linkerexe = "$CC"
EOF
args="--cpu:$arch"
fi
nimble -y build -d:release --passC:-flto "$args"
}
do_install() {
vbin bin/choosenim
vlicense LICENSE
}