<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/eb3f11c806eadbf64135f4622bcf4dccba618f13">https://github.com/macports/macports-ports/commit/eb3f11c806eadbf64135f4622bcf4dccba618f13</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 eb3f11c806e muniversal PG: add option to mark files equivalent
</span>eb3f11c806e is described below
<span style='display:block; white-space:pre;color:#808000;'>commit eb3f11c806eadbf64135f4622bcf4dccba618f13
</span>Author: Marcus Calhoun-Lopez <mcalhoun@macports.org>
AuthorDate: Wed May 31 00:03:44 2023 -0700
<span style='display:block; white-space:pre;color:#404040;'> muniversal PG: add option to mark files equivalent
</span>---
_resources/port1.0/group/muniversal-1.1.tcl | 23 ++++++++++++++++-------
1 file changed, 16 insertions(+), 7 deletions(-)
<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 0b840062cb4..fc4df1b33b7 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;'>@@ -41,6 +41,10 @@ default muniversal.dont_diff {}
</span> options muniversal.combine
default muniversal.combine {}
<span style='display:block; white-space:pre;background:#e0ffe0;'>+# list of file names whose contents are equivalent but not byte by byte the same
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+options muniversal.equivalent
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+default muniversal.equivalent {}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> ##########################################################################################
# utilites
##########################################################################################
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -364,7 +368,7 @@ proc muniversal::strip_dir_arch {arch1 arch2 dir1 dir2 dir fl} {
</span> # merger_dont_diff: list of files for which diff ${diffFormat} will not merge correctly
# merger_combine: list of files whose different contents just need to be interlaced
# diffFormat: format used by diff to merge two text files
<span style='display:block; white-space:pre;background:#ffe0e0;'>-proc muniversal::merge {base1 base2 base prefixDir arch1 arch2 merger_dont_diff merger_combine diffFormat} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+proc muniversal::merge {base1 base2 base prefixDir arch1 arch2 merger_dont_diff merger_combine merger_equivalent diffFormat} {
</span> set dir1 ${base1}/${prefixDir}
set dir2 ${base2}/${prefixDir}
set dir ${base}/${prefixDir}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -408,7 +412,7 @@ proc muniversal::merge {base1 base2 base prefixDir arch1 arch2 merger_dont_diff
</span> }
} elseif { [file isdirectory ${dir1}/${fl}] } {
# files are directories (but not links), so recursively call function
<span style='display:block; white-space:pre;background:#ffe0e0;'>- muniversal::merge ${base1} ${base2} ${base} ${prefixDir}/${fl} ${arch1} ${arch2} ${merger_dont_diff} ${merger_combine} ${diffFormat}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ muniversal::merge ${base1} ${base2} ${base} ${prefixDir}/${fl} ${arch1} ${arch2} ${merger_dont_diff} ${merger_combine} ${merger_equivalent} ${diffFormat}
</span> } else {
# files are neither directories nor links
if { ! [catch {system "/usr/bin/cmp -s \"${dir1}/${fl}\" \"${dir2}/${fl}\" && /bin/cp -v \"${dir1}/${fl}\" \"${dir}\""}] } {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -448,6 +452,10 @@ proc muniversal::merge {base1 base2 base prefixDir arch1 arch2 merger_dont_diff
</span> set diffFormatCombine {--old-group-format='%<' --new-group-format='%>' --unchanged-group-format='%=' --changed-group-format='%<%>'}
ui_debug "universal: merge: created ${prefixDir}/${fl} by combining ${prefixDir}/${arch1}-${fl} ${prefixDir}/${arch1}-${fl}"
system "[muniversal::muniversal_get_diff_to_use] -dw ${diffFormatCombine} \"${dir1}/${fl}\" \"${dir2}/${fl}\" > \"${dir}/${fl}\"; test \$? -le 1"
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ } elseif {"${prefixDir}/${fl}" in ${merger_equivalent}} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # user has specified that contents are equivalent even though they are not byte by byte the same
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_debug "universal: merge: ${prefixDir}/${fl} differs in ${base1} and ${base2} the differences have been marked as trivial"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ copy ${dir1}/${fl} ${dir}
</span> } else {
# files could not be merged into a fat binary
# handle known file types
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -976,7 +984,8 @@ rename portdestroot::destroot_finish portdestroot::destroot_finish_real
</span> proc portdestroot::destroot_finish {args} {
global workpath \
muniversal.dont_diff \
<span style='display:block; white-space:pre;background:#ffe0e0;'>- muniversal.combine
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ muniversal.combine \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ muniversal.equivalent
</span>
# GNU diff can merge two C/C++ files
# See https://www.gnu.org/software/diffutils/manual/html_mono/diff.html#If-then-else
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1017,10 +1026,10 @@ proc portdestroot::destroot_finish {args} {
</span> %>#endif
'}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- muniversal::merge ${workpath}/destroot-ppc ${workpath}/destroot-ppc64 ${workpath}/destroot-powerpc "" ppc ppc64 ${muniversal.dont_diff} ${muniversal.combine} ${diffFormatM}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- muniversal::merge ${workpath}/destroot-i386 ${workpath}/destroot-x86_64 ${workpath}/destroot-intel "" i386 x86_64 ${muniversal.dont_diff} ${muniversal.combine} ${diffFormatM}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- muniversal::merge ${workpath}/destroot-powerpc ${workpath}/destroot-intel ${workpath}/destroot-ppc-intel "" powerpc x86 ${muniversal.dont_diff} ${muniversal.combine} ${diffFormatProc}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- muniversal::merge ${workpath}/destroot-arm64 ${workpath}/destroot-ppc-intel ${workpath}/destroot "" arm64 ppcintel ${muniversal.dont_diff} ${muniversal.combine} ${diffFormatArmElse}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ muniversal::merge ${workpath}/destroot-ppc ${workpath}/destroot-ppc64 ${workpath}/destroot-powerpc "" ppc ppc64 ${muniversal.dont_diff} ${muniversal.combine} ${muniversal.equivalent} ${diffFormatM}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ muniversal::merge ${workpath}/destroot-i386 ${workpath}/destroot-x86_64 ${workpath}/destroot-intel "" i386 x86_64 ${muniversal.dont_diff} ${muniversal.combine} ${muniversal.equivalent} ${diffFormatM}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ muniversal::merge ${workpath}/destroot-powerpc ${workpath}/destroot-intel ${workpath}/destroot-ppc-intel "" powerpc x86 ${muniversal.dont_diff} ${muniversal.combine} ${muniversal.equivalent} ${diffFormatProc}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ muniversal::merge ${workpath}/destroot-arm64 ${workpath}/destroot-ppc-intel ${workpath}/destroot "" arm64 ppcintel ${muniversal.dont_diff} ${muniversal.combine} ${muniversal.equivalent} ${diffFormatArmElse}
</span>
portdestroot::destroot_finish_real ${args}
}
</pre><pre style='margin:0'>
</pre>