[56160] trunk/base/src/port1.0/portfetch.tcl

toby at macports.org toby at macports.org
Mon Aug 24 15:54:32 PDT 2009


Revision: 56160
          http://trac.macports.org/changeset/56160
Author:   toby at macports.org
Date:     2009-08-24 15:54:32 -0700 (Mon, 24 Aug 2009)
Log Message:
-----------
cheap hack to avoid installing macports svn on snow leopard (should actually use autoconf to check the version...)

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

Modified: trunk/base/src/port1.0/portfetch.tcl
===================================================================
--- trunk/base/src/port1.0/portfetch.tcl	2009-08-24 22:53:33 UTC (rev 56159)
+++ trunk/base/src/port1.0/portfetch.tcl	2009-08-24 22:54:32 UTC (rev 56160)
@@ -85,7 +85,7 @@
 default cvs.post_args {"${cvs.module}"}
 
 # we want the svn port so we know --trust-server-cert will work
-default svn.cmd {${prefix}/bin/svn}
+default svn.cmd {[portfetch::find_svn_path]}
 default svn.dir {${workpath}}
 default svn.method {export}
 default svn.revision ""
@@ -160,13 +160,18 @@
 }
 
 proc portfetch::set_fetch_type {option action args} {
+    global os.major
     if {[string equal ${action} "set"]} {
         switch $args {
             cvs {
                 depends_fetch-append bin:cvs:cvs
             }
             svn {
-                depends_fetch-append port:subversion
+                if {${os.major} >= 10} {
+                    depends_fetch-append bin:svn:subversion
+                } else {
+                    depends_fetch-append port:subversion
+                }
             }
             git {
                 depends_fetch-append bin:git:git-core
@@ -178,6 +183,15 @@
     }
 }
 
+proc portfetch::find_svn_path {args} {
+    global prefix os.major
+    if {${os.major} >= 10} {
+        return [findBinary svn $portutil::autoconf::svn_path]
+    } else {
+        return ${prefix}/bin/svn
+    }
+}
+
 set_ui_prefix
 
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090824/f46c0a8b/attachment.html>


More information about the macports-changes mailing list