summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2003-09-27 02:34:52 +0000
committerMike Frysinger <vapier@gentoo.org>2003-09-27 02:34:52 +0000
commit9efc40ea2fa15a437244a806f8059ea893280da3 (patch)
tree04450e966d681e3ea7e5c73d58e2dfe73f412c5b
parentx11-libs/xaw has gone away; use sed >= 4 for sed -i; fix DESCRIPTION; tidy (diff)
downloadgentoo-2-9efc40ea2fa15a437244a806f8059ea893280da3.tar.gz
gentoo-2-9efc40ea2fa15a437244a806f8059ea893280da3.tar.bz2
gentoo-2-9efc40ea2fa15a437244a806f8059ea893280da3.zip
more nanorc goodness
-rw-r--r--app-editors/nano/ChangeLog5
-rw-r--r--app-editors/nano/files/1.2.2-wsconvert.patch30
-rw-r--r--app-editors/nano/files/nanorc-gentoo29
-rw-r--r--app-editors/nano/files/nanorc-patch11
-rw-r--r--app-editors/nano/files/nanorc-sh13
-rw-r--r--app-editors/nano/nano-1.2.2.ebuild15
6 files changed, 89 insertions, 14 deletions
diff --git a/app-editors/nano/ChangeLog b/app-editors/nano/ChangeLog
index 3a3e5fa7a90c..e074a288c3f0 100644
--- a/app-editors/nano/ChangeLog
+++ b/app-editors/nano/ChangeLog
@@ -1,9 +1,12 @@
# 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.35 2003/08/21 06:13:48 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-editors/nano/ChangeLog,v 1.36 2003/09/27 02:34:52 vapier Exp $
*nano-1.2.2 (18 Aug 2003)
+ 26 Sep 2003; Mike Frysinger <vapier@gentoo.org> :
+ Add a bunch of example nanorc stuff and install to /etc/nanorc.
+
18 Aug 2003; Mike Frysinger <vapier@gentoo.org> :
Add back in optional slang support + add in debug support.
Also fix symlink so it points at ../../bin/nano rather than /bin/nano.
diff --git a/app-editors/nano/files/1.2.2-wsconvert.patch b/app-editors/nano/files/1.2.2-wsconvert.patch
index 81c1dc9b23a9..35e2dd8754d8 100644
--- a/app-editors/nano/files/1.2.2-wsconvert.patch
+++ b/app-editors/nano/files/1.2.2-wsconvert.patch
@@ -23,7 +23,7 @@ diff -ur work.orig/nano-1.2.2/global.c work/nano-1.2.2/global.c
toggle_mac_msg = _("Writing file in Mac format");
toggle_backup_msg = _("Backing up file");
toggle_smooth_msg = _("Smooth scrolling");
-+// toggle_wsconvert_msg = _("Whitespace converting");
++ //toggle_wsconvert_msg = _("Whitespace converting");
#ifdef ENABLE_COLOR
toggle_syntax_msg = _("Color syntax highlighting");
#endif
@@ -31,7 +31,7 @@ diff -ur work.orig/nano-1.2.2/global.c work/nano-1.2.2/global.c
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);
++ //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
@@ -42,7 +42,7 @@ diff -ur work.orig/nano-1.2.2/nano.h work/nano-1.2.2/nano.h
#define HISTORY_CHANGED (1<<29)
#define HISTORYLOG (1<<30)
#define JUSTIFY_MODE (1<<31)
-+//#define WS_CONVERT (1<<32)
++//#define WS_CONVERT (1<<31) // 32
/* Control key sequences, changing these would be very very bad */
@@ -50,14 +50,14 @@ diff -ur work.orig/nano-1.2.2/nano.h work/nano-1.2.2/nano.h
#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_WSCONVERT_KEY NANO_ALT_V
#define TOGGLE_BACKUP_KEY NANO_ALT_B
#define TOGGLE_SYNTAX_KEY NANO_ALT_Y
#endif /* !NANO_SMALL */
diff -ur work.orig/nano-1.2.2/nanorc.sample work/nano-1.2.2/nanorc.sample
--- work.orig/nano-1.2.2/nanorc.sample 2003-09-01 18:15:59.000000000 -0400
+++ work/nano-1.2.2/nanorc.sample 2003-09-01 18:32:31.000000000 -0400
-@@ -86,6 +86,14 @@
+@@ -86,6 +86,16 @@
## Use this tab size instead of the default; it must be greater than 0
# set tabsize 8
@@ -68,6 +68,8 @@ diff -ur work.orig/nano-1.2.2/nanorc.sample work/nano-1.2.2/nanorc.sample
+## Same as tabconverting above, but applied to spaces.
+## it can be a single character. 183 seems to be a 'good' value.
+# set tabconvert 32
++## Finally, you can toggle whitespace converting with this
++# set wsconvert
+
## Save automatically on exit, don't prompt
# set tempfile
@@ -91,7 +93,7 @@ diff -ur work.orig/nano-1.2.2/rcfile.c work/nano-1.2.2/rcfile.c
#endif
#ifndef NANO_SMALL
{"noconvert", NO_CONVERT},
-+/* {"wsconvert", WS_CONVERT}, */
++ {"wsconvert", WS_CONVERT},
#endif
{"nofollow", NOFOLLOW_SYMLINKS},
{"nohelp", NO_HELP},
@@ -158,7 +160,7 @@ diff -ur work.orig/nano-1.2.2/winio.c work/nano-1.2.2/winio.c
- if (*original == '\t')
- do {
+ if (*original == '\t') {
-+ converted[pos++] = tabconvert;
++ converted[pos++] = (ISSET(WS_CONVERT) ? tabconvert : ' ');
+ while (pos % tabsize)
converted[pos++] = ' ';
- } while (pos % tabsize);
@@ -172,7 +174,19 @@ diff -ur work.orig/nano-1.2.2/winio.c work/nano-1.2.2/winio.c
converted[pos++] = *original + 64;
} else
- converted[pos++] = *original;
-+ converted[pos++] = (*original==' ') ? spaceconvert : *original;
++ converted[pos++] = (*original==' '&&ISSET(WS_CONVERT)) ? spaceconvert : *original;
}
converted[pos] = '\0';
+--- work.orig/nano-1.2.2/nano.c.orig 2003-09-14 20:33:48.981627152 -0400
++++ work/nano-1.2.2/nano.c 2003-09-14 20:34:33.990784720 -0400
+@@ -2957,6 +2957,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 --git a/app-editors/nano/files/nanorc-gentoo b/app-editors/nano/files/nanorc-gentoo
new file mode 100644
index 000000000000..92dc30dd0fbc
--- /dev/null
+++ b/app-editors/nano/files/nanorc-gentoo
@@ -0,0 +1,29 @@
+
+## Here is an example for ebuilds/eclasses
+##
+# syntax "ebuild" "\.e(build|class)$"
+## All the standard portage functions
+# color brightgreen "^src_(unpack|compile|install)" "^pkg_(config|nofetch|setup|(pre|post)(inst|rm))"
+## 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)\>"
+# color green "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)"
+# color green "-(e|d|f|r|g|u|w|x|L)\>"
+# color green "-(eq|ne|gt|lt|ge|le|s|n|z)\>"
+## Highlight variables ... official portage ones in red, all others in bright red
+# color brightred "\$\{?[a-zA-Z_0-9]+\}?"
+# color red "\<(ARCH|HOMEPAGE|DESCRIPTION|IUSE|SRC_URI|LICENSE|SLOT|KEYWORDS|FILESDIR|WORKDIR|(P|R)?DEPEND|PROVIDE|DISTDIR|RESTRICT)\>"
+# color red "\<(S|D|T|PV|PF|P|PN|A)\>" "\<C(XX)?FLAGS\>"
+## Highlight portage commands
+# color magenta "\<use(_(with|enable))?\> [a-z0-9X ]*" "inherit.*"
+# color brightblue "e(begin|end|conf|install|make|warn|infon?|error|patch)"
+# color brightblue "\<die\>" "\<use(_(with|enable))?\>" "\<inherit\>" "\<has\>" "\<(has|best)_version\>" "\<unpack\>"
+# color brightblue "\<(do|new)(ins|s?bin|doc|lib(|\.so|\.a)|man|info|exe)\>"
+# color brightblue "\<do(python|sed|dir|hard|sym|html|jar|mo)\>" "\<keepdir\>"
+# color brightblue "prepall(|docs|info|man|strip)" "prep(info|lib|lib\.so|man|strip)"
+# color brightblue "\<(|doc|ins|exe)into\>" "\<f(owners|perms)\>" "\<(exe|ins)opts\>"
+## Highlight common commands used in ebuilds
+# color blue "\<make\>" "\<(cat|cd|chmod|chown|cp|echo|env|export|grep|let|ln|mkdir|mv|rm|sed|set|tar|touch|unset)\>"
+## Highlight comments (doesnt work that well)
+# color yellow "#.*$"
+## Highlight strings (doesnt work that well)
+# color brightyellow ""(\\.|[^\"])*"" "'(\\.|[^'])*'"
diff --git a/app-editors/nano/files/nanorc-patch b/app-editors/nano/files/nanorc-patch
new file mode 100644
index 000000000000..0c48155d92f4
--- /dev/null
+++ b/app-editors/nano/files/nanorc-patch
@@ -0,0 +1,11 @@
+
+## Here is an example for patch files
+##
+# syntax "patch" "\.(patch|diff)$"
+# color brightgreen "^\+.*"
+# color green "^\+\+\+.*"
+# color brightblue "^ .*"
+# color brightred "^-.*"
+# color red "^---.*"
+# color brightyellow "^@@.*"
+# color magenta "^diff.*"
diff --git a/app-editors/nano/files/nanorc-sh b/app-editors/nano/files/nanorc-sh
new file mode 100644
index 000000000000..4ab75cc00a67
--- /dev/null
+++ b/app-editors/nano/files/nanorc-sh
@@ -0,0 +1,13 @@
+
+## Here is an example for shell scripts
+##
+# syntax "shellscript" "\.sh$"
+# color brightgreen "^[a-zA-Z_0-9]+\(\)"
+# 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 "-(e|d|f|r|g|u|w|x|L)\>"
+# color green "-(eq|ne|gt|lt|ge|le|s|n|z)\>"
+# color brightblue "\<make\>" "\<(cat|cd|chmod|chown|cp|echo|env|export|grep|install|let|ln|mkdir|mv|rm|sed|set|tar|touch|umask|unset)\>"
+# color brightred "\$\{?[a-zA-Z_0-9]+\}?"
+# color yellow "#.*$"
+# color brightyellow ""(\\.|[^\"])*"" "'(\\.|[^'])*'"
diff --git a/app-editors/nano/nano-1.2.2.ebuild b/app-editors/nano/nano-1.2.2.ebuild
index 92aa31e93e22..6f753062c66f 100644
--- a/app-editors/nano/nano-1.2.2.ebuild
+++ b/app-editors/nano/nano-1.2.2.ebuild
@@ -1,6 +1,6 @@
# 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.2.2.ebuild,v 1.7 2003/09/17 23:02:57 avenj Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-editors/nano/nano-1.2.2.ebuild,v 1.8 2003/09/27 02:34:52 vapier Exp $
inherit eutils
@@ -49,10 +49,15 @@ src_compile() {
src_install() {
make DESTDIR=${D} install || die
- use build \
- && rm -rf ${D}/usr/share \
- || dodoc ChangeLog README nanorc.sample AUTHORS BUGS NEWS TODO \
- && dohtml *.html
+ 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