<pre style='margin:0'>
Clemens Lang (neverpanic) pushed a commit to branch master
in repository macports-infrastructure.
</pre>
<p><a href="https://github.com/macports/macports-infrastructure/commit/7a0a40816d83010fe76af0769a561f45e966cb62">https://github.com/macports/macports-infrastructure/commit/7a0a40816d83010fe76af0769a561f45e966cb62</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 7a0a408 port_binary_distributable: Accept +var1+var2
</span>7a0a408 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 7a0a40816d83010fe76af0769a561f45e966cb62
</span>Author: Clemens Lang <neverpanic@gmail.com>
AuthorDate: Sat Mar 10 18:26:18 2018 +0100
<span style='display:block; white-space:pre;color:#404040;'> port_binary_distributable: Accept +var1+var2
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> port_binary_distributable currently expects all variants to be
</span><span style='display:block; white-space:pre;color:#404040;'> space-separated, which does not equal to what port(1) accepts. Unify
</span><span style='display:block; white-space:pre;color:#404040;'> them so that we can get accurate license info for variants in mpbb.
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Note that some ports *do* change their licenses in variants. A popular
</span><span style='display:block; white-space:pre;color:#404040;'> example is ffmpeg.
</span>---
jobs/port_binary_distributable.tcl | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/jobs/port_binary_distributable.tcl b/jobs/port_binary_distributable.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 5a8b890..987e3a3 100755
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/jobs/port_binary_distributable.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/jobs/port_binary_distributable.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -282,6 +282,14 @@ proc check_licenses {portName variantInfo verbose} {
</span> return 0
}
<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>
# Begin
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -328,9 +336,10 @@ set ::argv [lrange $::argv 1 end]
</span>
array set variantInfo {}
foreach variantSetting $::argv {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set flag [string index $variantSetting 0]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set variantName [string range $variantSetting 1 end]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set variantInfo($variantName) $flag
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set variant [split_variants $variantSetting]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach {variantName flag} $variant {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set variantInfo($variantName) $flag
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span> }
exit [check_licenses $portName [array get variantInfo] $verbose]
</pre><pre style='margin:0'>
</pre>