]> git.pld-linux.org Git - packages/tcl.git/blob - tcl-autopath.patch
d0a020c45f0565d5065cf9be74ef98429180413f
[packages/tcl.git] / tcl-autopath.patch
1 diff -up tcl8.5.1/unix/configure.in.autopath tcl8.5.1/unix/configure.in
2 --- tcl8.5.1/unix/configure.in.autopath 2008-02-05 18:00:35.000000000 +0100
3 +++ tcl8.5.1/unix/configure.in  2008-03-17 14:57:24.000000000 +0100
4 @@ -795,9 +795,9 @@ if test "$FRAMEWORK_BUILD" = "1" ; then
5      test -z "$TCL_MODULE_PATH"  && \
6         TCL_MODULE_PATH="~/Library/Tcl /Library/Tcl /Network/Library/Tcl /System/Library/Tcl"
7  elif test "$prefix/lib" != "$libdir"; then
8 -    TCL_PACKAGE_PATH="${libdir} ${prefix}/lib ${TCL_PACKAGE_PATH}"
9 +    TCL_PACKAGE_PATH="${libdir} ${libdir}/tcl8.6 ${prefix}/lib ${prefix}/lib/tcl8.6 ${prefix}/share/tcl8.6 ${TCL_PACKAGE_PATH}"
10  else
11 -    TCL_PACKAGE_PATH="${prefix}/lib ${TCL_PACKAGE_PATH}"
12 +    TCL_PACKAGE_PATH="${libdir} ${libdir}/tcl8.6 ${prefix}/share/tcl8.6 ${TCL_PACKAGE_PATH}"
13  fi
14  
15  #--------------------------------------------------------------------
16 diff -up tcl8.5.1/library/init.tcl.autopath tcl8.5.1/library/init.tcl
17 --- tcl8.5.1/library/init.tcl.autopath  2008-02-04 18:29:11.000000000 +0100
18 +++ tcl8.5.1/library/init.tcl   2008-02-19 09:11:51.000000000 +0100
19 @@ -48,16 +48,11 @@ if {![info exists auto_path]} {
20  }
21  namespace eval tcl {
22      variable Dir
23 -    foreach Dir [list $::tcl_library [file dirname $::tcl_library]] {
24 +    foreach Dir [list $::tcl_library] {
25         if {$Dir ni $::auto_path} {
26             lappend ::auto_path $Dir
27         }
28      }
29 -    set Dir [file join [file dirname [file dirname \
30 -           [info nameofexecutable]]] lib]
31 -    if {$Dir ni $::auto_path} {
32 -       lappend ::auto_path $Dir
33 -    }
34      catch {
35         foreach Dir $::tcl_pkgPath {
36             if {$Dir ni $::auto_path} {
37 diff -up tcl8.5.1/library/auto.tcl.autopath tcl8.5.1/library/auto.tcl
38 --- tcl8.5.1/library/auto.tcl.autopath  2006-11-03 01:34:52.000000000 +0100
39 +++ tcl8.5.1/library/auto.tcl   2008-02-19 09:11:51.000000000 +0100
40 @@ -85,6 +85,13 @@ proc tcl_findLibrary {basename version p
41             lappend dirs $value
42         }
43  
44 +        # 2a. As a sibling of Tcl's script directory
45 +        if {[catch {
46 +            ::tcl::pkgconfig get scriptdir,runtime
47 +        } value] == 0} {
48 +            lappend dirs [file join [file dirname $value] $basename$version]
49 +        }
50 +
51         # 3. Relative to auto_path directories.  This checks relative to the
52         # Tcl library as well as allowing loading of libraries added to the
53         # auto_path that is not relative to the core library or binary paths.
This page took 0.018349 seconds and 2 git commands to generate.