diff options
Diffstat (limited to 'library/init.tcl')
-rw-r--r-- | library/init.tcl | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/library/init.tcl b/library/init.tcl index d4a66e2..e58dcfc 100644 --- a/library/init.tcl +++ b/library/init.tcl @@ -6,7 +6,10 @@ # Copyright (c) 1991-1993 The Regents of the University of California. # Copyright (c) 1994-1996 Sun Microsystems, Inc. # Copyright (c) 1998-1999 Scriptics Corporation. -# Copyright (c) 2004 by Kevin B. Kenny. All rights reserved. +# Copyright (c) 2004 by Kevin B. Kenny. +# Copyright (c) 2018 by Sean Woods +# +# All rights reserved. # # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. @@ -795,7 +798,21 @@ proc tcl::CopyDirectory {action src dest} { } return } -if {[file exists [file join $::tcl_library pkgIndex.tcl]]} { - set dir $::tcl_library - source [file join $::tcl_library pkgIndex.tcl] +set isafe [interp issafe] +### +# Package manifest for all Tcl packages included in the /library file system +### +set isafe [interp issafe] +set dir [file dirname [info script]] +foreach {safe package version file} { + 0 http 2.8.12 {http http.tcl} + 0 http 1.0 {http1.0 http.tcl} + 1 msgcat 1.6.1 {msgcat msgcat.tcl} + 1 opt 0.4.7 {opt optparse.tcl} + 0 platform 1.0.14 {platform platform.tcl} + 0 platform::shell 1.1.4 {platform shell.tcl} + 1 tcltest 2.4.1 {tcltest tcltest.tcl} +} { + if {$isafe && !$safe} continue + package ifneeded $package $version [list source [file join $dir {*}$file]] } |