pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/net/syncthing Make syncthing build more reliable.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/b31f2db57159
branches:  trunk
changeset: 382821:b31f2db57159
user:      bsiegert <bsiegert%pkgsrc.org@localhost>
date:      Sun Jul 15 16:26:07 2018 +0000

description:
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:

 net/syncthing/Makefile |  14 ++++++--------
 1 files changed, 6 insertions(+), 8 deletions(-)

diffs (45 lines):

diff -r a6a37a7c740d -r b31f2db57159 net/syncthing/Makefile
--- a/net/syncthing/Makefile    Sun Jul 15 16:12:07 2018 +0000
+++ b/net/syncthing/Makefile    Sun Jul 15 16:26:07 2018 +0000
@@ -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 @@
 
 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 @@
 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 @@
        ${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:



Home | Main Index | Thread Index | Old Index