wtplan: fix cross, enable pie

This commit is contained in:
Đoàn Trần Công Danh 2020-09-09 08:00:02 +07:00
parent 9d2896ee80
commit 42e8f1057a

View file

@ -1,12 +1,10 @@
# Template file for 'wtplan'
pkgname=wtplan
version=0.1
revision=1
nocross="runtime/cgo: armv7l-linux-musleabihf-gcc: error: unrecognized command line option '-m64"
revision=2
archs="aarch64* armv[567]* i686* x86_64* ppc64le*"
build_style=gnu-makefile
hostmakedepends="go"
nopie="golang"
nostrip="golang"
short_desc="Calendar program with terminal and web interfaces and git integration"
maintainer="Toyam Cox <Vaelatern@voidlinux.org>"
license="MIT"
@ -14,6 +12,18 @@ homepage="https://github.com/kjellwinblad/wtplan/"
distfiles="https://github.com/kjellwinblad/wtplan/archive/${version}.tar.gz"
checksum=31c66181f815889828eb2bd3739d6b23582ec75a5a8d6c6bf76c2a6679112bb4
do_build() {
export GOPATH=$(pwd)
export VERSIONSTR=$version
go generate wtplan
go generate wtplan-web
. $XBPS_COMMONDIR/environment/build-style/go.sh
GOPATH=$(pwd)
# Without -buildmode=pie, build failure on armv6hf-musl
go build -buildmode=pie wtplan
go build -buildmode=pie wtplan-web
}
post_install() {
vlicense LICENSE
}