<pre style='margin:0'>
Chris Jones (cjones051073) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/3f0613b2c68ba42a0b1d062ab434d6116b6eeef4">https://github.com/macports/macports-ports/commit/3f0613b2c68ba42a0b1d062ab434d6116b6eeef4</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 3f0613b2c68 cargo PG: Create temporary bin dir to direct clang(++) to correct compiler cargo/rust builds often do not properly respect MacPorts compiler selection, so use the temporary bin directory trick to ensure 'clang' and 'clang++' found via PATH point where we want. See: https://trac.macports.org/ticket/64088
</span>3f0613b2c68 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 3f0613b2c68ba42a0b1d062ab434d6116b6eeef4
</span>Author: Chris Jones <jonesc@macports.org>
AuthorDate: Sat Dec 4 10:49:02 2021 +0000
<span style='display:block; white-space:pre;color:#404040;'> cargo PG: Create temporary bin dir to direct clang(++) to correct compiler
</span><span style='display:block; white-space:pre;color:#404040;'> cargo/rust builds often do not properly respect MacPorts compiler selection,
</span><span style='display:block; white-space:pre;color:#404040;'> so use the temporary bin directory trick to ensure 'clang' and 'clang++'
</span><span style='display:block; white-space:pre;color:#404040;'> found via PATH point where we want.
</span><span style='display:block; white-space:pre;color:#404040;'> See: https://trac.macports.org/ticket/64088
</span>---
_resources/port1.0/group/cargo-1.0.tcl | 13 +++++++++++++
1 file changed, 13 insertions(+)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/_resources/port1.0/group/cargo-1.0.tcl b/_resources/port1.0/group/cargo-1.0.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index d2890b63364..762114618f9 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/_resources/port1.0/group/cargo-1.0.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/_resources/port1.0/group/cargo-1.0.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -44,3 +44,16 @@ destroot {
</span> ui_msg "Please check if there are additional files (configuration, documentation, etc.) that need to be installed."
error "destroot phase not implemented"
}
<span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# https://trac.macports.org/ticket/64088
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# rust/cargo builds are often a pain to get them to use the correct
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# compiler as per MacPorts' selection. So use prepending to PATH
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# trick to ensure 'clang' and 'clang++' point to the correct compilers.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+pre-configure {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set TmpCompPath ${worksrcpath}/cargo_pg/bin
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ xinstall -d -m 0755 ${TmpCompPath}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.env-append PATH=${TmpCompPath}:$env(PATH)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ build.env-append PATH=${TmpCompPath}:$env(PATH)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ln -s ${configure.cxx} ${TmpCompPath}/clang++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ln -s ${configure.cc} ${TmpCompPath}/clang
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span></pre><pre style='margin:0'>
</pre>