summaryrefslogtreecommitdiffstats
path: root/library/platform/platform.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'library/platform/platform.tcl')
-rw-r--r--library/platform/platform.tcl45
1 files changed, 34 insertions, 11 deletions
diff --git a/library/platform/platform.tcl b/library/platform/platform.tcl
index 87d720b..6c01142 100644
--- a/library/platform/platform.tcl
+++ b/library/platform/platform.tcl
@@ -94,12 +94,6 @@ proc ::platform::generic {} {
}
switch -glob -- $plat {
- cygwin* {
- set plat cygwin
- }
- msys* {
- set plat msystem
- }
windows {
if {$tcl_platform(platform) == "unix"} {
set plat cygwin
@@ -152,6 +146,9 @@ proc ::platform::generic {} {
osf1 {
set plat tru64
}
+ default {
+ set plat [lindex [split $plat _-] 0]
+ }
}
return "${plat}-${cpu}"
@@ -178,11 +175,15 @@ proc ::platform::identify {} {
}
macosx {
set major [lindex [split $tcl_platform(osVersion) .] 0]
- if {$major > 8} {
+ if {$major > 19} {
+ incr major -20
+ append plat 11.$major
+ } else {
incr major -4
append plat 10.$major
return "${plat}-${cpu}"
}
+ return "${plat}-${cpu}"
}
linux {
# Look for the libc*.so and determine its version
@@ -333,7 +334,7 @@ proc ::platform::patterns {id} {
lappend res macosx-universal macosx-i386-x86_64
}
macosx*-* {
- # 10.5+
+ # 10.5+,11.0+
if {[regexp {macosx([^-]*)-(.*)} $id -> v cpu]} {
switch -exact -- $cpu {
@@ -341,17 +342,39 @@ proc ::platform::patterns {id} {
lappend alt i386-x86_64
lappend alt universal
}
- x86_64 { lappend alt i386-x86_64 }
+ x86_64 {
+ if {[lindex [split $::tcl_platform(osVersion) .] 0] < 19} {
+ set alt i386-x86_64
+ } else {
+ set alt {}
+ }
+ }
+ arm {
+ lappend alt x86_64
+ }
default { set alt {} }
}
if {$v ne ""} {
foreach {major minor} [split $v .] break
- # Add 10.5 to 10.minor to patterns.
set res {}
+ if {$major eq 11} {
+ # Add 11.0 to 11.minor to patterns.
+ for {set j $minor} {$j >= 0} {incr j -1} {
+ lappend res macosx${major}.${j}-${cpu}
+ foreach a $alt {
+ lappend res macosx${major}.${j}-$a
+ }
+ }
+ set major 10
+ set minor 15
+ }
+ # Add 10.5 to 10.minor to patterns.
for {set j $minor} {$j >= 5} {incr j -1} {
- lappend res macosx${major}.${j}-${cpu}
+ if {$cpu ne "arm"} {
+ lappend res macosx${major}.${j}-${cpu}
+ }
foreach a $alt {
lappend res macosx${major}.${j}-$a
}