[43328] trunk/base/src
perry at macports.org
perry at macports.org
Tue Dec 9 01:54:06 PST 2008
Revision: 43328
http://trac.macports.org/changeset/43328
Author: perry at macports.org
Date: 2008-12-09 01:54:04 -0800 (Tue, 09 Dec 2008)
Log Message:
-----------
port/port.tcl, port1.0/portutil.tcl - 'port variants' shows default variants.
Modified Paths:
--------------
trunk/base/src/port/port.tcl
trunk/base/src/port1.0/portutil.tcl
Modified: trunk/base/src/port/port.tcl
===================================================================
--- trunk/base/src/port/port.tcl 2008-12-09 08:52:01 UTC (rev 43327)
+++ trunk/base/src/port/port.tcl 2008-12-09 09:54:04 UTC (rev 43328)
@@ -2096,6 +2096,12 @@
if {![info exists portinfo(variants)]} {
puts "$portname has no variants"
} else {
+ # Get the default variants
+ if {[info exists portinfo(default_variants)]} {
+ array set default_variants $portinfo(default_variants)
+ } else {
+ array set default_variants ""
+ }
# Get the variant descriptions
if {[info exists portinfo(variant_desc)]} {
array set descs $portinfo(variant_desc)
@@ -2107,10 +2113,14 @@
puts "$portname has the variants:"
foreach v $portinfo(variants) {
if {[info exists descs($v)] && $descs($v) != ""} {
- puts "\t$v: [string trim $descs($v)]"
+ puts -nonewline "\t$v: [string trim $descs($v)]"
} else {
- puts "\t$v"
+ puts -nonewline "\t$v"
}
+ if {[info exists default_variants($v)] && $default_variants($v) != ""} {
+ puts -nonewline { [default]}
+ }
+ puts ""
}
}
}
Modified: trunk/base/src/port1.0/portutil.tcl
===================================================================
--- trunk/base/src/port1.0/portutil.tcl 2008-12-09 08:52:01 UTC (rev 43327)
+++ trunk/base/src/port1.0/portutil.tcl 2008-12-09 09:54:04 UTC (rev 43328)
@@ -1858,12 +1858,15 @@
}
proc handle_default_variants {option action {value ""}} {
+ global PortInfo
global variations
switch -regex $action {
set|append {
+ set PortInfo(default_variants) {}
foreach v $value {
if {[regexp {([-+])([-A-Za-z0-9_]+)} $v whole val variant]} {
if {![info exists variations($variant)]} {
+ lappend PortInfo(default_variants) $variant $val
set variations($variant) $val
}
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20081209/7af9cf06/attachment.html>
More information about the macports-changes
mailing list