summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2012-08-26 03:24:37 +0000
committerMike Frysinger <vapier@gentoo.org>2012-08-26 03:24:37 +0000
commit04222042c2822ad57fd28392f044b171660ccdf7 (patch)
tree6a8dd6d78a6398b34b547ea8aacf4777c2415218 /app-editors/nano
parentRemove older version (diff)
downloadgentoo-2-04222042c2822ad57fd28392f044b171660ccdf7.tar.gz
gentoo-2-04222042c2822ad57fd28392f044b171660ccdf7.tar.bz2
gentoo-2-04222042c2822ad57fd28392f044b171660ccdf7.zip
Update nanorc files #397413 by Davide Pesavento. Split USE=nls dependency #398975 by Maxim Kammerer.
(Portage version: 2.2.0_alpha120/cvs/Linux x86_64)
Diffstat (limited to 'app-editors/nano')
-rw-r--r--app-editors/nano/ChangeLog11
-rw-r--r--app-editors/nano/files/nano-2.3.1-bind-unbind-docs.patch118
-rw-r--r--app-editors/nano/files/nano-2.3.1-drop-target.patch30
-rw-r--r--app-editors/nano/files/nano-2.3.1-gentoo-nanorc.patch78
-rw-r--r--app-editors/nano/files/nano-2.3.1-shell-nanorc.patch44
-rw-r--r--app-editors/nano/metadata.xml3
-rw-r--r--app-editors/nano/nano-2.3.1-r2.ebuild73
7 files changed, 356 insertions, 1 deletions
diff --git a/app-editors/nano/ChangeLog b/app-editors/nano/ChangeLog
index cea4b4b2c97b..cb170aca2773 100644
--- a/app-editors/nano/ChangeLog
+++ b/app-editors/nano/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for app-editors/nano
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-editors/nano/ChangeLog,v 1.276 2012/07/29 16:52:55 armin76 Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-editors/nano/ChangeLog,v 1.277 2012/08/26 03:24:37 vapier Exp $
+
+*nano-2.3.1-r2 (26 Aug 2012)
+
+ 26 Aug 2012; Mike Frysinger <vapier@gentoo.org>
+ +files/nano-2.3.1-bind-unbind-docs.patch, +files/nano-2.3.1-drop-target.patch,
+ +files/nano-2.3.1-gentoo-nanorc.patch, +files/nano-2.3.1-shell-nanorc.patch,
+ +nano-2.3.1-r2.ebuild, metadata.xml:
+ Update nanorc files #397413 by Davide Pesavento. Split USE=nls dependency
+ #398975 by Maxim Kammerer.
29 Jul 2012; Raúl Porcel <armin76@gentoo.org> nano-2.3.1-r1.ebuild:
alpha/sparc stable wrt #413897
diff --git a/app-editors/nano/files/nano-2.3.1-bind-unbind-docs.patch b/app-editors/nano/files/nano-2.3.1-bind-unbind-docs.patch
new file mode 100644
index 000000000000..300ee2d24ee1
--- /dev/null
+++ b/app-editors/nano/files/nano-2.3.1-bind-unbind-docs.patch
@@ -0,0 +1,118 @@
+From 5afd6d3e9558f8295496f7c59c765947e7f19d8a Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Mon, 28 Nov 2011 15:37:02 -0500
+Subject: [PATCH 1/2] nanorc(5): fix bind/unbind documentation
+
+The unbind section is listed after valid key/menu/functions, but tries
+to say those sections come after it. So reorganization the section so
+that bind/unbind comes first, and then we cover the key/menu/functions
+after both of them.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ doc/man/nanorc.5 | 32 +++++++++++++++++++-------------
+ 1 file changed, 19 insertions(+), 13 deletions(-)
+
+diff --git a/doc/man/nanorc.5 b/doc/man/nanorc.5
+index da33179..2da71ab 100644
+--- a/doc/man/nanorc.5
++++ b/doc/man/nanorc.5
+@@ -282,9 +282,19 @@ Read in self-contained color syntaxes from \fIsyntaxfile\fP. Note that
+ .SH KEY BINDINGS
+ Key bindings may be reassigned via the following commands:
+ .TP
+-.B bind \fIkey\fP \fIfunction\fP \fImenu\fP
++.B bind \fIkey\fP \fIfunction\fP \fImenu\fP
+ Rebinds the key \fIkey\fP to a new function named \fIfunction\fP in the
+-context of menu \fImenu\fP. The format of \fIkey\fP should be one of:
++context of menu \fImenu\fP.
++.TP
++.B unbind \fIkey\fP \fImenu\fP
++Unbind the key \fIkey\fP from the menu named \fImenu\fP or from all
++menus by using \fIall\fP. Same key syntax as for binding.
++Rebinds the key \fIkey\fP to a new function named \fIfunction\fP in the
++context of menu \fImenu\fP.
++.TP
++
++The format of \fIkey\fP should be one of:
++
+ .TP
+ .B ^
+ followed by an alpha character or the word "Space".
+@@ -298,8 +308,10 @@ Example: M-C
+ followed by a numeric value from 1 to 16.
+ Example: F10
+ .TP
+-Valid function names to be bound include:
+-.TP 3
++
++Valid \fIfunction\fP names to be bound include:
++
++.TP 2
+ .B help
+ Invoke the help menu.
+ .TP
+@@ -506,8 +518,9 @@ Toggle whether long lines will be wrapped to the next line.
+ Toggle whether the suspend sequence (normally ^Z) will suspend the editor window.
+ .TP
+
+-Valid menu sections are:
+-.TP
++Valid \fImenu\fP sections are:
++
++.TP 2
+ .B main
+ The main editor window where text is entered.
+ .TP
+@@ -549,13 +562,6 @@ The 'go to directory' menu.
+ .TP
+ .B all
+ A special name meaning: apply to all menus where this function exists.
+-
+-.TP
+-.B unbind \fIkey\fP \fImenu\fP
+-Unbind the key \fIkey\fP from the menu named \fImenu\fP or from all
+-menus by using \fIall\fP. Same key syntax as for binding.
+-Rebinds the key \fIkey\fP to a new function named \fIfunction\fP in the
+-context of menu \fImenu\fP. The format of \fIkey\fP should be one of:
+ .SH FILES
+ .TP
+ .I SYSCONFDIR/nanorc
+--
+1.7.9.7
+
+From 4b3e912d4a5c3561d1cfaf944d33ba9c30a9a555 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Mon, 28 Nov 2011 15:38:26 -0500
+Subject: [PATCH 2/2] nanorc syntax: add bind/unbind commands
+
+We don't currently handle the bind/unbind commands, so adding them to
+your nanorc file with colorization enabled makes it look like they're
+not actually supported.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ doc/syntax/nanorc.nanorc | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/doc/syntax/nanorc.nanorc b/doc/syntax/nanorc.nanorc
+index bda5f4f..287be56 100644
+--- a/doc/syntax/nanorc.nanorc
++++ b/doc/syntax/nanorc.nanorc
+@@ -2,10 +2,12 @@
+ ##
+ syntax "nanorc" "\.?nanorc$"
+ ## Possible errors and parameters
+-icolor brightwhite "^[[:space:]]*((un)?set|include|syntax|i?color).*$"
++icolor brightwhite "^[[:space:]]*((un)?(bind|set)|include|syntax|i?color).*$"
+ ## Keywords
+ icolor brightgreen "^[[:space:]]*(set|unset)[[:space:]]+(allow_insecure_backup|autoindent|backup|backupdir|backwards|boldtext|brackets|casesensitive|const|cut|fill|historylog|matchbrackets|morespace|mouse|multibuffer|noconvert|nofollow|nohelp|nonewlines|nowrap|operatingdir|poslog|preserve|punct)\>" "^[[:space:]]*(set|unset)[[:space:]]+(quickblank|quotestr|rebinddelete|rebindkeypad|regexp|smarthome|smooth|softwrap|speller|suspend|suspendenable|tabsize|tabstospaces|tempfile|undo|view|whitespace|wordbounds)\>"
+-icolor green "^[[:space:]]*(set|unset|include|syntax|header|magic)\>"
++icolor brightgreen "^[[:space:]]*bind[[:space:]]+((\^|M-)([[:alpha:]]|space)|F([0-9]|1[0-6]))[[:space:]]+[[:alpha:]]+[[:space:]]+[[:alpha:]]+[[:space:]]*$"
++icolor brightgreen "^[[:space:]]*unbind[[:space:]]+((\^|M-)([[:alpha:]]|space)|F([0-9]|1[0-6]))[[:space:]]+[[:alpha:]]+[[:space:]]*$"
++icolor green "^[[:space:]]*((un)?(bind|set)|include|syntax|header|magic)\>"
+ ## Colors
+ icolor yellow "^[[:space:]]*i?color[[:space:]]*(bright)?(white|black|red|blue|green|yellow|magenta|cyan)?(,(white|black|red|blue|green|yellow|magenta|cyan))?\>"
+ icolor magenta "^[[:space:]]*i?color\>" "\<(start|end)="
+--
+1.7.9.7
diff --git a/app-editors/nano/files/nano-2.3.1-drop-target.patch b/app-editors/nano/files/nano-2.3.1-drop-target.patch
new file mode 100644
index 000000000000..3b5647675090
--- /dev/null
+++ b/app-editors/nano/files/nano-2.3.1-drop-target.patch
@@ -0,0 +1,30 @@
+From 0708d921211fa0f89288690593c406a682b2c826 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Tue, 14 Jun 2011 16:00:52 -0400
+Subject: [PATCH] drop --target as it makes no sense
+
+Since nano doesn't produce code, the --target option to configure
+doesn't make sense. So only support --{build,host} since those are
+what we need in order to cross-compile.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index c590737..3eb61c2 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -22,7 +22,7 @@
+
+ AC_INIT([GNU nano], [2.3.1], [nano-devel@gnu.org], [nano])
+ AC_CONFIG_SRCDIR([src/nano.c])
+-AC_CANONICAL_TARGET([])
++AC_CANONICAL_HOST
+ AM_INIT_AUTOMAKE
+ AC_CONFIG_HEADERS([config.h])
+
+--
+1.7.9.7
+
diff --git a/app-editors/nano/files/nano-2.3.1-gentoo-nanorc.patch b/app-editors/nano/files/nano-2.3.1-gentoo-nanorc.patch
new file mode 100644
index 000000000000..2fed6f0c9678
--- /dev/null
+++ b/app-editors/nano/files/nano-2.3.1-gentoo-nanorc.patch
@@ -0,0 +1,78 @@
+From b7e6bbe4ee980a5bb166bae8cd5603301cb6e22f Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Sat, 25 Aug 2012 23:03:22 -0400
+Subject: [PATCH] gentoo syntax: update
+
+Update to newer EAPIs, and fold in updated shell changes too.
+Much of this is based on work by Davide.
+
+Reported-by: Davide Pesavento <pesa@gentoo.org>
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ doc/syntax/gentoo.nanorc | 44 ++++++++++++++++++++++++++------------------
+ 1 file changed, 26 insertions(+), 18 deletions(-)
+
+diff --git a/doc/syntax/gentoo.nanorc b/doc/syntax/gentoo.nanorc
+index 2ad1597..55dd101 100644
+--- a/doc/syntax/gentoo.nanorc
++++ b/doc/syntax/gentoo.nanorc
+@@ -2,30 +2,38 @@
+ ##
+ syntax "ebuild" "\.e(build|class)$"
+ ## All the standard portage functions
+-color brightgreen "^src_(unpack|prepare|configure|compile|install|test)" "^pkg_(config|nofetch|setup|(pre|post)(inst|rm))"
++color brightgreen "(^|\<default_)src_(unpack|prepare|configure|compile|install|test)\>"
++color brightgreen "^pkg_(config|nofetch|pretend|setup|(pre|post)(inst|rm))\>"
++color brightgreen "\<default(_pkg_nofetch)?\>"
+ ## Highlight bash related syntax
+-color green "\<(case|do|done|elif|else|esac|exit|fi|for|function|if|in|local|read|return|select|shift|then|time|until|while|continue|break)\>"
+-color green "\<(declare|eval|exec|let)\>"
+-color green "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)"
+-color green "-[edfgruwxL]\>"
+-color green "-(eq|ne|gt|lt|ge|le|s|n|z)\>"
++color green "\<(break|case|continue|do|done|elif|else|esac|exit|fi|for|function|if|in|read|return|select|shift|then|time|until|while)\>"
++color green "\<(declare|eval|exec|export|let|local)\>"
++color green "[{}():;|`$<>!=&\\]" "(\]|\[)"
++color green "-[defhnrsuwxzL]\>"
++color green "-(eq|ne|gt|lt|ge|le)\>"
+ ## Highlight variables ... official portage ones in red, all others in bright red
+-color brightred "\$\{?[a-zA-Z_0-9]+\}?"
+-color red "\<(EAPI|ARCH|HOMEPAGE|DESCRIPTION|IUSE|SRC_URI|LICENSE|SLOT|KEYWORDS|(P|R)?DEPEND|PROVIDE|PROPERTIES|RESTRICT|USERLAND)\>"
+-color red "\<(S|D|T|PV|PF|P|PN|PR|PVR|A|CATEGORY|DISTDIR|FILESDIR|ROOT|WORKDIR)\>" "\<(AS|C(PP|XX)?|LD)FLAGS\>" "\<C(HOST|TARGET|BUILD)\>"
+-color red "\<QA_((TEXTRELS|EXECSTACK|WX_LOAD)(_[a-zA-Z_0-9]+)?|DT_HASH|PRESTRIPPED)\>" "\<WANT_AUTO(CONF|MAKE)\>" "\<AT_M4DIR\>"
++color brightred "\$[-0-9@*#?$!]" "\$[[:alpha:]_][[:alnum:]_]*"
++color brightred "\$\{[#!]?([-@*#?$!]|[0-9]+|[[:alpha:]_][[:alnum:]_]*)(\[([[:digit:]]|@)+\])?(([#%/]|:?[-=?+])[^}]*\}|\[|\})"
++color red "\<(EAPI|ARCH|HOMEPAGE|DESCRIPTION|IUSE|SRC_URI|LICENSE|SLOT|KEYWORDS|(P|R)?DEPEND|PROVIDE|PROPERTIES|REQUIRED_USE|RESTRICT|USERLAND)\>"
++color red "\<(S|E?D|T|PV|PF|P|PN|PR|PVR|A|CATEGORY|DISTDIR|FILESDIR|EPREFIX|E?ROOT|WORKDIR)\>"
++color red "\<(AS|C(PP|XX)?|LD)FLAGS\>" "\<C(HOST|TARGET|BUILD)\>"
++color red "\<QA_((TEXTRELS|EXECSTACK|WX_LOAD)(_[a-zA-Z_0-9]+)?|DT_HASH|PRESTRIPPED)\>"
++color red "\<(PATCHES|(HTML_)?DOCS)\>" "\<WANT_(AUTO(CONF|MAKE)|LIBTOOL)\>" "\<AT_M4DIR\>"
+ ## Highlight portage commands
+-color magenta "\<use(_(with|enable))?\> [!a-zA-Z0-9_+ -]*" "inherit.*"
+-color brightblue "\<e(begin|end|conf|install|make|qmake[34]|ant|(qa)?warn|infon?|error|log|patch|new(group|user))\>"
+-color brightblue "\<e(pause|beep|mktemp|(cvs|svn)_clean|punt_cxx)\>" "\<e(aclocal|auto(reconf|header|conf|make))\>"
+-color brightblue "\<built_with_use\>" "\<make_desktop_entry\>" "\<unpack(_(makeself|pdv))?\>"
+-color brightblue "\<die\>" "\<use(_(with|enable))?\>" "\<inherit\>" "\<has\>" "\<(has|best)_version\>"
++color magenta "\<(use(_(with|enable|if_iuse)|x)?|in_iuse)\> [!a-zA-Z0-9_+ -]*" "inherit.*"
++color brightblue "\<e(begin|end|conf|install|make|qmake4|ant|(qa)?warn|infon?|error|log|patch(_user)?|new(group|user))\>"
++color brightblue "\<e(pause|beep|mktemp|(cvs|svn)_clean|punt_cxx)\>" "\<e(aclocal|auto(reconf|header|conf|make)|libtoolize)\>"
++color brightblue "\<e(stack|shopts|umask)_(push|pop)\>" "\<version_is_at_least\>"
++color brightblue "\<make_desktop_entry\>" "\<unpack(_(makeself|pdv))?\>"
++color brightblue "\<(die|has|inherit|nonfatal)\>" "\<(use(_(with|enable|if_iuse)|x)?|in_iuse)\>" "\<(has|best)_version\>"
+ color brightblue "\<(do|new)(ins|(games)?s?bin|doc|lib(\.so|\.a)?|man|info|exe|initd|confd|envd|pam|menu|icon)\>"
+-color brightblue "\<do(python|sed|dir|hard|sym|html|jar|mo)\>" "\<keepdir\>"
+-color brightblue "prepall(docs|info|man|strip)?" "prep(info|lib|lib\.(so|a)|man|strip|gamesdirs)"
++color brightblue "\<do(compress|python|sed|dir|hard|sym|html|jar|mo)\>" "\<keepdir\>"
++color brightblue "\<prepall(docs|info|man|strip)?\>" "\<prep(info|lib|lib\.(so|a)|man|strip|gamesdirs)\>"
+ color brightblue "\<(doc|ins|exe)?into\>" "\<(f|games)(owners|perms)\>" "\<(exe|ins|dir)opts\>"
++color brightblue "\<tc-get(BUILD_)?(AR|AS|CC|CPP|CXX|LD|NM|OBJCOPY|PKG_CONFIG|RANLIB)\>"
++color brightblue "\<tc-(arch(-kernel)?|export|has-(tls|openmp))\>"
+ ## Highlight common commands used in ebuilds
+-color blue "\<make\>" "\<(awk|cat|cd|chmod|chown|cp|echo|env|export|find|e?grep|ln|mkdir|mv|rm|sed|set|tar|touch|unset|xargs)\>"
++color blue "\<(awk|cat|cd|chmod|chown|cp|echo|env|find|e?grep|ln|make|mkdir|mv|popd|printf|pushd|rm|rmdir|sed|set|tar|touch|unset|xargs)\>"
+ ## Highlight comments (doesnt work that well)
+ color yellow "(^|[[:space:]])#.*$"
+ ## Highlight strings (doesnt work that well)
+--
+1.7.9.7
+
diff --git a/app-editors/nano/files/nano-2.3.1-shell-nanorc.patch b/app-editors/nano/files/nano-2.3.1-shell-nanorc.patch
new file mode 100644
index 000000000000..805130fda25c
--- /dev/null
+++ b/app-editors/nano/files/nano-2.3.1-shell-nanorc.patch
@@ -0,0 +1,44 @@
+From 5a6a9c107148162f47032b03af3f393c3888c5df Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Tue, 28 Feb 2012 11:14:33 -0500
+Subject: [PATCH] shell syntax: major updates
+
+Highlight more shell builtins and common commands.
+
+Rewrite the variable highlighting to be more exact and handle cases where
+string operations are used.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ doc/syntax/sh.nanorc | 13 +++++++++----
+ 1 file changed, 9 insertions(+), 4 deletions(-)
+
+diff --git a/doc/syntax/sh.nanorc b/doc/syntax/sh.nanorc
+index f660105..a664ef6 100644
+--- a/doc/syntax/sh.nanorc
++++ b/doc/syntax/sh.nanorc
+@@ -4,12 +4,17 @@ syntax "sh" "\.sh$"
+ magic "(POSIX|Bourne.*) shell script text"
+ header "^#!.*/(ba|k|pdk)?sh[-0-9_]*"
+ icolor brightgreen "^[0-9A-Z_]+\(\)"
+-color green "\<(case|do|done|elif|else|esac|exit|fi|for|function|if|in|local|read|return|select|shift|then|time|until|while)\>"
+-color green "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)"
++color green "\<(break|case|continue|do|done|elif|else|esac|exit|fi|for|function|if|in|read|return|select|shift|then|time|until|while)\>"
++color green "\<(declare|eval|exec|export|let|local)\>"
++color green "[{}():;|`$<>!=&\\]" "(\]|\[)"
+ color green "-[Ldefgruwx]\>"
+ color green "-(eq|ne|gt|lt|ge|le|s|n|z)\>"
+-color brightblue "\<(cat|cd|chmod|chown|cp|echo|env|export|grep|install|let|ln|make|mkdir|mv|rm|sed|set|tar|touch|umask|unset)\>"
+-icolor brightred "\$\{?[0-9A-Z_!@#$*?-]+\}?"
++color brightblue "\<(awk|cat|cd|ch(grp|mod|own)|cp|echo|env|grep|install|ln|make|mkdir|mv|popd|printf|pushd|rm|rmdir|sed|set|tar|touch|umask|unset)\>"
++# Basic variable names (no braces)
++color brightred "\$[-0-9@*#?$!]" "\$[[:alpha:]_][[:alnum:]_]*"
++# More complicated variable names; handles braces
++# and replacements and arrays
++color brightred "\$\{[#!]?([-@*#?$!]|[0-9]+|[[:alpha:]_][[:alnum:]_]*)(\[([[:space:]]*[[:alnum:]_]+[[:space:]]*|@)\])?(([#%/]|:?[-=?+])[^}]*\}|\[|\})"
+ color cyan "(^|[[:space:]])#.*$"
+ color brightyellow ""(\\.|[^"])*"" "'(\\.|[^'])*'"
+ color ,green "[[:space:]]+$"
+--
+1.7.9.7
+
diff --git a/app-editors/nano/metadata.xml b/app-editors/nano/metadata.xml
index e7d95417176a..98a48959684c 100644
--- a/app-editors/nano/metadata.xml
+++ b/app-editors/nano/metadata.xml
@@ -27,6 +27,9 @@ perhaps providing other extra functionality.
Enable debug messages and assert warnings. Note that these will all be sent
straight to stderr rather than some logging facility.
</flag>
+ <flag name='magic'>
+ Add magic file support (sys-apps/file) to automatically detect appropriate syntax highlighting
+ </flag>
<flag name='minimal'>
Disable all fancy features, including ones that otherwise have a dedicated
USE flag (such as spelling).
diff --git a/app-editors/nano/nano-2.3.1-r2.ebuild b/app-editors/nano/nano-2.3.1-r2.ebuild
new file mode 100644
index 000000000000..efd1b866324f
--- /dev/null
+++ b/app-editors/nano/nano-2.3.1-r2.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-editors/nano/nano-2.3.1-r2.ebuild,v 1.1 2012/08/26 03:24:37 vapier Exp $
+
+EAPI="3"
+
+inherit eutils autotools
+if [[ ${PV} == "9999" ]] ; then
+ ESVN_REPO_URI="svn://svn.savannah.gnu.org/nano/trunk/nano"
+ inherit subversion autotools
+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 ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="debug justify +magic minimal ncurses nls slang spell unicode"
+
+RDEPEND=">=sys-libs/ncurses-5.9-r1[unicode?]
+ magic? ( sys-apps/file )
+ nls? ( virtual/libintl )
+ !ncurses? ( slang? ( sys-libs/slang ) )"
+DEPEND="${RDEPEND}
+ nls? ( sys-devel/gettext )
+ virtual/pkgconfig"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.3.1-drop-target.patch
+ epatch "${FILESDIR}"/${PN}-2.3.1-ncurses-pkg-config.patch
+ epatch "${FILESDIR}"/${PN}-2.3.1-bind-unbind-docs.patch
+ epatch "${FILESDIR}"/${PN}-2.3.1-{shell,gentoo}-nanorc.patch
+ eautoreconf
+}
+
+src_configure() {
+ eval export ac_cv_{header_magic_h,lib_magic_magic_open}=$(usex magic)
+ econf \
+ --bindir="${EPREFIX}"/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) \
+ $(usex ncurses --without-slang $(use_with slang))
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ rm -r "${ED}"/usr/share/nano/man-html || die
+
+ dodoc ChangeLog README doc/nanorc.sample AUTHORS BUGS NEWS TODO
+ dohtml doc/faq.html
+ insinto /etc
+ newins doc/nanorc.sample nanorc
+
+ 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"
+}