[34852] branches/variant-descs-14482/base/src/macports1.0/macports.tcl

raimue at macports.org raimue at macports.org
Sat Mar 8 17:45:24 PST 2008


Revision: 34852
          http://trac.macosforge.org/projects/macports/changeset/34852
Author:   raimue at macports.org
Date:     2008-03-08 17:45:22 -0800 (Sat, 08 Mar 2008)

Log Message:
-----------
macports1.0/macports.tcl:
New API: macports::getsourceconfigdir
Returns the path to .config for a porturl.

Modified Paths:
--------------
    branches/variant-descs-14482/base/src/macports1.0/macports.tcl

Modified: branches/variant-descs-14482/base/src/macports1.0/macports.tcl
===================================================================
--- branches/variant-descs-14482/base/src/macports1.0/macports.tcl	2008-03-09 01:20:51 UTC (rev 34851)
+++ branches/variant-descs-14482/base/src/macports1.0/macports.tcl	2008-03-09 01:45:22 UTC (rev 34852)
@@ -886,6 +886,24 @@
     }
 }
 
+##
+# Get the path to the .config directory of the source
+#
+# @param url port url
+# @return path to the .config directory or an empty string if the protocol does \
+#         not support .config
+proc macports::getsourceconfigdir {url} {
+    set protocol [macports::getprotocol $url]
+    switch -- ${protocol} {
+        file {
+            return [file normalize [file join [macports::getportdir $url] .. .. .config]]
+        }
+        default {
+            return ""
+        }
+    }
+}
+
 # dportopen
 # Deprecated version of the new mportopen proc, listed here as backwards
 # compatibility glue for API clients that haven't updated to the new naming

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


More information about the macports-changes mailing list