diff options
Diffstat (limited to 'library')
-rw-r--r-- | library/auto.tcl | 3 | ||||
-rw-r--r-- | library/package.tcl | 21 |
2 files changed, 22 insertions, 2 deletions
diff --git a/library/auto.tcl b/library/auto.tcl index b023f59..dcea2b5 100644 --- a/library/auto.tcl +++ b/library/auto.tcl @@ -3,7 +3,7 @@ # utility procs formerly in init.tcl dealing with auto execution # of commands and can be auto loaded themselves. # -# RCS: @(#) $Id: auto.tcl,v 1.10 2002/08/31 06:09:45 das Exp $ +# RCS: @(#) $Id: auto.tcl,v 1.11 2002/10/22 16:41:27 das Exp $ # # Copyright (c) 1991-1993 The Regents of the University of California. # Copyright (c) 1994-1998 Sun Microsystems, Inc. @@ -103,6 +103,7 @@ proc tcl_findLibrary {basename version patch initScript enVarName varName} { [string equal $::tcl_platform(os) "Darwin"]} { foreach d $::tcl_pkgPath { lappend dirs [file join $d $basename$version] + lappend dirs [file join $d $basename$version Resources Scripts] } } } diff --git a/library/package.tcl b/library/package.tcl index 91b5831..83a7692 100644 --- a/library/package.tcl +++ b/library/package.tcl @@ -3,7 +3,7 @@ # utility procs formerly in init.tcl which can be loaded on demand # for package management. # -# RCS: @(#) $Id: package.tcl,v 1.19 2002/05/31 23:21:12 dgp Exp $ +# RCS: @(#) $Id: package.tcl,v 1.20 2002/10/22 16:41:28 das Exp $ # # Copyright (c) 1991-1993 The Regents of the University of California. # Copyright (c) 1994-1998 Sun Microsystems, Inc. @@ -510,6 +510,25 @@ proc tclPkgUnknown {name version {exact {}}} { } } } + # On MacOSX also search the Resources/Scripts directories in + # the subdirectories for pkgIndex files + if {[string equal $::tcl_platform(platform) "unix"] && \ + [string equal $::tcl_platform(os) "Darwin"]} { + set dir [lindex $use_path end] + catch { + foreach file [glob -directory $dir -join -nocomplain \ + * Resources Scripts pkgIndex.tcl] { + set dir [file dirname $file] + if {[file readable $file] && ![info exists procdDirs($dir)]} { + if {[catch {source $file} msg]} { + tclLog "error reading package index file $file: $msg" + } else { + set procdDirs($dir) 1 + } + } + } + } + } set dir [lindex $use_path end] set file [file join $dir pkgIndex.tcl] # safe interps usually don't have "file readable", nor stderr channel |