From 8f5c8bd5d10824a8811c85340b521d50f72285f1 Mon Sep 17 00:00:00 2001 From: Tom William Payne Date: Thu, 12 Apr 2007 20:04:58 +0000 Subject: [PATCH] Add ruby support. Bug # 158337. Package-Manager: portage-2.1.2.2 --- app-text/enscript/ChangeLog | 8 +- app-text/enscript/Manifest | 33 +-- app-text/enscript/enscript-1.6.4-r3.ebuild | 47 ++++ .../enscript/files/digest-enscript-1.6.4-r3 | 3 + .../enscript/files/enscript-1.6.2-ruby.patch | 19 ++ app-text/enscript/files/ruby.st | 212 ++++++++++++++++++ 6 files changed, 307 insertions(+), 15 deletions(-) create mode 100644 app-text/enscript/enscript-1.6.4-r3.ebuild create mode 100644 app-text/enscript/files/digest-enscript-1.6.4-r3 create mode 100644 app-text/enscript/files/enscript-1.6.2-ruby.patch create mode 100644 app-text/enscript/files/ruby.st 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; +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 enscript-1.6.4-r2.ebuild: Replacing einfo with elog diff --git a/app-text/enscript/Manifest b/app-text/enscript/Manifest index 9c8638173d70..052b2ea50128 100644 --- a/app-text/enscript/Manifest +++ b/app-text/enscript/Manifest @@ -1,10 +1,11 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - AUX ebuild.st 6113 RMD160 9d3aac83d40a3fca3d1cd7707973f6fdb275898a SHA1 0ffb5db728ed8578b57850a73547b2a87f5c2d0d SHA256 672cade9cfaddc7c21b3fb59952b0dd5f3593d41e958146467f29249f005f5ac MD5 7a1a122665bbefdc6a1e7df62e28ffb1 files/ebuild.st 6113 RMD160 9d3aac83d40a3fca3d1cd7707973f6fdb275898a files/ebuild.st 6113 SHA256 672cade9cfaddc7c21b3fb59952b0dd5f3593d41e958146467f29249f005f5ac files/ebuild.st 6113 +AUX enscript-1.6.2-ruby.patch 661 RMD160 4d7069033a165587dbda17d2febe2ae84cc68af5 SHA1 3a10790c279e110115ec50ce70f2482a5cbd1bee SHA256 53bf90fa47841bcab742155d28f314ff5864c122b7f7d7fbb12177d43b3b60a7 +MD5 3bcc8df0196607e3acb6aca43a82cf26 files/enscript-1.6.2-ruby.patch 661 +RMD160 4d7069033a165587dbda17d2febe2ae84cc68af5 files/enscript-1.6.2-ruby.patch 661 +SHA256 53bf90fa47841bcab742155d28f314ff5864c122b7f7d7fbb12177d43b3b60a7 files/enscript-1.6.2-ruby.patch 661 AUX enscript-1.6.3-language.patch 456 RMD160 5bc06db3e9d3ff441f2b97e94255d93d7b827e9c SHA1 1ce2fd699b26c5773c2e2dbf67d28d0741fb1cfe SHA256 b4830bb18f98749724f1382ef8c47124ae134c707af5303103fead2343710642 MD5 2982cb4ed62b45684d5e6e015c34a52e files/enscript-1.6.3-language.patch 456 RMD160 5bc06db3e9d3ff441f2b97e94255d93d7b827e9c files/enscript-1.6.3-language.patch 456 @@ -21,15 +22,23 @@ AUX enscript-catmur.patch 604 RMD160 74dae25828a36028f877d7cec73f321f5354e4ad SH MD5 854bcc9d4ce6d573dfa5133a55e8ddca files/enscript-catmur.patch 604 RMD160 74dae25828a36028f877d7cec73f321f5354e4ad files/enscript-catmur.patch 604 SHA256 23b2359b2ef4e9cf0f6b915fb9f326a0a9ebd3f43f4dcca5f4beb2602201d02c files/enscript-catmur.patch 604 +AUX ruby.st 3904 RMD160 a1e7228e4b508e73210d5054e4b66f8e6be4135f SHA1 8a8311ee734f1d3bc8baafb67f7cf7425e4469c9 SHA256 211d8a241d177c9c1c232eec514357b96b2d28554d63b72df3d72f79a41b25b0 +MD5 d6f3ed0d8b575b82514b4130bb7321b8 files/ruby.st 3904 +RMD160 a1e7228e4b508e73210d5054e4b66f8e6be4135f files/ruby.st 3904 +SHA256 211d8a241d177c9c1c232eec514357b96b2d28554d63b72df3d72f79a41b25b0 files/ruby.st 3904 DIST enscript-1.6.4.tar.gz 1036734 RMD160 9050728f14500f0360c5a4e258cba0646694bfeb SHA1 9dd7128a508d4c9671659b9520028d12add50cfa SHA256 45299a4db47c9c08c3649d4f62b211ae79ef5143360c264a40371a728f6ad99b EBUILD enscript-1.6.4-r2.ebuild 1140 RMD160 cf6d72006294e01d0281addf900316c4e36f7422 SHA1 51aa1289df0569b2ebb59d0f442c3abb34e4e9ab SHA256 ed0179fc639e677bc77ae4634d593b0bab532ef7cbe3b90318a5566c18cac23a MD5 e312b672b950d23c5c0e994d028ab3ab enscript-1.6.4-r2.ebuild 1140 RMD160 cf6d72006294e01d0281addf900316c4e36f7422 enscript-1.6.4-r2.ebuild 1140 SHA256 ed0179fc639e677bc77ae4634d593b0bab532ef7cbe3b90318a5566c18cac23a enscript-1.6.4-r2.ebuild 1140 -MISC ChangeLog 5733 RMD160 e258a540071637e07e8b67f76c76df3622058a11 SHA1 231d11d38ce973bb2fa0fe0fc6f08b43fc19644a SHA256 3001d2a5b0c2422995a3563109e572d0e7b59d77d4d79521f7380252c1f30f23 -MD5 70fb9f6a37f6b42d0537fe7e25378aa3 ChangeLog 5733 -RMD160 e258a540071637e07e8b67f76c76df3622058a11 ChangeLog 5733 -SHA256 3001d2a5b0c2422995a3563109e572d0e7b59d77d4d79521f7380252c1f30f23 ChangeLog 5733 +EBUILD enscript-1.6.4-r3.ebuild 1239 RMD160 13122763fad1a8780b69d6fe5cd1efed5db14c07 SHA1 0de4bdac4018a2b7bb591819bb7311cce5213533 SHA256 1d6eb6a740e87b0e5a94a31bed33b95e1417b5d32eef8e1228508f1468dfbf71 +MD5 0e51972615bf2c579396979f599be66c enscript-1.6.4-r3.ebuild 1239 +RMD160 13122763fad1a8780b69d6fe5cd1efed5db14c07 enscript-1.6.4-r3.ebuild 1239 +SHA256 1d6eb6a740e87b0e5a94a31bed33b95e1417b5d32eef8e1228508f1468dfbf71 enscript-1.6.4-r3.ebuild 1239 +MISC ChangeLog 5910 RMD160 cabe7a8599f5613aaf09eb35f277c492c646e851 SHA1 52afe3567c4790de019be7bda66ed1759c3ba863 SHA256 7ec0d21f7e61b9ab00a3b640447b977b799056df5f5e9491373863a218f8ca0c +MD5 40ebacc0d5f17b8f564cfc5e146e3e81 ChangeLog 5910 +RMD160 cabe7a8599f5613aaf09eb35f277c492c646e851 ChangeLog 5910 +SHA256 7ec0d21f7e61b9ab00a3b640447b977b799056df5f5e9491373863a218f8ca0c ChangeLog 5910 MISC metadata.xml 161 RMD160 1e5b1e42553c8869b93c4a5448e9a2a2ed9fe525 SHA1 209c6a46e4cdd891980115e42ba419e3799f8088 SHA256 7c85e6739a71f5bb23e8de36c88677d772946e61f7285892f7554e37bd2bca76 MD5 26b4b081d538c195dc39bcb2ec8e6f3a metadata.xml 161 RMD160 1e5b1e42553c8869b93c4a5448e9a2a2ed9fe525 metadata.xml 161 @@ -37,10 +46,6 @@ SHA256 7c85e6739a71f5bb23e8de36c88677d772946e61f7285892f7554e37bd2bca76 metadata MD5 f70a39f6291eddbb73355c26d4bbbad7 files/digest-enscript-1.6.4-r2 247 RMD160 2b4a871cac2752fc37109a71130d72149060bbff files/digest-enscript-1.6.4-r2 247 SHA256 9f3d6a620c7b3b32ea1e518c3ca5ae8fb2331b655b9673c569140378d71421cd files/digest-enscript-1.6.4-r2 247 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.1 (GNU/Linux) - -iD8DBQFFvDqd6J2i8a8J4okRAoG+AKCm0h5vAqBNDucvlZOFYhWPIBcscwCgqCuS -HG3mMxv1BZEl2o0/+FVvCKg= -=eW0k ------END PGP SIGNATURE----- +MD5 f70a39f6291eddbb73355c26d4bbbad7 files/digest-enscript-1.6.4-r3 247 +RMD160 2b4a871cac2752fc37109a71130d72149060bbff files/digest-enscript-1.6.4-r3 247 +SHA256 9f3d6a620c7b3b32ea1e518c3ca5ae8fb2331b655b9673c569140378d71421cd files/digest-enscript-1.6.4-r3 247 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 + */ + +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: +*/ -- 2.26.2