Setup symlink to jruby/bin/jruby at bin/jruby, so that jruby is usable
without any modifications to PATH. To run an ruby program that is installed in jruby's bin directory (which no longer needs to be in the PATH), use jruby -S program.
This commit is contained in:
parent
7dc50cced5
commit
53bee10b3a
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.28 2011/11/14 12:00:04 jeremy Exp $
|
||||
# $OpenBSD: Makefile,v 1.29 2011/12/09 21:46:15 jeremy Exp $
|
||||
|
||||
SHARED_ONLY = Yes
|
||||
|
||||
@ -7,6 +7,7 @@ COMMENT = pure-Java implementation of the Ruby language
|
||||
V = 1.6.5
|
||||
DISTNAME = jruby-src-${V}
|
||||
PKGNAME = jruby-${V}
|
||||
REVISION = 0
|
||||
CATEGORIES = lang lang/ruby
|
||||
DISTFILES = ${DISTNAME}.tar.gz \
|
||||
wmeissner-jffi-1.0.2-0-ge0d10e9.tar.gz:0
|
||||
@ -61,6 +62,7 @@ post-extract:
|
||||
|
||||
pre-configure:
|
||||
${SUBST_CMD} ${WRKSRC}/lib/ruby/site_ruby/shared/mkmf.rb \
|
||||
${WRKSRC}/jruby-launcher/jrubyexe.cpp \
|
||||
${WRKSRC}/jruby-launcher/unixlauncher.cpp
|
||||
# Rebuild the jruby-launcher gem
|
||||
cd ${WRKSRC}/jruby-launcher && find . -type f \! -name '*.orig' -print | \
|
||||
@ -90,6 +92,7 @@ post-build:
|
||||
rm -r !(${FFI_ARCH}|*.ffi)
|
||||
|
||||
do-install:
|
||||
ln -s ${TRUEPREFIX}/jruby/bin/jruby ${PREFIX}/bin/jruby
|
||||
${INSTALL_DATA_DIR} ${JRUBY_HOME}
|
||||
${INSTALL_DATA_DIR} ${JRUBY_HOME}/bin
|
||||
for file in ast gem jgem jirb jirb_swing jruby jrubyc rdoc ri testrb; \
|
||||
|
18
lang/jruby/patches/patch-jruby-launcher_jrubyexe_cpp
Normal file
18
lang/jruby/patches/patch-jruby-launcher_jrubyexe_cpp
Normal file
@ -0,0 +1,18 @@
|
||||
$OpenBSD: patch-jruby-launcher_jrubyexe_cpp,v 1.1 2011/12/09 21:46:15 jeremy Exp $
|
||||
|
||||
Hardcode executable path so that the symlink in the standard PATH
|
||||
works correctly.
|
||||
|
||||
--- jruby-launcher/jrubyexe.cpp.orig Fri Dec 2 09:34:43 2011
|
||||
+++ jruby-launcher/jrubyexe.cpp Fri Dec 2 09:35:02 2011
|
||||
@@ -57,8 +57,10 @@ const char *CON_ATTACH_MSG =
|
||||
|
||||
#include "utilsfuncs.h"
|
||||
|
||||
+char JRUBY_PATH[] = "${PREFIX}/jruby/bin/jruby";
|
||||
|
||||
int main(int argc, char *argv[], char* envp[]) {
|
||||
+ argv[0] = JRUBY_PATH;
|
||||
checkLoggingArg(argc, argv, true);
|
||||
|
||||
#ifdef WIN32
|
@ -1 +0,0 @@
|
||||
Please add ${JRUBY_HOME}/bin to your PATH to access the JRuby programs.
|
@ -1,4 +1,5 @@
|
||||
@comment $OpenBSD: PLIST,v 1.12 2011/11/08 23:58:08 jeremy Exp $
|
||||
@comment $OpenBSD: PLIST,v 1.13 2011/12/09 21:46:15 jeremy Exp $
|
||||
bin/jruby
|
||||
jruby/
|
||||
jruby/bin/
|
||||
jruby/bin/ast
|
||||
|
Loading…
Reference in New Issue
Block a user