diff options
author | andreas_kupries <akupries@shaw.ca> | 2009-04-08 19:11:32 (GMT) |
---|---|---|
committer | andreas_kupries <akupries@shaw.ca> | 2009-04-08 19:11:32 (GMT) |
commit | bf46b0546f32b8e90f6d448efcbc45213ad75d27 (patch) | |
tree | b8172852248956e5483ca83b73eef9a4a7ae2001 /library | |
parent | 5d6bed5903c5448fb571d77aeb25ef24d9c36d47 (diff) | |
download | tcl-bf46b0546f32b8e90f6d448efcbc45213ad75d27.zip tcl-bf46b0546f32b8e90f6d448efcbc45213ad75d27.tar.gz tcl-bf46b0546f32b8e90f6d448efcbc45213ad75d27.tar.bz2 |
* library/platform/platform.tcl: Extended the darwin sections to
* library/platform/pkgIndex.tcl: add a kernel version number to
* unix/Makefile.in: the identifier for anything from Leopard (10.5)
* win/Makefile.in: on up. Extended patterns for same. Extended cpu
* doc/platform.n: recognition for 64bit Tcl running on a 32bit
kernel on a 64bit processor (By Daniel Steffen). Bumped version to
1.0.4. Updated Makefiles.
Diffstat (limited to 'library')
-rw-r--r-- | library/platform/pkgIndex.tcl | 2 | ||||
-rw-r--r-- | library/platform/platform.tcl | 40 |
2 files changed, 40 insertions, 2 deletions
diff --git a/library/platform/pkgIndex.tcl b/library/platform/pkgIndex.tcl index 27d596f..a63f4aa 100644 --- a/library/platform/pkgIndex.tcl +++ b/library/platform/pkgIndex.tcl @@ -1,3 +1,3 @@ -package ifneeded platform 1.0.3 [list source [file join $dir platform.tcl]] +package ifneeded platform 1.0.4 [list source [file join $dir platform.tcl]] package ifneeded platform::shell 1.1.4 [list source [file join $dir shell.tcl]] diff --git a/library/platform/platform.tcl b/library/platform/platform.tcl index 143cdc5..b42c419 100644 --- a/library/platform/platform.tcl +++ b/library/platform/platform.tcl @@ -111,6 +111,13 @@ proc ::platform::generic {} { } darwin { set plat macosx + # Correctly identify the cpu when running as a 64bit + # process on a machine with a 32bit kernel + if {$cpu eq "ix86"} { + if {$tcl_platform(wordSize) == 8} { + set cpu x86_64 + } + } } aix { set cpu powerpc @@ -154,6 +161,14 @@ proc ::platform::identify {} { append plat $text return "${plat}-${cpu}" } + macosx { + set major [lindex [split $tcl_platform(osVersion) .] 0] + if {$major > 8} { + incr major -4 + append plat 10.$major + return "${plat}-${cpu}" + } + } linux { # Look for the libc*.so and determine its version # (libc5/6, libc6 further glibc 2.X) @@ -238,6 +253,29 @@ proc ::platform::patterns {id} { } } } + macosx*-* { + # 10.5+ + if {[regexp {macosx([^-]*)-(.*)} $id -> v cpu]} { + if {$v ne ""} { + foreach {major minor} [split $v .] break + + # Add 10.5 to 10.minor to patterns. + set res {} + for {set j $minor} {$j >= 5} {incr j -1} { + lappend res macosx${major}.${j}-${cpu} + lappend res macosx${major}.${j}-universal + } + + # Add unversioned patterns for 10.3/10.4 builds. + lappend res macosx-${cpu} + lappend res macosx-universal + } else { + lappend res macosx-universal + } + } else { + lappend res macosx-universal + } + } macosx-powerpc - macosx-ix86 { lappend res macosx-universal @@ -251,7 +289,7 @@ proc ::platform::patterns {id} { # ### ### ### ######### ######### ######### ## Ready -package provide platform 1.0.3 +package provide platform 1.0.4 # ### ### ### ######### ######### ######### ## Demo application |