<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/c4892534a78e24acc2b60c95f2d4dbf39b28e6a9">https://github.com/macports/macports-ports/commit/c4892534a78e24acc2b60c95f2d4dbf39b28e6a9</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 c4892534a78 rust-compiler-wrap: fix builds on system not requiring port
</span>c4892534a78 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit c4892534a78e24acc2b60c95f2d4dbf39b28e6a9
</span>Author: Chris Jones <jonesc@macports.org>
AuthorDate: Mon Apr 26 09:18:55 2021 +0100
<span style='display:block; white-space:pre;color:#404040;'> rust-compiler-wrap: fix builds on system not requiring port
</span>---
lang/rust/Portfile | 56 +++++++++++++++++++++++++++++-------------------------
1 file changed, 30 insertions(+), 26 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/rust/Portfile b/lang/rust/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 2786374714a..b652151fbc0 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/lang/rust/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/rust/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -203,32 +203,36 @@ subport ${ccwrap} {
</span> build {}
depends_lib-append port:cctools
destroot {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- # Deduce MP clang version
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![regexp {macports-clang-(.*)} ${configure.compiler} -> llvm_ver]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_error "Unsupported compiler: ${configure.compiler}"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- xinstall -m 755 -d ${destroot}${wrapdir}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- proc create_wrapper { fname comp flags } {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set f [ open ${fname} w 0755 ]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- puts ${f} "#!/bin/bash"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- puts ${f} "exec ${comp} ${flags} \$\{\@\}"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- close ${f}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set llvm_dir ${prefix}/libexec/llvm-${llvm_ver}/bin
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- create_wrapper ${destroot}${wrapdir}/clang \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- "\$\{MACPORTS_RUST_CC\:\-${llvm_dir}/clang\}" \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- "\$\{MACPORTS_LEGACY_SUPPORT_CPPFLAGS\}"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- create_wrapper ${destroot}${wrapdir}/clang++ \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- "\$\{MACPORTS_RUST_CXX\:\-${llvm_dir}/clang++\}" \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- "\$\{MACPORTS_LEGACY_SUPPORT_CPPFLAGS\}"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- create_wrapper ${destroot}${wrapdir}/ld-rust \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- "\$\{MACPORTS_RUST_CC\:\-${llvm_dir}/clang\}" \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- "\$\{MACPORTS_LEGACY_SUPPORT_CPPFLAGS\} \$\{MACPORTS_LEGACY_SUPPORT_LDFLAGS\}"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- create_wrapper ${destroot}${wrapdir}/ld \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- "\$\{MACPORTS_RUST_LD\:\-${llvm_dir}/ld\}" \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- "\$\{MACPORTS_LEGACY_SUPPORT_LDFLAGS\}"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- foreach cmd { ar as nm nm-classic libtool lipo objdump otool ranlib size size-classic strip strings bitcode-strip segedit } {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ln -s ${prefix}/bin/${cmd} ${destroot}${wrapdir}/${cmd}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ xinstall -d ${destroot}${prefix}/share/doc/${ccwrap}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ system "echo '${description}' > ${destroot}${prefix}/share/doc/${ccwrap}/README"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if { ${os.major} <= ${max_wrap_darwin} } {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Deduce MP clang version
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![regexp {macports-clang-(.*)} ${configure.compiler} -> llvm_ver]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_error "Unsupported compiler: ${configure.compiler}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ xinstall -m 755 -d ${destroot}${wrapdir}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ proc create_wrapper { fname comp flags } {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set f [ open ${fname} w 0755 ]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ puts ${f} "#!/bin/bash"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ puts ${f} "exec ${comp} ${flags} \$\{\@\}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ close ${f}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set llvm_dir ${prefix}/libexec/llvm-${llvm_ver}/bin
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ create_wrapper ${destroot}${wrapdir}/clang \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "\$\{MACPORTS_RUST_CC\:\-${llvm_dir}/clang\}" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "\$\{MACPORTS_LEGACY_SUPPORT_CPPFLAGS\}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ create_wrapper ${destroot}${wrapdir}/clang++ \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "\$\{MACPORTS_RUST_CXX\:\-${llvm_dir}/clang++\}" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "\$\{MACPORTS_LEGACY_SUPPORT_CPPFLAGS\}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ create_wrapper ${destroot}${wrapdir}/ld-rust \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "\$\{MACPORTS_RUST_CC\:\-${llvm_dir}/clang\}" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "\$\{MACPORTS_LEGACY_SUPPORT_CPPFLAGS\} \$\{MACPORTS_LEGACY_SUPPORT_LDFLAGS\}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ create_wrapper ${destroot}${wrapdir}/ld \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "\$\{MACPORTS_RUST_LD\:\-${llvm_dir}/ld\}" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "\$\{MACPORTS_LEGACY_SUPPORT_LDFLAGS\}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach cmd { ar as nm nm-classic libtool lipo objdump otool ranlib size size-classic strip strings bitcode-strip segedit } {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ln -s ${prefix}/bin/${cmd} ${destroot}${wrapdir}/${cmd}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span> }
}
}
</pre><pre style='margin:0'>
</pre>