<pre style='margin:0'>
Marcus Calhoun-Lopez (MarcusCalhoun-Lopez) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/4eca9ad07ad0143f16dabca02fa52b45dfa53d59">https://github.com/macports/macports-ports/commit/4eca9ad07ad0143f16dabca02fa52b45dfa53d59</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 4eca9ad07ad rust-bootstrap*: fail gracefully on arm machines
</span>4eca9ad07ad is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 4eca9ad07ad0143f16dabca02fa52b45dfa53d59
</span>Author: Marcus Calhoun-Lopez <mcalhoun@macports.org>
AuthorDate: Wed Jun 15 07:31:05 2022 -0700
<span style='display:block; white-space:pre;color:#404040;'> rust-bootstrap*: fail gracefully on arm machines
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Fixes https://trac.macports.org/ticket/65255
</span><span style='display:block; white-space:pre;color:#404040;'> Fixes https://trac.macports.org/ticket/65256
</span>---
_resources/port1.0/group/rust-1.0.tcl | 26 ++++++++++++++++++++++++++
lang/rust-bootstrap/Portfile | 6 ++++++
2 files changed, 32 insertions(+)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/_resources/port1.0/group/rust-1.0.tcl b/_resources/port1.0/group/rust-1.0.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index f071e92992e..7ee06fbe7c8 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/_resources/port1.0/group/rust-1.0.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/_resources/port1.0/group/rust-1.0.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -191,6 +191,18 @@ proc rust.add_bootstrap_components {architectures {components {rust-std rustc ca
</span> depends_skip_archcheck-delete rust-bootstrap-transition
depends_skip_archcheck-append rust-bootstrap-transition
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[option muniversal.is_cross.[option configure.build_arch]]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # if os.arch is arm and subport is rust-bootstrap-10.6, avoid
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Error: Cannot install rust-bootstrap-10.6 for the arch 'x86_64' because
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Error: its dependency rust-bootstrap-transition does not build for the required arch by default
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Error: and does not have a universal variant.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ known_fail yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ pre-fetch {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_error "${subport} does not support cross-compilation"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return -code error "incompatible OS configuration"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> foreach component ${components} {
set binTag ${rustc_version}+0-[option triplet.cpu.${arch}]-${build_vendor}-[option triplet.os]${build_major}
set distfile [option prefix]/libexec/rust-bootstrap/${component}-${binTag}${extract.suffix}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -768,6 +780,20 @@ proc rust::rust_pg_callback {} {
</span> # Use libMacportsLegacySystem.B.dylib since it is able to use the `__asm("$ld$add$os10.5$...")` trick for symbols that are part of legacy-support *only* on older systems.
set legacyLib libMacportsLegacySystem.B.dylib
set dep_type lib
<span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # code should mimic legacy-support
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # see https://github.com/macports/macports-ports/blob/master/devel/legacy-support/Portfile
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set max_darwin_reexport 19
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set max_darwin_optool 20
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if { !( [option configure.build_arch] ne "arm64" && [option os.major] > ${max_darwin_reexport} && [option os.major] <= ${max_darwin_optool} ) } {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # ${prefix}/lib/libMacportsLegacySystem.B.dylib does not exist
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # see https://trac.macports.org/ticket/65255
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ known_fail yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ pre-fetch {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_error "${subport} requires libMacportsLegacySystem.B.dylib, which is provided by legacy-support"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return -code error "incompatible system configuration"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span> } else {
# Use the static library since the Rust compiler looks up certain symbols at *runtime* (e.g. `openat`).
# Normally, we would want the additional functionality provided by MacPorts.
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/rust-bootstrap/Portfile b/lang/rust-bootstrap/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 9550edcf856..4e8ee58c0f0 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/lang/rust-bootstrap/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/rust-bootstrap/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -54,6 +54,12 @@ if { ${os.platform} eq "darwin" && ${os.major} < 13 } {
</span> }
}
<span style='display:block; white-space:pre;background:#e0ffe0;'>+if { ${os.platform} eq "darwin" && [vercmp ${macosx_deployment_target} 10.20] < 0 } {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # support for Apple silicon was added in macOS 11 (Darwin 20)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # see https://trac.macports.org/ticket/65256
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ supported_archs x86_64 i386 ppc ppc64
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> set py_ver 3.10
set py_ver_nodot [string map {. {}} ${py_ver}]
configure.python ${prefix}/bin/python${py_ver}
</pre><pre style='margin:0'>
</pre>