[43330] trunk/base/src/port/port.tcl
raimue at macports.org
raimue at macports.org
Tue Dec 9 02:26:52 PST 2008
Revision: 43330
http://trac.macports.org/changeset/43330
Author: raimue at macports.org
Date: 2008-12-09 02:26:52 -0800 (Tue, 09 Dec 2008)
Log Message:
-----------
port/port.tcl:
After r43328, it is now possible to show default variants in port info, too.
If you have better syntax ideas than (+) and [-], suggestions welcomed.
Modified Paths:
--------------
trunk/base/src/port/port.tcl
Modified: trunk/base/src/port/port.tcl
===================================================================
--- trunk/base/src/port/port.tcl 2008-12-09 10:18:10 UTC (rev 43329)
+++ trunk/base/src/port/port.tcl 2008-12-09 10:26:52 UTC (rev 43330)
@@ -1475,6 +1475,13 @@
if {[info exists portinfo(variants)]} {
global global_variations
+ # Get the default variants
+ if {[info exists portinfo(default_variants)]} {
+ array set default_variants $portinfo(default_variants)
+ } else {
+ array set default_variants ""
+ }
+
set joiner ""
set vars ""
foreach v [lsort $portinfo(variants)] {
@@ -1485,8 +1492,10 @@
} elseif {[info exists global_variations($v)]} {
# selected by variants.conf, prefixed with (+)/(-)
set mod "($global_variations($v))"
+ } elseif {[info exists default_variants($v)]} {
+ # selected by default_variants, prefixed with [+]/[-]
+ set mod "\[$default_variants($v)\]"
}
- # TODO: selected by default_variants (with [+]/[-])
append vars "$joiner$mod$v"
set joiner ", "
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20081209/8cbeb77a/attachment.html>
More information about the macports-changes
mailing list