<pre style='margin:0'>
Arjun Salyan (arjunsalyan) pushed a commit to branch master
in repository macports-contrib.

</pre>
<p><a href="https://github.com/macports/macports-contrib/commit/adba67d47f363d185b4b090c885b948b7f12c8ef">https://github.com/macports/macports-contrib/commit/adba67d47f363d185b4b090c885b948b7f12c8ef</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 adba67d  portindex2json: Fix representation of license field in JSON
</span>adba67d is described below

<span style='display:block; white-space:pre;color:#808000;'>commit adba67d47f363d185b4b090c885b948b7f12c8ef
</span>Author: arjunsalyan <iarjunsalyan@gmail.com>
AuthorDate: Fri Jul 17 00:41:30 2020 +0530

<span style='display:block; white-space:pre;color:#404040;'>    portindex2json: Fix representation of license field in JSON
</span>---
 portindex2json/portindex2json.tcl | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

<span style='display:block; white-space:pre;color:#808080;'>diff --git a/portindex2json/portindex2json.tcl b/portindex2json/portindex2json.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 68327f3..0fd39c7 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/portindex2json/portindex2json.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/portindex2json/portindex2json.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -18,7 +18,12 @@ package require json::write
</span> proc tcl2json_list {tcl_list} {
     set new_tcl_list {}
     foreach element $tcl_list {
<span style='display:block; white-space:pre;background:#ffe0e0;'>-        lappend new_tcl_list [::json::write string $element]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+        if {[llength $element] > 1} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+            # the element is itself a list, recursively calling tcl2json_list
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+            lappend new_tcl_list [tcl2json_list $element]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+        } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+            lappend new_tcl_list [::json::write string $element]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+        }
</span>     }
     return [::json::write array {*}$new_tcl_list]
 }
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -142,7 +147,7 @@ while {[gets $fd line] >= 0} {
</span>     array set portinfo $line
     array unset json_portinfo
     foreach key [array names portinfo] {
<span style='display:block; white-space:pre;background:#ffe0e0;'>-        if {$key eq "categories" || $key eq "variants" || [string match "depends_*" $key]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+        if {$key in [list categories variants license] || [string match "depends_*" $key]} {
</span>             set json_portinfo($key) [tcl2json_list $portinfo($key)]
         } elseif {$key eq "maintainers"} {
             set json_portinfo($key) [parse_maintainers $portinfo($key)]
</pre><pre style='margin:0'>

</pre>