[68807] branches/release_1_9/base/src/macports1.0/macports.tcl

jmr at macports.org jmr at macports.org
Mon Jun 14 02:35:28 PDT 2010


Revision: 68807
          http://trac.macports.org/changeset/68807
Author:   jmr at macports.org
Date:     2010-06-14 02:35:25 -0700 (Mon, 14 Jun 2010)
Log Message:
-----------
merge r68806 from trunk:
 add activate to list of targets that need deps installed (#25239), factor out check into a helper proc

Revision Links:
--------------
    http://trac.macports.org/changeset/68806

Modified Paths:
--------------
    branches/release_1_9/base/src/macports1.0/macports.tcl

Modified: branches/release_1_9/base/src/macports1.0/macports.tcl
===================================================================
--- branches/release_1_9/base/src/macports1.0/macports.tcl	2010-06-14 09:32:50 UTC (rev 68806)
+++ branches/release_1_9/base/src/macports1.0/macports.tcl	2010-06-14 09:35:25 UTC (rev 68807)
@@ -1559,18 +1559,8 @@
     }
 
     # Before we build the port, we must build its dependencies.
-    # XXX: need a more general way of comparing against targets
     set dlist {}
-    if {   $target == "fetch" || $target == "checksum"
-        || $target == "extract" || $target == "patch"
-        || $target == "configure" || $target == "build"
-        || $target == "test"
-        || $target == "destroot" || $target == "install"
-        || $target == "archive"
-        || $target == "dmg" || $target == "mdmg"
-        || $target == "pkg" || $target == "mpkg"
-        || $target == "rpm" || $target == "dpkg"
-        || $target == "srpm"|| $target == "portpkg" } {
+    if {[macports::_target_needs_deps $target]} {
 
         # possibly warn or error out depending on how old xcode is
         if {[$workername eval _check_xcode_version] != 0} {
@@ -2602,6 +2592,33 @@
     ui_error "and does not have a universal variant."
 }
 
+# check if the given target needs dependencies installed first
+proc macports::_target_needs_deps {target} {
+    # XXX: need a better way than checking this hardcoded list
+    switch -- $target {
+        fetch -
+        checksum -
+        extract -
+        patch -
+        configure -
+        build -
+        test -
+        destroot -
+        install -
+        archive -
+        activate -
+        dmg -
+        mdmg -
+        pkg -
+        mpkg -
+        rpm -
+        dpkg -
+        srpm -
+        portpkg { return 1 }
+        default { return 0 }
+    }
+}
+
 # Determine dependency types required for target
 proc macports::_deptypes_for_target {target} {
     switch $target {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100614/d449c4a1/attachment-0001.html>


More information about the macports-changes mailing list