<pre style='margin:0'>
Mojca Miklavec (mojca) pushed a commit to branch master
in repository macports-ports.

</pre>
<p><a href="https://github.com/macports/macports-ports/commit/065547b3259c907593941d93ca6d73133f016cdd">https://github.com/macports/macports-ports/commit/065547b3259c907593941d93ca6d73133f016cdd</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 065547b  mpstats: add subport mpstats-gsoc and stop submission of inactive ports
</span>065547b is described below

<span style='display:block; white-space:pre;color:#808000;'>commit 065547b3259c907593941d93ca6d73133f016cdd
</span>Author: arjunsalyan <arjunsalyan@icloud.com>
AuthorDate: Mon Jun 3 19:17:48 2019 +0530

<span style='display:block; white-space:pre;color:#404040;'>    mpstats: add subport mpstats-gsoc and stop submission of inactive ports
</span>---
 sysutils/mpstats/Portfile                    | 20 +++++++++++++++++---
 sysutils/mpstats/files/mpstats.plist.default |  2 +-
 sysutils/mpstats/files/mpstats.tcl           |  7 ++-----
 sysutils/mpstats/files/stats-gsoc.conf       |  4 ++++
 4 files changed, 24 insertions(+), 9 deletions(-)

<span style='display:block; white-space:pre;color:#808080;'>diff --git a/sysutils/mpstats/Portfile b/sysutils/mpstats/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 3112458..c0d6087 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/sysutils/mpstats/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/sysutils/mpstats/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2,6 +2,7 @@ PortSystem          1.0
</span> 
 name                mpstats
 version             0.1.8
<span style='display:block; white-space:pre;background:#e0ffe0;'>+revision            1
</span> categories          sysutils macports
 license             BSD
 platforms           darwin
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -16,6 +17,7 @@ long_description \
</span>    support and test more and which ports are most commonly used.
 
 homepage            https://www.macports.org/
<span style='display:block; white-space:pre;background:#e0ffe0;'>+subport             mpstats-gsoc {}
</span> distfiles
 
 set launchd_dir     ${prefix}/etc/${startupitem.location}/${startupitem.uniquename}/
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -25,6 +27,14 @@ startupitem.type     launchd
</span> startupitem.autostart \
                     yes
 
<span style='display:block; white-space:pre;background:#e0ffe0;'>+if {${subport} eq "mpstats-gsoc"} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    set fname mpstats-gsoc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    set confname stats-gsoc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+} else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    set fname mpstats
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    set confname stats-gsoc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> extract.mkdir       yes
 extract {
     xinstall -m 644 -W ${filespath} mpstats.tcl mpstats.plist.default ${worksrcpath}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -36,6 +46,10 @@ configure {
</span>         ${worksrcpath}/mpstats.plist.default
     reinplace "s|@LABEL@|${startupitem.uniquename}|g" \
         ${worksrcpath}/mpstats.plist.default
<span style='display:block; white-space:pre;background:#e0ffe0;'>+    reinplace "s|@CONFNAME@|${confname}|g" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+        ${worksrcpath}/mpstats.tcl
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    reinplace "s|@PORTNAME@|${fname}|g" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+        ${worksrcpath}/mpstats.plist.default
</span> }
 
 build {}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -43,7 +57,7 @@ build {}
</span> destroot {
     xinstall -m 755 \
         ${worksrcpath}/mpstats.tcl \
<span style='display:block; white-space:pre;background:#ffe0e0;'>-        ${destroot}${prefix}/libexec/mpstats
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+        ${destroot}${prefix}/libexec/${fname}
</span> 
     xinstall -m 755 -d \
         ${destroot}${launchd_dir}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -54,8 +68,8 @@ destroot {
</span>     xinstall -m 755 -d \
         ${destroot}${prefix}/etc/macports
     xinstall -m 444 \
<span style='display:block; white-space:pre;background:#ffe0e0;'>-        ${filespath}/stats.conf \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-        ${destroot}${prefix}/etc/macports/stats.conf
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+        ${filespath}/${confname}.conf \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+        ${destroot}${prefix}/etc/macports/${confname}.conf
</span> 
     # install the plist, if startupitem.install is set
     if {[getuid] == 0 && ${startupitem.install}} {
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/sysutils/mpstats/files/mpstats.plist.default b/sysutils/mpstats/files/mpstats.plist.default
</span><span style='display:block; white-space:pre;color:#808080;'>index b58fe38..8d98c62 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/sysutils/mpstats/files/mpstats.plist.default
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/sysutils/mpstats/files/mpstats.plist.default
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -13,7 +13,7 @@
</span>           </dict>
                <key>ProgramArguments</key>
                <array>
<span style='display:block; white-space:pre;background:#ffe0e0;'>-                        <string>@PREFIX@/libexec/mpstats</string>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                   <string>@PREFIX@/libexec/@PORTNAME@</string>
</span>                   <string>submit</string>
                </array>
                <key>StartCalendarInterval</key>
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/sysutils/mpstats/files/mpstats.tcl b/sysutils/mpstats/files/mpstats.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 40e3c86..6aee3e5 100755
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/sysutils/mpstats/files/mpstats.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/sysutils/mpstats/files/mpstats.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -49,7 +49,7 @@ proc usage {} {
</span> # Prints an error message (but doesn't abort) if the UUID is empty.
 proc read_config {} {
     global prefix stats_url stats_id
<span style='display:block; white-space:pre;background:#ffe0e0;'>-    set conf_path "${prefix}/etc/macports/stats.conf"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    set conf_path "${prefix}/etc/macports/@CONFNAME@.conf"
</span>     if {[file isfile $conf_path]} {
         set fd [open $conf_path r]
         while {[gets $fd line] >= 0} {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -273,13 +273,11 @@ proc json_encode_stats {id os_dict ports_dict} {
</span> 
     set os_json [json_encode_dict os]
     set active_ports_json [json_encode_portlist [dict get $ports "active"]]
<span style='display:block; white-space:pre;background:#ffe0e0;'>-    set inactive_ports_json [json_encode_portlist [dict get $ports "inactive"]]
</span> 
     set json "\{"
     append json "\n  \"id\": \"$id\","
     append json "\n  \"os\": [json_encode_dict os "  "],"
<span style='display:block; white-space:pre;background:#ffe0e0;'>-    append json "\n  \"active_ports\": [json_encode_portlist [dict get $ports "active"] "  "],"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-    append json "\n  \"inactive_ports\": [json_encode_portlist [dict get $ports "inactive"] "  "]"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    append json "\n  \"active_ports\": [json_encode_portlist [dict get $ports "active"] "  "]"
</span>     append json "\n\}"
 
     return $json
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -377,7 +375,6 @@ proc action_stats {subcommands} {
</span> 
     # Build dictionary of port information
     dict set ports active   [get_installed_ports yes]
<span style='display:block; white-space:pre;background:#ffe0e0;'>-    dict set ports inactive [get_installed_ports no]
</span> 
     # Make sure there aren't too many subcommands
     if {[llength $subcommands] > 1} {
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/sysutils/mpstats/files/stats-gsoc.conf b/sysutils/mpstats/files/stats-gsoc.conf
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 0000000..a713110
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/sysutils/mpstats/files/stats-gsoc.conf
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,4 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# configuration for mpstats-gsoc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Where to submit usage data
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+stats_url       http://frozen-falls-98471.herokuapp.com/statistics/submit/
</span></pre><pre style='margin:0'>

</pre>