summaryrefslogtreecommitdiff
path: root/development/tclvfs/patches/05-pkgindex.patch
blob: 77bb689caa9458c731fae3c0c255b880d6c1a6e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Debian-specific patch by Sergei Golovan which replaces current directory
for tclvfs library by a fixed one.

--- tclvfs-1.3-20080503.orig/pkgIndex.tcl.in
+++ tclvfs-1.3-20080503/pkgIndex.tcl.in
@@ -12,19 +12,18 @@
 package require Tcl 8.4
 
 namespace eval ::vfs {}
-variable vfs::dll [file join $dir @PKG_LIB_FILE@]
+variable vfs::dll [file join /usr/lib @PACKAGE_NAME@@PACKAGE_VERSION@ @PKG_LIB_FILE@]
 
-proc loadvfs {dll} {
+proc loadvfs {dir dll} {
     global auto_path
     if {![file exists $dll]} { return }
-    set dir [file dirname $dll]
     if {[lsearch -exact $auto_path $dir] == -1} {
 	lappend auto_path $dir
     }
     load $dll
 }
 
-package ifneeded vfs        @PACKAGE_VERSION@ [list loadvfs $vfs::dll]
+package ifneeded vfs        @PACKAGE_VERSION@ [list loadvfs $dir $vfs::dll]
 
 # Allow optional redirect of VFS_LIBRARY components.  Only necessary
 # for testing, but could be used elsewhere.