[25812] trunk/base/src/port1.0/portsubmit.tcl

source_changes at macosforge.org source_changes at macosforge.org
Sat Jun 2 14:52:08 PDT 2007


Revision: 25812
          http://trac.macosforge.org/projects/macports/changeset/25812
Author:   jberry at macports.org
Date:     2007-06-02 14:52:08 -0700 (Sat, 02 Jun 2007)

Log Message:
-----------
Add variant descriptions to portpkg meta data format

Modified Paths:
--------------
    trunk/base/src/port1.0/portsubmit.tcl

Modified: trunk/base/src/port1.0/portsubmit.tcl
===================================================================
--- trunk/base/src/port1.0/portsubmit.tcl	2007-06-02 21:51:47 UTC (rev 25811)
+++ trunk/base/src/port1.0/portsubmit.tcl	2007-06-02 21:52:08 UTC (rev 25812)
@@ -157,7 +157,22 @@
 		
 			# TODO: variants has platforms in it
 			if {[info exists PortInfo(variants)]} {
-				putlist $sd variants variant $PortInfo(variants)
+				if {[info exists PortInfo(variant_desc)]} {
+					array set descs $PortInfo(variant_desc)
+				} else {
+					array set descs ""
+				}
+	
+				puts $sd "<variants>"
+				foreach v $PortInfo(variants) {
+					puts $sd "<variant>"
+						putel $sd name $v
+						if {[info exists descs($v)]} {
+							putel $sd description $descs($v)
+						}
+					puts $sd "</variant>"
+				}
+				puts $sd "</variants>"
 			} else {
 				putel $sd variants ""
 			}

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070602/b731877e/attachment.html


More information about the macports-changes mailing list