comparison CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/lib/thread2.8.8/pkgIndex.tcl @ 68:5028fdace37b

planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author jpayne
date Tue, 18 Mar 2025 16:23:26 -0400
parents
children
comparison
equal deleted inserted replaced
67:0e9998148a16 68:5028fdace37b
1 # -*- tcl -*-
2 # Tcl package index file, version 1.1
3 #
4
5 if {![package vsatisfies [package provide Tcl] 8.4]} {
6 # Pre-8.4 Tcl interps we dont support at all. Bye!
7 # 9.0+ Tcl interps are only supported on 32-bit platforms.
8 if {![package vsatisfies [package provide Tcl] 9.0]
9 || ($::tcl_platform(pointerSize) != 4)} {
10 return
11 }
12 }
13
14 # All Tcl 8.4+ interps can [load] Thread 2.8.8
15 #
16 # For interps that are not thread-enabled, we still call [package ifneeded].
17 # This is contrary to the usual convention, but is a good idea because we
18 # cannot imagine any other version of Thread that might succeed in a
19 # thread-disabled interp. There's nothing to gain by yielding to other
20 # competing callers of [package ifneeded Thread]. On the other hand,
21 # deferring the error has the advantage that a script calling
22 # [package require Thread] in a thread-disabled interp gets an error message
23 # about a thread-disabled interp, instead of the message
24 # "can't find package Thread".
25
26 package ifneeded Thread 2.8.8 [list load [file join $dir libthread2.8.8.so] [string totitle thread]]
27
28 # package Ttrace uses some support machinery.
29
30 # In Tcl 8.4 interps we use some older interfaces
31 if {![package vsatisfies [package provide Tcl] 8.5]} {
32 package ifneeded Ttrace 2.8.8 "
33 [list proc thread_source {dir} {
34 if {[info exists ::env(TCL_THREAD_LIBRARY)] &&
35 [file readable $::env(TCL_THREAD_LIBRARY)/ttrace.tcl]} {
36 source $::env(TCL_THREAD_LIBRARY)/ttrace.tcl
37 } elseif {[file readable [file join $dir .. lib ttrace.tcl]]} {
38 source [file join $dir .. lib ttrace.tcl]
39 } elseif {[file readable [file join $dir ttrace.tcl]]} {
40 source [file join $dir ttrace.tcl]
41 }
42 if {[namespace which ::ttrace::update] ne ""} {
43 ::ttrace::update
44 }
45 }]
46 [list thread_source $dir]
47 [list rename thread_source {}]"
48 return
49 }
50
51 # In Tcl 8.5+ interps; use [::apply]
52
53 package ifneeded Ttrace 2.8.8 [list ::apply {{dir} {
54 if {[info exists ::env(TCL_THREAD_LIBRARY)] &&
55 [file readable $::env(TCL_THREAD_LIBRARY)/ttrace.tcl]} {
56 source $::env(TCL_THREAD_LIBRARY)/ttrace.tcl
57 } elseif {[file readable [file join $dir .. lib ttrace.tcl]]} {
58 source [file join $dir .. lib ttrace.tcl]
59 } elseif {[file readable [file join $dir ttrace.tcl]]} {
60 source [file join $dir ttrace.tcl]
61 }
62 if {[namespace which ::ttrace::update] ne ""} {
63 ::ttrace::update
64 }
65 }} $dir]
66
67
68