diff options
author | Mike Frysinger <vapier@gentoo.org> | 2006-07-17 04:36:20 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2006-07-17 04:36:20 +0000 |
commit | 063591c7a953c95b0f887c98902fe93d7b146ad0 (patch) | |
tree | 879d9f36407c85356d3cfb9ecc51348dd962a1be | |
parent | Fix building with linux-2.6.18 #140674. (diff) | |
download | gentoo-2-063591c7a953c95b0f887c98902fe93d7b146ad0.tar.gz gentoo-2-063591c7a953c95b0f887c98902fe93d7b146ad0.tar.bz2 gentoo-2-063591c7a953c95b0f887c98902fe93d7b146ad0.zip |
Switch nanorc file over to new include system and add some more colorization by Benno Schulenberg #138056.
(Portage version: 2.1.1_pre2-r8)
-rw-r--r-- | app-editors/nano/ChangeLog | 7 | ||||
-rw-r--r-- | app-editors/nano/files/gentoo.nanorc | 48 | ||||
-rw-r--r-- | app-editors/nano/nano-1.3.12-r1.ebuild | 21 |
3 files changed, 64 insertions, 12 deletions
diff --git a/app-editors/nano/ChangeLog b/app-editors/nano/ChangeLog index a87be39c101b..1a6dd18c2554 100644 --- a/app-editors/nano/ChangeLog +++ b/app-editors/nano/ChangeLog @@ -1,6 +1,11 @@ # 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.119 2006/07/15 02:34:48 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-editors/nano/ChangeLog,v 1.120 2006/07/17 04:36:20 vapier Exp $ + + 17 Jul 2006; Mike Frysinger <vapier@gentoo.org> +files/gentoo.nanorc, + nano-1.3.12-r1.ebuild: + Switch nanorc file over to new include system and add some more colorization + by Benno Schulenberg #138056. *nano-1.3.12-r1 (15 Jul 2006) diff --git a/app-editors/nano/files/gentoo.nanorc b/app-editors/nano/files/gentoo.nanorc new file mode 100644 index 000000000000..e9d8ee8c00da --- /dev/null +++ b/app-editors/nano/files/gentoo.nanorc @@ -0,0 +1,48 @@ +## Here is an example for ebuilds/eclasses +## +syntax "ebuild" "\.e(build|class)$" +## All the standard portage functions +color brightgreen "^src_(unpack|compile|install|test)" "^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|USERLAND)\>" +color red "\<(S|D|T|PV|PF|P|PN|A)\>" "\<C(XX)?FLAGS\>" "\<LDFLAGS\>" "\<C(HOST|TARGET|BUILD)\>" +## Highlight portage commands +color magenta "\<use(_(with|enable))?\> [!a-zA-Z0-9_+ -]*" "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|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)" +color brightblue "\<(|doc|ins|exe)into\>" "\<f(owners|perms)\>" "\<(exe|ins|dir)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 ""(\\.|[^\"])*"" "'(\\.|[^'])*'" + +## Here is an example for Portage control files +## +syntax "/etc/portage" "\.(keywords|mask|unmask|use)$" +## Base text: +color green "^.+$" +## Use flags: +color brightred "[[:space:]]+\+?[a-zA-Z0-9_-]+" +color brightblue "[[:space:]]+-[a-zA-Z0-9_-]+" +## Likely version numbers: +color magenta "-[[:digit:]].*([[:space:]]|$)" +## Accepted arches: +color white "[~-]?\<(alpha|amd64|arm|hppa|ia64|mips|ppc|ppc64|s390|sh|sparc|x86|x86-fbsd)\>" +color white "[[:space:]][~-]?\*" +## Categories: +color cyan "^[[:space:]]*.*/" +## Masking regulators: +color brightmagenta "^[[:space:]]*(=|~|<|<=|=<|>|>=|=>)" +## Comments: +color yellow "#.*$" diff --git a/app-editors/nano/nano-1.3.12-r1.ebuild b/app-editors/nano/nano-1.3.12-r1.ebuild index b7281fd7baee..f6ce1269802c 100644 --- a/app-editors/nano/nano-1.3.12-r1.ebuild +++ b/app-editors/nano/nano-1.3.12-r1.ebuild @@ -1,6 +1,6 @@ # 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.12-r1.ebuild,v 1.2 2006/07/15 02:34:48 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-editors/nano/nano-1.3.12-r1.ebuild,v 1.3 2006/07/17 04:36:20 vapier Exp $ #ECVS_SERVER="savannah.gnu.org:/cvsroot/nano" #ECVS_MODULE="nano" @@ -17,7 +17,7 @@ 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" +IUSE="debug justify minimal ncurses nls slang spell unicode" DEPEND=">=sys-libs/ncurses-5.2 nls? ( sys-devel/gettext ) @@ -61,15 +61,14 @@ src_compile() { 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 + dodoc ChangeLog README doc/nanorc.sample AUTHORS BUGS NEWS TODO + dohtml *.html + insinto /etc + newins doc/nanorc.sample nanorc + + insinto /usr/share/nano + doins "${FILESDIR}"/*.nanorc || die + echo $'\n''# include "/usr/share/nano/gentoo.nanorc"' >> "${D}"/etc/nanorc dodir /usr/bin dosym /bin/nano /usr/bin/nano |