<pre style='margin:0'>
Clemens Lang (neverpanic) pushed a commit to branch master
in repository mpbb.
</pre>
<p><a href="https://github.com/macports/mpbb/commit/640313a8d8acc1b4e0de331963e702fb6c74ad74">https://github.com/macports/mpbb/commit/640313a8d8acc1b4e0de331963e702fb6c74ad74</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 640313a tools: Support variants all port clients
</span>640313a is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 640313a8d8acc1b4e0de331963e702fb6c74ad74
</span>Author: Clemens Lang <cal@macports.org>
AuthorDate: Sat Mar 10 18:53:29 2018 +0100
<span style='display:block; white-space:pre;color:#404040;'> tools: Support variants all port clients
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Ports might change portgroups or supported architectures depending on
</span><span style='display:block; white-space:pre;color:#404040;'> their variant selection, so support variant passing for those tools.
</span><span style='display:block; white-space:pre;color:#404040;'> This is a dependency for mpbb list-subports to support variants.
</span>---
tools/portgroups.tcl | 16 +++++++++++++++-
tools/supported-archs.tcl | 16 +++++++++++++++-
2 files changed, 30 insertions(+), 2 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/tools/portgroups.tcl b/tools/portgroups.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 0d28165..93071b9 100755
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/tools/portgroups.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/tools/portgroups.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -31,6 +31,15 @@
</span> # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<span style='display:block; white-space:pre;background:#e0ffe0;'>+proc split_variants {variants} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set result {}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set l [regexp -all -inline -- {([-+])([[:alpha:]_]+[\w\.]*)} $variants]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach { match sign variant } $l {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lappend result $variant $sign
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return $result
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> package require macports
if {[llength $::argv] == 0} {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -47,6 +56,11 @@ if {[catch {mportinit "" "" ""} result]} {
</span>
# look up the path of the Portfile for the given port
set portname [lindex $::argv 0]
<span style='display:block; white-space:pre;background:#e0ffe0;'>+if {[llength $::argv] > 1} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set variations [split_variants [lindex $::argv 1]]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+} else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set variations ""
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span> #try -pass_signal {...}
try {
set result [mportlookup $portname]
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -63,7 +77,7 @@ try {
</span> array set portinfo [lindex $result 1]
#try -pass_signal {...}
try {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set mport [mportopen $portinfo(porturl) [list subport $portname] {}]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set mport [mportopen $portinfo(porturl) [list subport $portname] $variations]
</span> } catch {{*} eCode eMessage} {
ui_error "mportopen ${portinfo(porturl)} failed: $eMessage"
exit 1
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/tools/supported-archs.tcl b/tools/supported-archs.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 6f76623..29b421e 100755
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/tools/supported-archs.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/tools/supported-archs.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -30,6 +30,15 @@
</span> # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<span style='display:block; white-space:pre;background:#e0ffe0;'>+proc split_variants {variants} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set result {}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set l [regexp -all -inline -- {([-+])([[:alpha:]_]+[\w\.]*)} $variants]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach { match sign variant } $l {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lappend result $variant $sign
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return $result
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> if {[llength $::argv] == 0} {
puts stderr "Usage: $argv0 <portname>"
exit 1
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -44,6 +53,11 @@ if {[catch {mportinit "" "" ""} result]} {
</span> }
set portname [lindex $::argv 0]
<span style='display:block; white-space:pre;background:#e0ffe0;'>+if {[llength $::argv] > 1} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set variations [split_variants [lindex $::argv 1]]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+} else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set variations ""
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span>
if {[catch {set one_result [mportlookup $portname]}] || [llength $one_result] < 2} {
ui_error "No port named ${portname} could be found in the port index"
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -54,7 +68,7 @@ array set portinfo [lindex $one_result 1]
</span> set portname $portinfo(name)
if {[info exists portinfo(porturl)]} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[catch {set mport [mportopen $portinfo(porturl) [list subport $portname] {}]}]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[catch {set mport [mportopen $portinfo(porturl) [list subport $portname] $variations]}]} {
</span> ui_warn "failed to open port: $portname"
} else {
set archs [_mportkey $mport supported_archs]
</pre><pre style='margin:0'>
</pre>