[arch-commits] Commit in vi/trunk (6 files)
Paul Mattal
paul at archlinux.org
Sun Mar 7 19:09:57 UTC 2010
Date: Sunday, March 7, 2010 @ 14:09:56
Author: paul
Revision: 71573
package cleanup per FS#18215
Added:
vi/trunk/navkeys.patch
Modified:
vi/trunk/PKGBUILD
Deleted:
vi/trunk/c_locale.patch
vi/trunk/db47-hack.patch
vi/trunk/du.patch
vi/trunk/widechar.patch
-----------------+
PKGBUILD | 40 +++++++++++++++++---------------
c_locale.patch | 30 ------------------------
db47-hack.patch | 27 ---------------------
du.patch | 67 ------------------------------------------------------
navkeys.patch | 55 ++++++++++++++++++++++++++++++++++++++++++++
widechar.patch | 67 ------------------------------------------------------
6 files changed, 77 insertions(+), 209 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2010-03-07 18:52:27 UTC (rev 71572)
+++ PKGBUILD 2010-03-07 19:09:56 UTC (rev 71573)
@@ -3,7 +3,7 @@
pkgname=vi
pkgver=050325
-pkgrel=2
+pkgrel=3
pkgdesc='The original ex/vi text editor.'
arch=('i686' 'x86_64')
url='http://ex-vi.sourceforge.net/'
@@ -12,25 +12,29 @@
groups=('base')
options=(force strip !libtool emptydirs)
source=(http://downloads.sourceforge.net/sourceforge/ex-vi/ex-${pkgver}.tar.bz2
- du.patch increase-tube.patch exrc.sample)
-md5sums=('e668595254233e4d96811083a3e4e2f3' '2d80fbc7d612963466d9ae45058a3778' \
+ navkeys.patch increase-tube.patch exrc.sample)
+md5sums=('e668595254233e4d96811083a3e4e2f3' 'aac133930047eafa4f28736cfaf976b3'
'e596e05a00a24187b576e389fa1de45d' 'd3b483c994d859232ce369b82a4b5668')
build() {
- cd ${srcdir}/ex-${pkgver}
- sed -i -e 's/^PREFIX.*$/PREFIX = \/usr/' Makefile
- sed -i -e 's/^LIBEXECDIR.*$/LIBEXECDIR = $(PREFIX)\/lib\/ex/' Makefile
- sed -i -e 's/^PRESERVEDIR.*$/PRESERVEDIR = \/var\/lib\/ex/' Makefile
- sed -i -e 's/^DESTDIR.*$/DESTDIR = ..\/..\/pkg/' Makefile
- sed -i -e 's/^INSTALL.*$/INSTALL = \/bin\/install/' Makefile
- sed -i -e 's/^FEATURES.*$/FEATURES = -DCHDIR -DFASTTAG -DUCVISUAL -DMB -DBIT8/' Makefile
- sed -i -e 's/^TERMLIB.*$/TERMLIB = ncurses/' Makefile
- sed -i -e 's/^\.B \/usr\/libexec/.B \/usr\/lib\/ex/' vi.1
- sed -i -e 's/^\.B \/var\/preserve$/.B \/var\/lib\/ex/' vi.1
- patch -Np1 -i ../du.patch || return 1
+ cd ${srcdir}/ex-${pkgver} || return 1
+
+ # apply patches
+ patch -Np1 -i ../navkeys.patch || return 1
patch -Np0 -i ../increase-tube.patch || return 1
- make || return 1
- make install
- install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/vi/LICENSE
- install -D -m644 ${srcdir}/exrc.sample ${pkgdir}/etc/exrc.sample
+
+ # correct paths in manpages
+ sed -i -e 's/^\.B \/usr\/libexec/.B \/usr\/lib\/ex/' vi.1 \
+ || return 1
+ sed -i -e 's/^\.B \/var\/preserve$/.B \/var\/lib\/ex/' vi.1 \
+ || return 1
+
+ make PREFIX=/usr LIBEXECDIR=/usr/lib/ex PRESERVEDIR=/var/lib/ex \
+ 'FEATURES=-DCHDIR -DFASTTAG -DUCVISUAL -DMB -DBIT8' TERMLIB=ncurses \
+ || return 1
+ make PREFIX=/usr LIBEXECDIR=/usr/lib/ex PRESERVEDIR=/var/lib/ex INSTALL=/bin/install \
+ "DESTDIR=$pkgdir" install || return 1
+
+ install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE \
+ || return 1
}
Deleted: c_locale.patch
===================================================================
--- c_locale.patch 2010-03-07 18:52:27 UTC (rev 71572)
+++ c_locale.patch 2010-03-07 19:09:56 UTC (rev 71573)
@@ -1,30 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 27support_C_locale.dpatch by <hesso at pool.math.tu-berlin.de>
-##
-## DP: Allow users to edit 8-bit files even under LC_CTYPE=C.
-
- at DPATCH@
---- nvi-1.81.6.orig/common/conv.c 2007-11-18 17:41:42.000000000 +0100
-+++ nvi-1.81.6/common/conv.c 2009-03-09 16:45:37.812022582 +0100
-@@ -322,11 +322,16 @@
- else {
- setlocale(LC_ALL, "");
- #ifdef USE_WIDECHAR
-- sp->conv.sys2int = cs_char2int;
-- sp->conv.int2sys = cs_int2char;
-- sp->conv.file2int = fe_char2int;
-- sp->conv.int2file = fe_int2char;
-- sp->conv.input2int = ie_char2int;
-+ if (!strcmp(LANGCODESET, "ANSI_X3.4-1968")) {
-+ sp->conv.file2int = sp->conv.input2int = sp->conv.sys2int = raw2int;
-+ sp->conv.int2sys = sp->conv.int2file = int2raw;
-+ } else {
-+ sp->conv.sys2int = cs_char2int;
-+ sp->conv.int2sys = cs_int2char;
-+ sp->conv.file2int = fe_char2int;
-+ sp->conv.int2file = fe_int2char;
-+ sp->conv.input2int = ie_char2int;
-+ }
- #endif
- #ifdef USE_ICONV
- o_set(sp, O_FILEENCODING, OS_STRDUP, nl_langinfo(CODESET), 0);
Deleted: db47-hack.patch
===================================================================
--- db47-hack.patch 2010-03-07 18:52:27 UTC (rev 71572)
+++ db47-hack.patch 2010-03-07 19:09:56 UTC (rev 71573)
@@ -1,27 +0,0 @@
-diff --git a/cl/cl_main.c b/cl/cl_main.c
-index 0ecbe44..87feb28 100644
---- a/cl/cl_main.c
-+++ b/cl/cl_main.c
-@@ -57,6 +57,9 @@ main(int argc, char **argv)
- int rval;
- char **p_av, **t_av, *ttype;
-
-+ /* Hack for db-4.7. */
-+ unsetenv("LANG");
-+ unsetenv("LC_ALL");
- /* If loaded at 0 and jumping through a NULL pointer, stop. */
- if (reenter++)
- abort();
-diff --git a/common/db.h b/common/db.h
-index fd1dc64..00a7ce7 100644
---- a/common/db.h
-+++ b/common/db.h
-@@ -18,7 +18,7 @@
-
- #if DB_VERSION_MAJOR >= 4 && DB_VERSION_MINOR >= 1
- #define db_open(db,file,type,flags,mode) \
-- (db)->open(db, NULL, file, NULL, type, flags, mode)
-+ (db)->open(db, NULL, file, NULL, type, flags | DB_CREATE, mode)
- #else
- #define db_open(db,file,type,flags,mode) \
- (db)->open(db, file, NULL, type, flags, mode)
\ No newline at end of file
Deleted: du.patch
===================================================================
--- du.patch 2010-03-07 18:52:27 UTC (rev 71572)
+++ du.patch 2010-03-07 19:09:56 UTC (rev 71573)
@@ -1,67 +0,0 @@
-diff -ru ex-050325/ex_tty.c ex-050325-du/ex_tty.c
---- ex-050325/ex_tty.c 2005-03-04 13:42:58.000000000 +0100
-+++ ex-050325-du/ex_tty.c 2009-06-25 20:06:57.000000000 +0200
-@@ -132,7 +132,8 @@
- &ED, &EI, &F0, &F1, &F2, &F3, &F4, &F5, &F6, &F7, &F8, &F9,
- &HO, &IC, &IM, &IP, &KD, &KE, &KH, &KL, &KR, &KS, &KU, &LL, &ND, &xNL,
- &xPC, &RC, &SC, &SE, &SF, &SO, &SR, &TA, &TE, &TI, &UP, &VB, &VS, &VE,
-- &AL_PARM, &DL_PARM, &UP_PARM, &DOWN_PARM, &LEFT_PARM, &RIGHT_PARM
-+ &AL_PARM, &DL_PARM, &UP_PARM, &DOWN_PARM, &LEFT_PARM, &RIGHT_PARM,
-+ &kI, &kD, &kh, &at7, &kP, &kN
- };
- bool *sflags[] = {
- &AM, &BS, &DA, &DB, &EO, &HC,
-@@ -170,7 +171,12 @@
- addmac1(KD, "j", "down", arrows, 1);
- addmac1(KL, "h", "left", arrows, 1);
- addmac1(KR, "l", "right", arrows, 1);
-- addmac1(KH, "H", "home", arrows, 1);
-+ addmac1(kI, "i", "insert", arrows, 1);
-+ addmac1(kD, "x", "delete", arrows, 1);
-+ addmac1(kh, "^", "home", arrows, 1);
-+ addmac1(at7, "$", "end", arrows, 1);
-+ addmac1(kP, "", "pgup", arrows, 1);
-+ addmac1(kN, "", "pgdn", arrows, 1);
-
- /*
- * Handle funny termcap capabilities
-@@ -341,7 +347,7 @@
- *(*fp++) = flag;
- namp += 2;
- } while (*namp);
-- namp = "albcbtcdceclcmcrcsdcdldmdoedeik0k1k2k3k4k5k6k7k8k9hoicimipkdkekhklkrkskullndnlpcrcscsesfsosrtatetiupvbvsveALDLUPDOLERI";
-+ namp = "albcbtcdceclcmcrcsdcdldmdoedeik0k1k2k3k4k5k6k7k8k9hoicimipkdkekhklkrkskullndnlpcrcscsesfsosrtatetiupvbvsveALDLUPDOLERIkIkDkh at 7kPkN";
- sp = sstrs;
- do {
- string = tgetstr(namp, &aoftspace);
-diff -ru ex-050325/ex_tty.h ex-050325-du/ex_tty.h
---- ex-050325/ex_tty.h 2004-12-01 19:21:06.000000000 +0100
-+++ ex-050325-du/ex_tty.h 2009-06-25 20:06:05.000000000 +0200
-@@ -183,6 +183,15 @@
- var bool XX; /* Tektronix 4025 insert line */
- /* X? is reserved for severely nauseous glitches */
- /* If there are enough of these we may need bit masks! */
-+/*
-+ * Insert, Delete, Home, End, PgUp an PgDown keys
-+ */
-+var char *kI;
-+var char *kD;
-+var char *kh;
-+var char *at7;
-+var char *kP;
-+var char *kN;
-
- /*
- * From the tty modes...
-diff -ru ex-050325/libuxre/regnfa.c ex-050325-du/libuxre/regnfa.c
---- ex-050325/libuxre/regnfa.c 2005-02-06 15:16:14.000000000 +0100
-+++ ex-050325-du/libuxre/regnfa.c 2009-06-25 21:33:30.000000000 +0200
-@@ -535,7 +535,7 @@
- * the alignments (given the varying length of rm[])
- * are potentially nontrivial.
- */
-- n = offsetof(Context, rm) + np->rmlen * sizeof(regmatch_t);
-+ n = ((size_t)&cp->rm - (size_t)cp) + np->rmlen * sizeof(regmatch_t);
- i = 4;
- cpp = &np->avail;
- while ((ncp = malloc(n)) != 0)
Added: navkeys.patch
===================================================================
--- navkeys.patch (rev 0)
+++ navkeys.patch 2010-03-07 19:09:56 UTC (rev 71573)
@@ -0,0 +1,55 @@
+diff -ru ex-050325/ex_tty.c ex-050325-du/ex_tty.c
+--- ex-050325/ex_tty.c 2005-03-04 13:42:58.000000000 +0100
++++ ex-050325-du/ex_tty.c 2009-06-25 20:06:57.000000000 +0200
+@@ -132,7 +132,8 @@
+ &ED, &EI, &F0, &F1, &F2, &F3, &F4, &F5, &F6, &F7, &F8, &F9,
+ &HO, &IC, &IM, &IP, &KD, &KE, &KH, &KL, &KR, &KS, &KU, &LL, &ND, &xNL,
+ &xPC, &RC, &SC, &SE, &SF, &SO, &SR, &TA, &TE, &TI, &UP, &VB, &VS, &VE,
+- &AL_PARM, &DL_PARM, &UP_PARM, &DOWN_PARM, &LEFT_PARM, &RIGHT_PARM
++ &AL_PARM, &DL_PARM, &UP_PARM, &DOWN_PARM, &LEFT_PARM, &RIGHT_PARM,
++ &kI, &kD, &kh, &at7, &kP, &kN
+ };
+ bool *sflags[] = {
+ &AM, &BS, &DA, &DB, &EO, &HC,
+@@ -170,7 +171,12 @@
+ addmac1(KD, "j", "down", arrows, 1);
+ addmac1(KL, "h", "left", arrows, 1);
+ addmac1(KR, "l", "right", arrows, 1);
+- addmac1(KH, "H", "home", arrows, 1);
++ addmac1(kI, "i", "insert", arrows, 1);
++ addmac1(kD, "x", "delete", arrows, 1);
++ addmac1(kh, "^", "home", arrows, 1);
++ addmac1(at7, "$", "end", arrows, 1);
++ addmac1(kP, "", "pgup", arrows, 1);
++ addmac1(kN, "", "pgdn", arrows, 1);
+
+ /*
+ * Handle funny termcap capabilities
+@@ -341,7 +347,7 @@
+ *(*fp++) = flag;
+ namp += 2;
+ } while (*namp);
+- namp = "albcbtcdceclcmcrcsdcdldmdoedeik0k1k2k3k4k5k6k7k8k9hoicimipkdkekhklkrkskullndnlpcrcscsesfsosrtatetiupvbvsveALDLUPDOLERI";
++ namp = "albcbtcdceclcmcrcsdcdldmdoedeik0k1k2k3k4k5k6k7k8k9hoicimipkdkekhklkrkskullndnlpcrcscsesfsosrtatetiupvbvsveALDLUPDOLERIkIkDkh at 7kPkN";
+ sp = sstrs;
+ do {
+ string = tgetstr(namp, &aoftspace);
+diff -ru ex-050325/ex_tty.h ex-050325-du/ex_tty.h
+--- ex-050325/ex_tty.h 2004-12-01 19:21:06.000000000 +0100
++++ ex-050325-du/ex_tty.h 2009-06-25 20:06:05.000000000 +0200
+@@ -183,6 +183,15 @@
+ var bool XX; /* Tektronix 4025 insert line */
+ /* X? is reserved for severely nauseous glitches */
+ /* If there are enough of these we may need bit masks! */
++/*
++ * Insert, Delete, Home, End, PgUp an PgDown keys
++ */
++var char *kI;
++var char *kD;
++var char *kh;
++var char *at7;
++var char *kP;
++var char *kN;
+
+ /*
+ * From the tty modes...
Deleted: widechar.patch
===================================================================
--- widechar.patch 2010-03-07 18:52:27 UTC (rev 71572)
+++ widechar.patch 2010-03-07 19:09:56 UTC (rev 71573)
@@ -1,67 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 13widechar_horrors.dpatch by <hesso at pool.math.tu-berlin.de>
-##
-## DP: This patch tries to cope with the fact that widechar support
-## DP: in nvi is at best rudimentary.
-## DP: Hunk 1)
-## DP: * Due to "ch = *t", this code is not wide-char aware, so
-## DP: cast the value to a proper type so the KEY_ macros make
-## DP: the right choice.
-## DP: Hunk 2)
-## DP: * Printing of the in-/decreased number back into the screen
-## DP: buffer is not widechar-aware, either. Add a dirty fix.
-## DP: Cf. #497349.
-
- at DPATCH@
---- nvi-1.81.6.orig/vi/vs_msg.c 2007-11-18 17:41:42.000000000 +0100
-+++ nvi-1.81.6/vi/vs_msg.c 2009-03-01 14:51:08.211414132 +0100
-@@ -472,10 +472,10 @@
- */
- if (ch == '\t')
- ch = ' ';
-- chlen = KEY_LEN(sp, ch);
-+ chlen = KEY_LEN(sp, (unsigned char)ch);
- if (cbp + chlen >= ecbp)
- FLUSH;
-- for (kp = KEY_NAME(sp, ch); chlen--;)
-+ for (kp = KEY_NAME(sp, (unsigned char)ch); chlen--;)
- *cbp++ = *kp++;
- }
- if (cbp > cbuf)
---- nvi-1.81.6.orig/vi/v_increment.c 2007-11-18 17:41:42.000000000 +0100
-+++ nvi-1.81.6/vi/v_increment.c 2009-03-01 15:12:50.950415874 +0100
-@@ -57,7 +57,7 @@
- long change, ltmp, lval;
- size_t beg, blen, end, len, nlen, wlen;
- int base, isempty, rval;
-- char *ntype, nbuf[100];
-+ char *ntype, nbuf[100 * sizeof(CHAR_T)];
- CHAR_T *bp, *p, *t;
-
- /* Validate the operator. */
-@@ -202,7 +202,7 @@
- /* If we cross 0, signed numbers lose their sign. */
- if (lval == 0 && ntype == fmt[SDEC])
- ntype = fmt[DEC];
-- nlen = snprintf(nbuf, sizeof(nbuf), ntype, lval);
-+ nlen = snprintf(nbuf, sizeof(nbuf)/sizeof(CHAR_T), ntype, lval);
- } else {
- if ((nret = nget_uslong(sp, &ulval, t, NULL, base)) != NUM_OK)
- goto err;
-@@ -224,7 +224,15 @@
- if (base == 16)
- wlen -= 2;
-
-- nlen = snprintf(nbuf, sizeof(nbuf), ntype, wlen, ulval);
-+ nlen = snprintf(nbuf, sizeof(nbuf)/sizeof(CHAR_T), ntype, wlen, ulval);
-+ }
-+
-+ /* Inflate the printed char buffer to CHAR_T elements if necessary */
-+ if (sizeof(CHAR_T) > sizeof(char)) {
-+ int nlen_inflate;
-+ for (nlen_inflate = nlen; nlen_inflate >= 0; nlen_inflate--) {
-+ ((CHAR_T *)nbuf)[nlen_inflate] = nbuf[nlen_inflate];
-+ }
- }
-
- /* Build the new line. */
More information about the arch-commits
mailing list