summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2010-01-21 11:23:47 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2010-01-21 11:23:47 +0000
commit7161cc35be7b0026cf9ea20dcd0c27dd9fd97e11 (patch)
tree948352b6b07c537fab564a0bfb53214625318f0c /dev-ruby/racc
parentnew revision removing extra-fine SLOTting as no longer necessary. Moved eauto... (diff)
downloadgentoo-2-7161cc35be7b0026cf9ea20dcd0c27dd9fd97e11.tar.gz
gentoo-2-7161cc35be7b0026cf9ea20dcd0c27dd9fd97e11.tar.bz2
gentoo-2-7161cc35be7b0026cf9ea20dcd0c27dd9fd97e11.zip
While JRuby does not work yet, predispose the ebuild to support it; also add a patch to work with test-unit-1.2.3 on Ruby 1.9.
(Portage version: 2.2_rc61/cvs/Linux x86_64)
Diffstat (limited to 'dev-ruby/racc')
-rw-r--r--dev-ruby/racc/ChangeLog7
-rw-r--r--dev-ruby/racc/files/racc-1.4.6-test-unit.patch13
-rw-r--r--dev-ruby/racc/racc-1.4.6.ebuild25
3 files changed, 37 insertions, 8 deletions
diff --git a/dev-ruby/racc/ChangeLog b/dev-ruby/racc/ChangeLog
index 21bb685467a7..7daf86970e96 100644
--- a/dev-ruby/racc/ChangeLog
+++ b/dev-ruby/racc/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for dev-ruby/racc
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-ruby/racc/ChangeLog,v 1.45 2010/01/04 11:44:30 fauli Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/racc/ChangeLog,v 1.46 2010/01/21 11:23:46 flameeyes Exp $
+
+ 21 Jan 2010; Diego E. Pettenò <flameeyes@gentoo.org> racc-1.4.6.ebuild,
+ +files/racc-1.4.6-test-unit.patch:
+ While JRuby does not work yet, predispose the ebuild to support it; also
+ add a patch to work with test-unit-1.2.3 on Ruby 1.9.
04 Jan 2010; Christian Faulhammer <fauli@gentoo.org> racc-1.4.6.ebuild:
Transfer Prefix keywords
diff --git a/dev-ruby/racc/files/racc-1.4.6-test-unit.patch b/dev-ruby/racc/files/racc-1.4.6-test-unit.patch
new file mode 100644
index 000000000000..657454ac1113
--- /dev/null
+++ b/dev-ruby/racc/files/racc-1.4.6-test-unit.patch
@@ -0,0 +1,13 @@
+Index: racc-1.4.6/test/helper.rb
+===================================================================
+--- racc-1.4.6.orig/test/helper.rb
++++ racc-1.4.6/test/helper.rb
+@@ -84,5 +84,8 @@ module Racc
+ result ? assert(result) : raise(cmd)
+ end
+ end
++
++ def default_test
++ end
+ end
+ end
diff --git a/dev-ruby/racc/racc-1.4.6.ebuild b/dev-ruby/racc/racc-1.4.6.ebuild
index 99c153b88879..d1142a1a3b1a 100644
--- a/dev-ruby/racc/racc-1.4.6.ebuild
+++ b/dev-ruby/racc/racc-1.4.6.ebuild
@@ -1,9 +1,11 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-ruby/racc/racc-1.4.6.ebuild,v 1.2 2010/01/04 11:44:30 fauli Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/racc/racc-1.4.6.ebuild,v 1.3 2010/01/21 11:23:46 flameeyes Exp $
EAPI=2
+# jruby → testsuite uses fork (incompatible with JRuby), and patched
+# one crashes JRuby 1.4.0.
USE_RUBY="ruby18 ruby19"
RUBY_FAKEGEM_TASK_DOC=""
@@ -26,6 +28,8 @@ all_ruby_prepare() {
sed -i -e '/tasks\/email/s:^:#:' Rakefile || die "rakefile fix failed"
sed -i -e '/prerequisites/s:^:#:' tasks/test.rb || die "test task fix failed"
sed -i -e 's|/tmp/out|${TMPDIR:-/tmp}/out|' test/helper.rb || die "tests fix failed"
+
+ epatch "${FILESDIR}"/${P}-test-unit.patch
}
each_ruby_prepare() {
@@ -36,12 +40,19 @@ each_ruby_prepare() {
}
each_ruby_compile() {
- ${RUBY} -S rake build || die "build failed"
-}
-
-each_ruby_install() {
- each_fakegem_install
- ruby_fakegem_newins ext/racc/cparse/cparse.so lib/racc/cparse.so
+ case ${RUBY} in
+ *jruby)
+ einfo "Under JRuby, racc cannot use the shared object parser, so instead"
+ einfo "you have to rely on the pure Ruby implementation."
+ ;;
+ *)
+ ${RUBY} -S rake build || die "build failed"
+ # Copy over the file here so that we don't have to do
+ # special ruby install for JRuby and the other
+ # implementations.
+ cp -l ext/racc/cparse/cparse.so lib/racc/cparse.so || die
+ ;;
+ esac
}
all_ruby_install() {