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

jmr at macports.org jmr at macports.org
Sun Dec 14 16:58:10 PST 2008


Revision: 43782
          http://trac.macports.org/changeset/43782
Author:   jmr at macports.org
Date:     2008-12-14 16:58:10 -0800 (Sun, 14 Dec 2008)
Log Message:
-----------
Set appropriate build dependencies for each fetch.type and the various use_foo extract type options. Fixes #13981.

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

Modified: trunk/base/src/port1.0/portfetch.tcl
===================================================================
--- trunk/base/src/port1.0/portfetch.tcl	2008-12-15 00:52:07 UTC (rev 43781)
+++ trunk/base/src/port1.0/portfetch.tcl	2008-12-15 00:58:10 UTC (rev 43782)
@@ -103,23 +103,29 @@
 default mirror_sites.listpath {"port1.0/fetch"}
 
 # Option-executed procedures
-option_proc use_bzip2 fix_extract_suffix
-option_proc use_lzma fix_extract_suffix
-option_proc use_zip fix_extract_suffix
-option_proc use_dmg fix_extract_suffix
+option_proc use_bzip2 set_extract_type
+option_proc use_lzma set_extract_type
+option_proc use_zip set_extract_type
+option_proc use_dmg set_extract_type
 
-proc fix_extract_suffix {option action args} {
+option_proc fetch.type set_fetch_type
+
+# We should probably add something like a depends_fetch; see #15161
+proc set_extract_type {option action args} {
     global extract.suffix
     if {[string equal ${action} "set"] && [tbool args]} {
         switch $option {
             use_bzip2 {
                 set extract.suffix .tar.bz2
+                depends_build-append bin:bunzip2:bzip2
             }
             use_lzma {
                 set extract.suffix .tar.lzma
+                depends_build-append bin:unlzma:lzmautils
             }
             use_zip {
                 set extract.suffix .zip
+                depends_build-append bin:unzip:unzip
             }
             use_dmg {
                 set extract.suffix .dmg
@@ -128,6 +134,25 @@
     }
 }
 
+proc set_fetch_type {option action args} {
+    if {[string equal ${action} "set"]} {
+        switch $args {
+            cvs {
+                depends_build-append bin:cvs:cvs
+            }
+            svn {
+                depends_build-append bin:svn:subversion
+            }
+            git {
+                depends_build-append bin:git:git-core
+            }
+            hg {
+                depends_build-append bin:hg:mercurial
+            }
+        }
+    }
+}
+
 # Name space for internal implementation variables
 # Site lists are stored here
 namespace eval portfetch { }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20081214/e589bbc4/attachment.html>


More information about the macports-changes mailing list