diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-12-10 18:05:34 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-12-10 18:05:34 (GMT) |
commit | f4ec29ceb25d347536aee82060c3402bc87a94e8 (patch) | |
tree | 2a88bcbf9624d74b8b2822ca9590c3a4d4d5292a /library | |
parent | 615b18fee4adf12d21c4019aa7b3bc8a96ff2344 (diff) | |
download | tcl-f4ec29ceb25d347536aee82060c3402bc87a94e8.zip tcl-f4ec29ceb25d347536aee82060c3402bc87a94e8.tar.gz tcl-f4ec29ceb25d347536aee82060c3402bc87a94e8.tar.bz2 |
Update "platform" package to handle Big Sur version numbering. Also remove special case for cygwin/msys2, just make it more generic
Diffstat (limited to 'library')
-rw-r--r-- | library/platform/platform.tcl | 34 |
1 files changed, 24 insertions, 10 deletions
diff --git a/library/platform/platform.tcl b/library/platform/platform.tcl index 87d720b..2e54a33 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,15 +342,28 @@ proc ::platform::patterns {id} { lappend alt i386-x86_64 lappend alt universal } - x86_64 { lappend alt i386-x86_64 } + x86_64 { + lappend alt i386-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} foreach a $alt { |