summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarald van Dijk <truedfx@gentoo.org>2006-10-06 12:27:33 +0000
committerHarald van Dijk <truedfx@gentoo.org>2006-10-06 12:27:33 +0000
commit1cef317eb9ce88a54316309aa572e5277a6d8396 (patch)
tree9facccb57f4eec0d913818595747c0ed1e121d7a /app-editors/nvi
parentsparc has the same csu issue as amd64 - lacking a dir to install to (diff)
downloadhistorical-1cef317eb9ce88a54316309aa572e5277a6d8396.tar.gz
historical-1cef317eb9ce88a54316309aa572e5277a6d8396.tar.bz2
historical-1cef317eb9ce88a54316309aa572e5277a6d8396.zip
Better multibyte support (bug #150169)
Package-Manager: portage-2.1.2_pre2-r3
Diffstat (limited to 'app-editors/nvi')
-rw-r--r--app-editors/nvi/ChangeLog9
-rw-r--r--app-editors/nvi/files/digest-nvi-1.81.5-r53
-rw-r--r--app-editors/nvi/files/nvi-1.81.5-wide.patch102
-rw-r--r--app-editors/nvi/nvi-1.81.5-r5.ebuild61
4 files changed, 174 insertions, 1 deletions
diff --git a/app-editors/nvi/ChangeLog b/app-editors/nvi/ChangeLog
index d8fa58996ac7..8d2a2970ff75 100644
--- a/app-editors/nvi/ChangeLog
+++ b/app-editors/nvi/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for app-editors/nvi
# Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-editors/nvi/ChangeLog,v 1.36 2006/10/04 17:58:46 blubb Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-editors/nvi/ChangeLog,v 1.37 2006/10/06 12:27:32 truedfx Exp $
+
+*nvi-1.81.5-r5 (06 Oct 2006)
+
+ 06 Oct 2006; Harald van Dijk <truedfx@gentoo.org>
+ +files/nvi-1.81.5-wide.patch, -nvi-1.81.5-r4.ebuild,
+ +nvi-1.81.5-r5.ebuild:
+ Better multibyte support (bug #150169)
04 Oct 2006; Simon Stelling <blubb@gentoo.org> nvi-1.81.5-r3.ebuild:
stable on amd64
diff --git a/app-editors/nvi/files/digest-nvi-1.81.5-r5 b/app-editors/nvi/files/digest-nvi-1.81.5-r5
new file mode 100644
index 000000000000..ebc8a212032c
--- /dev/null
+++ b/app-editors/nvi/files/digest-nvi-1.81.5-r5
@@ -0,0 +1,3 @@
+MD5 5cc674f049054f3e8f7600df8d8d5cf4 nvi-1.81.5.tar.gz 1628555
+RMD160 d1cfd4a87250baea4832ed6cac69ed18e6880915 nvi-1.81.5.tar.gz 1628555
+SHA256 4c6b5c13999d8883da85e49e6dc2d02dddc084ac24fc72102cc372c5a0b7e745 nvi-1.81.5.tar.gz 1628555
diff --git a/app-editors/nvi/files/nvi-1.81.5-wide.patch b/app-editors/nvi/files/nvi-1.81.5-wide.patch
new file mode 100644
index 000000000000..ebf3305fcbca
--- /dev/null
+++ b/app-editors/nvi/files/nvi-1.81.5-wide.patch
@@ -0,0 +1,102 @@
+Make sure nvi handles multibyte characters properly in more cases than
+before. Submitted by Karl Hakimian, http://bugs.gentoo.org/150169
+
+--- nvi-1.81.5/common/multibyte.h
++++ nvi-1.81.5/common/multibyte.h
+@@ -19,7 +19,12 @@
+ #define STRCMP wcscmp
+ #define STRPBRK wcspbrk
+ #define TOUPPER towupper
++#define TOLOWER towlower
++#define ISUPPER iswupper
++#define ISLOWER iswlower
+ #define STRSET wmemset
++#define GETC getwc
++#define VI_EOF WEOF
+
+ #define L(ch) L ## ch
+
+@@ -38,7 +43,12 @@
+ #define STRCMP strcmp
+ #define STRPBRK strpbrk
+ #define TOUPPER toupper
++#define TOLOWER tolower
++#define ISUPPER isupper
++#define ISLOWER islower
+ #define STRSET memset
++#define GETC getc
++#define VI_EOF EOF
+
+ #define L(ch) ch
+
+--- nvi-1.81.5/ex/ex_subst.c
++++ nvi-1.81.5/ex/ex_subst.c
+@@ -909,7 +909,7 @@
+ }
+ if (LF_ISSET(SEARCH_ICL)) {
+ iclower: for (p = ptrn, len = plen; len > 0; ++p, --len)
+- if (isupper(*p))
++ if (ISUPPER(*p))
+ break;
+ if (len == 0)
+ reflags |= REG_ICASE;
+@@ -1363,15 +1363,15 @@
+ conv = C_NOTSET; \
+ /* FALLTHROUGH */ \
+ case C_LOWER: \
+- if (isupper(__ch)) \
++ if (ISUPPER(__ch)) \
+- __ch = tolower(__ch); \
++ __ch = TOLOWER(__ch); \
+ break; \
+ case C_ONEUPPER: \
+ conv = C_NOTSET; \
+ /* FALLTHROUGH */ \
+ case C_UPPER: \
+- if (islower(__ch)) \
++ if (ISLOWER(__ch)) \
+- __ch = toupper(__ch); \
++ __ch = TOUPPER(__ch); \
+ break; \
+ default: \
+ abort(); \
+--- nvi-1.81.5/ex/ex_util.c
++++ nvi-1.81.5/ex/ex_util.c
+@@ -67,7 +67,7 @@
+ BINC_RETW(sp, exp->ibp, exp->ibp_len, off + 1);
+ p = exp->ibp + off;
+ }
+- if ((ch = getc(fp)) == EOF && !feof(fp)) {
++ if ((ch = GETC(fp)) == VI_EOF && !feof(fp)) {
+ if (errno == EINTR) {
+ errno = 0;
+ clearerr(fp);
+@@ -75,8 +75,8 @@
+ }
+ return (1);
+ }
+- if (ch == EOF || ch == '\n') {
++ if (ch == VI_EOF || ch == '\n') {
+- if (ch == EOF && !off)
++ if (ch == VI_EOF && !off)
+ return (1);
+ *lenp = off;
+ return (0);
+--- nvi-1.81.5/vi/v_ulcase.c
++++ nvi-1.81.5/vi/v_ulcase.c
+@@ -154,11 +154,11 @@
+ change = rval = 0;
+ for (p = bp + scno, t = bp + ecno + 1; p < t; ++p) {
+ ch = *(u_char *)p;
+- if (islower(ch)) {
++ if (ISLOWER(*p)) {
+- *p = toupper(ch);
++ *p = TOUPPER(*p);
+ change = 1;
+- } else if (isupper(ch)) {
++ } else if (ISUPPER(*p)) {
+- *p = tolower(ch);
++ *p = TOLOWER(*p);
+ change = 1;
+ }
+ }
diff --git a/app-editors/nvi/nvi-1.81.5-r5.ebuild b/app-editors/nvi/nvi-1.81.5-r5.ebuild
new file mode 100644
index 000000000000..5ab5dc2b67bc
--- /dev/null
+++ b/app-editors/nvi/nvi-1.81.5-r5.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-editors/nvi/nvi-1.81.5-r5.ebuild,v 1.1 2006/10/06 12:27:32 truedfx Exp $
+
+inherit eutils
+
+DESCRIPTION="Vi clone"
+HOMEPAGE="http://www.bostic.com/vi/"
+SRC_URI="http://www.kotnet.org/~skimo/nvi/devel/${P}.tar.gz"
+
+LICENSE="Sleepycat"
+SLOT="0"
+KEYWORDS="~x86 ~ppc ~sparc ~mips ~alpha ~hppa ~amd64 ~ppc64"
+IUSE="perl unicode"
+
+DEPEND="=sys-libs/db-4*"
+RDEPEND="${DEPEND}
+ app-admin/eselect-vi"
+PROVIDE="virtual/editor"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-build.patch
+ # Fix bug 23888
+ epatch "${FILESDIR}"/${P}-tcsetattr.patch
+ # Fix bug 150169
+ epatch "${FILESDIR}"/${P}-wide.patch
+ epatch "${FILESDIR}"/${P}-gcc4.patch
+ epatch "${FILESDIR}"/${P}-db4.patch
+ touch "${S}"/dist/{configure,aclocal.m4,Makefile.in,stamp-h.in}
+}
+
+src_compile() {
+ local myconf
+
+ use perl && myconf="${myconf} --enable-perlinterp"
+ use unicode && myconf="${myconf} --enable-widechar"
+
+ cd build.unix
+ ECONF_SOURCE=../dist econf \
+ --program-prefix=n \
+ ${myconf} \
+ || die "configure failed"
+ emake || die "make failed"
+}
+
+src_install() {
+ cd build.unix
+ emake -j1 DESTDIR="${D}" install || die "install failed"
+}
+
+pkg_postinst() {
+ einfo "Setting /usr/bin/vi symlink"
+ eselect vi set "${PN}"
+}
+
+pkg_postrm() {
+ einfo "Updating /usr/bin/vi symlink"
+ eselect vi update
+}