<pre style='margin:0'>
Joshua Root (jmroot) pushed a commit to branch master
in repository macports-base.

</pre>
<p><a href="https://github.com/macports/macports-base/commit/fcff138bf4a96d41a30774aa03d7269712efc334">https://github.com/macports/macports-base/commit/fcff138bf4a96d41a30774aa03d7269712efc334</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 fcff138b Remove universal variant if < 2 archs
</span>fcff138b is described below

<span style='display:block; white-space:pre;color:#808000;'>commit fcff138bf4a96d41a30774aa03d7269712efc334
</span>Author: Joshua Root <jmr@macports.org>
AuthorDate: Fri Jan 29 03:14:44 2021 +1100

<span style='display:block; white-space:pre;color:#404040;'>    Remove universal variant if < 2 archs
</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/57133
</span>---
 src/port1.0/portutil.tcl | 23 +++++++++++++++++++++--
 1 file changed, 21 insertions(+), 2 deletions(-)

<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/port1.0/portutil.tcl b/src/port1.0/portutil.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 46961ccc..fbf8af72 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/port1.0/portutil.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/port1.0/portutil.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -716,6 +716,20 @@ proc variant_remove_ditem {name} {
</span>     }
 }
 
<span style='display:block; white-space:pre;background:#e0ffe0;'>+# variant_delete name
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# completely delete the named variant from the port
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+proc variant_delete {name} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    variant_remove_ditem $name
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    if {[info exists ::PortInfo(variants)]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+        set ::PortInfo(variants) [ldelete $::PortInfo(variants) $name]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    if {[info exists ::PortInfo(vinfo)]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+        array set vinfo $::PortInfo(vinfo)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+        unset -nocomplain vinfo($name)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+        set ::PortInfo(vinfo) [array get vinfo]
</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> # variant_exists name
 # determine if a variant exists.
 proc variant_exists {name} {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2133,14 +2147,19 @@ proc check_variants {target} {
</span> # add the default universal variant if appropriate
 proc universal_setup {args} {
     if {[variant_exists universal]} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>-        ui_debug "universal variant already exists, so not adding the default one"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+        if {[llength [option configure.universal_archs]] >= 2} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+            ui_debug "universal variant already exists, so not adding the default one"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+        } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+            ui_debug "removing universal variant due to < 2 supported universal_archs"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+            variant_delete universal
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+        }
</span>     } elseif {[exists universal_variant] && ![option universal_variant]} {
         ui_debug "universal_variant is false, so not adding the default universal variant"
     } elseif {[exists use_xmkmf] && [option use_xmkmf]} {
         ui_debug "using xmkmf, so not adding the default universal variant"
     } elseif {![exists os.universal_supported] || ![option os.universal_supported]} {
         ui_debug "OS doesn't support universal builds, so not adding the default universal variant"
<span style='display:block; white-space:pre;background:#ffe0e0;'>-    } elseif {[llength [option supported_archs]] == 1} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    } elseif {[llength [option configure.universal_archs]] <= 1} {
</span>         ui_debug "only one arch supported, so not adding the default universal variant"
     } elseif {![portconfigure::arch_flag_supported [option configure.compiler] yes]} {
         ui_debug "Compiler doesn't support universal builds, so not adding the default universal variant"
</pre><pre style='margin:0'>

</pre>