<pre style='margin:0'>
Ken (kencu) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/c9a6e03fc195486bbc91148a44393ae9f333f109">https://github.com/macports/macports-ports/commit/c9a6e03fc195486bbc91148a44393ae9f333f109</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit c9a6e03fc195486bbc91148a44393ae9f333f109
</span>Author: Ken <21211439+kencu@users.noreply.github.com>
AuthorDate: Mon Jun 20 12:21:05 2022 -0700
<span style='display:block; white-space:pre;color:#404040;'> muniversal: strip host information when merging
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> host information can vary from build arch to build arch
</span><span style='display:block; white-space:pre;color:#404040;'> depending on the native compiler and the cross build
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> but this host information is not relevant to the config files and
</span><span style='display:block; white-space:pre;color:#404040;'> scripts, and requires stripping it out individually in ports to
</span><span style='display:block; white-space:pre;color:#404040;'> facilitate merging
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> so just always try it when merging suitable files
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> and also strip out stray space runs that can make cmp fail spuriously
</span>---
_resources/port1.0/group/muniversal-1.0.tcl | 5 +++++
_resources/port1.0/group/muniversal-1.1.tcl | 5 +++++
2 files changed, 10 insertions(+)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/_resources/port1.0/group/muniversal-1.0.tcl b/_resources/port1.0/group/muniversal-1.0.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index b184691afe6..bedac879ad1 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/_resources/port1.0/group/muniversal-1.0.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/_resources/port1.0/group/muniversal-1.0.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -599,6 +599,11 @@ variant universal {
</span> reinplace -q {s:-m32::g} ${tempfile1} ${tempfile2}
reinplace -q {s:-m64::g} ${tempfile1} ${tempfile2}
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ # also strip out host information and stray space runs
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace -q -E {s:--host=[^ ]+::g} ${tempfile1} ${tempfile2}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace -q -E {s:host_alias=[^ ]+::g} ${tempfile1} ${tempfile2}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace -q -E {s: +: :g} ${tempfile1} ${tempfile2}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> if { ! [catch {system "/usr/bin/cmp -s \"${tempfile1}\" \"${tempfile2}\""}] } {
# modified files are identical
ui_debug "universal: merge: ${fl} differs in ${dir1} and ${dir2} but are the same when stripping out -m32, -m64, and -arch XXX"
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/_resources/port1.0/group/muniversal-1.1.tcl b/_resources/port1.0/group/muniversal-1.1.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index a4efdfaed89..34e8dc974ec 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/_resources/port1.0/group/muniversal-1.1.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/_resources/port1.0/group/muniversal-1.1.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -305,6 +305,11 @@ proc muniversal::strip_arch_flags {dir1 dir2 dir fl} {
</span> reinplace -q {s:-m32::g} ${tempfile1} ${tempfile2}
reinplace -q {s:-m64::g} ${tempfile1} ${tempfile2}
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ # also strip out host information and stray space runs
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace -q -E {s:--host=[^ ]+::g} ${tempfile1} ${tempfile2}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace -q -E {s:host_alias=[^ ]+::g} ${tempfile1} ${tempfile2}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace -q -E {s: +: :g} ${tempfile1} ${tempfile2}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> if { ! [catch {system "/usr/bin/cmp -s \"${tempfile1}\" \"${tempfile2}\""}] } {
# modified files are identical
ui_debug "universal: merge: ${fl} differs in ${dir1} and ${dir2} but are the same when stripping out -m32, -m64, and -arch XXX"
</pre><pre style='margin:0'>
</pre>