<pre style='margin:0'>
Joshua Root (jmroot) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/91b738cf177cfd6b342ea782463496ff94c3449b">https://github.com/macports/macports-ports/commit/91b738cf177cfd6b342ea782463496ff94c3449b</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 91b738c Portgroups: use set instead of double substituting
</span>91b738c is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 91b738cf177cfd6b342ea782463496ff94c3449b
</span>Author: Joshua Root <jmr@macports.org>
AuthorDate: Tue Apr 17 23:50:05 2018 +1000
<span style='display:block; white-space:pre;color:#404040;'> Portgroups: use set instead of double substituting
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> [set varname] returns the value of varname, and is the usual Tcl way of
</span><span style='display:block; white-space:pre;color:#404040;'> getting the value of a dynamically constructed variable name. It's very
</span><span style='display:block; white-space:pre;color:#404040;'> likely also more efficient than substituting a variable into the name
</span><span style='display:block; white-space:pre;color:#404040;'> and then getting expr to substitute the whole thing again.
</span>---
_resources/port1.0/group/compilers-1.0.tcl | 8 ++++----
_resources/port1.0/group/mpi-1.0.tcl | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/_resources/port1.0/group/compilers-1.0.tcl b/_resources/port1.0/group/compilers-1.0.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index bdde6ba..23ac20c 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/_resources/port1.0/group/compilers-1.0.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/_resources/port1.0/group/compilers-1.0.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -587,17 +587,17 @@ proc compilers.setup {args} {
</span> # handle special cases, such as 'gcc' -> all gcc variants
switch -exact $v {
gcc {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set ${mode}_list [${mode}_from_list [expr $${mode}_list] ${compilers.gcc_variants}]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set ${mode}_list [${mode}_from_list [set ${mode}_list] ${compilers.gcc_variants}]
</span> }
fortran {
# here we just check gfortran and g95, not every fortran
# compatible variant since it makes more sense to specify
# 'fortran' to mean add just the +gfortran and +g95 variants
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set ${mode}_list [${mode}_from_list [expr $${mode}_list] {gfortran g95}]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set ${mode}_list [${mode}_from_list [set ${mode}_list] {gfortran g95}]
</span>
}
clang {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set ${mode}_list [${mode}_from_list [expr $${mode}_list] ${compilers.clang_variants}]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set ${mode}_list [${mode}_from_list [set ${mode}_list] ${compilers.clang_variants}]
</span> }
require_fortran {
# this signals that fortran is required and not optional
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -611,7 +611,7 @@ proc compilers.setup {args} {
</span> if {[info exists cdb($v,variant)] == 0} {
return -code error "no such compiler: $v"
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set ${mode}_list [${mode}_from_list [expr $${mode}_list] $cdb($v,variant)]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set ${mode}_list [${mode}_from_list [set ${mode}_list] $cdb($v,variant)]
</span> }
}
}
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/_resources/port1.0/group/mpi-1.0.tcl b/_resources/port1.0/group/mpi-1.0.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 15ae7e3..ec9e390 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/_resources/port1.0/group/mpi-1.0.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/_resources/port1.0/group/mpi-1.0.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -296,7 +296,7 @@ proc mpi.setup {args} {
</span> return -code error "no such mpi package: $v"
}
} else {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set ${mode}_list [${mode}_from_list [expr $${mode}_list] $mpidb($v,variant)]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set ${mode}_list [${mode}_from_list [set ${mode}_list] $mpidb($v,variant)]
</span> }
}
}
</pre><pre style='margin:0'>
</pre>