summaryrefslogtreecommitdiff
path: root/tcl-8.6.15-autopath.patch
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2024-11-16 13:19:27 +0000
committerCoprDistGit <infra@openeuler.org>2024-11-16 13:19:27 +0000
commitdc41324914e7fb8451c663f2e83c4daa259e0f75 (patch)
treed52bde2543b54602e59450377c1b2f43cda5f791 /tcl-8.6.15-autopath.patch
parent495915bd411b88bab4e9aa4b6f466072c12dd35d (diff)
automatic import of tcl
Diffstat (limited to 'tcl-8.6.15-autopath.patch')
-rw-r--r--tcl-8.6.15-autopath.patch56
1 files changed, 56 insertions, 0 deletions
diff --git a/tcl-8.6.15-autopath.patch b/tcl-8.6.15-autopath.patch
new file mode 100644
index 0000000..cf9f9c0
--- /dev/null
+++ b/tcl-8.6.15-autopath.patch
@@ -0,0 +1,56 @@
+diff --git a/library/auto.tcl b/library/auto.tcl
+index 7d23b6e..3c7717b 100644
+--- a/library/auto.tcl
++++ b/library/auto.tcl
+@@ -81,6 +81,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.
+diff --git a/library/init.tcl b/library/init.tcl
+index edf6bd5..fa37bcc 100644
+--- a/library/init.tcl
++++ b/library/init.tcl
+@@ -52,16 +52,11 @@ if {![info exists auto_path]} {
+ namespace eval tcl {
+ if {![interp issafe]} {
+ 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
+- }
+ if {[info exists ::tcl_pkgPath]} { catch {
+ foreach Dir $::tcl_pkgPath {
+ if {$Dir ni $::auto_path} {
+diff --git a/unix/configure.in b/unix/configure.in
+index c73f368..5c57692 100644
+--- a/unix/configure.in
++++ b/unix/configure.in
+@@ -869,9 +869,9 @@
+ test -z "$TCL_MODULE_PATH" && \
+ TCL_MODULE_PATH="~/Library/Tcl /Library/Tcl"
+ elif test "$prefix/lib" != "$libdir"; then
+- test -z "$TCL_PACKAGE_PATH" && TCL_PACKAGE_PATH="${libdir}:${prefix}/lib"
++ test -z "$TCL_PACKAGE_PATH" && TCL_PACKAGE_PATH="${libdir}/tcl8.6 ${prefix}/share/tcl8.6 ${libdir}/tk8.6 ${prefix}/share/tk8.6"
+ else
+- test -z "$TCL_PACKAGE_PATH" && TCL_PACKAGE_PATH="${prefix}/lib"
++ test -z "$TCL_PACKAGE_PATH" && TCL_PACKAGE_PATH="${libdir}/tcl8.6 ${prefix}/share/tcl8.6 ${libdir}/tk8.6 ${prefix}/share/tk8.6"
+ fi
+
+ #--------------------------------------------------------------------