Modified: trunk/base/src/macports1.0/macports.tcl (72996 => 72997)
--- trunk/base/src/macports1.0/macports.tcl 2010-10-31 20:06:38 UTC (rev 72996)
+++ trunk/base/src/macports1.0/macports.tcl 2010-10-31 20:36:52 UTC (rev 72997)
@@ -1605,7 +1605,7 @@
# Before we build the port, we must build its dependencies.
set dlist {}
- if {[macports::_target_needs_deps $target]} {
+ if {[macports::_target_needs_deps $target] && [macports::_mport_has_deptypes $mport [macports::_deptypes_for_target $target $workername]]} {
registry::exclusive_lock
# see if we actually need to build this port
if {($target != "activate" && $target != "install") ||
@@ -2658,6 +2658,17 @@
ui_error "and does not have a universal variant."
}
+# check if the given mport has any dependencies of the given types
+proc macports::_mport_has_deptypes {mport deptypes} {
+ array set portinfo [mportinfo $mport]
+ foreach type $deptypes {
+ if {[info exists portinfo($type)] && $portinfo($type) != ""} {
+ return 1
+ }
+ }
+ return 0
+}
+
# 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