<pre style='margin:0'>
Herby Gillot (herbygillot) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/52ffacd221c40c8a9b41bf7ef044f72faf68a074">https://github.com/macports/macports-ports/commit/52ffacd221c40c8a9b41bf7ef044f72faf68a074</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new 52ffacd221c golang portgroup: add explicit option for disabling offline builds
</span>52ffacd221c is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 52ffacd221c40c8a9b41bf7ef044f72faf68a074
</span>Author: Herby Gillot <herby.gillot@gmail.com>
AuthorDate: Thu Aug 10 13:09:04 2023 -0400
<span style='display:block; white-space:pre;color:#404040;'> golang portgroup: add explicit option for disabling offline builds
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> We have quite a number of Go ports that are not doing their builds offline
</span><span style='display:block; white-space:pre;color:#404040;'> (using go.vendors). Add a formal option to the golang portgroup so that we
</span><span style='display:block; white-space:pre;color:#404040;'> turn this on and off in ports with a single option.
</span>---
_resources/port1.0/group/golang-1.0.tcl | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/_resources/port1.0/group/golang-1.0.tcl b/_resources/port1.0/group/golang-1.0.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 21a87f3b22c..57b541f3f05 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/_resources/port1.0/group/golang-1.0.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/_resources/port1.0/group/golang-1.0.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -54,7 +54,7 @@
</span> PortGroup legacysupport 1.1
PortGroup compiler_wrapper 1.0
<span style='display:block; white-space:pre;background:#ffe0e0;'>-options go.package go.domain go.author go.project go.version go.tag_prefix go.tag_suffix
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+options go.package go.domain go.author go.project go.version go.tag_prefix go.tag_suffix go.offline_build
</span>
proc go.setup {go_package go_version {go_tag_prefix ""} {go_tag_suffix ""}} {
global go.package go.domain go.author go.project go.version go.tag_prefix go.tag_suffix
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -150,6 +150,8 @@ options go.bin go.vendors
</span>
default go.bin {${prefix}/bin/go}
default go.vendors {}
<span style='display:block; white-space:pre;background:#e0ffe0;'>+default go.offline_build \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ true
</span>
platforms darwin freebsd linux
supported_archs arm64 i386 x86_64
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -191,6 +193,7 @@ default configure.env ${go_env}
</span> proc go.append_env {} {
global configure.cc configure.cxx configure.ldflags configure.cflags configure.cxxflags configure.cppflags
global os.major build.env workpath
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ global go.offline_build
</span> # Create a wrapper scripts around compiler commands to enforce use of MacPorts flags
# and to aid use of MacPorts legacysupport library as required.
if { ${os.major} <= [option legacysupport.newest_darwin_requires_legacy] } {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -223,6 +226,20 @@ proc go.append_env {} {
</span> configure.env-append ${build.env}
test.env-append ${build.env}
}
<span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if { ! ${go.offline_build} } {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_debug "Disabling offline building for Go"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.env-delete \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ GO111MODULE=off
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ build.env-delete GO111MODULE=off
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ test.env-delete GO111MODULE=off
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.env-replace \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ GOPROXY=off GOPROXY=https://proxy.golang.org
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ build.env-replace GOPROXY=off GOPROXY=https://proxy.golang.org
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ test.env-replace GOPROXY=off GOPROXY=https://proxy.golang.org
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span> }
port::register_callback go.append_env
</pre><pre style='margin:0'>
</pre>