# Template file for 'joker'
pkgname=joker
version=0.14.1
revision=1
build_style=go
go_import_path=github.com/candid82/joker
short_desc="Interpreted dialect of Clojure written in Go and Clojure(Script) linter"
maintainer="Dominic Monroe <monroef4@googlemail.com>"
license="EPL-1.0"
homepage="https://joker-lang.org/"
distfiles="https://github.com/candid82/joker/archive/v${version}.tar.gz"
checksum=c14789a091d38f7c9373705e9dc9edd24ab6c3c877f83788db4a0b14ebef26ef

if [ "$CROSS_BUILD" ]; then
	hostmakedepends+=" joker"
fi

pre_build() {
	JOKER="joker"

	if [ -z "$CROSS_BUILD" ]; then
		JOKER="../joker"
		go generate ./...
		go build
	fi

	(cd std; "$JOKER" --hashmap-threshold 8192 generate-std.joke)
}
