[34538] trunk/base/src/port1.0/portmain.tcl
afb at macports.org
afb at macports.org
Wed Feb 27 13:51:41 PST 2008
Revision: 34538
http://trac.macosforge.org/projects/macports/changeset/34538
Author: afb at macports.org
Date: 2008-02-27 13:51:41 -0800 (Wed, 27 Feb 2008)
Log Message:
-----------
calculate Mac OS X version from Darwin version
Modified Paths:
--------------
trunk/base/src/port1.0/portmain.tcl
Modified: trunk/base/src/port1.0/portmain.tcl
===================================================================
--- trunk/base/src/port1.0/portmain.tcl 2008-02-27 21:51:34 UTC (rev 34537)
+++ trunk/base/src/port1.0/portmain.tcl 2008-02-27 21:51:41 UTC (rev 34538)
@@ -86,15 +86,23 @@
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]
+set os_version $tcl_platform(osVersion)
+set os_major [lindex [split $os_version .] 0]
+set os_platform [string tolower $tcl_platform(os)]
-default os.platform {[string tolower $tcl_platform(os)]}
-default os.version {$tcl_platform(osVersion)}
+default os.platform {$os_platform}
+default os.version {$os_version}
default os.major {$os_major}
default os.arch {$os_arch}
# Remove trailing "Endian"
default os.endian {[string range $tcl_platform(byteOrder) 0 end-6]}
+set macosx_version {}
+if {$os_platform == "darwin"} {
+ # This will probably break when Apple changes versioning
+ set macosx_version [expr 10.0 + ($os_major - 4) / 10.0]
+}
+
# Select implicit variants
if {[info exists os.platform] && ![info exists variations(${os.platform})]} { variant_set ${os.platform}}
if {[info exists os.arch] && ![info exists variations(${os.arch})]} { variant_set ${os.arch} }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080227/fd403f38/attachment.html
More information about the macports-changes
mailing list