From: "Diego Petteno (flameeyes)" <flameeyes@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] gentoo-x86 commit in dev-ruby/json: ChangeLog json-1.2.0-r1.ebuild
Date: Fri, 25 Dec 2009 17:01:02 +0000 [thread overview]
Message-ID: <E1NODXC-0000xP-ST@stork.gentoo.org> (raw)
flameeyes 09/12/25 17:01:02
Modified: ChangeLog json-1.2.0-r1.ebuild
Log:
Add support for JRuby (json_pure); make sure to test the new build rather than the old one; avoid building the extensions twice.
(Portage version: 2.2_rc61/cvs/Linux x86_64)
Revision Changes Path
1.13 dev-ruby/json/ChangeLog
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-ruby/json/ChangeLog?rev=1.13&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-ruby/json/ChangeLog?rev=1.13&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-ruby/json/ChangeLog?r1=1.12&r2=1.13
Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/dev-ruby/json/ChangeLog,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- ChangeLog 25 Dec 2009 15:43:01 -0000 1.12
+++ ChangeLog 25 Dec 2009 17:01:02 -0000 1.13
@@ -1,6 +1,11 @@
# ChangeLog for dev-ruby/json
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-ruby/json/ChangeLog,v 1.12 2009/12/25 15:43:01 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/json/ChangeLog,v 1.13 2009/12/25 17:01:02 flameeyes Exp $
+
+ 25 Dec 2009; Diego E. Pettenò <flameeyes@gentoo.org>
+ json-1.2.0-r1.ebuild:
+ Add support for JRuby (json_pure); make sure to test the new build rather
+ than the old one; avoid building the extensions twice.
25 Dec 2009; Diego E. Pettenò <flameeyes@gentoo.org>
json-1.2.0-r1.ebuild:
1.5 dev-ruby/json/json-1.2.0-r1.ebuild
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-ruby/json/json-1.2.0-r1.ebuild?rev=1.5&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-ruby/json/json-1.2.0-r1.ebuild?rev=1.5&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-ruby/json/json-1.2.0-r1.ebuild?r1=1.4&r2=1.5
Index: json-1.2.0-r1.ebuild
===================================================================
RCS file: /var/cvsroot/gentoo-x86/dev-ruby/json/json-1.2.0-r1.ebuild,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- json-1.2.0-r1.ebuild 25 Dec 2009 15:43:01 -0000 1.4
+++ json-1.2.0-r1.ebuild 25 Dec 2009 17:01:02 -0000 1.5
@@ -1,9 +1,9 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-ruby/json/json-1.2.0-r1.ebuild,v 1.4 2009/12/25 15:43:01 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-ruby/json/json-1.2.0-r1.ebuild,v 1.5 2009/12/25 17:01:02 flameeyes Exp $
EAPI=2
-USE_RUBY="ruby18 ruby19"
+USE_RUBY="ruby18 ruby19 jruby"
RUBY_FAKEGEM_EXTRADOC="CHANGES TODO README"
RUBY_FAKEGEM_DOCDIR="doc"
@@ -22,12 +22,41 @@
RDEPEND=""
DEPEND="dev-util/ragel"
+ruby_add_bdepend test virtual/ruby-test-unit
+
+all_ruby_prepare() {
+ # Avoid building the extension twice!
+ sed -i \
+ -e 's| => :compile_ext||' \
+ -e 's| => :clean||' \
+ Rakefile || die "rakefile fix failed"
+}
+
each_ruby_compile() {
- ${RUBY} -S rake compile_ext || die "extension compile failed"
+ if [[ $(basename ${RUBY}) != "jruby" ]]; then
+ ${RUBY} -S rake compile_ext || die "extension compile failed"
+ fi
+}
+
+each_ruby_test() {
+ # We have to set RUBYLIB because otherwise the tests will run
+ # against the sytem-installed json; at the same time, we cannot
+ # use the -I parameter because rake won't let it pass to the
+ # testrb call that is executed down the road.
+
+ RUBYLIB="${RUBYLIB}${RUBYLIB+:}lib:ext/json/ext" \
+ ${RUBY} -S rake test_pure || die "pure ruby tests failed"
+
+ if [[ $(basename ${RUBY}) != "jruby" ]]; then
+ RUBYLIB="${RUBYLIB}${RUBYLIB+:}lib:ext/json/ext" \
+ ${RUBY} -Ilib:ext/json/ext -S rake test_ext || die " ruby extension tests failed"
+ fi
}
each_ruby_install() {
each_fakegem_install
- ruby_fakegem_newins ext/json/ext/generator.so lib/json/generator.so
- ruby_fakegem_newins ext/json/ext/parser.so lib/json/parser.so
+ if [[ $(basename ${RUBY}) != "jruby" ]]; then
+ ruby_fakegem_newins ext/json/ext/generator.so lib/json/generator.so
+ ruby_fakegem_newins ext/json/ext/parser.so lib/json/parser.so
+ fi
}
next reply other threads:[~2009-12-25 17:01 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-25 17:01 Diego Petteno (flameeyes) [this message]
-- strict thread matches above, loose matches on Subject: below --
2010-02-23 18:18 [gentoo-commits] gentoo-x86 commit in dev-ruby/json: ChangeLog json-1.2.0-r1.ebuild Hans de Graaff (graaff)
2010-01-13 16:13 Brent Baude (ranger)
2010-01-06 18:25 Raul Porcel (armin76)
2010-01-04 11:23 Christian Faulhammer (fauli)
2009-12-26 21:32 Diego Petteno (flameeyes)
2009-12-25 15:43 Diego Petteno (flameeyes)
2009-12-23 1:15 Jeroen Roovers (jer)
2009-12-21 15:42 Diego Petteno (flameeyes)
2009-12-20 9:22 Hans de Graaff (graaff)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1NODXC-0000xP-ST@stork.gentoo.org \
--to=flameeyes@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox