pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/lang/go Use lang/go111, not lang/go, for package builds.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/166b43dc32da
branches:  trunk
changeset: 385377:166b43dc32da
user:      bsiegert <bsiegert%pkgsrc.org@localhost>
date:      Fri Sep 21 20:35:56 2018 +0000

description:
Use lang/go111, not lang/go, for package builds.

This moves builds of packages using Go off the unversioned lang/go package
and onto Go 1.11 or Go 1.9 (on NetBSD 6) by default.

There is a new, user-settable variable GO_VERSION_DEFAULT.

NOTE: not all Go packages completely implement this yet. For example,
net/syncthing does its own thing. This will be fixed.

diffstat:

 lang/go/go-package.mk |  15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 deletions(-)

diffs (29 lines):

diff -r dd05a35e640f -r 166b43dc32da lang/go/go-package.mk
--- a/lang/go/go-package.mk     Fri Sep 21 17:10:57 2018 +0000
+++ b/lang/go/go-package.mk     Fri Sep 21 20:35:56 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: go-package.mk,v 1.16 2018/09/15 00:31:11 minskim Exp $
+# $NetBSD: go-package.mk,v 1.17 2018/09/21 20:35:56 bsiegert Exp $
 #
 # This file implements common logic for compiling Go programs in pkgsrc.
 #
@@ -57,7 +57,18 @@
 
 WRKSRC=                        ${WRKDIR}/src/${GO_SRCPATH}
 
-BUILD_DEPENDS+=                go-${GO_VERSION}*:../../lang/go
+.if ${OPSYS} == "NetBSD" && ${OS_VERSION:M6.*}
+# 1.9 is the last Go version to support NetBSD 6
+GO_VERSION_DEFAULT?=   19
+.else
+GO_VERSION_DEFAULT?=   111
+.endif
+
+.if !empty(GO_VERSION_DEFAULT)
+GOVERSSUFFIX=          ${GO_VERSION_DEFAULT}
+.endif
+
+BUILD_DEPENDS+=                go${GOVERSSUFFIX}-${GO${GOVERSSUFFIX}_VERSION}*:../../lang/go${GOVERSSUFFIX}
 
 MAKE_JOBS_SAFE=                no
 INSTALLATION_DIRS+=    bin gopkg



Home | Main Index | Thread Index | Old Index