<pre style='margin:0'>
Ahmad Satryaji Aulia (satraul) pushed a commit to branch mpstats
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/ccb2ba22dc2db789dfa897e5b1418132a9dad045">https://github.com/macports/macports-ports/commit/ccb2ba22dc2db789dfa897e5b1418132a9dad045</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit ccb2ba22dc2db789dfa897e5b1418132a9dad045
</span>Author: satraul <satraul@gmail.com>
AuthorDate: Mon Jul 29 06:32:59 2019 +0700
<span style='display:block; white-space:pre;color:#404040;'> mpstats: add support for commandlinetools version
</span>---
sysutils/mpstats/Portfile | 2 +-
sysutils/mpstats/files/mpstats.tcl | 17 +++++++++++++++++
2 files changed, 18 insertions(+), 1 deletion(-)
<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 5ce89c5..8b28dd5 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,7 +2,7 @@ PortSystem 1.0
</span>
name mpstats
version 0.1.8
<span style='display:block; white-space:pre;background:#ffe0e0;'>-revision 3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+revision 4
</span> categories sysutils macports
license BSD
platforms darwin
<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 d16b992..300d561 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;'>@@ -102,6 +102,22 @@ proc getgccinfo {} {
</span> }
}
<span style='display:block; white-space:pre;background:#e0ffe0;'>+# extraction of CommandLineTools version
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+proc getcltinfo {} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[file exists /usr/lib/libxcselect.dylib]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set pkgname "CLTools_Executables"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Mountain Lion (10.8) and below. Note that we prefer Xcode over CLT for <= 10.8
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set pkgname "DeveloperToolsCLI"
</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;'>+ if {![catch {exec pkgutil --pkg-info=com.apple.pkg.${pkgname}} results]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return [lindex $results 3]
</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;'>+ return none
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> ###### JSON Encoding helper procs ######
##
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -373,6 +389,7 @@ proc action_stats {subcommands} {
</span> dict set os cxx_stdlib ${macports::cxx_stdlib}
dict set os gcc_version [getgccinfo]
dict set os xcode_version ${macports::xcodeversion}
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ dict set os clt_version [getcltinfo]
</span>
# Build dictionary of port information
dict set ports active [get_installed_ports yes]
</pre><pre style='margin:0'>
</pre>