summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjperkin <jperkin@pkgsrc.org>2019-12-09 09:59:31 +0000
committerjperkin <jperkin@pkgsrc.org>2019-12-09 09:59:31 +0000
commitbbd27622ccc50fff26aa08263d60e9d55bc4c273 (patch)
tree77c97569d5bc832b23f31b1a8cf143a66b2a122b
parentd5696dc8da07aa2c85d847faee2538945d4f1a92 (diff)
downloadpkgsrc-bbd27622ccc50fff26aa08263d60e9d55bc4c273.tar.gz
go: Split *_SUPPORTED variables out into new go-vars.mk.
It's not always possible to include go-package.mk earlier than bsd.prefs.mk in a package, for example if the package defines its own do-install target, so move out the *_SUPPORTED variables that need to be included first.
-rw-r--r--lang/go/go-vars.mk19
-rw-r--r--lang/go/version.mk14
2 files changed, 27 insertions, 6 deletions
diff --git a/lang/go/go-vars.mk b/lang/go/go-vars.mk
new file mode 100644
index 00000000000..839aa712ae6
--- /dev/null
+++ b/lang/go/go-vars.mk
@@ -0,0 +1,19 @@
+# $NetBSD: go-vars.mk,v 1.1 2019/12/09 09:59:31 jperkin Exp $
+#
+# Makefile fragment to be included by any package that uses go-package.mk.
+#
+# This needs to be included before bsd.prefs.mk, as the variables set in this
+# file are used there to determine whether certain features should be enabled
+# or not.
+#
+# go-package.mk itself can't always be included before bsd.prefs.mk as it
+# provides some default targets such as do-install if the package has not
+# already defined its own.
+#
+
+#
+# go uses its own special linker which does not at this time support CTF/SSP.
+#
+CTF_SUPPORTED= no
+SSP_SUPPORTED= no
+STRIP_DEBUG_SUPPORTED= no
diff --git a/lang/go/version.mk b/lang/go/version.mk
index f69d5d294cc..16cefe672e2 100644
--- a/lang/go/version.mk
+++ b/lang/go/version.mk
@@ -1,10 +1,10 @@
-# $NetBSD: version.mk,v 1.73 2019/12/08 14:42:02 bsiegert Exp $
+# $NetBSD: version.mk,v 1.74 2019/12/09 09:59:31 jperkin Exp $
-CTF_SUPPORTED= no
-SSP_SUPPORTED= no
-STRIP_DEBUG_SUPPORTED= no
-
-.include "../../mk/bsd.prefs.mk"
+#
+# If bsd.prefs.mk is included before go-package.mk in a package, then this
+# file must be included directly in the package prior to bsd.prefs.mk.
+#
+.include "go-vars.mk"
GO113_VERSION= 1.13.5
GO112_VERSION= 1.12.12
@@ -14,6 +14,8 @@ GO19_VERSION= 1.9.7
GO14_VERSION= 1.4.3
GO_VERSION= ${GO110_VERSION}
+.include "../../mk/bsd.prefs.mk"
+
.if ${OPSYS} == "NetBSD" && ${OS_VERSION:M6.*}
# 1.9 is the last Go version to support NetBSD 6
GO_VERSION_DEFAULT?= 19