public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in dev-ruby/rcov/files: rcov-0.9.7.1-jruby.patch
@ 2010-01-14 19:25 Diego Petteno (flameeyes)
  0 siblings, 0 replies; 2+ messages in thread
From: Diego Petteno (flameeyes) @ 2010-01-14 19:25 UTC (permalink / raw
  To: gentoo-commits

flameeyes    10/01/14 19:25:58

  Added:                rcov-0.9.7.1-jruby.patch
  Log:
  Add a patch to build properly with JRuby (sent upstream), and enable jruby target.
  (Portage version: 2.2_rc61/cvs/Linux x86_64)

Revision  Changes    Path
1.1                  dev-ruby/rcov/files/rcov-0.9.7.1-jruby.patch

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-ruby/rcov/files/rcov-0.9.7.1-jruby.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-ruby/rcov/files/rcov-0.9.7.1-jruby.patch?rev=1.1&content-type=text/plain

Index: rcov-0.9.7.1-jruby.patch
===================================================================
From b2eaa10033e12ebc17542f0c16065519454a6a6b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Diego=20Elio=20'Flameeyes'=20Petten=C3=B2?= <flameeyes@gmail.com>
Date: Thu, 14 Jan 2010 20:15:29 +0100
Subject: [PATCH] Use hpricot's classpath argument function to set the classpath.

This solves problems of building the rcovrt.jar file with JRuby from Gentoo
Linux.
---
 Rakefile |   16 +++++++++++++++-
 1 files changed, 15 insertions(+), 1 deletions(-)

diff --git a/Rakefile b/Rakefile
index 6cb27f0..7157a1c 100644
--- a/Rakefile
+++ b/Rakefile
@@ -41,6 +41,20 @@ end
 
 desc "Run the unit tests with rcovrt."
 if RUBY_PLATFORM == 'java'
+  def java_classpath_arg # myriad of ways to discover JRuby classpath
+    begin
+      cpath  = Java::java.lang.System.getProperty('java.class.path').split(File::PATH_SEPARATOR)
+      cpath += Java::java.lang.System.getProperty('sun.boot.class.path').split(File::PATH_SEPARATOR)
+      jruby_cpath = cpath.compact.join(File::PATH_SEPARATOR)
+    rescue => e
+    end
+    unless jruby_cpath
+      jruby_cpath = ENV['JRUBY_PARENT_CLASSPATH'] || ENV['JRUBY_HOME'] &&
+        FileList["#{ENV['JRUBY_HOME']}/lib/*.jar"].join(File::PATH_SEPARATOR)
+    end
+    jruby_cpath ? "-cp \"#{jruby_cpath}\"" : ""
+  end
+
   Rake::TestTask.new(:test_rcovrt => ["lib/rcovrt.jar"]) do |t|
     t.libs << "lib"
     t.ruby_opts << "--debug"
@@ -51,7 +65,7 @@ if RUBY_PLATFORM == 'java'
   file "lib/rcovrt.jar" => FileList["ext/java/**/*.java"] do |t|
     rm_f "lib/rcovrt.jar"
     mkdir_p "pkg/classes"
-    sh "javac -classpath #{Java::JavaLang::System.getProperty('java.class.path')} -d pkg/classes #{t.prerequisites.join(' ')}"
+    sh "javac #{java_classpath_arg} -d pkg/classes #{t.prerequisites.join(' ')}"
     sh "jar cf #{t.name} -C pkg/classes ."
   end
 else
-- 
1.6.6







^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] gentoo-x86 commit in dev-ruby/rcov/files: rcov-0.9.7.1-jruby.patch
@ 2013-10-29  3:52 Manuel Rueger (mrueg)
  0 siblings, 0 replies; 2+ messages in thread
From: Manuel Rueger (mrueg) @ 2013-10-29  3:52 UTC (permalink / raw
  To: gentoo-commits

mrueg       13/10/29 03:52:20

  Removed:              rcov-0.9.7.1-jruby.patch
  Log:
  dev-ruby/rcov removal (pending 27th October 2013), due to ruby18 deprecation.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-10-29  3:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-14 19:25 [gentoo-commits] gentoo-x86 commit in dev-ruby/rcov/files: rcov-0.9.7.1-jruby.patch Diego Petteno (flameeyes)
  -- strict thread matches above, loose matches on Subject: below --
2013-10-29  3:52 Manuel Rueger (mrueg)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox