[76919] trunk/base/src/package1.0/portarchive.tcl

afb at macports.org afb at macports.org
Sun Mar 13 01:45:56 PST 2011


Revision: 76919
          http://trac.macports.org/changeset/76919
Author:   afb at macports.org
Date:     2011-03-13 01:45:55 -0800 (Sun, 13 Mar 2011)
Log Message:
-----------
try to record @pkgdep in +CONTENTS

Modified Paths:
--------------
    trunk/base/src/package1.0/portarchive.tcl

Modified: trunk/base/src/package1.0/portarchive.tcl
===================================================================
--- trunk/base/src/package1.0/portarchive.tcl	2011-03-12 22:58:42 UTC (rev 76918)
+++ trunk/base/src/package1.0/portarchive.tcl	2011-03-13 09:45:55 UTC (rev 76919)
@@ -354,6 +354,28 @@
             puts $fd "@portvariant +${v}"
         }
     }
+    set res [mport_lookup $name]
+    if {[llength $res] < 2} {
+        ui_error "Port $name not found"
+    } else {
+        array set portinfo [lindex $res 1]
+        foreach key "depends_lib depends_run" {
+             if {[info exists portinfo($key)]} {
+                 foreach depspec $portinfo($key) {
+                     set depname [lindex [split $depspec :] end]
+                     set dep [mport_lookup $depname]
+                     if {[llength $dep] < 2} {
+                         ui_error "Dependency $dep not found"
+                     } else {
+                         array set portinfo [lindex $dep 1]
+                         set depver $portinfo(version)
+                         set deprev $portinfo(revision)
+                         puts $fd "@pkgdep ${depname}-${depver}_${deprev}"
+                     }
+                 }
+             }
+        }
+    }
     fs-traverse -depth fullpath $destpath {
         if {[file isdirectory $fullpath]} {
             continue
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110313/94341f5d/attachment.html>


More information about the macports-changes mailing list