Java version and JRuby port

Jason Helfman jhelfman at
Fri Apr 22 05:36:04 UTC 2011

On Thu, Apr 21, 2011 at 01:28:21AM -0500, Bruce Albrecht thus spake:
>When the JRuby port is installed, it updates the jruby script to force
>the JAVA_HOME to be the JAVA_HOME the port was built with.  I've got
>both diablo-jdk1.6.0 and openjdk6 installed, but I can't figure out how
>to force the JRuby port to use openjdk6, and I can't override the
>JAVA_HOME unless I'm willing to modify the jruby script. Why is this
>port set up this way?  What's the rationale for not allowing JAVA_HOME
>to be overridden?
>freebsd-ports at mailing list
>To unsubscribe, send any mail to "freebsd-ports-unsubscribe at"

Add this to lang/jruby:

JAVA_VENDOR?=   freebsd

And then extract this shar into your ports tree. This should build against
openjdk. Then build your port/pkg in the new directory.

cd /usr/ports; sh ~/vendor.txt; cd lang/jruby-vendor; make install

Let me know if this works, and if so, I will clean it up and submit it as a
PR for possible inclusion in the portstree.


Jason Helfman
System Administrator
E4AD 7CF1 1396 27F6 79DD  4342 5E92 AD66 8C8C FBA5
-------------- next part --------------
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
# This archive contains:
#	lang/jruby-vendor
#	lang/jruby-vendor/Makefile
echo c - lang/jruby-vendor
mkdir -p lang/jruby-vendor > /dev/null 2>&1
echo x - lang/jruby-vendor/Makefile
sed 's/^X//' >lang/jruby-vendor/Makefile << 'da5a2bee2bc11dc15f37bb7ef05c35c7'
X# New ports collection makefile for:    jruby-vendor
X# Date created:                         2011-04-21
X# Whom:                                 Jason Helfman <jhelfman at>
X# $FreeBSD$
XMASTERDIR=              ${.CURDIR}/../jruby
XMAINTAINER=             ports at
XJAVA_VENDOR?=		openjdk
XLATEST_LINK=            jruby-${JAVA_VENDOR}
XDESCR=                  ${MASTERDIR}/pkg-descr
X.include "${MASTERDIR}/Makefile"

More information about the freebsd-ports mailing list