diff --git a/lang/jruby/Makefile b/lang/jruby/Makefile index d45a73fc29c..79ab0af875d 100644 --- a/lang/jruby/Makefile +++ b/lang/jruby/Makefile @@ -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; \ diff --git a/lang/jruby/patches/patch-jruby-launcher_jrubyexe_cpp b/lang/jruby/patches/patch-jruby-launcher_jrubyexe_cpp new file mode 100644 index 00000000000..7952fa2d3b7 --- /dev/null +++ b/lang/jruby/patches/patch-jruby-launcher_jrubyexe_cpp @@ -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 diff --git a/lang/jruby/pkg/MESSAGE b/lang/jruby/pkg/MESSAGE deleted file mode 100644 index c511d8278f1..00000000000 --- a/lang/jruby/pkg/MESSAGE +++ /dev/null @@ -1 +0,0 @@ -Please add ${JRUBY_HOME}/bin to your PATH to access the JRuby programs. diff --git a/lang/jruby/pkg/PLIST b/lang/jruby/pkg/PLIST index 54f8413a898..4e889ebe872 100644 --- a/lang/jruby/pkg/PLIST +++ b/lang/jruby/pkg/PLIST @@ -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