Debian Codegraph @

library/pkgIndex.tcl.in

raw ◀ ▶
1 Debian patch touch this file
1 # Tcl package index file, version 1.0
2
3 proc LoadBLT25 { version dir } {
4
5 set prefix "%LIB_PREFIX%"
6 set suffix [info sharedlibextension]
7 regsub {\.} $version {} version_no_dots
8 set versuf $version$suffix
9
10 # Determine whether to load the full BLT library or
11 # the "lite" tcl-only version.
12
13 if {[package vcompare [info tclversion] 8.2] < 0} {
14 set taillib ${versuf}.8.0
15 } elseif {[package vcompare [info tclversion] 8.3] < 0} {
16 set taillib ${versuf}.8.2
17 } elseif {[package vcompare [info tclversion] 8.4] < 0} {
18 set taillib ${versuf}.8.3
19 } elseif {[package vcompare [info tclversion] 8.5] < 0} {
20 set taillib ${versuf}.8.4
21 } elseif {[package vcompare [info tclversion] 8.6] < 0} {
22 set taillib ${versuf}.8.5
23 } else {
24 set taillib ${versuf}.8.6
25 }
26
27 if { [info commands tk] == "tk" } {
28 set name1 ${prefix}BLT.${taillib}
29 set name2 ${prefix}BLT${version_no_dots}${suffix}
30 } else {
31 set name1 ${prefix}BLTlite.${taillib}
32 set name2 ${prefix}BLTlite${version_no_dots}${suffix}
33 }
34
35 global tcl_platform
36 foreach name [list $name1 $name2] {
37 if { $tcl_platform(platform) == "unix" } {
38 set library [file join $dir $name]
39 if { ![file exists $library] } {
40 # Try the parent directory.
41 set library [file join [file dirname $dir] $name]
42 }
43 if { ![file exists $library] } {
44 # Default to the path generated at compilation.
45 set library [file join "%LIB_DIR%" $name]
46 }
47 } else {
48 set library $name
49 }
50 if { ![file exists $library] } continue
51 load $library BLT
•52 break
53 }
54 }
55
56 set version "%VERSION%"
•57 set patchlevel %PATCHLEVEL%
58
•59 package ifneeded BLT $patchlevel [list LoadBLT25 $version $dir]
60
61 # End of package index file