tcl/tcl-8.6.0-autopath.patch

57 lines
2.1 KiB
Diff
Raw Normal View History

2013-08-15 08:51:20 +00:00
diff --git a/library/auto.tcl b/library/auto.tcl
index 4bd860d..edc09ee 100644
2013-08-15 08:51:20 +00:00
--- a/library/auto.tcl
+++ b/library/auto.tcl
@@ -80,6 +80,13 @@ proc tcl_findLibrary {basename version patch initScript enVarName varName} {
lappend dirs [::${basename}::pkgconfig get scriptdir,runtime]
}
+ # 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.
2013-08-15 08:51:20 +00:00
diff --git a/library/init.tcl b/library/init.tcl
index e836df9..2ebded6 100644
2013-08-15 08:51:20 +00:00
--- a/library/init.tcl
+++ b/library/init.tcl
@@ -46,16 +46,11 @@ if {![info exists auto_path]} {
}
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} {
2013-08-15 08:51:20 +00:00
diff --git a/unix/configure.in b/unix/configure.in
index 087bb05..7b9025c 100755
2013-08-15 08:51:20 +00:00
--- a/unix/configure.in
+++ b/unix/configure.in
@@ -883,9 +883,9 @@ if test "$FRAMEWORK_BUILD" = "1" ; then
test -z "$TCL_MODULE_PATH" && \
TCL_MODULE_PATH="~/Library/Tcl /Library/Tcl /System/Library/Tcl"
elif test "$prefix/lib" != "$libdir"; then
- TCL_PACKAGE_PATH="${libdir} ${prefix}/lib ${TCL_PACKAGE_PATH}"
2010-06-09 12:49:43 +00:00
+ TCL_PACKAGE_PATH="${libdir}/tcl8.5 ${prefix}/share/tcl8.5 ${libdir}/tk8.5 ${prefix}/share/tk8.5 ${TCL_PACKAGE_PATH}"
else
- TCL_PACKAGE_PATH="${prefix}/lib ${TCL_PACKAGE_PATH}"
2010-06-09 12:49:43 +00:00
+ TCL_PACKAGE_PATH="${libdir}/tcl8.5 ${prefix}/share/tcl8.5 ${libdir}/tk8.5 ${prefix}/share/tk8.5 ${TCL_PACKAGE_PATH}"
fi
#--------------------------------------------------------------------