summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2010-01-15 14:01:55 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2010-01-15 14:01:55 +0000
commit26f682d1f3f756c259958e733e77b1d4335a6810 (patch)
treed193c6c80b73de69d712b313b08e325d6c608116 /dev-ruby/rexical
parentVersion bump. Now uses ruby-ng-gnome2 eclass. (diff)
downloadgentoo-2-26f682d1f3f756c259958e733e77b1d4335a6810.tar.gz
gentoo-2-26f682d1f3f756c259958e733e77b1d4335a6810.tar.bz2
gentoo-2-26f682d1f3f756c259958e733e77b1d4335a6810.zip
Initial import of rexical, needed for nokogiri after patching.
(Portage version: 2.2_rc61/cvs/Linux x86_64)
Diffstat (limited to 'dev-ruby/rexical')
-rw-r--r--dev-ruby/rexical/ChangeLog10
-rw-r--r--dev-ruby/rexical/files/rexical-1.0.4-ruby187.patch37
-rw-r--r--dev-ruby/rexical/metadata.xml5
-rw-r--r--dev-ruby/rexical/rexical-1.0.4.ebuild35
4 files changed, 87 insertions, 0 deletions
diff --git a/dev-ruby/rexical/ChangeLog b/dev-ruby/rexical/ChangeLog
new file mode 100644
index 000000000000..470f8cf0a9ab
--- /dev/null
+++ b/dev-ruby/rexical/ChangeLog
@@ -0,0 +1,10 @@
+# ChangeLog for dev-ruby/rexical
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/rexical/ChangeLog,v 1.1 2010/01/15 14:01:54 flameeyes Exp $
+
+*rexical-1.0.4 (15 Jan 2010)
+
+ 15 Jan 2010; Diego E. Pettenò <flameeyes@gentoo.org>
+ +rexical-1.0.4.ebuild, +files/rexical-1.0.4-ruby187.patch, +metadata.xml:
+ Initial import of rexical, needed for nokogiri after patching.
+
diff --git a/dev-ruby/rexical/files/rexical-1.0.4-ruby187.patch b/dev-ruby/rexical/files/rexical-1.0.4-ruby187.patch
new file mode 100644
index 000000000000..6d5d8096e9fe
--- /dev/null
+++ b/dev-ruby/rexical/files/rexical-1.0.4-ruby187.patch
@@ -0,0 +1,37 @@
+From 0def37146dce8b2795443b04237e4e345dbaf59c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Diego=20Elio=20'Flameeyes'=20Petten=C3=B2?= <flameeyes@gmail.com>
+Date: Fri, 15 Jan 2010 14:54:45 +0100
+Subject: [PATCH] Make rexcmd.rb compatible with both MRI 1.8.7 and 1.9.
+
+As it was, rex only worked fine with JRuby 1.4.0 on Gentoo, and not with
+either MRI implementation. With this change, OPTIONS (which is a string) is
+used properly and works with all three implementations.
+---
+ lib/rexical/rexcmd.rb | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lib/rexical/rexcmd.rb b/lib/rexical/rexcmd.rb
+index 844bbf6..30b3300 100644
+--- a/lib/rexical/rexcmd.rb
++++ b/lib/rexical/rexcmd.rb
+@@ -63,7 +63,7 @@ EOT
+ def initialize
+ @status = 2
+ @cmd = File.basename($0, ".rb")
+- tmp = OPTIONS.collect do |line|
++ tmp = OPTIONS.lines.collect do |line|
+ next if /\A\s*\z/ === line
+ disp, sopt, lopt, takearg, doc = line.strip.split(/\s+/, 5)
+ a = []
+@@ -109,7 +109,7 @@ Usage: #{@cmd} [options] <grammar file>
+ Options:
+ EOT
+
+- OPTIONS.each do |line|
++ OPTIONS.each_line do |line|
+ next if line.strip.empty?
+ if /\A\s*\z/ === line
+ f.puts
+--
+1.6.6
+
diff --git a/dev-ruby/rexical/metadata.xml b/dev-ruby/rexical/metadata.xml
new file mode 100644
index 000000000000..852136183369
--- /dev/null
+++ b/dev-ruby/rexical/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>ruby</herd>
+</pkgmetadata>
diff --git a/dev-ruby/rexical/rexical-1.0.4.ebuild b/dev-ruby/rexical/rexical-1.0.4.ebuild
new file mode 100644
index 000000000000..b159eff61dbe
--- /dev/null
+++ b/dev-ruby/rexical/rexical-1.0.4.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/rexical/rexical-1.0.4.ebuild,v 1.1 2010/01/15 14:01:54 flameeyes Exp $
+
+EAPI=2
+
+USE_RUBY="ruby18 ruby19 jruby"
+
+RUBY_FAKEGEM_TASK_DOC="docs"
+RUBY_FAKEGEM_DOCDIR="doc"
+RUBY_FAKEGEM_EXTRADOC="CHANGELOG.rdoc DOCUMENTATION.en.rdoc DOCUMENTATION.ja.rdoc README.ja README.rdoc"
+
+inherit ruby-fakegem eutils
+
+DESCRIPTION="Rexical is a lexical scanner generator"
+HOMEPAGE="http://github.com/tenderlove/rexical/tree/master"
+LICENSE="LGPL-2" # plus exception
+
+KEYWORDS="~amd64"
+SLOT="0"
+IUSE=""
+
+ruby_add_bdepend doc "dev-ruby/hoe"
+ruby_add_bdepend test "dev-ruby/hoe virtual/ruby-test-unit"
+
+all_ruby_prepare() {
+ epatch "${FILESDIR}"/${P}-ruby187.patch
+}
+
+all_ruby_install() {
+ all_fakegem_install
+
+ docinto examples
+ dodoc sample/* || die
+}