<pre style='margin:0'>
Haren S (harens) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/0f1b82b611dc846b7effba664f75c9cfff5f476a">https://github.com/macports/macports-ports/commit/0f1b82b611dc846b7effba664f75c9cfff5f476a</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 0f1b82b611d vlang: set correct deployment target in V compiler
</span>0f1b82b611d is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 0f1b82b611dc846b7effba664f75c9cfff5f476a
</span>Author: Haren S <12570877+harens@users.noreply.github.com>
AuthorDate: Sat Apr 2 14:07:10 2022 +0000
<span style='display:block; white-space:pre;color:#404040;'> vlang: set correct deployment target in V compiler
</span>---
lang/vlang/Portfile | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/vlang/Portfile b/lang/vlang/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index e492e5c1514..98e8b619247 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/lang/vlang/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/vlang/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -54,6 +54,9 @@ if {${build_arch} in "ppc ppc64"} {
</span> configure.ldflags-append -latomic
}
<span style='display:block; white-space:pre;background:#e0ffe0;'>+# Path to V compiler
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set vc_path ${workpath}/vc-${vc_commit}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> # ./thirdparty/stdatomic/nix/atomic.h:12:10: fatal error: 'stdatomic.h' file not found
# Based on cmus port: compatible compilers are Xcode > Xcode 7, clang > 3.7, and gcc > 4.8
compiler.c_standard 2011
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -61,18 +64,19 @@ compiler.blacklist-append {clang < 700} macports-clang-3.*
</span>
post-patch {
# https://github.com/vlang/v/issues/10796 - Set correct deployment target.
<span style='display:block; white-space:pre;background:#ffe0e0;'>- reinplace "s|-mmacosx-version-min=10.7|-mmacosx-version-min=${macosx_deployment_target}|" ${worksrcpath}/vlib/v/builder/cc.v
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach f [list ${worksrcpath}/vlib/v/builder/cc.v ${vc_path}/v_win.c ${vc_path}/v.c] {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace "s|-mmacosx-version-min=10.7|-mmacosx-version-min=${macosx_deployment_target}|" ${f}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span>
# Disable vlang self update feature.
copy -force ${filespath}/vup.v ${worksrcpath}/cmd/tools
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-# -cg allows for better error debugging
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# -cg and -showcc allows for better error debugging
</span> # local prevents fetching the V compiler during the build
<span style='display:block; white-space:pre;background:#ffe0e0;'>-# VC is the location of the V compiler directory
</span> build.args-append local=true \
<span style='display:block; white-space:pre;background:#ffe0e0;'>- VFLAGS="-v -cg -prod -cc ${configure.cc} -cflags [shellescape ${configure.cflags}]" \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- VC=../vc-${vc_commit}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ VFLAGS="-v -cg -showcc -prod -cc ${configure.cc} -cflags [shellescape ${configure.cflags}]" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ VC=${vc_path}
</span>
destroot {
set library_path ${destroot}${prefix}/lib/${name}
</pre><pre style='margin:0'>
</pre>