tcl/tcl-8.5.0-autopath.patch

51 lines
1.9 KiB
Diff

--- tcl8.5.0/unix/configure.in.orig 2007-12-19 13:50:13.000000000 -0800
+++ tcl8.5.0/unix/configure.in 2007-12-21 19:25:04.000000000 -0800
@@ -795,9 +795,9 @@
test -z "$TCL_MODULE_PATH" && \
TCL_MODULE_PATH="~/Library/Tcl /Library/Tcl /Network/Library/Tcl /System/Library/Tcl"
elif test "$prefix/lib" != "$libdir"; then
- TCL_PACKAGE_PATH="${libdir} ${prefix}/lib ${TCL_PACKAGE_PATH}"
+ TCL_PACKAGE_PATH="${libdir}/tcl8.5 ${prefix}/share/tcl8.5 ${TCL_PACKAGE_PATH}"
else
- TCL_PACKAGE_PATH="${prefix}/lib ${TCL_PACKAGE_PATH}"
+ TCL_PACKAGE_PATH="${libdir}/tcl8.5 ${prefix}/share/tcl8.5 ${TCL_PACKAGE_PATH}"
fi
#--------------------------------------------------------------------
--- tcl8.5.0/library/init.tcl.orig 2007-12-21 19:43:12.000000000 -0800
+++ tcl8.5.0/library/init.tcl 2007-12-21 19:43:28.000000000 -0800
@@ -48,16 +48,11 @@
}
namespace eval tcl {
variable Dir
- foreach Dir [list $::tcl_library [file dirname $::tcl_library]] {
+ foreach Dir [list $::tcl_library] {
if {$Dir ni $::auto_path} {
lappend ::auto_path $Dir
}
}
- set Dir [file join [file dirname [file dirname \
- [info nameofexecutable]]] lib]
- if {$Dir ni $::auto_path} {
- lappend ::auto_path $Dir
- }
catch {
foreach Dir $::tcl_pkgPath {
if {$Dir ni $::auto_path} {
--- tcl8.5a5/library/auto.tcl.orig 2007-02-08 17:03:44.000000000 -0800
+++ tcl8.5a5/library/auto.tcl 2007-02-08 17:04:03.000000000 -0800
@@ -85,6 +85,13 @@
lappend dirs $value
}
+ # 2a. As a sibling of Tcl's script directory
+ if {[catch {
+ ::tcl::pkgconfig get scriptdir,runtime
+ } value] == 0} {
+ lappend dirs [file join [file dirname $value] $basename$version]
+ }
+
# 3. Relative to auto_path directories. This checks relative to the
# Tcl library as well as allowing loading of libraries added to the
# auto_path that is not relative to the core library or binary paths.