summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2008-10-19 06:56:40 +0000
committerMike Frysinger <vapier@gentoo.org>2008-10-19 06:56:40 +0000
commit4bc101f12b1edee707c5c93e8e76a2e3b9f18ea6 (patch)
tree22d34d565a092a98f81e29b27d4909c4be2501d4 /app-editors/nano
parentbroken (diff)
downloadhistorical-4bc101f12b1edee707c5c93e8e76a2e3b9f18ea6.tar.gz
historical-4bc101f12b1edee707c5c93e8e76a2e3b9f18ea6.tar.bz2
historical-4bc101f12b1edee707c5c93e8e76a2e3b9f18ea6.zip
Add fix from upstream for cutting at end of file #240330 by amadeus.bit.
Package-Manager: portage-2.2_rc12/cvs/Linux 2.6.26.2 x86_64
Diffstat (limited to 'app-editors/nano')
-rw-r--r--app-editors/nano/ChangeLog8
-rw-r--r--app-editors/nano/Manifest15
-rw-r--r--app-editors/nano/files/nano-2.1.6-cut-last.patch121
-rw-r--r--app-editors/nano/nano-2.1.6-r2.ebuild86
4 files changed, 217 insertions, 13 deletions
diff --git a/app-editors/nano/ChangeLog b/app-editors/nano/ChangeLog
index 17818a5b9738..7690ed657ee2 100644
--- a/app-editors/nano/ChangeLog
+++ b/app-editors/nano/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for app-editors/nano
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-editors/nano/ChangeLog,v 1.217 2008/10/08 10:09:57 armin76 Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-editors/nano/ChangeLog,v 1.218 2008/10/19 06:56:40 vapier Exp $
+
+*nano-2.1.6-r2 (19 Oct 2008)
+
+ 19 Oct 2008; Mike Frysinger <vapier@gentoo.org>
+ +files/nano-2.1.6-cut-last.patch, +nano-2.1.6-r2.ebuild:
+ Add fix from upstream for cutting at end of file #240330 by amadeus.bit.
08 Oct 2008; Raúl Porcel <armin76@gentoo.org> nano-2.0.9.ebuild,
nano-2.1.5.ebuild:
diff --git a/app-editors/nano/Manifest b/app-editors/nano/Manifest
index f0b52ad3a465..618a49d5f914 100644
--- a/app-editors/nano/Manifest
+++ b/app-editors/nano/Manifest
@@ -1,6 +1,3 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
AUX awk.nanorc 1504 RMD160 c932525ef987d799b255d308a1d354a56d3302a7 SHA1 22da2f05cabf3ae14a85352133315712816cab7b SHA256 c4fb326c9a11a56220dd8a566918c389794fd25e1cc3fda94c5925e5367977bb
AUX css.nanorc 327 RMD160 a2d28f8f74c53b46d85d6ad986ad7dde7b3b7e50 SHA1 184cc1768789564d795398240ac814a9ae9f835d SHA256 0c2ea24540d9a87abb8c68e5eb042d396ec91a58cd53ea135b5548ea92c67913
AUX gentoo.nanorc 2578 RMD160 65460270bc9e9e8041570124ccc510311761403d SHA1 e431cc0c034c354817a553a859e9256da1f31211 SHA256 82318b18536d3113238b91a2ed1d42aead0c6080492c540a4f8fdddccd8bbbd4
@@ -10,6 +7,7 @@ AUX nano-1.3.12-scroll.patch 1357 RMD160 0ff451539b959ed1b48995cacec0ee5938f5139
AUX nano-2.1.2-history-justify.patch 1321 RMD160 06d8640fbfe8c994155d38f8dae667d172386e4f SHA1 a21a95ce091336a046d8df0cdc770488895babd1 SHA256 8ae7bdc55044e1864b8ff93f450a9bb359a44a3b4dc15385db0744538e3523ca
AUX nano-2.1.4-debug.patch 386 RMD160 2a399cc78445b740f1ba69357aa1cca0969462cc SHA1 0ca9e7f27699c39c54b9b7170c6357fc780f822e SHA256 21f0579ecb90f574390433227948137be1fd5e2ead70ce2b426e7c5e86f470c2
AUX nano-2.1.4-open-mode.patch 685 RMD160 c4790cef44f95812fb607ddb50dea6a5c93cff4d SHA1 1a589253ebc1f24b4587eeae8f4ea3fc9371a42c SHA256 d31769c50c5724d96ea0be295975b7958e9440a646b8ad1f084f1a89f827bd4d
+AUX nano-2.1.6-cut-last.patch 3728 RMD160 3196b993c9205a34c7c684250a82a1ac93842945 SHA1 480d28487f3d466d14901dbc2b4b35f39e01d887 SHA256 90097b565be17eb0a4ac0ccbbfb19a4a1a76935227c501bcf1bfd5192d217fa1
AUX nano-2.1.6-cut-paste-segv.patch 2412 RMD160 01e5cab9ef42924d8a3b4401073f90047a40d701 SHA1 c887d0bc754417c9de50ea1c935164163dce9899 SHA256 4f9b4a4b62f283a1053af54e53554510c7fb8c86e2d9b0266435a71c89061ab6
AUX nanorc-gentoo 1898 RMD160 df026420d78b71d4bd04bf15eaabbc862b2d2c89 SHA1 da4a8151ac4bd87ef01cf46abe1fa9f9183a41b7 SHA256 e4f58765d1cb6a0548a6a7c6c55873fbccdfa27cef63339f82b1ea999f4faff0
AUX xml.nanorc 260 RMD160 eeb168220d7a96ba20c8a537b24e850211bf8cee SHA1 c74a37a415aaa119453060114a06c1dd7291b663 SHA256 d8de59f2993d921801e38127043a05b07277373b32714e7489d0947b3415a406
@@ -28,13 +26,6 @@ EBUILD nano-2.0.9.ebuild 1965 RMD160 18651e8962cf528baf339b46fc70d77f22deb155 SH
EBUILD nano-2.1.2-r1.ebuild 2142 RMD160 0a4f75045bc4207098f380204bb1b9bc98817c0a SHA1 59df7cf2f310d5fe66a545c2c1dbdb7ef1999f3d SHA256 07a2ffc647bec7c17a668e663d4d6694c98cf52350e77c31a30dc497bb140a14
EBUILD nano-2.1.4.ebuild 2200 RMD160 9010fe9cba166170d4e40ef8e85c15ff97f6e45a SHA1 e2842e1ee07ac759b5d24a8347a83cf4264ebc2a SHA256 fdf3df334b9f11fa4f04ff17253919087f2c2b51e14ba125d2997cd441cb9898
EBUILD nano-2.1.5.ebuild 2090 RMD160 5a6a7abed2cf00f3345d6ff952c431f83e2c44df SHA1 3415ffe888672cd00ba595495843707c190d530d SHA256 d06de46b0c9d408a2173861734777c86bb3bf594d7f611c398cfbde5a74a6f50
-EBUILD nano-2.1.6-r1.ebuild 2178 RMD160 cedf8548520a952ce5175aaf386f2c4cee97d86b SHA1 c4bc6a45523f29bc6073c42b3679aa1a1c6d5d1e SHA256 bd1e7e3c63ea31d6011d5877d0b1952e44b8c36e924c5f6f44ac8e79ac111e76
-MISC ChangeLog 25309 RMD160 2f70697dbc11671a39911098be66d2b4c1592159 SHA1 194646dbd4452b812239bb61e48ff74723fac9cf SHA256 f60dda15642cede1d16be95ad902d8786f89f41e8049b020f5cd56fd83084b70
+EBUILD nano-2.1.6-r2.ebuild 2228 RMD160 a4b4be948d8ee7af398ebe4d5265a82a777e16ac SHA1 1ffac56ec5bd0ecd3ae5fc146abe5ad69157717c SHA256 f3ffe315d4bc6cff3a2a38c94b8799282bbc2c4b6f8b3f12d541538d676c9d3f
+MISC ChangeLog 25523 RMD160 0cb1ac6fef4a46d8c1b7395601be594aaa1a056f SHA1 74979bdb7b1a707bfade957e8a6b229f620256dd SHA256 5c1aed78019e591dde261f56f54c1b970bf71cea16706830c77b91e624074ff6
MISC metadata.xml 1055 RMD160 5ef8d82cdf250abb5cffa58383c7b4d50f81d155 SHA1 4026434ab09a45edff0543c2c20e0fd20e6c03ed SHA256 8cbe9b49592bc79d362fd390c5d5b1782c0765c6f88a91aa199858ad73dec408
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.9 (GNU/Linux)
-
-iEYEARECAAYFAkjuXMAACgkQ67wieSYcaxd8vACg4t0gT5BWe+iHNZ9koxWuHzui
-XBoAoLmNS+aH2CV7zWJmMUmI0WWUXQfL
-=SYKV
------END PGP SIGNATURE-----
diff --git a/app-editors/nano/files/nano-2.1.6-cut-last.patch b/app-editors/nano/files/nano-2.1.6-cut-last.patch
new file mode 100644
index 000000000000..bf9e90d776d0
--- /dev/null
+++ b/app-editors/nano/files/nano-2.1.6-cut-last.patch
@@ -0,0 +1,121 @@
+http://bugs.gentoo.org/240330
+
+From a203163ac137a7b184e7e7a03ab7254e502d0775 Mon Sep 17 00:00:00 2001
+From: astyanax <astyanax@35c25a1d-7b9e-4130-9fde-d3aeb78583b8>
+Date: Tue, 14 Oct 2008 01:14:12 +0000
+Subject: [PATCH] 2008-10-13 Chris Allegretta <chrisa@asty.org>
+ * Remove CUTTOEND as an undo type as it's unneeded, fix u->to_end logic in undo struct.
+ * undo.c (update_undo): Don't free cutbuffer if NULL, fix for Savannah bug #24499
+
+git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4339 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
+---
+ ChangeLog | 4 ++++
+ src/cut.c | 2 +-
+ src/nano.h | 2 +-
+ src/text.c | 12 +++++-------
+ 4 files changed, 11 insertions(+), 9 deletions(-)
+
+diff --git a/ChangeLog b/ChangeLog
+index 5f0f132..c14b724 100644
+--- a/ChangeLog
++++ b/ChangeLog
+@@ -1,3 +1,7 @@
++2008-10-13 Chris Allegretta <chrisa@asty.org>
++ * Remove CUTTOEND as an undo type as it's unneeded, fix u->to_end logic in undo struct.
++ * undo.c (update_undo): Don't free cutbuffer if NULL, fix for Savannah bug #24499
++
+ 2008-10-04 Chris Allegretta <chrisa@asty.org>
+ * cut.c (Add_undo): Save last cut undo information so it can be used for next uncut, fixes
+ Savannah bug 24183.
+diff --git a/src/cut.c b/src/cut.c
+index 2689986..f92f9b3 100644
+--- a/src/cut.c
++++ b/src/cut.c
+@@ -245,7 +245,7 @@ void do_copy_text(void)
+ void do_cut_till_end(void)
+ {
+ #ifndef NANO_TINY
+- add_undo(CUTTOEND);
++ add_undo(CUT);
+ #endif
+ do_cut_text(FALSE, TRUE, FALSE);
+ }
+diff --git a/src/nano.h b/src/nano.h
+index c82122d..3bc10f1 100644
+--- a/src/nano.h
++++ b/src/nano.h
+@@ -170,7 +170,7 @@ typedef enum {
+ } function_type;
+
+ typedef enum {
+- ADD, DEL, REPLACE, SPLIT, UNSPLIT, CUT, CUTTOEND, UNCUT, INSERT, OTHER
++ ADD, DEL, REPLACE, SPLIT, UNSPLIT, CUT, UNCUT, INSERT, OTHER
+ } undo_type;
+
+ /* Structure types. */
+diff --git a/src/text.c b/src/text.c
+index 97e1f19..915d1c1 100644
+--- a/src/text.c
++++ b/src/text.c
+@@ -408,7 +408,7 @@ void redo_cut(undo *u) {
+ #ifdef DEBUG
+ fprintf(stderr, "Undoing multi-^K cut, u->linescut = %d\n", u->linescut);
+ #endif
+- for (i = 0, t = openfile->current; i < u->linescut; i++) {
++ for (i = 0, t = openfile->current; i < u->linescut && t->next != NULL ; i++) {
+
+ #ifdef DEBUG
+ fprintf(stderr, "Advancing, lineno = %d, data = \"%s\"\n", t->lineno, t->data);
+@@ -505,7 +505,6 @@ void do_undo(void)
+ renumber(f);
+ break;
+ case CUT:
+- case CUTTOEND:
+ undidmsg = _("text cut");
+ undo_cut(u);
+ break;
+@@ -629,7 +628,6 @@ void do_redo(void)
+ renumber(f);
+ break;
+ case CUT:
+- case CUTTOEND:
+ undidmsg = _("text cut");
+ redo_cut(u);
+ break;
+@@ -890,13 +888,12 @@ void add_undo(undo_type current_action)
+ u->strdata = data;
+ break;
+ case CUT:
+- case CUTTOEND:
+ u->mark_set = openfile->mark_set;
+ if (u->mark_set) {
+ u->mark_begin_lineno = openfile->mark_begin->lineno;
+ u->mark_begin_x = openfile->mark_begin_x;
+ }
+- u->to_end = (current_action == CUTTOEND);
++ u->to_end = (ISSET(CUT_TO_END)) ? TRUE : FALSE;
+ last_cutu = u;
+ break;
+ case UNCUT:
+@@ -951,7 +948,7 @@ void update_undo(undo_type action)
+ /* Change to an add if we're not using the same undo struct
+ that we should be using */
+ if (action != fs->last_action
+- || (action != CUT && action != CUTTOEND && action != INSERT
++ || (action != CUT && action != INSERT
+ && openfile->current->lineno != fs->current_undo->lineno)) {
+ add_undo(action);
+ return;
+@@ -1016,7 +1013,8 @@ void update_undo(undo_type action)
+ #endif
+ break;
+ case CUT:
+- case CUTTOEND:
++ if (!cutbuffer)
++ break;
+ if (u->cutbuffer)
+ free(u->cutbuffer);
+ u->cutbuffer = copy_filestruct(cutbuffer);
+--
+1.6.0.1
+
diff --git a/app-editors/nano/nano-2.1.6-r2.ebuild b/app-editors/nano/nano-2.1.6-r2.ebuild
new file mode 100644
index 000000000000..615147a163d1
--- /dev/null
+++ b/app-editors/nano/nano-2.1.6-r2.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-editors/nano/nano-2.1.6-r2.ebuild,v 1.1 2008/10/19 06:56:40 vapier Exp $
+
+inherit eutils
+if [[ ${PV} == "9999" ]] ; then
+ ESVN_REPO_URI="svn://svn.savannah.gnu.org/nano/trunk/nano"
+ inherit subversion
+else
+ MY_P=${PN}-${PV/_}
+ SRC_URI="http://www.nano-editor.org/dist/v${PV:0:3}/${MY_P}.tar.gz"
+fi
+
+DESCRIPTION="GNU GPL'd Pico clone with more functionality"
+HOMEPAGE="http://www.nano-editor.org/"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
+IUSE="debug justify minimal ncurses nls slang spell unicode"
+
+DEPEND=">=sys-libs/ncurses-5.2
+ nls? ( sys-devel/gettext )
+ !ncurses? ( slang? ( sys-libs/slang ) )"
+
+src_unpack() {
+ if [[ ${PV} == "9999" ]] ; then
+ subversion_src_unpack
+ else
+ unpack ${A}
+ fi
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-cut-paste-segv.patch
+ epatch "${FILESDIR}"/${P}-cut-last.patch #240330
+ if [[ ! -e configure ]] ; then
+ ./autogen.sh || die "autogen failed"
+ fi
+}
+
+src_compile() {
+ local myconf=""
+ use ncurses \
+ && myconf="--without-slang" \
+ || myconf="${myconf} $(use_with slang)"
+
+ econf \
+ --bindir=/bin \
+ $(use_enable !minimal color) \
+ $(use_enable !minimal multibuffer) \
+ $(use_enable !minimal nanorc) \
+ --disable-wrapping-as-root \
+ $(use_enable spell speller) \
+ $(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() {
+ emake DESTDIR="${D}" install || die
+
+ dodoc ChangeLog README doc/nanorc.sample AUTHORS BUGS NEWS TODO
+ dohtml *.html
+ insinto /etc
+ newins doc/nanorc.sample nanorc
+
+ dodir /usr/bin
+ dosym /bin/nano /usr/bin/nano
+
+ insinto /usr/share/nano
+ local f
+ for f in "${FILESDIR}"/*.nanorc ; do
+ [[ -e ${D}/usr/share/nano/${f##*/} ]] && continue
+ doins "${f}" || die
+ echo "# include \"/usr/share/nano/${f##*/}\"" >> "${D}"/etc/nanorc
+ done
+}
+
+pkg_postinst() {
+ elog "More helpful info about nano, visit the GDP page:"
+ elog "http://www.gentoo.org/doc/en/nano-basics-guide.xml"
+}