summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authordas <das>2002-10-22 16:41:26 (GMT)
committerdas <das>2002-10-22 16:41:26 (GMT)
commitcd83bd4f9b2b62007d4f9eed42dffba1e49e70f0 (patch)
treecbfa88b9d4e734767f869e6cc17264ca9d64cd7e /library
parent5356bb251e4978b7dc52fb21ee811b516ef2329f (diff)
downloadtcl-cd83bd4f9b2b62007d4f9eed42dffba1e49e70f0.zip
tcl-cd83bd4f9b2b62007d4f9eed42dffba1e49e70f0.tar.gz
tcl-cd83bd4f9b2b62007d4f9eed42dffba1e49e70f0.tar.bz2
* library/auto.tcl (tcl_findLibrary):
* library/package.tcl (tclPkgUnknown): on macosx, search inside the Resources/Scripts subdirectory of any potential package directory * macosx/Tcl.pbproj/project.pbxproj: add standard Frameworks dirs to TCL_PACKAGE_PATH make argument. * unix/tclUnixInit.c (TclpSetVariables): on macosx, add embedded framework dirs to tcl_pkgPath: @executable_path/../Frameworks and @executable_path/../PrivateFrameworks (if they exist), as well as the dirs in DYLD_FRAMEWORK_PATH (if set). [Patch #624509] use standard MAXPATHLEN instead of literal 1024
Diffstat (limited to 'library')
-rw-r--r--library/auto.tcl3
-rw-r--r--library/package.tcl21
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