summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-12-11 12:33:27 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-12-11 12:33:27 (GMT)
commitde49e4b0fca86c89d93891a96de5e5b2d162a096 (patch)
treec28c6a5da223bdcfb749c457d3f90d62389afd5b /library
parentcd48044e1b95257568e26686e58e9c293a81a82d (diff)
downloadtcl-de49e4b0fca86c89d93891a96de5e5b2d162a096.zip
tcl-de49e4b0fca86c89d93891a96de5e5b2d162a096.tar.gz
tcl-de49e4b0fca86c89d93891a96de5e5b2d162a096.tar.bz2
Update "platform" package for Big Sur:
1) Catalina was the last platform supporting 32-bit applications 2) macOS is no longer 10 but 11 3) New "arm" processor
Diffstat (limited to 'library')
-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
}