$OpenBSD: patch-src_org_jruby_runtime_load_LoadService_java,v 1.2 2008/07/21 11:17:33 bernd Exp $

Add the JRUBY_LIBDIR to the library search path so we can run jruby from
anywhere.

--- src/org/jruby/runtime/load/LoadService.java.orig	Sat Jul 19 07:09:36 2008
+++ src/org/jruby/runtime/load/LoadService.java	Sun Jul 20 11:02:42 2008
@@ -161,6 +161,15 @@ public class LoadService {
            }
        }
 
+        // add localbase
+        char psep = '/';
+        String jrubyLibdir = "${JRUBY_LIBDIR}" + psep + "ruby" + psep;
+
+        addPath(jrubyLibdir + "site_ruby" + psep + Constants.RUBY_MAJOR_VERSION);
+        addPath(jrubyLibdir + "site_ruby");
+        addPath(jrubyLibdir + Constants.RUBY_MAJOR_VERSION);
+        addPath(jrubyLibdir + Constants.RUBY_MAJOR_VERSION + psep + "java");
+
         // wrap in try/catch for security exceptions in an applet
         if (!Ruby.isSecurityRestricted()) {
           String jrubyHome = runtime.getJRubyHome();
