From 99944faab5c22c3549c345fd980d7c60a4bbc87c Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sat, 10 Jan 2004 08:10:04 +0000 Subject: ver bump --- app-editors/nano/ChangeLog | 7 +- app-editors/nano/files/1.3.0-wsconvert.patch | 197 --------------------------- app-editors/nano/files/1.3.1-wsconvert.patch | 197 +++++++++++++++++++++++++++ app-editors/nano/files/digest-nano-1.3.0 | 1 - app-editors/nano/files/digest-nano-1.3.1 | 1 + app-editors/nano/nano-1.3.0.ebuild | 66 --------- app-editors/nano/nano-1.3.1.ebuild | 66 +++++++++ 7 files changed, 270 insertions(+), 265 deletions(-) delete mode 100644 app-editors/nano/files/1.3.0-wsconvert.patch create mode 100644 app-editors/nano/files/1.3.1-wsconvert.patch delete mode 100644 app-editors/nano/files/digest-nano-1.3.0 create mode 100644 app-editors/nano/files/digest-nano-1.3.1 delete mode 100644 app-editors/nano/nano-1.3.0.ebuild create mode 100644 app-editors/nano/nano-1.3.1.ebuild (limited to 'app-editors') diff --git a/app-editors/nano/ChangeLog b/app-editors/nano/ChangeLog index d58a0cb4a64d..b4f9758b0ece 100644 --- a/app-editors/nano/ChangeLog +++ b/app-editors/nano/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for app-editors/nano # Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-editors/nano/ChangeLog,v 1.41 2003/10/25 05:06:18 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-editors/nano/ChangeLog,v 1.42 2004/01/10 08:10:04 vapier Exp $ + +*nano-1.3.1 (10 Jan 2004) + + 10 Jan 2004; Mike Frysinger : + Version bump ... should fix input routines #34628 #34817. *nano-1.3.0 (25 Oct 2003) diff --git a/app-editors/nano/files/1.3.0-wsconvert.patch b/app-editors/nano/files/1.3.0-wsconvert.patch deleted file mode 100644 index d56067c21237..000000000000 --- a/app-editors/nano/files/1.3.0-wsconvert.patch +++ /dev/null @@ -1,197 +0,0 @@ -diff -ur nano-1.3.0.orig/doc/nanorc.sample nano-1.3.0/doc/nanorc.sample ---- nano-1.3.0.orig/doc/nanorc.sample 2003-10-25 01:13:28.280054984 -0400 -+++ nano-1.3.0/doc/nanorc.sample 2003-10-25 01:16:13.805891232 -0400 -@@ -86,6 +86,16 @@ - ## Use this tab size instead of the default; it must be greater than 0 - # set tabsize 8 - -+## Use this tab char instead of the default space; it can either be the -+## ascii value of the character you wish to see (refer to ascii(7)) or -+## it can be a single character. 187 seems to be a 'good' value. -+# set tabconvert 32 -+## Same as tabconverting above, but applied to spaces. -+## it can be a single character. 183 seems to be a 'good' value. -+# set spaceconvert 32 -+## Finally, you can toggle whitespace converting with this -+# set wsconvert -+ - ## Save automatically on exit, don't prompt - # set tempfile - -diff -ur nano-1.3.0.orig/src/global.c nano-1.3.0/src/global.c ---- nano-1.3.0.orig/src/global.c 2003-10-25 01:13:28.287053920 -0400 -+++ nano-1.3.0/src/global.c 2003-10-25 01:14:47.756972656 -0400 -@@ -84,6 +84,9 @@ - int tabsize = -1; /* Our internal tabsize variable. The - default value 8 is set in main(). */ - -+int tabconvert = ' '; -+int spaceconvert = ' '; -+ - char *hblank = NULL; /* A horizontal blank line */ - #ifndef DISABLE_HELP - char *help_text; /* The text in the help window */ -@@ -227,7 +230,7 @@ - char *toggle_const_msg, *toggle_autoindent_msg, *toggle_suspend_msg, - *toggle_nohelp_msg, *toggle_cuttoend_msg, - *toggle_noconvert_msg, *toggle_dos_msg, *toggle_mac_msg, -- *toggle_backup_msg, *toggle_smooth_msg; -+ *toggle_backup_msg, *toggle_smooth_msg, *toggle_wsconvert_msg; - #ifndef DISABLE_MOUSE - char *toggle_mouse_msg; - #endif -@@ -259,6 +262,7 @@ - toggle_mac_msg = _("Writing file in Mac format"); - toggle_backup_msg = _("Backing up file"); - toggle_smooth_msg = _("Smooth scrolling"); -+ toggle_wsconvert_msg = _("Whitespace converting"); - #ifdef ENABLE_COLOR - toggle_syntax_msg = _("Color syntax highlighting"); - #endif -@@ -273,6 +277,7 @@ - toggle_init_one(TOGGLE_AUTOINDENT_KEY, toggle_autoindent_msg, AUTOINDENT); - toggle_init_one(TOGGLE_SUSPEND_KEY, toggle_suspend_msg, SUSPEND); - toggle_init_one(TOGGLE_NOHELP_KEY, toggle_nohelp_msg, NO_HELP); -+ toggle_init_one(TOGGLE_WSCONVERT_KEY, toggle_wsconvert_msg, WS_CONVERT); - #ifndef DISABLE_WRAPPING - toggle_init_one(TOGGLE_WRAP_KEY, toggle_wrap_msg, NO_WRAP); - #endif -diff -ur nano-1.3.0.orig/src/nano.c nano-1.3.0/src/nano.c ---- nano-1.3.0.orig/src/nano.c 2003-10-25 01:13:28.288053768 -0400 -+++ nano-1.3.0/src/nano.c 2003-10-25 01:21:58.101550336 -0400 -@@ -3009,6 +3009,9 @@ - edit_refresh(); - break; - #endif -+ case TOGGLE_WSCONVERT_KEY: -+ edit_refresh(); -+ break; - } - - /* We are assuming here that shortcut_init() above didn't free and -diff -ur nano-1.3.0.orig/src/nano.h nano-1.3.0/src/nano.h ---- nano-1.3.0.orig/src/nano.h 2003-10-25 01:13:28.288053768 -0400 -+++ nano-1.3.0/src/nano.h 2003-10-25 01:15:49.714553672 -0400 -@@ -272,6 +272,7 @@ - #define HISTORY_CHANGED (1<<28) - #define HISTORYLOG (1<<29) - #define JUSTIFY_MODE (1<<30) -+#define WS_CONVERT (1<<31) - - /* Control key sequences, changing these would be very very bad */ - -@@ -427,6 +428,7 @@ - #define TOGGLE_MAC_KEY NANO_ALT_O - #define TOGGLE_SMOOTH_KEY NANO_ALT_S - #define TOGGLE_NOCONVERT_KEY NANO_ALT_N -+#define TOGGLE_WSCONVERT_KEY NANO_ALT_V - #define TOGGLE_BACKUP_KEY NANO_ALT_B - #define TOGGLE_SYNTAX_KEY NANO_ALT_Y - #endif /* !NANO_SMALL */ -diff -ur nano-1.3.0.orig/src/proto.h nano-1.3.0/src/proto.h ---- nano-1.3.0.orig/src/proto.h 2003-10-25 01:13:28.288053768 -0400 -+++ nano-1.3.0/src/proto.h 2003-10-25 01:16:41.660656664 -0400 -@@ -41,7 +41,7 @@ - extern long totsize; - extern int temp_opt; - extern int flags; --extern int tabsize; -+extern int tabsize, tabconvert, spaceconvert; - extern int search_last_line; - extern int search_offscreen; - extern int currslen; -diff -ur nano-1.3.0.orig/src/rcfile.c nano-1.3.0/src/rcfile.c ---- nano-1.3.0.orig/src/rcfile.c 2003-10-25 01:13:28.288053768 -0400 -+++ nano-1.3.0/src/rcfile.c 2003-10-25 01:29:20.587282280 -0400 -@@ -60,6 +60,7 @@ - #endif - #ifndef NANO_SMALL - {"noconvert", NO_CONVERT}, -+ {"wsconvert", WS_CONVERT}, - #endif - {"nofollow", NOFOLLOW_SYMLINKS}, - {"nohelp", NO_HELP}, -@@ -85,6 +86,8 @@ - #endif - {"suspend", SUSPEND}, - {"tabsize", 0}, -+ {"tabconvert", ' '}, -+ {"spaceconvert", ' '}, - {"tempfile", TEMP_OPT}, - {"view", VIEW_MODE}, - {NULL, 0} -@@ -531,6 +534,8 @@ - #endif - if (set == 1) { - if (!strcasecmp(rcopts[i].name, "tabsize") -+ || !strcasecmp(rcopts[i].name, "tabconvert") -+ || !strcasecmp(rcopts[i].name, "spaceconvert") - #ifndef DISABLE_OPERATINGDIR - || !strcasecmp(rcopts[i].name, "operatingdir") - #endif -@@ -594,12 +599,30 @@ - * accept 0 while checking other - * errors. */ - j = (int)strtol(option, &first_error, 10); -- if (errno == ERANGE || *option == '\0' || *first_error != '\0') -- rcfile_error(_("Requested tab size %d invalid"), -- j); -- else -- tabsize = j; -- } -+ if (!strcasecmp(rcopts[i].name, "tabconvert")) { -+ if (errno == ERANGE || *first_error != '\0') { -+ if (*option == '\0') -+ rcfile_error(_("requested tab convert is invalid")); -+ else -+ tabconvert = option[0]; -+ } else -+ tabconvert = j; -+ } else if (!strcasecmp(rcopts[i].name, "spaceconvert")) { -+ if (errno == ERANGE || *first_error != '\0') { -+ if (*option == '\0') -+ rcfile_error(_("requested space convert is invalid")); -+ else -+ spaceconvert = option[0]; -+ } else -+ spaceconvert = j; -+ } else { -+ if (errno == ERANGE || *option == '\0' || *first_error != '\0') -+ rcfile_error(_("requested tab size %d invalid"), -+ j); -+ else -+ tabsize = j; -+ } -+ } - } else - SET(rcopts[i].flag); - #ifdef DEBUG -diff -ur nano-1.3.0.orig/src/winio.c nano-1.3.0/src/winio.c ---- nano-1.3.0.orig/src/winio.c 2003-10-25 01:13:28.289053616 -0400 -+++ nano-1.3.0/src/winio.c 2003-10-25 01:27:12.934688424 -0400 -@@ -471,11 +471,12 @@ - index = 0; - - for (; index < alloc_len; buf++) { -- if (*buf == '\t') -- do { -+ if (*buf == '\t') { -+ converted[index++] = (ISSET(WS_CONVERT) ? tabconvert : ' '); -+ while ((column + index) % tabsize) { - converted[index++] = ' '; -- } while ((column + index) % tabsize); -- else if (is_cntrl_char(*buf)) { -+ } -+ } else if (is_cntrl_char(*buf)) { - converted[index++] = '^'; - if (*buf == '\n') - /* Treat newlines embedded in a line as encoded nulls; -@@ -487,7 +488,7 @@ - else - converted[index++] = *buf + 64; - } else -- converted[index++] = *buf; -+ converted[index++] = (*buf==' '&&ISSET(WS_CONVERT)) ? spaceconvert : *buf; - } - assert(len <= alloc_len + column - start_col); - charmove(converted, converted + start_col - column, len); diff --git a/app-editors/nano/files/1.3.1-wsconvert.patch b/app-editors/nano/files/1.3.1-wsconvert.patch new file mode 100644 index 000000000000..2c894aaffd40 --- /dev/null +++ b/app-editors/nano/files/1.3.1-wsconvert.patch @@ -0,0 +1,197 @@ +diff -ur nano-1.3.1.orig/doc/nanorc.sample nano-1.3.1/doc/nanorc.sample +--- nano-1.3.1.orig/doc/nanorc.sample 2004-01-10 03:04:04.105882992 -0500 ++++ nano-1.3.1/doc/nanorc.sample 2004-01-10 03:04:29.507021432 -0500 +@@ -86,6 +86,16 @@ + ## Use this tab size instead of the default; it must be greater than 0 + # set tabsize 8 + ++## Use this tab char instead of the default space; it can either be the ++## ascii value of the character you wish to see (refer to ascii(7)) or ++## it can be a single character. 187 seems to be a 'good' value. ++# set tabconvert 32 ++## Same as tabconverting above, but applied to spaces. ++## it can be a single character. 183 seems to be a 'good' value. ++# set spaceconvert 32 ++## Finally, you can toggle whitespace converting with this ++# set wsconvert ++ + ## Save automatically on exit, don't prompt + # set tempfile + +diff -ur nano-1.3.1.orig/src/global.c nano-1.3.1/src/global.c +--- nano-1.3.1.orig/src/global.c 2004-01-10 03:04:04.115881472 -0500 ++++ nano-1.3.1/src/global.c 2004-01-10 03:05:01.991083104 -0500 +@@ -84,6 +84,9 @@ + int tabsize = -1; /* Our internal tabsize variable. The + default value 8 is set in main(). */ + ++int tabconvert = ' '; ++int spaceconvert = ' '; ++ + char *hblank = NULL; /* A horizontal blank line */ + #ifndef DISABLE_HELP + char *help_text; /* The text in the help window */ +@@ -227,7 +230,7 @@ + char *toggle_const_msg, *toggle_autoindent_msg, *toggle_suspend_msg, + *toggle_nohelp_msg, *toggle_cuttoend_msg, + *toggle_noconvert_msg, *toggle_dos_msg, *toggle_mac_msg, +- *toggle_backup_msg, *toggle_smooth_msg; ++ *toggle_backup_msg, *toggle_smooth_msg, *toggle_wsconvert_msg; + #ifndef DISABLE_MOUSE + char *toggle_mouse_msg; + #endif +@@ -259,6 +262,7 @@ + toggle_mac_msg = _("Writing file in Mac format"); + toggle_backup_msg = _("Backing up file"); + toggle_smooth_msg = _("Smooth scrolling"); ++ toggle_wsconvert_msg = _("Whitespace converting"); + #ifdef ENABLE_COLOR + toggle_syntax_msg = _("Color syntax highlighting"); + #endif +@@ -275,6 +279,7 @@ + #endif + toggle_init_one(TOGGLE_CONST_KEY, toggle_const_msg, CONSTUPDATE); + toggle_init_one(TOGGLE_AUTOINDENT_KEY, toggle_autoindent_msg, AUTOINDENT); ++ toggle_init_one(TOGGLE_WSCONVERT_KEY, toggle_wsconvert_msg, WS_CONVERT); + #ifndef DISABLE_WRAPPING + toggle_init_one(TOGGLE_WRAP_KEY, toggle_wrap_msg, NO_WRAP); + #endif +diff -ur nano-1.3.1.orig/src/nano.c nano-1.3.1/src/nano.c +--- nano-1.3.1.orig/src/nano.c 2004-01-10 03:04:04.140877672 -0500 ++++ nano-1.3.1/src/nano.c 2004-01-10 03:04:29.511020824 -0500 +@@ -3035,6 +3035,9 @@ + edit_refresh(); + break; + #endif ++ case TOGGLE_WSCONVERT_KEY: ++ edit_refresh(); ++ break; + } + + /* We are assuming here that shortcut_init() above didn't free and +diff -ur nano-1.3.1.orig/src/nano.h nano-1.3.1/src/nano.h +--- nano-1.3.1.orig/src/nano.h 2004-01-10 03:04:04.139877824 -0500 ++++ nano-1.3.1/src/nano.h 2004-01-10 03:04:29.512020672 -0500 +@@ -289,6 +289,7 @@ + #define HISTORY_CHANGED (1<<28) + #define HISTORYLOG (1<<29) + #define JUSTIFY_MODE (1<<30) ++#define WS_CONVERT (1<<31) + + /* Control key sequences, changing these would be very very bad. */ + #define NANO_CONTROL_SPACE 0 +@@ -451,6 +452,7 @@ + #define TOGGLE_MAC_KEY NANO_ALT_O + #define TOGGLE_SMOOTH_KEY NANO_ALT_S + #define TOGGLE_NOCONVERT_KEY NANO_ALT_N ++#define TOGGLE_WSCONVERT_KEY NANO_ALT_V + #define TOGGLE_BACKUP_KEY NANO_ALT_B + #define TOGGLE_SYNTAX_KEY NANO_ALT_Y + #endif /* !NANO_SMALL */ +diff -ur nano-1.3.1.orig/src/proto.h nano-1.3.1/src/proto.h +--- nano-1.3.1.orig/src/proto.h 2004-01-10 03:04:04.140877672 -0500 ++++ nano-1.3.1/src/proto.h 2004-01-10 03:04:29.513020520 -0500 +@@ -41,7 +41,7 @@ + extern long totsize; + extern int temp_opt; + extern int flags; +-extern int tabsize; ++extern int tabsize, tabconvert, spaceconvert; + extern int search_last_line; + extern int search_offscreen; + extern int currslen; +diff -ur nano-1.3.1.orig/src/rcfile.c nano-1.3.1/src/rcfile.c +--- nano-1.3.1.orig/src/rcfile.c 2004-01-10 03:04:04.140877672 -0500 ++++ nano-1.3.1/src/rcfile.c 2004-01-10 03:04:29.514020368 -0500 +@@ -60,6 +60,7 @@ + #endif + #ifndef NANO_SMALL + {"noconvert", NO_CONVERT}, ++ {"wsconvert", WS_CONVERT}, + #endif + {"nofollow", NOFOLLOW_SYMLINKS}, + {"nohelp", NO_HELP}, +@@ -85,6 +86,8 @@ + #endif + {"suspend", SUSPEND}, + {"tabsize", 0}, ++ {"tabconvert", ' '}, ++ {"spaceconvert", ' '}, + {"tempfile", TEMP_OPT}, + {"view", VIEW_MODE}, + {NULL, 0} +@@ -531,6 +534,8 @@ + #endif + if (set == 1) { + if (!strcasecmp(rcopts[i].name, "tabsize") ++ || !strcasecmp(rcopts[i].name, "tabconvert") ++ || !strcasecmp(rcopts[i].name, "spaceconvert") + #ifndef DISABLE_OPERATINGDIR + || !strcasecmp(rcopts[i].name, "operatingdir") + #endif +@@ -594,12 +599,30 @@ + * accept 0 while checking other + * errors. */ + j = (int)strtol(option, &first_error, 10); +- if (errno == ERANGE || *option == '\0' || *first_error != '\0') +- rcfile_error(_("Requested tab size %d invalid"), +- j); +- else +- tabsize = j; +- } ++ if (!strcasecmp(rcopts[i].name, "tabconvert")) { ++ if (errno == ERANGE || *first_error != '\0') { ++ if (*option == '\0') ++ rcfile_error(_("requested tab convert is invalid")); ++ else ++ tabconvert = option[0]; ++ } else ++ tabconvert = j; ++ } else if (!strcasecmp(rcopts[i].name, "spaceconvert")) { ++ if (errno == ERANGE || *first_error != '\0') { ++ if (*option == '\0') ++ rcfile_error(_("requested space convert is invalid")); ++ else ++ spaceconvert = option[0]; ++ } else ++ spaceconvert = j; ++ } else { ++ if (errno == ERANGE || *option == '\0' || *first_error != '\0') ++ rcfile_error(_("requested tab size %d invalid"), ++ j); ++ else ++ tabsize = j; ++ } ++ } + } else + SET(rcopts[i].flag); + #ifdef DEBUG +diff -ur nano-1.3.1.orig/src/winio.c nano-1.3.1/src/winio.c +--- nano-1.3.1.orig/src/winio.c 2004-01-10 03:04:04.138877976 -0500 ++++ nano-1.3.1/src/winio.c 2004-01-10 03:04:29.516020064 -0500 +@@ -773,11 +773,12 @@ + index = 0; + + for (; index < alloc_len; buf++) { +- if (*buf == '\t') +- do { ++ if (*buf == '\t') { ++ converted[index++] = (ISSET(WS_CONVERT) ? tabconvert : ' '); ++ while ((column + index) % tabsize) { + converted[index++] = ' '; +- } while ((column + index) % tabsize); +- else if (is_cntrl_char(*buf)) { ++ } ++ } else if (is_cntrl_char(*buf)) { + converted[index++] = '^'; + if (*buf == '\n') + /* Treat newlines embedded in a line as encoded nulls; +@@ -789,7 +790,7 @@ + else + converted[index++] = *buf + 64; + } else +- converted[index++] = *buf; ++ converted[index++] = (*buf==' '&&ISSET(WS_CONVERT)) ? spaceconvert : *buf; + } + assert(len <= alloc_len + column - start_col); + charmove(converted, converted + start_col - column, len); diff --git a/app-editors/nano/files/digest-nano-1.3.0 b/app-editors/nano/files/digest-nano-1.3.0 deleted file mode 100644 index b81111b6d22f..000000000000 --- a/app-editors/nano/files/digest-nano-1.3.0 +++ /dev/null @@ -1 +0,0 @@ -MD5 db46d7f7ce5f938df3f2ea1cb22f9f55 nano-1.3.0.tar.gz 897106 diff --git a/app-editors/nano/files/digest-nano-1.3.1 b/app-editors/nano/files/digest-nano-1.3.1 new file mode 100644 index 000000000000..1d6d4dfbba38 --- /dev/null +++ b/app-editors/nano/files/digest-nano-1.3.1 @@ -0,0 +1 @@ +MD5 4f47a60a4027f22433b54e092fe61469 nano-1.3.1.tar.gz 971883 diff --git a/app-editors/nano/nano-1.3.0.ebuild b/app-editors/nano/nano-1.3.0.ebuild deleted file mode 100644 index 927ff9a942d3..000000000000 --- a/app-editors/nano/nano-1.3.0.ebuild +++ /dev/null @@ -1,66 +0,0 @@ -# Copyright 1999-2003 Gentoo Technologies, Inc. -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-editors/nano/nano-1.3.0.ebuild,v 1.4 2003/12/25 19:25:33 vapier Exp $ - -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="~x86 ~ppc ~sparc ~mips ~alpha ~arm ~hppa ~amd64 ~ia64 ppc64" -IUSE="nls build spell justify debug slang icc" - -DEPEND=">=sys-libs/ncurses-5.2 - nls? ( sys-devel/gettext ) - slang? ( sys-libs/slang )" -PROVIDE="virtual/editor" - -S=${WORKDIR}/${MY_P} - -src_unpack() { - unpack ${A} - cd ${S} - epatch ${FILESDIR}/${PV}-wsconvert.patch -} - -src_compile() { - use icc && export CC=icc - - local myconf="" - use build && myconf="${myconf} --disable-wrapping-as-root" - [ `use ncurses` ] || myconf="${myconf} `use_with slang`" - - econf \ - --bindir=/bin \ - --enable-color \ - --enable-multibuffer \ - --enable-nanorc \ - `use_enable justify` \ - `use_enable spell` \ - `use_enable debug` \ - `use_enable nls` \ - ${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-* >> nanorc.sample - dodoc ChangeLog README nanorc.sample AUTHORS BUGS NEWS TODO - dohtml *.html - insinto /etc - newins nanorc.sample nanorc - fi - - dodir /usr/bin - dosym ../../bin/nano /usr/bin/nano -} diff --git a/app-editors/nano/nano-1.3.1.ebuild b/app-editors/nano/nano-1.3.1.ebuild new file mode 100644 index 000000000000..51a152b6495b --- /dev/null +++ b/app-editors/nano/nano-1.3.1.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2003 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-editors/nano/nano-1.3.1.ebuild,v 1.1 2004/01/10 08:10:04 vapier Exp $ + +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="~x86 ~ppc ~sparc ~mips ~alpha ~arm ~hppa ~amd64 ~ia64 ppc64" +IUSE="nls build spell justify debug slang icc" + +DEPEND=">=sys-libs/ncurses-5.2 + nls? ( sys-devel/gettext ) + slang? ( sys-libs/slang )" +PROVIDE="virtual/editor" + +S=${WORKDIR}/${MY_P} + +src_unpack() { + unpack ${A} + cd ${S} + epatch ${FILESDIR}/${PV}-wsconvert.patch +} + +src_compile() { + use icc && export CC=icc + + local myconf="" + use build && myconf="${myconf} --disable-wrapping-as-root" + [ `use ncurses` ] || myconf="${myconf} `use_with slang`" + + econf \ + --bindir=/bin \ + --enable-color \ + --enable-multibuffer \ + --enable-nanorc \ + `use_enable justify` \ + `use_enable spell` \ + `use_enable debug` \ + `use_enable nls` \ + ${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-* >> nanorc.sample + dodoc ChangeLog README nanorc.sample AUTHORS BUGS NEWS TODO + dohtml *.html + insinto /etc + newins nanorc.sample nanorc + fi + + dodir /usr/bin + dosym ../../bin/nano /usr/bin/nano +} -- cgit v1.2.3-65-gdbad