vim allows listing contents of a tar{.gz,bz2}/tgz/... file and
is supposed to allow viewing of files internal to that tar.
amongst other things, this is convenient for use with a mail
client to read files inside a .tgz posted to ports@/etc.

the contents listing does currently works with /bin/tar
however viewing internal files fails (you just get a blank
screen) as this requires GNU tar options.

diff below changes tar.vim to use gtar; I haven't added it as
a run dependency as I don't think it's required in the normal
case, and the error message when it fails is perfectly clear
(<***error*** (tar#Browse) "gtar" not available on your system)
but could do so if preferred.

ok?


Index: Makefile
===================================================================
RCS file: /cvs/ports/editors/vim/Makefile,v
retrieving revision 1.120
diff -u -p -r1.120 Makefile
--- Makefile    10 Apr 2011 18:01:13 -0000      1.120
+++ Makefile    15 Jun 2011 12:31:09 -0000
@@ -9,7 +9,7 @@ VERSION=        7.3.${REV}
 # keep PKGNAME for full version number
 PKGNAME=       vim-${VERSION}
 PKGNAME-main=  vim-${VERSION}
-REVISION-main= 0
+REVISION-main= 1
 PKGNAME-lang=  vim-lang-${VERSION}
 P=             ${DISTNAME:C/[-\.]//g}
 CATEGORIES=    editors
Index: patches/patch-runtime_autoload_tar_vim
===================================================================
RCS file: patches/patch-runtime_autoload_tar_vim
diff -N patches/patch-runtime_autoload_tar_vim
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-runtime_autoload_tar_vim      15 Jun 2011 12:31:09 -0000
@@ -0,0 +1,12 @@
+$OpenBSD$
+--- runtime/autoload/tar.vim.orig      Wed Jun 15 13:27:21 2011
++++ runtime/autoload/tar.vim   Wed Jun 15 13:30:00 2011
+@@ -42,7 +42,7 @@ if !exists("g:tar_readoptions")
+  let g:tar_readoptions= "OPxf"
+ endif
+ if !exists("g:tar_cmd")
+- let g:tar_cmd= "tar"
++ let g:tar_cmd= "gtar"
+ endif
+ if !exists("g:tar_writeoptions")
+  let g:tar_writeoptions= "uf"

Reply via email to