2018-01-26 18:21:37 +01:00
|
|
|
# Template file for 'choosenim'
|
|
|
|
pkgname=choosenim
|
2018-02-28 14:28:01 +01:00
|
|
|
version=0.3.2
|
2018-06-27 20:01:08 +02:00
|
|
|
revision=2
|
|
|
|
hostmakedepends="git nim"
|
2018-01-26 18:21:37 +01:00
|
|
|
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
|
2018-01-26 18:21:37 +01:00
|
|
|
|
2018-06-27 20:01:08 +02:00
|
|
|
if [ -n "$CROSS_BUILD" ]; then
|
|
|
|
hostmakedepends+=" libressl-devel"
|
|
|
|
fi
|
|
|
|
|
2018-01-26 18:21:37 +01:00
|
|
|
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;;
|
2018-01-26 18:21:37 +01:00
|
|
|
esac
|
|
|
|
if [ -n "$arch" ]; then
|
|
|
|
cat > nim.cfg <<EOF
|
2018-06-27 20:01:08 +02:00
|
|
|
$arch.linux.gcc.exe = "$CC"
|
|
|
|
$arch.linux.gcc.linkerexe = "$CC"
|
2018-01-26 18:21:37 +01:00
|
|
|
EOF
|
2018-06-27 20:01:08 +02:00
|
|
|
args="--cpu:$arch"
|
2018-01-26 18:21:37 +01:00
|
|
|
fi
|
2018-06-27 20:01:08 +02:00
|
|
|
nimble -y build -d:release --passC:-flto "$args"
|
2018-01-26 18:21:37 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
do_install() {
|
|
|
|
vbin bin/choosenim
|
|
|
|
vlicense LICENSE
|
|
|
|
}
|