Various patches to editors/elvis, mostly from Debian, via Donovan Watteau:
- add --docdir so that :help works - add --verbose - fix a bug in the ")" command that could cause a segfault - fix a bug when lauching elvis in a directory containing a "tags" dir - make file/syntax detection work for scripts using "env" - add "return" to the list of shell script keywords - fix a few things in the man pages (\-, typo, whitespace) since we were already patching them.
This commit is contained in:
parent
0881ce2ba6
commit
dcf8bf5606
@ -1,10 +1,10 @@
|
||||
# $OpenBSD: Makefile,v 1.20 2012/03/17 12:40:01 sthen Exp $
|
||||
# $OpenBSD: Makefile,v 1.21 2012/05/05 14:03:15 sthen Exp $
|
||||
|
||||
COMMENT= clone of the ex/vi text editor
|
||||
|
||||
DISTNAME= elvis-2.2_0
|
||||
PKGNAME= ${DISTNAME:S/_/./}
|
||||
REVISION= 1
|
||||
REVISION= 2
|
||||
CATEGORIES= editors
|
||||
HOMEPAGE= http://elvis.the-little-red-haired-girl.org/
|
||||
|
||||
@ -24,7 +24,9 @@ FLAVOR?=
|
||||
|
||||
CONFIGURE_STYLE= simple
|
||||
CONFIGURE_ARGS= --bindir=${PREFIX}/bin \
|
||||
--datadir=${PREFIX}/share/elvis
|
||||
--datadir=${PREFIX}/share/elvis \
|
||||
--docdir=${PREFIX}/share/doc/elvis \
|
||||
--verbose
|
||||
|
||||
.if ${FLAVOR:Mno_x11}
|
||||
CONFIGURE_ARGS+= --with-x=no
|
||||
@ -39,7 +41,7 @@ WANTLIB+= X11 Xft Xpm pthread-stubs xcb
|
||||
NO_REGRESS= Yes
|
||||
|
||||
do-install:
|
||||
@rm -f ${WRKSRC}/doc/ctags.man.orig
|
||||
@rm -f ${WRKSRC}/{doc,data}/*.orig
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/share/elvis
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/elvis
|
||||
.for prog in elvfmt elvis ref
|
||||
|
16
editors/elvis/patches/patch-data_elvis_arf
Normal file
16
editors/elvis/patches/patch-data_elvis_arf
Normal file
@ -0,0 +1,16 @@
|
||||
$OpenBSD: patch-data_elvis_arf,v 1.1 2012/05/05 14:03:15 sthen Exp $
|
||||
|
||||
Make file/syntax detection work for scripts that use env
|
||||
in their shebang line. From Debian.
|
||||
|
||||
--- data/elvis.arf.orig Tue Oct 21 04:32:25 2003
|
||||
+++ data/elvis.arf Sat May 5 13:40:29 2012
|
||||
@@ -10,6 +10,8 @@ then {
|
||||
if os=="unix" && buflines >= 1
|
||||
then {
|
||||
try 1s/\V^#! *[^ ]*\/\([^ ]\+\).*/set! bufdisplay="syntax \1"/x
|
||||
+ if bufdisplay=="syntax env"
|
||||
+ then try 1s/\V^#! *[^ ]*\/[^ ]\+ \([^ ]\+\).*/set! bufdisplay="syntax \1"/x
|
||||
if bufdisplay<<11=="syntax perl"
|
||||
then set! bufdisplay="syntax perl"
|
||||
if bufdisplay<<12=="syntax tclsh"
|
17
editors/elvis/patches/patch-data_elvis_syn
Normal file
17
editors/elvis/patches/patch-data_elvis_syn
Normal file
@ -0,0 +1,17 @@
|
||||
$OpenBSD: patch-data_elvis_syn,v 1.1 2012/05/05 14:03:15 sthen Exp $
|
||||
|
||||
Add "return" to the list of keywords for shell scripts.
|
||||
|
||||
--- data/elvis.syn.orig Tue Oct 21 04:32:25 2003
|
||||
+++ data/elvis.syn Sat May 5 13:33:21 2012
|
||||
@@ -209,8 +209,8 @@ keyword $* $@ $# $? $- $$ $! & | ; [ ] < > ( )
|
||||
keyword alias autoload bg break case cd continue do done echo elif else esac
|
||||
keyword eval exec exit export false fc fg fi for getopts hash history
|
||||
keyword if in integer jobs kill let newgrp nohup print pwd r read readonly
|
||||
-keyword select set shift source stop suspend test then time times trap type
|
||||
-keyword typeset ulimit umask unalias unset until wait whence while
|
||||
+keyword return select set shift source stop suspend test then time times trap
|
||||
+keyword type typeset ulimit umask unalias unset until wait whence while
|
||||
function (
|
||||
comment #
|
||||
startword /?-*!.
|
@ -1,6 +1,6 @@
|
||||
$OpenBSD: patch-doc_ctags_man,v 1.1 2008/12/11 13:58:14 jasper Exp $
|
||||
--- doc/ctags.man.orig Tue Dec 9 12:05:48 2008
|
||||
+++ doc/ctags.man Tue Dec 9 12:06:12 2008
|
||||
$OpenBSD: patch-doc_ctags_man,v 1.2 2012/05/05 14:03:15 sthen Exp $
|
||||
--- doc/ctags.man.orig Tue Oct 21 04:32:26 2003
|
||||
+++ doc/ctags.man Sat May 5 13:48:52 2012
|
||||
@@ -1,8 +1,8 @@
|
||||
-.TH CTAGS 1
|
||||
+.TH ELVCTAGS 1
|
||||
@ -13,3 +13,30 @@ $OpenBSD: patch-doc_ctags_man,v 1.1 2008/12/11 13:58:14 jasper Exp $
|
||||
.RB [ -D
|
||||
.IR word ]
|
||||
.RB [ -FBNgitvshlpdxra ]
|
||||
@@ -18,7 +18,7 @@ See
|
||||
.B ctags
|
||||
generates the
|
||||
.I tags
|
||||
-and
|
||||
+and
|
||||
.I refs
|
||||
files from a group of C source files.
|
||||
The
|
||||
@@ -84,7 +84,7 @@ and regular expressions for anything else.
|
||||
.IP \fB-g\fR
|
||||
For static tags, generate entries that look like global tags.
|
||||
(I.e., never generate an extra "file:" attribute.)
|
||||
-This implies -s and -h.
|
||||
+This implies \-s and \-h.
|
||||
.IP \fB-i\fR
|
||||
Include inline definitions.
|
||||
A tag will be generated for each function which is declared as being
|
||||
@@ -151,7 +151,7 @@ the tag is defined, and the text of that line.
|
||||
.IP \fB-r\fP
|
||||
This causes
|
||||
.B ctags
|
||||
-to generate both
|
||||
+to generate both
|
||||
.I tags
|
||||
and
|
||||
.IR refs .
|
||||
|
83
editors/elvis/patches/patch-doc_elvis_man
Normal file
83
editors/elvis/patches/patch-doc_elvis_man
Normal file
@ -0,0 +1,83 @@
|
||||
$OpenBSD: patch-doc_elvis_man,v 1.1 2012/05/05 14:03:15 sthen Exp $
|
||||
--- doc/elvis.man.orig Tue Oct 21 04:32:26 2003
|
||||
+++ doc/elvis.man Sat May 5 13:48:08 2012
|
||||
@@ -1,4 +1,4 @@
|
||||
-.TH elvis 1
|
||||
+.TH ELVIS 1
|
||||
.SH NAME
|
||||
elvis \- a clone of the ex/vi text editor
|
||||
.SH SYNOPSIS
|
||||
@@ -46,7 +46,7 @@ you can give the command ":q" in each of its windows.
|
||||
If you've modified the buffer in a window, and you want to abandon those
|
||||
changes, then give the command ":q!" instead.
|
||||
.SH "HELP PAGES"
|
||||
-For more information please take a look at
|
||||
+For more information please take a look at
|
||||
.BR Elvis '
|
||||
help pages.
|
||||
These pages should have been installed together with
|
||||
@@ -83,7 +83,7 @@ by running...
|
||||
.B Elvis
|
||||
to output more status messages.
|
||||
You can use multiple \fB-V\fP flags to get even more detailed
|
||||
-information.
|
||||
+information.
|
||||
\fB-VVV\fP can be handy when
|
||||
.B Elvis
|
||||
isn't initializing itself quite the way you
|
||||
@@ -150,7 +150,7 @@ The \fB-S\fR flag is just used to make
|
||||
permanently paranoid, for the duration of this process.
|
||||
.IP \fB-SS\fR
|
||||
Sets security=restricted.
|
||||
-This is more extreme security than "-S".
|
||||
+This is more extreme security than "\-S".
|
||||
The intent is to protect the system against reading by malicious users.
|
||||
.IP "\fB-f \fIsession\fR"
|
||||
Makes
|
||||
@@ -163,13 +163,13 @@ Redirects messages and trace information out to
|
||||
.I logfile
|
||||
instead of going to stdout/stderr as usual.
|
||||
This is useful under Windows95, where stdout/stderr don't show anywhere.
|
||||
-If you're having trouble configuring WinElvis, try running "WinElvis -VVV -o log"
|
||||
+If you're having trouble configuring WinElvis, try running "WinElvis \-VVV \-o log"
|
||||
and then you can find the trace and error messages in the file "log".
|
||||
.IP "\fB-G \fIgui\fR"
|
||||
Makes
|
||||
.B Elvis
|
||||
use the named \fIgui\fR user interface instead of the default.
|
||||
-To see a list of supported user interfaces, give the command "elvis -?".
|
||||
+To see a list of supported user interfaces, give the command "elvis \-?".
|
||||
.IP "\fB-c \fIcommand\fR"
|
||||
After loading the first file, interpret \fIcommand\fR as an ex command line.
|
||||
Several ex command lines can be sent in one line, separated by "|".
|
||||
@@ -334,9 +334,9 @@ First, the server
|
||||
temporarily sets security=safer while the
|
||||
command is executed, for security reasons.
|
||||
Second, the command is executed by the server's existing window, not the
|
||||
-new one, so (for example) "elvis -client -c 20 foo" creates a new window for the file
|
||||
-"foo", and then moves the OLD WINDOW's cursor to line 20 of whatever file
|
||||
-it was showing.
|
||||
+new one, so (for example) "elvis \-client \-c 20 foo" creates a new window for
|
||||
+the file "foo", and then moves the OLD WINDOW's cursor to line 20 of whatever
|
||||
+file it was showing.
|
||||
.SS "X11 Mouse"
|
||||
.PP
|
||||
I've tried to reach a balance between the mouse behavior of
|
||||
@@ -454,7 +454,7 @@ when looking for a header file such as <stdio.h>.
|
||||
.IP "LC_ALL, LC_MESSAGES, and LANG"
|
||||
If LANG is defined, then
|
||||
.B Elvis
|
||||
-will look for for its message translations in
|
||||
+will look for its message translations in
|
||||
.IR $LANG/elvis.msg ,
|
||||
and only use just plain
|
||||
.I elvis.msg
|
||||
@@ -500,7 +500,7 @@ containing a file named
|
||||
.IP TERM
|
||||
For the termcap interface, this is the name of the terminal's termcap/terminfo
|
||||
entry.
|
||||
-Also, if its value is "kvt" or ends with "-r" or "-rv", then the background
|
||||
+Also, if its value is "kvt" or ends with "\-r" or "\-rv", then the background
|
||||
option will be "light" by default; else it will be "dark".
|
||||
.IP TERMCAP
|
||||
For the termcap interface, this can either store the name of a termcap file
|
63
editors/elvis/patches/patch-doc_ref_man
Normal file
63
editors/elvis/patches/patch-doc_ref_man
Normal file
@ -0,0 +1,63 @@
|
||||
$OpenBSD: patch-doc_ref_man,v 1.1 2012/05/05 14:03:15 sthen Exp $
|
||||
--- doc/ref.man.orig Tue Oct 21 04:32:26 2003
|
||||
+++ doc/ref.man Sat May 5 13:48:30 2012
|
||||
@@ -17,7 +17,7 @@ See
|
||||
quickly locates and displays the header of a function.
|
||||
To do this,
|
||||
.B ref
|
||||
-looks in the "tags" file for the line that describes the function, and then
|
||||
+looks in the "tags" file for the line that describes the function, and then
|
||||
scans the source file for the function.
|
||||
When it locates the function, it displays an introductory comment
|
||||
(if there is one), the function's declaration, and the declarations of all
|
||||
@@ -28,8 +28,8 @@ Output tag info, instead of the function header.
|
||||
The tag info consists of the three standard fields from each tag.
|
||||
The fields will be separated by tab characters, just like records from the
|
||||
traditional tags file format.
|
||||
-Consequently, you can use "ref -t -a >oldtags" to convert a new-style tags file
|
||||
-back to an old-style tags file.
|
||||
+Consequently, you can use "ref \-t \-a >oldtags" to convert a new-style tags
|
||||
+file back to an old-style tags file.
|
||||
.IP \fB-v\fR
|
||||
Output verbose tag info, instead of the function header.
|
||||
The verbose tag info shows the names and values of all attributes for each
|
||||
@@ -65,7 +65,7 @@ would only output the single most likely tag.)
|
||||
Search all tags files.
|
||||
Without this option,
|
||||
.B ref
|
||||
-would stop searching after processing the first tags file which
|
||||
+would stop searching after processing the first tags file which
|
||||
contained any tags which met the restrictions.
|
||||
.IP "\fB-p\fI tagpath\fR"
|
||||
List of directories or tags files to search through.
|
||||
@@ -122,7 +122,7 @@ global tags whose address mentions "Foo" \-
|
||||
probably friends of the Foo class.
|
||||
.TP
|
||||
.IB value [, value ...]
|
||||
-Short for
|
||||
+Short for
|
||||
.BI tagname: value [, value ...]
|
||||
.PP
|
||||
The sorting hints follow a similar form:
|
||||
@@ -160,10 +160,10 @@ I needed to generate extern declarations for all the f
|
||||
To find the global function headers, I used the command...
|
||||
.nf
|
||||
|
||||
- ref -a kind:f file:dummy
|
||||
+ ref \-a kind:f file:dummy
|
||||
.fi
|
||||
.PP
|
||||
-The "-a" causes
|
||||
+The "\-a" causes
|
||||
.B ref
|
||||
to output all headers, instead of just the first one that it finds.
|
||||
"kind:f" causes it to exclude any non-functions.
|
||||
@@ -184,7 +184,7 @@ For each source file, I also needed to find the static
|
||||
there, so for each "file.c" I used the command...
|
||||
.nf
|
||||
|
||||
- ref -a kind:f file:=file.c
|
||||
+ ref \-a kind:f file:=file.c
|
||||
.fi
|
||||
.PP
|
||||
This is very similar to the earlier command.
|
24
editors/elvis/patches/patch-move_c
Normal file
24
editors/elvis/patches/patch-move_c
Normal file
@ -0,0 +1,24 @@
|
||||
$OpenBSD: patch-move_c,v 1.1 2012/05/05 14:03:15 sthen Exp $
|
||||
|
||||
From Debian:
|
||||
"Fix a bug in the ) vi command that could cause a segmentation
|
||||
fault (patch from elvis-almost-2.2.1)"
|
||||
|
||||
--- move.c.orig Tue Oct 21 04:32:25 2003
|
||||
+++ move.c Sat May 5 13:53:51 2012
|
||||
@@ -1620,6 +1620,7 @@ RESULT m_fsentence(win, vinf)
|
||||
long para;
|
||||
long offset;
|
||||
long count;
|
||||
+ MARKBUF tmp;
|
||||
|
||||
DEFAULT(1);
|
||||
|
||||
@@ -1651,6 +1652,7 @@ RESULT m_fsentence(win, vinf)
|
||||
else
|
||||
{
|
||||
para = 0;
|
||||
+ scanseek(&cp, marktmp(tmp, markbuffer(win->state->cursor), 0L));
|
||||
}
|
||||
marksetoffset(win->state->cursor, offset);
|
||||
if (para == offset)
|
27
editors/elvis/patches/patch-tagelvis_c
Normal file
27
editors/elvis/patches/patch-tagelvis_c
Normal file
@ -0,0 +1,27 @@
|
||||
$OpenBSD: patch-tagelvis_c,v 1.1 2012/05/05 14:03:15 sthen Exp $
|
||||
|
||||
From Debian:
|
||||
"Elvis 2.2.0 has a bug causing it to exit 1 and not save any
|
||||
files if started in a directory which contains a directory
|
||||
"tags". This is fixed by the following patch."
|
||||
|
||||
--- tagelvis.c.orig Tue Oct 21 04:32:25 2003
|
||||
+++ tagelvis.c Sat May 5 13:17:33 2012
|
||||
@@ -672,6 +672,7 @@ void tebuilddef(buf)
|
||||
CHAR *cp; /* for scanning the line */
|
||||
long offset; /* offset of the tag within this buffer */
|
||||
int i;
|
||||
+ DIRPERM perm;
|
||||
|
||||
/* Destroy the old list, if any */
|
||||
tefreedef(buf);
|
||||
@@ -701,7 +702,8 @@ void tebuilddef(buf)
|
||||
* necessary because the ioopen() function displays an error
|
||||
* message when the file it's trying to read doesn't exist.
|
||||
*/
|
||||
- if (dirperm("tags") == DIR_NEW)
|
||||
+ perm = dirperm("tags");
|
||||
+ if (perm == DIR_NEW || perm == DIR_DIRECTORY)
|
||||
return;
|
||||
|
||||
/* open the file */
|
Loading…
Reference in New Issue
Block a user