[32724] trunk/base/src/port/port.tcl
afb at macports.org
afb at macports.org
Sat Jan 12 04:09:55 PST 2008
Revision: 32724
http://trac.macosforge.org/projects/macports/changeset/32724
Author: afb at macports.org
Date: 2008-01-12 04:09:50 -0800 (Sat, 12 Jan 2008)
Log Message:
-----------
port platform, info target (#12302)
Modified Paths:
--------------
trunk/base/src/port/port.tcl
Modified: trunk/base/src/port/port.tcl
===================================================================
--- trunk/base/src/port/port.tcl 2008-01-12 11:49:42 UTC (rev 32723)
+++ trunk/base/src/port/port.tcl 2008-01-12 12:09:50 UTC (rev 32724)
@@ -1398,6 +1398,21 @@
}
+proc action_platform { action portlist opts } {
+# global os.platform os.major os.arch
+ global tcl_platform
+ set os_platform [string tolower $tcl_platform(os)]
+ set os_version $tcl_platform(osVersion)
+ set os_arch $tcl_platform(machine)
+ if {$os_arch == "Power Macintosh"} { set os_arch "powerpc" }
+ if {$os_arch == "i586" || $os_arch == "i686"} { set os_arch "i386" }
+ set os_major [lindex [split $tcl_platform(osVersion) .] 0]
+# puts "Platform: ${os.platform} ${os.major} ${os.arch}"
+ puts "Platform: ${os_platform} ${os_major} ${os_arch}"
+ return 0
+}
+
+
proc action_compact { action portlist opts } {
set status 0
require_portlist portlist
@@ -2159,6 +2174,7 @@
upgrade action_upgrade
version action_version
+ platform action_platform
compact action_compact
uncompact action_uncompact
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080112/a930eff5/attachment.html
More information about the macports-changes
mailing list