summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-05-24 02:50:07 +0000
committerMike Frysinger <vapier@gentoo.org>2006-05-24 02:50:07 +0000
commit6e319524a370d680ce3aa7b515dd76275172ee00 (patch)
tree9d7bb26406b31d2112f88db7145435c9b8ee47d6 /app-editors/nano
parentAdd sys-libs/libchipcard support through chipcard2 USE flag. Fixes bug 131421... (diff)
downloadgentoo-2-6e319524a370d680ce3aa7b515dd76275172ee00.tar.gz
gentoo-2-6e319524a370d680ce3aa7b515dd76275172ee00.tar.bz2
gentoo-2-6e319524a370d680ce3aa7b515dd76275172ee00.zip
Grab fixes from upstream.
(Portage version: 2.1_rc1-r3)
Diffstat (limited to 'app-editors/nano')
-rw-r--r--app-editors/nano/ChangeLog10
-rw-r--r--app-editors/nano/files/digest-nano-1.3.11-r23
-rw-r--r--app-editors/nano/files/nano-1.3.11-backupfix.patch83
-rw-r--r--app-editors/nano/files/nano-1.3.11-columnfix.patch17
-rw-r--r--app-editors/nano/files/nano-1.3.11-parse.patch31
-rw-r--r--app-editors/nano/files/nano-1.3.11-wrapfix.patch36
-rw-r--r--app-editors/nano/nano-1.3.11-r2.ebuild85
7 files changed, 264 insertions, 1 deletions
diff --git a/app-editors/nano/ChangeLog b/app-editors/nano/ChangeLog
index 338d2c1657ef..5a6e2da85526 100644
--- a/app-editors/nano/ChangeLog
+++ b/app-editors/nano/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for app-editors/nano
# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-editors/nano/ChangeLog,v 1.107 2006/05/09 08:35:04 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-editors/nano/ChangeLog,v 1.108 2006/05/24 02:50:07 vapier Exp $
+
+*nano-1.3.11-r2 (24 May 2006)
+
+ 24 May 2006; Mike Frysinger <vapier@gentoo.org>
+ +files/nano-1.3.11-backupfix.patch, +files/nano-1.3.11-columnfix.patch,
+ +files/nano-1.3.11-parse.patch, +files/nano-1.3.11-wrapfix.patch,
+ +nano-1.3.11-r2.ebuild:
+ Grab fixes from upstream.
09 May 2006; Diego Pettenò <flameeyes@gentoo.org> nano-1.3.11.ebuild:
Drop ~x86-fbsd keyword from old package to force update to -r1 that has no
diff --git a/app-editors/nano/files/digest-nano-1.3.11-r2 b/app-editors/nano/files/digest-nano-1.3.11-r2
new file mode 100644
index 000000000000..4134e437cf8b
--- /dev/null
+++ b/app-editors/nano/files/digest-nano-1.3.11-r2
@@ -0,0 +1,3 @@
+MD5 ad6c2270fd674065ef994a58d3a8a7b7 nano-1.3.11.tar.gz 1172504
+RMD160 44156620181f5b968375c682b3713d869810f193 nano-1.3.11.tar.gz 1172504
+SHA256 5f8d718bf5274be6a3a7100ae6693b5001ad15f4b505f0ba670cc28f9b9fc798 nano-1.3.11.tar.gz 1172504
diff --git a/app-editors/nano/files/nano-1.3.11-backupfix.patch b/app-editors/nano/files/nano-1.3.11-backupfix.patch
new file mode 100644
index 000000000000..32dd74f0aac8
--- /dev/null
+++ b/app-editors/nano/files/nano-1.3.11-backupfix.patch
@@ -0,0 +1,83 @@
+diff -ur nano-1.3.11/src/files.c nano-1.3.11-fixed/src/files.c
+--- nano-1.3.11/src/files.c 2006-02-24 14:38:20.000000000 -0500
++++ nano-1.3.11-fixed/src/files.c 2006-05-18 08:59:47.000000000 -0400
+@@ -1336,7 +1336,10 @@
+ statusbar(_("Error reading %s: %s"), realname,
+ strerror(errno));
+ beep();
+- goto cleanup_and_exit;
++ /* If we can't read from the original file, go on, since
++ * only saving the original file is better than saving
++ * nothing. */
++ goto skip_backup;
+ }
+ }
+
+@@ -1375,8 +1378,10 @@
+ _("Too many backup files?"));
+ free(backuptemp);
+ free(backupname);
+- fclose(f);
+- goto cleanup_and_exit;
++ /* If we can't write to the backup, go on, since only
++ * saving the original file is better than saving
++ * nothing. */
++ goto skip_backup;
+ } else {
+ free(backupname);
+ backupname = backuptemp;
+@@ -1398,8 +1403,9 @@
+ free(backupname);
+ if (backup_file != NULL)
+ fclose(backup_file);
+- fclose(f);
+- goto cleanup_and_exit;
++ /* If we can't write to the backup, go on, since only saving
++ * the original file is better than saving nothing. */
++ goto skip_backup;
+ }
+
+ #ifdef DEBUG
+@@ -1414,7 +1420,6 @@
+ openfile->current_stat->st_uid,
+ openfile->current_stat->st_gid) == -1 ||
+ utime(backupname, &filetime) == -1) {
+- free(backupname);
+ if (copy_status == -1) {
+ statusbar(_("Error reading %s: %s"), realname,
+ strerror(errno));
+@@ -1422,11 +1427,15 @@
+ } else
+ statusbar(_("Error writing %s: %s"), backupname,
+ strerror(errno));
+- goto cleanup_and_exit;
++ /* If we can't read from or write to the backup, go on,
++ * since only saving the original file is better than saving
++ * nothing. */
+ }
+
+ free(backupname);
+ }
++
++ skip_backup:
+ #endif /* !NANO_TINY */
+
+ /* If NOFOLLOW_SYMLINKS is set and the file is a link, we aren't
+@@ -1454,6 +1463,17 @@
+ int fd_source;
+ FILE *f_source = NULL;
+
++ if (f == NULL) {
++ f = fopen(realname, "rb");
++
++ if (f == NULL) {
++ statusbar(_("Error reading %s: %s"), realname,
++ strerror(errno));
++ beep();
++ goto cleanup_and_exit;
++ }
++ }
++
+ tempname = safe_tempfile(&f);
+
+ if (tempname == NULL) {
diff --git a/app-editors/nano/files/nano-1.3.11-columnfix.patch b/app-editors/nano/files/nano-1.3.11-columnfix.patch
new file mode 100644
index 000000000000..ef49780e77d7
--- /dev/null
+++ b/app-editors/nano/files/nano-1.3.11-columnfix.patch
@@ -0,0 +1,17 @@
+diff -ur nano-1.3.11/src/winio.c nano-1.3.11-fixed/src/winio.c
+--- nano-1.3.11/src/winio.c 2006-03-29 20:18:29.000000000 -0500
++++ nano-1.3.11-fixed/src/winio.c 2006-05-19 14:08:24.000000000 -0400
+@@ -1857,7 +1857,12 @@
+ }
+ }
+ #ifdef ENABLE_UTF8
+- else if (ISSET(USE_UTF8) && mbwidth(buf_mb) > 1) {
++ else if (ISSET(USE_UTF8) && mbwidth(buf_mb) == 2) {
++ if (column >= start_col) {
++ converted[index++] = ' ';
++ start_col++;
++ }
++
+ converted[index++] = ' ';
+ start_col++;
+
diff --git a/app-editors/nano/files/nano-1.3.11-parse.patch b/app-editors/nano/files/nano-1.3.11-parse.patch
new file mode 100644
index 000000000000..0a70335f13cf
--- /dev/null
+++ b/app-editors/nano/files/nano-1.3.11-parse.patch
@@ -0,0 +1,31 @@
+diff -ur nano-1.3.11/src/rcfile.c nano-1.3.11-fixed/src/rcfile.c
+--- nano-1.3.11/src/rcfile.c 2006-01-06 17:04:38.000000000 -0500
++++ nano-1.3.11-fixed/src/rcfile.c 2006-04-15 12:43:25.000000000 -0400
+@@ -275,7 +275,7 @@
+ void parse_syntax(char *ptr)
+ {
+ const char *fileregptr = NULL, *nameptr = NULL;
+- const syntaxtype *tmpsyntax;
++ syntaxtype *tmpsyntax;
+ exttype *endext = NULL;
+ /* The end of the extensions list for this syntax. */
+
+@@ -300,11 +300,16 @@
+ if (ptr == NULL)
+ return;
+
++ /* Search for a duplicate syntax name. If we find one, free it, so
++ * that we always use the last syntax with a given name. */
+ for (tmpsyntax = syntaxes; tmpsyntax != NULL;
+ tmpsyntax = tmpsyntax->next) {
+ if (strcmp(nameptr, tmpsyntax->desc) == 0) {
+- rcfile_error(N_("Duplicate syntax name %s"), nameptr);
+- return;
++ syntaxtype *prev_syntax = tmpsyntax;
++
++ tmpsyntax = tmpsyntax->next;
++ free(prev_syntax);
++ break;
+ }
+ }
+
diff --git a/app-editors/nano/files/nano-1.3.11-wrapfix.patch b/app-editors/nano/files/nano-1.3.11-wrapfix.patch
new file mode 100644
index 000000000000..509d1afbfa7d
--- /dev/null
+++ b/app-editors/nano/files/nano-1.3.11-wrapfix.patch
@@ -0,0 +1,36 @@
+diff -ur nano-1.3.11/src/text.c nano-1.3.11-fixed/src/text.c
+--- nano-1.3.11/src/text.c 2006-02-18 16:32:29.000000000 -0500
++++ nano-1.3.11-fixed/src/text.c 2006-05-18 13:51:50.000000000 -0400
+@@ -607,14 +607,14 @@
+ * found with short enough display width. */
+ ssize_t cur_loc = 0;
+ /* Current index in line. */
++ size_t cur_pos = 0;
++ /* Current column position in line. */
+ int line_len;
+
+ assert(line != NULL);
+
+- while (*line != '\0' && goal >= 0) {
+- size_t pos = 0;
+-
+- line_len = parse_mbchar(line, NULL, &pos);
++ while (*line != '\0' && goal >= cur_pos) {
++ line_len = parse_mbchar(line, NULL, &cur_pos);
+
+ if (is_blank_mbchar(line)
+ #ifndef DISABLE_HELP
+@@ -629,12 +629,11 @@
+ #endif
+ }
+
+- goal -= pos;
+ line += line_len;
+ cur_loc += line_len;
+ }
+
+- if (goal >= 0)
++ if (goal >= cur_pos)
+ /* In fact, the whole line displays shorter than goal. */
+ return cur_loc;
+
diff --git a/app-editors/nano/nano-1.3.11-r2.ebuild b/app-editors/nano/nano-1.3.11-r2.ebuild
new file mode 100644
index 000000000000..3099c6ad5040
--- /dev/null
+++ b/app-editors/nano/nano-1.3.11-r2.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-editors/nano/nano-1.3.11-r2.ebuild,v 1.1 2006/05/24 02:50:07 vapier Exp $
+
+#ECVS_SERVER="savannah.gnu.org:/cvsroot/nano"
+#ECVS_MODULE="nano"
+#ECVS_AUTH="pserver"
+#ECVS_USER="anonymous"
+#inherit cvs
+inherit eutils
+
+MY_P=${PN}-${PV/_}
+DESCRIPTION="GNU GPL'd Pico clone with more functionality"
+HOMEPAGE="http://www.nano-editor.org/"
+SRC_URI="http://www.nano-editor.org/dist/v1.3/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc-macos ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
+IUSE="build debug justify minimal ncurses nls slang spell unicode"
+
+DEPEND=">=sys-libs/ncurses-5.2
+ nls? ( sys-devel/gettext )
+ !ncurses? ( slang? ( sys-libs/slang ) )"
+PROVIDE="virtual/editor"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ # fixes from upstream, see mailing list
+ epatch "${FILESDIR}"/${P}-backupfix.patch
+ epatch "${FILESDIR}"/${P}-regexfix.patch
+ epatch "${FILESDIR}"/${P}-columnfix.patch
+ epatch "${FILESDIR}"/${P}-wrapfix.patch
+ epatch "${FILESDIR}"/${P}-parse.patch
+}
+
+src_compile() {
+ if [[ ! -e configure ]] ; then
+ ./autogen.sh || die "autogen failed"
+ fi
+
+ local myconf=""
+ use ncurses \
+ && myconf="--without-slang" \
+ || myconf="${myconf} $(use_with slang)"
+
+ econf \
+ --bindir=/bin \
+ --enable-color \
+ --enable-multibuffer \
+ --enable-nanorc \
+ --disable-wrapping-as-root \
+ $(use_enable spell) \
+ $(use_enable justify) \
+ $(use_enable debug) \
+ $(use_enable nls) \
+ $(use_enable unicode utf8) \
+ $(use_enable minimal tiny) \
+ ${myconf} \
+ || die "configure failed"
+ emake || die
+}
+
+src_install() {
+ make DESTDIR="${D}" install || die
+
+ if use build ; then
+ rm -rf "${D}"/usr/share
+ else
+ cat "${FILESDIR}"/nanorc-* >> doc/nanorc.sample
+ dodoc ChangeLog README doc/nanorc.sample AUTHORS BUGS NEWS TODO
+ dohtml *.html
+ insinto /etc
+ newins doc/nanorc.sample nanorc
+ fi
+
+ dodir /usr/bin
+ dosym /bin/nano /usr/bin/nano
+}
+
+pkg_postinst() {
+ einfo "More helpful info about nano, visit the GDP page:"
+ einfo "http://www.gentoo.org/doc/en/nano-basics-guide.xml"
+}