[24199] trunk/base

source_changes at macosforge.org source_changes at macosforge.org
Wed Apr 18 21:55:33 PDT 2007


Revision: 24199
          http://trac.macosforge.org/projects/macports/changeset/24199
Author:   pguyot at kallisys.net
Date:     2007-04-18 21:55:33 -0700 (Wed, 18 Apr 2007)

Log Message:
-----------
Consider activate target's dependencies to be the same as build target's.

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

Modified: trunk/base/ChangeLog
===================================================================
--- trunk/base/ChangeLog	2007-04-19 04:52:43 UTC (rev 24198)
+++ trunk/base/ChangeLog	2007-04-19 04:55:33 UTC (rev 24199)
@@ -7,6 +7,10 @@
 
 (unreleased):
 
+    - Trace mode now take dependencies into account when executing the activate
+      phase. This fixes an unwanted warning when activating ports that depend
+      on teTeX (pguyot r24199).
+
 Release 1.4.3 (17-Apr-2007):
 
     - Fix bug in launchd support, introduced in 1.4.2. Remove remnants of

Modified: trunk/base/src/port1.0/portutil.tcl
===================================================================
--- trunk/base/src/port1.0/portutil.tcl	2007-04-19 04:52:43 UTC (rev 24198)
+++ trunk/base/src/port1.0/portutil.tcl	2007-04-19 04:55:33 UTC (rev 24199)
@@ -375,11 +375,11 @@
     # (don't list it twice if the variant was already defined, which can happen
     # with universal or group code).
     set variant_provides [ditem_key $ditem provides]
-	if {![info exists PortInfo(variants)] || [lsearch -exact $PortInfo(variants) $variant_provides] < 0} {
-	    lappend PortInfo(variants) $variant_provides
-	} else {
+    if {[variant_exists $variant_provides]} {
 		# This variant was already defined. Remove it from the dlist.
 		variant_remove_ditem $variant_provides
+	} else {
+	    lappend PortInfo(variants) $variant_provides
 	}
 
 	# Finally append the ditem to the dlist.
@@ -454,6 +454,18 @@
 	}
 }
 
+# variant_exists name
+# determine if a variant exists.
+proc variant_exists {name} {
+	global PortInfo
+	if {[info exists PortInfo(variants)] &&
+		[lsearch -exact $PortInfo(variants) $name] >= 0} {
+		return 1
+	}
+	
+	return 0
+}
+
 # platform <os> [<release>] [<arch>] 
 # Portfile level procedure to provide support for declaring platform-specifics
 # Basically, just wrap 'variant', so that Portfiles' platform declarations can
@@ -482,6 +494,15 @@
     if {[info exists release]} { set platform ${platform}_${release} }
     if {[info exists arch]} { set platform ${platform}_${arch} }
     
+    # Pick up a unique name.
+    if {[variant_exists $platform]} {
+    	set suffix 1
+    	while {[variant_exists "$platform-$suffix"]} {
+    		incr suffix
+    	}
+    	
+    	set platform "$platform-$suffix"
+    }
     variant $platform $code
     
     # Set the variant if this platform matches the platform we're on
@@ -1102,6 +1123,7 @@
 						mpkg		-
 						rpmpackage	-
 						dpkg		-
+						activate    -
 						""			{ set deptypes "depends_lib depends_build depends_run" }
 					}
 					

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070418/35f8451b/attachment.html


More information about the macports-changes mailing list