diff options
Diffstat (limited to 'development/tclvfs/patches')
-rw-r--r-- | development/tclvfs/patches/01-configure.patch | 30 | ||||
-rw-r--r-- | development/tclvfs/patches/02-encoding.patch | 179 | ||||
-rw-r--r-- | development/tclvfs/patches/03-m4.patch | 21 | ||||
-rw-r--r-- | development/tclvfs/patches/04-man.patch | 33 | ||||
-rw-r--r-- | development/tclvfs/patches/05-pkgindex.patch | 28 | ||||
-rw-r--r-- | development/tclvfs/patches/06-zipfix.patch | 41 |
6 files changed, 332 insertions, 0 deletions
diff --git a/development/tclvfs/patches/01-configure.patch b/development/tclvfs/patches/01-configure.patch new file mode 100644 index 0000000000..c9f5b42566 --- /dev/null +++ b/development/tclvfs/patches/01-configure.patch @@ -0,0 +1,30 @@ +All the patches are taken from Debian repo + +--- tclvfs-1.3-20080503.orig/configure ++++ tclvfs-1.3-20080503/configure +@@ -7937,12 +7937,15 @@ + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" + ++ # following line added by CW for Debian GNU/Hurd ++ TCL_SHLIB_LD_EXTRAS="-Wl,-soname,\${TCL_LIB_FILE}.0" ++ + SHLIB_LD="${CC} -shared" +- DL_OBJS="" ++ DL_OBJS="tclLoadDl.o" + DL_LIBS="-ldl" + LDFLAGS="$LDFLAGS -Wl,--export-dynamic" + CC_SEARCH_FLAGS="" +- LD_SEARCH_FLAGS="" ++ LD_SEARCH_FLAGS="${CC_SEARCH_FLAGS}" + if test "`uname -m`" = "alpha" ; then + CFLAGS="$CFLAGS -mieee" + fi +@@ -9803,7 +9806,6 @@ + # (actually we leave an empty line to preserve line numbers). + if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +-s/:*\$(srcdir):*/:/; + s/:*\${srcdir}:*/:/; + s/:*@srcdir@:*/:/; + s/^\([^=]*=[ ]*\):*/\1/; diff --git a/development/tclvfs/patches/02-encoding.patch b/development/tclvfs/patches/02-encoding.patch new file mode 100644 index 0000000000..997a352fb0 --- /dev/null +++ b/development/tclvfs/patches/02-encoding.patch @@ -0,0 +1,179 @@ +Patch by Sergei Golovan (initially by Victor Wagner taken from +http://sourceforge.net/tracker/index.php?func=detail&aid=1011498&group_id=32692&atid=406308) +fixes -encoding and -eofchar of files opened on VFS. + +Probably, the patch is incomplete for mk4fs with ::mk4vfs::zstreamed set to 1. + +--- tclvfs-1.3-20080503.orig/library/ftpvfs.tcl ++++ tclvfs-1.3-20080503/library/ftpvfs.tcl +@@ -133,10 +133,13 @@ + ftp::Get $fd $name -variable tmp + + set filed [vfs::memchan] ++ set encoding [fconfigure $filed -encoding] ++ set eofchar [fconfigure $filed -eofchar] ++ set translation [fconfigure $filed -translation] + fconfigure $filed -translation binary + puts -nonewline $filed $tmp + +- fconfigure $filed -translation auto ++ fconfigure $filed -translation $translation -encoding $encoding -eofchar $eofchar + seek $filed 0 + return [list $filed] + } +--- tclvfs-1.3-20080503.orig/library/httpvfs.tcl ++++ tclvfs-1.3-20080503/library/httpvfs.tcl +@@ -357,11 +357,14 @@ + "r" { + set token [geturl "$dirurl$urlname" -headers $headers] + set filed [vfs::memchan] ++ set encoding [fconfigure $filed -encoding] ++ set eofchar [fconfigure $filed -eofchar] ++ set translation [fconfigure $filed -translation] + fconfigure $filed -translation binary + puts -nonewline $filed [::http::data $token] + http::cleanup $token + +- fconfigure $filed -translation auto ++ fconfigure $filed -translation $translation -encoding $encoding -eofchar $eofchar + seek $filed 0 + # XXX: the close command should free vfs::memchan somehow?? + return [list $filed] +--- tclvfs-1.3-20080503.orig/library/tclprocvfs.tcl ++++ tclvfs-1.3-20080503/library/tclprocvfs.tcl +@@ -84,9 +84,12 @@ + "" - + "r" { + set nfd [vfs::memchan] ++ set encoding [fconfigure $nfd -encoding] ++ set eofchar [fconfigure $nfd -eofchar] ++ set translation [fconfigure $nfd -translation] + fconfigure $nfd -translation binary + puts -nonewline $nfd [_generate ::${ns}::${name}] +- fconfigure $nfd -translation auto ++ fconfigure $nfd -translation $translation -encoding $encoding -eofchar $eofchar + seek $nfd 0 + return [list $nfd] + } +--- tclvfs-1.3-20080503.orig/library/webdavvfs.tcl ++++ tclvfs-1.3-20080503/library/webdavvfs.tcl +@@ -153,8 +153,12 @@ + upvar #0 $token state + + set filed [vfs::memchan] ++ set encoding [fconfigure $filed -encoding] ++ set eofchar [fconfigure $filed -eofchar] ++ set translation [fconfigure $filed -translation] + fconfigure $filed -encoding binary -translation binary + puts -nonewline $filed [::http::data $token] ++ fconfigure $filed -translation $translation -encoding $encoding -eofchar $eofchar + seek $filed 0 + ::http::cleanup $token + return [list $filed] +--- tclvfs-1.3-20080503.orig/library/tkvfs.tcl ++++ tclvfs-1.3-20080503/library/tkvfs.tcl +@@ -72,9 +72,12 @@ + "" - + "r" { + set nfd [vfs::memchan] ++ set encoding [fconfigure $nfd -encoding] ++ set eofchar [fconfigure $nfd -eofchar] ++ set translation [fconfigure $nfd -translation] + fconfigure $nfd -translation binary + puts -nonewline $nfd [_generate ${widg}.${name}] +- fconfigure $nfd -translation auto ++ fconfigure $nfd -translation $translation -encoding $encoding -eofchar $eofchar + seek $nfd 0 + return [list $nfd] + } +--- tclvfs-1.3-20080503.orig/library/tarvfs.tcl ++++ tclvfs-1.3-20080503/library/tarvfs.tcl +@@ -107,6 +107,9 @@ + ::tar::stat $tarfd $name sb + + set nfd [vfs::memchan] ++ set encoding [fconfigure $nfd -encoding] ++ set eofchar [fconfigure $nfd -eofchar] ++ set translation [fconfigure $nfd -translation] + fconfigure $nfd -translation binary + + # get the starting point from structure +@@ -115,7 +118,7 @@ + + puts -nonewline $nfd $data + +- fconfigure $nfd -translation auto ++ fconfigure $nfd -translation $translation -encoding $encoding -eofchar $eofchar + seek $nfd 0 + return [list $nfd] + } +--- tclvfs-1.3-20080503.orig/library/zipvfs.tcl ++++ tclvfs-1.3-20080503/library/zipvfs.tcl +@@ -108,6 +108,9 @@ + ::zip::stat $zipfd $name sb + + set nfd [vfs::memchan] ++ set encoding [fconfigure $nfd -encoding] ++ set eofchar [fconfigure $nfd -eofchar] ++ set translation [fconfigure $nfd -translation] + fconfigure $nfd -translation binary + + seek $zipfd $sb(ino) start +@@ -115,7 +118,7 @@ + + puts -nonewline $nfd $data + +- fconfigure $nfd -translation auto ++ fconfigure $nfd -translation $translation -encoding $encoding -eofchar $eofchar + seek $nfd 0 + return [list $nfd] + } +--- tclvfs-1.3-20080503.orig/library/mk4vfs.tcl ++++ tclvfs-1.3-20080503/library/mk4vfs.tcl +@@ -183,19 +183,25 @@ + set fd [vfs::zstream decompress $fd $sb(csize) $sb(size)] + } else { + set fd [vfs::memchan] ++ set encoding [fconfigure $fd -encoding] ++ set eofchar [fconfigure $fd -eofchar] ++ set translation [fconfigure $fd -translation] + fconfigure $fd -translation binary + set s [mk::get $sb(ino) contents] + puts -nonewline $fd [vfs::zip -mode decompress $s] + +- fconfigure $fd -translation auto ++ fconfigure $fd -translation $translation -encoding $encoding -eofchar $eofchar + seek $fd 0 + } + } elseif { $::mk4vfs::direct } { + set fd [vfs::memchan] ++ set encoding [fconfigure $fd -encoding] ++ set eofchar [fconfigure $fd -eofchar] ++ set translation [fconfigure $fd -translation] + fconfigure $fd -translation binary + puts -nonewline $fd [mk::get $sb(ino) contents] + +- fconfigure $fd -translation auto ++ fconfigure $fd -translation $translation -encoding $encoding -eofchar $eofchar + seek $fd 0 + } else { + set fd [mk::channel $sb(ino) contents r] +@@ -226,6 +232,9 @@ + } + + set fd [vfs::memchan] ++ set encoding [fconfigure $fd -encoding] ++ set eofchar [fconfigure $fd -eofchar] ++ set translation [fconfigure $fd -translation] + fconfigure $fd -translation binary + set s [mk::get $sb(ino) contents] + +@@ -237,7 +246,7 @@ + puts -nonewline $fd $s + #set fd [mk::channel $sb(ino) contents a] + } +- fconfigure $fd -translation auto ++ fconfigure $fd -translation $translation -encoding $encoding -eofchar $eofchar + seek $fd 0 end + return [list $fd [list mk4vfs::do_close $db $fd $mode $sb(ino)]] + } diff --git a/development/tclvfs/patches/03-m4.patch b/development/tclvfs/patches/03-m4.patch new file mode 100644 index 0000000000..d995d72fd4 --- /dev/null +++ b/development/tclvfs/patches/03-m4.patch @@ -0,0 +1,21 @@ + +--- tclvfs-1.3-20080503.orig/tclconfig/tcl.m4 ++++ tclvfs-1.3-20080503/tclconfig/tcl.m4 +@@ -1486,12 +1486,15 @@ + SHLIB_LD_LIBS='${LIBS}' + SHLIB_SUFFIX=".so" + ++ # following line added by CW for Debian GNU/Hurd ++ TCL_SHLIB_LD_EXTRAS="-Wl,-soname,\${TCL_LIB_FILE}.0" ++ + SHLIB_LD="${CC} -shared" +- DL_OBJS="" ++ DL_OBJS="tclLoadDl.o" + DL_LIBS="-ldl" + LDFLAGS="$LDFLAGS -Wl,--export-dynamic" + CC_SEARCH_FLAGS="" +- LD_SEARCH_FLAGS="" ++ LD_SEARCH_FLAGS="${CC_SEARCH_FLAGS}" + if test "`uname -m`" = "alpha" ; then + CFLAGS="$CFLAGS -mieee" + fi diff --git a/development/tclvfs/patches/04-man.patch b/development/tclvfs/patches/04-man.patch new file mode 100644 index 0000000000..73392562a6 --- /dev/null +++ b/development/tclvfs/patches/04-man.patch @@ -0,0 +1,33 @@ +--- tclvfs-1.3-20080503.orig/doc/vfs.n ++++ tclvfs-1.3-20080503/doc/vfs.n +@@ -138,7 +138,7 @@ + \fImount.zip\fR is a zip archive which has been mounted (on top of + itself) and contains \fIxxx/yyy\fR, and the current working directory + is inside \fIxxx\fR, and we evaluate a command like \fIfile exists +-yyy\fR, then \fIroot\R will be \fIC:/foo/bar/mount.zip\fR, ++yyy\fR, then \fIroot\fR will be \fIC:/foo/bar/mount.zip\fR, + \fIrelative\fR will be \fIxxx/yyy\fR, and \fIactualpath\fR will be + \fIyyy\fR. The file separator between the \fIroot\fR and \fIrelative\fR + is omitted. +@@ -218,7 +218,7 @@ + Delete the given directory. \fIrecursive\fR is either 0 or 1. If + it is 1 then even if the directory is non-empty, an attempt should + be made to recursively delete it and its contents. If it is 0 and +-the directory is non-empty, a posix error (EEXIST) should be ++the directory is non-empty, a posix error (ENOTEMPTY) should be + thrown. + .TP + \fIcommand\fR \fIstat\fR \fIr-r-a\fR +--- tclvfs-1.3-20080503.orig/doc/vfslib.n ++++ tclvfs-1.3-20080503/doc/vfslib.n +@@ -58,8 +58,8 @@ + .PP + The current supported types are ftp, tar, http, zip, mk4, ns, webdav. In + addition there is the ability to mount any 'urltype' as a new volume, +-provided an appropriate vfs is supported. This means that you can treat +-'ftp://', 'http://' and 'file://' urls as files. To do this, simply ++provided an appropriate vfs is supported. This means that you can ++treat 'ftp://', 'http://' and 'file://' urls as files. To do this, simply + evaluate the command + .PP + \fIvfs::urltype::Mount ftp\fR diff --git a/development/tclvfs/patches/05-pkgindex.patch b/development/tclvfs/patches/05-pkgindex.patch new file mode 100644 index 0000000000..77bb689caa --- /dev/null +++ b/development/tclvfs/patches/05-pkgindex.patch @@ -0,0 +1,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. diff --git a/development/tclvfs/patches/06-zipfix.patch b/development/tclvfs/patches/06-zipfix.patch new file mode 100644 index 0000000000..8ca6e1c1ae --- /dev/null +++ b/development/tclvfs/patches/06-zipfix.patch @@ -0,0 +1,41 @@ +Patch by Victor Wagner (modified by Sergei Golovan for archives less +than 512 bytes long) fixes zip vfs to work with prepended executable. + +--- tclvfs-1.3-20080503.orig/library/zipvfs.tcl ++++ tclvfs-1.3-20080503/library/zipvfs.tcl +@@ -113,7 +113,8 @@ + set translation [fconfigure $nfd -translation] + fconfigure $nfd -translation binary + +- seek $zipfd $sb(ino) start ++ upvar #0 zip::$zipfd cb ++ seek $zipfd [expr {$sb(ino)+$cb(base)}] start + zip::Data $zipfd sb data + + puts -nonewline $nfd $data +@@ -370,6 +371,7 @@ + + seek $fd $n end + set hdr [read $fd $len] ++ set read [string length $hdr] + set pos [string first "PK\05\06" $hdr] + if {$pos == -1} { + if {$at >= $sz} { +@@ -384,7 +386,7 @@ + } + + set hdr [string range $hdr [expr $pos + 4] [expr $pos + 21]] +- set pos [expr [tell $fd] + $pos - 512] ++ set pos [expr [tell $fd] + $pos - $read] + + binary scan $hdr ssssiis \ + cb(ndisk) cb(cdisk) \ +@@ -445,7 +447,7 @@ + + zip::EndOfArchive $fd cb + +- seek $fd $cb(coff) start ++ seek $fd [expr {$cb(coff)+$cb(base)}] start + + set toc(_) 0; unset toc(_); #MakeArray + |