summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom William Payne <twp@gentoo.org>2007-04-12 20:04:58 +0000
committerTom William Payne <twp@gentoo.org>2007-04-12 20:04:58 +0000
commit1ef91c32adde5d461ea09911aab54236367eae27 (patch)
tree07534e27e960a45fad960724fd1b5c711f0ccfc4 /app-text/enscript
parentstable x86, bug 174178 (diff)
downloadgentoo-2-1ef91c32adde5d461ea09911aab54236367eae27.tar.gz
gentoo-2-1ef91c32adde5d461ea09911aab54236367eae27.tar.bz2
gentoo-2-1ef91c32adde5d461ea09911aab54236367eae27.zip
Add ruby support. Bug # 158337.
(Portage version: 2.1.2.2)
Diffstat (limited to 'app-text/enscript')
-rw-r--r--app-text/enscript/ChangeLog8
-rw-r--r--app-text/enscript/enscript-1.6.4-r3.ebuild47
-rw-r--r--app-text/enscript/files/digest-enscript-1.6.4-r33
-rw-r--r--app-text/enscript/files/enscript-1.6.2-ruby.patch19
-rw-r--r--app-text/enscript/files/ruby.st212
5 files changed, 288 insertions, 1 deletions
diff --git a/app-text/enscript/ChangeLog b/app-text/enscript/ChangeLog
index 52861033a278..c924fcdf2e39 100644
--- a/app-text/enscript/ChangeLog
+++ b/app-text/enscript/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for app-text/enscript
# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-text/enscript/ChangeLog,v 1.47 2007/01/28 05:43:15 genone Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-text/enscript/ChangeLog,v 1.48 2007/04/12 20:04:58 twp Exp $
+
+*enscript-1.6.4-r3 (12 Apr 2007)
+
+ 12 Apr 2007; <twp@gentoo.org> +files/enscript-1.6.2-ruby.patch,
+ +files/ruby.st, +enscript-1.6.4-r3.ebuild:
+ Add ruby support. Bug # 158337.
28 Jan 2007; Marius Mauch <genone@gentoo.org> enscript-1.6.4-r2.ebuild:
Replacing einfo with elog
diff --git a/app-text/enscript/enscript-1.6.4-r3.ebuild b/app-text/enscript/enscript-1.6.4-r3.ebuild
new file mode 100644
index 000000000000..44fb013439b6
--- /dev/null
+++ b/app-text/enscript/enscript-1.6.4-r3.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-text/enscript/enscript-1.6.4-r3.ebuild,v 1.1 2007/04/12 20:04:58 twp Exp $
+
+inherit eutils
+
+DESCRIPTION="powerful text-to-postscript converter"
+SRC_URI="http://www.iki.fi/mtr/genscript/${P}.tar.gz"
+HOMEPAGE="http://www.gnu.org/software/enscript/enscript.html"
+
+KEYWORDS="alpha amd64 ia64 ~mips ppc ppc64 sparc x86 ~x86-fbsd"
+SLOT="0"
+LICENSE="GPL-2"
+IUSE="nls ruby"
+
+DEPEND="sys-devel/flex
+ sys-devel/bison
+ nls? ( sys-devel/gettext )"
+RDEPEND="nls? ( virtual/libintl )"
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+ epatch ${FILESDIR}/enscript-1.6.3-security.patch
+ epatch ${FILESDIR}/enscript-1.6.3-language.patch
+ epatch ${FILESDIR}/enscript-catmur.patch
+ epatch ${FILESDIR}/enscript-1.6.4-ebuild.st.patch
+ use ruby && epatch ${FILESDIR}/enscript-1.6.2-ruby.patch
+}
+
+src_compile() {
+ unset CC
+ econf `use_enable nls` || die
+ emake || die
+}
+
+src_install() {
+ einstall || die
+ dodoc AUTHORS ChangeLog FAQ.html NEWS README* THANKS TODO
+ insinto /usr/share/enscript/hl
+ doins ${FILESDIR}/ebuild.st
+ use ruby && doins ${FILESDIR}/ruby.st
+}
+
+pkg_postinst() {
+ elog "Now, customize /etc/enscript.cfg."
+}
diff --git a/app-text/enscript/files/digest-enscript-1.6.4-r3 b/app-text/enscript/files/digest-enscript-1.6.4-r3
new file mode 100644
index 000000000000..a5e060193cb0
--- /dev/null
+++ b/app-text/enscript/files/digest-enscript-1.6.4-r3
@@ -0,0 +1,3 @@
+MD5 b5174b59e4a050fb462af5dbf28ebba3 enscript-1.6.4.tar.gz 1036734
+RMD160 9050728f14500f0360c5a4e258cba0646694bfeb enscript-1.6.4.tar.gz 1036734
+SHA256 45299a4db47c9c08c3649d4f62b211ae79ef5143360c264a40371a728f6ad99b enscript-1.6.4.tar.gz 1036734
diff --git a/app-text/enscript/files/enscript-1.6.2-ruby.patch b/app-text/enscript/files/enscript-1.6.2-ruby.patch
new file mode 100644
index 000000000000..b492ca4f44f7
--- /dev/null
+++ b/app-text/enscript/files/enscript-1.6.2-ruby.patch
@@ -0,0 +1,19 @@
+--- states/hl/enscript.st.orig 2006-12-17 02:10:37.000000000 +0100
++++ states/hl/enscript.st 2006-12-17 02:10:13.000000000 +0100
+@@ -489,6 +489,7 @@
+ /\.idl$/ idl;
+ /\.(hs|lhs|gs|lgs)$/ haskell;
+ /\.(pm|pl)$/ perl;
++ /\.(rb|rbw)$/ ruby;
+ /\.(eps|EPS|ps|PS)$/ postscript;
+ /\.py$/ python;
+ /\.pyx$/ pyrex;
+@@ -531,6 +532,8 @@
+ /-\*- [Ii][Dd][Ll] -\*-/ idl;
+ /-\*- [Pp][Ee][Rr][Ll] -\*-/ perl;
+ /^#![ \t]*\/.*\/perl/ perl;
++ /-\*- [Rr][Uu][Bb][Yy] -\*-/ ruby;
++ /^#![ \t]*\/.*\/ruby/ ruby;
+ /^From:/ mail;
+ /^#![ \t]*(\/usr)?\/bin\/[ngmt]?awk/ awk;
+ /^#![ \t]*(\/usr)?\/bin\/sh/ sh;
diff --git a/app-text/enscript/files/ruby.st b/app-text/enscript/files/ruby.st
new file mode 100644
index 000000000000..392c9c1390eb
--- /dev/null
+++ b/app-text/enscript/files/ruby.st
@@ -0,0 +1,212 @@
+/**
+ * Name: ruby
+ * Description: Ruby programming language.
+ * Author: Mike Wilson <m.v.wilson@home.com>
+ */
+
+state ruby_comment
+{
+ /\*\\\// {
+ language_print ($0);
+ return;
+ }
+ LANGUAGE_SPECIALS {
+ language_print ($0);
+ }
+}
+
+state ruby_dquot_string
+{
+ /\\\\./ {
+ language_print ($0);
+ }
+ /\"/ {
+ language_print ($0);
+ return;
+ }
+ LANGUAGE_SPECIALS {
+ language_print ($0);
+ }
+}
+
+state ruby_quot_string
+{
+ /\\\\./ {
+ language_print ($0);
+ }
+ /[\']/ {
+ language_print ($0);
+ return;
+ }
+ LANGUAGE_SPECIALS {
+ language_print ($0);
+ }
+}
+
+state ruby_bquot_string
+{
+ /\\\\./ {
+ language_print ($0);
+ }
+ /`/ {
+ language_print ($0);
+ return;
+ }
+ LANGUAGE_SPECIALS {
+ language_print ($0);
+ }
+}
+
+state ruby
+{
+ BEGIN {
+ header ();
+ }
+ END {
+ trailer ();
+ }
+
+ /* Comments. */
+ /#[^{].*$/ {
+ comment_face (true);
+ language_print ($0);
+ comment_face (false);
+ }
+
+ /* Ignore escaped quote marks */
+ /\\\"/ {
+ language_print ($0);
+ }
+ /\\\'/ {
+ language_print ($0);
+ }
+ /\\\`/ {
+ language_print ($0);
+ }
+
+ /* In cgi files, JavaScript might be imbedded, so we need to look out
+ * for the JavaScript comments, because they might contain something
+ * we don't like, like a contraction (don't, won't, etc.)
+ * We won't put them in comment face, because they are not ruby
+ * comments.
+ */
+ /\/\// {
+ language_print ($0);
+ call (eat_one_line);
+ }
+
+ /* String constants. */
+ /\"/ {
+ string_face (true);
+ language_print ($0);
+ call (ruby_dquot_string);
+ string_face (false);
+ }
+ /[\']/ {
+ string_face (true);
+ language_print ($0);
+ call (ruby_quot_string);
+ string_face (false);
+ }
+
+ /* Backquoted command string */
+ /`/ {
+ string_face (true);
+ language_print ($0);
+ call (ruby_bquot_string);
+ string_face (false);
+ }
+
+ /* Variables globals and instance */
+ /[$@]\w+/ {
+ variable_name_face (true);
+ language_print ($0);
+ variable_name_face (false);
+ }
+
+ /* Variables class variable */
+ /@@\w+/ {
+ variable_name_face (true);
+ language_print ($0);
+ variable_name_face (false);
+ }
+
+ /([ \t]*)(def)([ \t]+)([^(]*)/ {
+ /* indentation */
+ language_print ($1);
+
+ /* def */
+ keyword_face (true);
+ language_print ($2);
+ keyword_face (false);
+
+ /* middle */
+ language_print ($3);
+
+ /* Function name. */
+ function_name_face (true);
+ language_print ($4);
+ function_name_face (false);
+ }
+
+ /\$[!@&`'+~=\/\\,;.<>_*$?:"]/ {
+ variable_name_face (true);
+ language_print ($0);
+ variable_name_face (false);
+ }
+
+ /* Highlighting
+ --Type face
+ private protected public
+
+ --Builtin face (I consider these to be somewhat special)
+ alias alias_method attr attr_accessor attr_reader attr_writer
+ module_alias module_function self super
+
+ --Reference face
+ require include
+
+ --Keyword face
+ and begin break case class def defined? do else elsif end
+ ensure eval extend false for if in method module next nil not
+ or redo rescue retry return then true undef unless until when
+ while yield
+ */
+/\\b(private|protected|public)\\b/ {
+ type_face (true);
+ language_print ($0);
+ type_face (false);
+ }
+
+/\\b(alias|alias_method|attr|attr_accessor|attr_reader|attr_writer\\
+|module_alias|module_function|self|super)\\b/ {
+ builtin_face (true);
+ language_print ($0);
+ builtin_face (false);
+ }
+
+/\\b(include|require)\\b/ {
+ reference_face (true);
+ language_print ($0);
+ reference_face (false);
+ }
+
+/\\b(and|begin|break|case|class|def|defined?|do|else|elsif|end|ensure|eval\\
+|extend|false|for|if|in|method|module|next|nil|not|or|raise|redo|rescue|retry\\
+|return|then|true|undef|unless|until|when|while|yield)\\b/ {
+ keyword_face (true);
+ language_print ($0);
+ keyword_face (false);
+ }
+
+ LANGUAGE_SPECIALS {
+ language_print ($0);
+ }
+}
+
+
+/*
+Local variables:
+mode: c
+End:
+*/