<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/2bb42647084e48de003eac5a9b4ee26a0b7824a5">https://github.com/macports/macports-ports/commit/2bb42647084e48de003eac5a9b4ee26a0b7824a5</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 2bb4264 dokuwiki: fix php* variants
</span>2bb4264 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 2bb42647084e48de003eac5a9b4ee26a0b7824a5
</span>Author: Joshua Root <jmr@macports.org>
AuthorDate: Sun Nov 25 08:46:29 2018 +1100
<span style='display:block; white-space:pre;color:#404040;'> dokuwiki: fix php* variants
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Braces disable substitution, which means the ${php} in the variant body
</span><span style='display:block; white-space:pre;color:#404040;'> was evaluated when the variants are evaluated, after the main body of
</span><span style='display:block; white-space:pre;color:#404040;'> the portfile. It thus always had the last value set by the foreach
</span><span style='display:block; white-space:pre;color:#404040;'> loop.
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> This is what the "eval subst" was fixing, but it's an antipattern
</span><span style='display:block; white-space:pre;color:#404040;'> because the much simpler and better performing approach is to just not
</span><span style='display:block; white-space:pre;color:#404040;'> use braces in the first place. Quotes can be used instead to group the
</span><span style='display:block; white-space:pre;color:#404040;'> variant body into a single argument.
</span>---
www/dokuwiki/Portfile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/www/dokuwiki/Portfile b/www/dokuwiki/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 14704e7..59262f2 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/www/dokuwiki/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/www/dokuwiki/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -22,11 +22,11 @@ checksums rmd160 cc9383ae8e056323c32fa79a0b6dc319202ccb19 \
</span> size 3693646
foreach php {php56 php70 php71 php72} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- variant ${php} description "Use ${php}" {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variant ${php} description "Use ${php}" "
</span> depends_run \
port:${php} \
port:${php}-openssl
<span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "
</span> }
if {![variant_isset php56] && ![variant_isset php70] && ![variant_isset php71]} {
</pre><pre style='margin:0'>
</pre>