pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/lang/go Move most of the version selection logic into ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/b560ebcd853b
branches:  trunk
changeset: 385393:b560ebcd853b
user:      bsiegert <bsiegert%pkgsrc.org@localhost>
date:      Sat Sep 22 19:44:21 2018 +0000

description:
Move most of the version selection logic into version.mk.

Provide a new variable, GO_PACKAGE_DEP, with the correct dependency on
the user-selected Go version, to be used for fixing syncthing and friends.

diffstat:

 lang/go/go-package.mk |  26 +++++++-------------------
 lang/go/version.mk    |  17 +++++++++++++++--
 2 files changed, 22 insertions(+), 21 deletions(-)

diffs (86 lines):

diff -r 930767d7992f -r b560ebcd853b lang/go/go-package.mk
--- a/lang/go/go-package.mk     Sat Sep 22 15:29:39 2018 +0000
+++ b/lang/go/go-package.mk     Sat Sep 22 19:44:21 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: go-package.mk,v 1.17 2018/09/21 20:35:56 bsiegert Exp $
+# $NetBSD: go-package.mk,v 1.18 2018/09/22 19:44:21 bsiegert Exp $
 #
 # This file implements common logic for compiling Go programs in pkgsrc.
 #
@@ -41,12 +41,11 @@
 # 2. Install binaries into bin/.
 # 3. Install source code and packages into a separate gopkg tree.
 #
-# In the future, we may implement buildlink by creating a separate tree during
-# the build and linking only the packages explicitly mentioned in dependencies
-# there.
+# We implement buildlink by creating a separate tree during the build and
+# linking only the packages explicitly mentioned in dependencies there.
 #
-# All packages build-depend on the "master" Go release. Go packages
-# need to be revbumped when lang/go is updated.
+# All packages build-depend on the default Go release. Go packages should be
+# revbumped when that package is updated.
 #
 
 .include "../../lang/go/version.mk"
@@ -57,23 +56,12 @@
 
 WRKSRC=                        ${WRKDIR}/src/${GO_SRCPATH}
 
-.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
 USE_TOOLS+=            pax
 
+BUILD_DEPENDS+=                ${GO_PACKAGE_DEP}
+
 GO_PLATFORM=           ${LOWER_OPSYS}_${GOARCH}
 GOTOOLDIR=             ${PREFIX}/go/pkg/tool/${GO_PLATFORM}
 
diff -r 930767d7992f -r b560ebcd853b lang/go/version.mk
--- a/lang/go/version.mk        Sat Sep 22 15:29:39 2018 +0000
+++ b/lang/go/version.mk        Sat Sep 22 19:44:21 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: version.mk,v 1.44 2018/09/18 20:52:11 bsiegert Exp $
+# $NetBSD: version.mk,v 1.45 2018/09/22 19:44:21 bsiegert Exp $
 
 SSP_SUPPORTED= no
 
@@ -10,10 +10,23 @@
 GO14_VERSION=  1.4.3
 GO_VERSION=    ${GO110_VERSION}
 
+.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
+
 # How to find the Go tool
-GOVERSSUFFIX?=
 GO=                    ${PREFIX}/go${GOVERSSUFFIX}/bin/go
 
+# Build dependency for Go
+GO_PACKAGE_DEP=                go${GOVERSSUFFIX}-${GO${GOVERSSUFFIX}_VERSION}*:../../lang/go${GOVERSSUFFIX}
+
 ONLY_FOR_PLATFORM=     *-*-i386 *-*-x86_64 *-*-earmv[67]hf
 NOT_FOR_PLATFORM=      SunOS-*-i386
 .if ${MACHINE_ARCH} == "i386"



Home | Main Index | Thread Index | Old Index