diff options
author | bsiegert <bsiegert@pkgsrc.org> | 2018-07-15 16:26:07 +0000 |
---|---|---|
committer | bsiegert <bsiegert@pkgsrc.org> | 2018-07-15 16:26:07 +0000 |
commit | 14ae4afb5fc811545c2097d51843b68e2446ae4c (patch) | |
tree | 5c253d7ccb2bbea6fd33c8ed59a01bdf0deeaa67 /net | |
parent | 979af0ba32b776b51f5677bb656b280b218b37d1 (diff) | |
download | pkgsrc-14ae4afb5fc811545c2097d51843b68e2446ae4c.tar.gz |
Make syncthing build more reliable.
- use $GO as the path to the go tool
- set a cache directory so that the build does not try to cache stuff
under $HOME.
Prodded by wiz@, thanks for reminding me!
Diffstat (limited to 'net')
-rw-r--r-- | net/syncthing/Makefile | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/net/syncthing/Makefile b/net/syncthing/Makefile index cda86c02203..a2341b9cf3f 100644 --- a/net/syncthing/Makefile +++ b/net/syncthing/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.70 2018/06/17 07:24:15 wiz Exp $ +# $NetBSD: Makefile,v 1.71 2018/07/15 16:26:07 bsiegert Exp $ # Upstream regularly breaks protocol compatibility. While users of # pkgsrc syncthing on multiple systems can update synchronously, an @@ -29,7 +29,9 @@ EXTRACT_USING= gtar GITHUB_TAG= v${PKGVERSION_NOREV} -BUILD_DEPENDS+= go-[0-9]*:../../lang/go +.include "../../lang/go/version.mk" + +BUILD_DEPENDS+= go-${GO_VERSION}*:../../lang/go # The 'zillode' dependency calls the compiler on certain archs. USE_LANGUAGES= c @@ -57,14 +59,10 @@ GOPATH= ${WRKDIR}/gopath WRKPLACEP= ${GOPATH}/src/github.com/syncthing WRKPLACE= ${WRKPLACEP}/syncthing -MAKE_ENV+= GOPATH=${GOPATH} +MAKE_ENV+= GOPATH=${GOPATH} GOCACHE=${WRKDIR}/.cache CHECK_RELRO_SKIP+= bin/syncthing -# This used to be set; there seems to be no reason any longer. To be -# pruned on 2016-11-04. -# INSTALL_UNSTRIPPED= yes - SUBST_CLASSES+= version SUBST_STAGE.version= pre-build SUBST_MESSAGE.version= Fixing version string @@ -83,7 +81,7 @@ post-extract: ${LN} -s ${WRKPLACE} ${WRKSRC} do-build: - cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${PREFIX}/bin/go run build.go build syncthing + cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${GO} run build.go build syncthing # Binaries other than syncthing proper should perhaps be installed. do-install: |