From 7cd8e1ccd9e2a58ca978539ab68d8f2ad3dff7ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Wed, 9 Sep 2020 08:00:02 +0700 Subject: [PATCH] wtplan: fix cross, enable pie --- srcpkgs/wtplan/template | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/srcpkgs/wtplan/template b/srcpkgs/wtplan/template index 904ab772db7..9bf0b38b4f2 100644 --- a/srcpkgs/wtplan/template +++ b/srcpkgs/wtplan/template @@ -1,12 +1,9 @@ # 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 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 " license="MIT" @@ -14,6 +11,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 }