summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlistair Bush <ali_bush@gentoo.org>2010-06-19 11:07:14 +0000
committerAlistair Bush <ali_bush@gentoo.org>2010-06-19 11:07:14 +0000
commit9633364707dd13ce36eca142e8baa56a82bc2e60 (patch)
tree1e10d163abc897a52b2eae5aef42eb1d54951872 /dev-java
parentAutomated update of use.local.desc (diff)
downloadgentoo-2-9633364707dd13ce36eca142e8baa56a82bc2e60.tar.gz
gentoo-2-9633364707dd13ce36eca142e8baa56a82bc2e60.tar.bz2
gentoo-2-9633364707dd13ce36eca142e8baa56a82bc2e60.zip
Version Bump and restrict tests for 1.4.1
(Portage version: 2.1.8.3/cvs/Linux x86_64)
Diffstat (limited to 'dev-java')
-rw-r--r--dev-java/jruby/ChangeLog9
-rw-r--r--dev-java/jruby/files/jruby-1.5.0-bindir.patch12
-rw-r--r--dev-java/jruby/files/jruby-1.5.0-system-jars.patch272
-rw-r--r--dev-java/jruby/jruby-1.4.1.ebuild4
-rw-r--r--dev-java/jruby/jruby-1.5.1.ebuild186
5 files changed, 480 insertions, 3 deletions
diff --git a/dev-java/jruby/ChangeLog b/dev-java/jruby/ChangeLog
index 48bd39a89764..5378c79b7639 100644
--- a/dev-java/jruby/ChangeLog
+++ b/dev-java/jruby/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for dev-java/jruby
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-java/jruby/ChangeLog,v 1.58 2010/04/27 09:23:58 caster Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-java/jruby/ChangeLog,v 1.59 2010/06/19 11:07:14 ali_bush Exp $
+
+*jruby-1.5.1 (17 Jun 2010)
+
+ 17 Jun 2010; Alistair Bush <ali_bush@gentoo.org>
+ +files/jruby-1.5.0-bindir.patch, +files/jruby-1.5.0-system-jars.patch,
+ +jruby-1.5.1.ebuild:
+ Version Bump.
*jruby-1.4.1 (27 Apr 2010)
diff --git a/dev-java/jruby/files/jruby-1.5.0-bindir.patch b/dev-java/jruby/files/jruby-1.5.0-bindir.patch
new file mode 100644
index 000000000000..88390b223adb
--- /dev/null
+++ b/dev-java/jruby/files/jruby-1.5.0-bindir.patch
@@ -0,0 +1,12 @@
+diff -Naur jruby-1.5.0.orig/src/org/jruby/libraries/RbConfigLibrary.java jruby-1.5.0/src/org/jruby/libraries/RbConfigLibrary.java
+--- jruby-1.5.0.orig/src/org/jruby/libraries/RbConfigLibrary.java 2010-05-16 08:54:49.000000000 +1200
++++ jruby-1.5.0/src/org/jruby/libraries/RbConfigLibrary.java 2010-05-16 23:24:36.000000000 +1200
+@@ -135,7 +135,7 @@
+ // Use property for binDir if available, otherwise fall back to common bin default
+ String binDir = SafePropertyAccessor.getProperty("jruby.bindir");
+ if (binDir == null) {
+- binDir = new NormalizedFile(normalizedHome, "bin").getPath();
++ binDir = new NormalizedFile(normalizedHome, "/usr/bin").getPath();
+ }
+ setConfig(configHash, "bindir", binDir);
+
diff --git a/dev-java/jruby/files/jruby-1.5.0-system-jars.patch b/dev-java/jruby/files/jruby-1.5.0-system-jars.patch
new file mode 100644
index 000000000000..294feedbbaf6
--- /dev/null
+++ b/dev-java/jruby/files/jruby-1.5.0-system-jars.patch
@@ -0,0 +1,272 @@
+diff -Naur jruby-1.5.1.bak/bin/jruby.sh jruby-1.5.1/bin/jruby.sh
+--- jruby-1.5.1.bak/bin/jruby.sh 2010-06-15 21:23:11.000000000 +1200
++++ jruby-1.5.1/bin/jruby.sh 2010-06-15 21:29:14.000000000 +1200
+@@ -11,16 +11,16 @@
+ #
+ # -----------------------------------------------------------------------------
+
+-cygwin=false
+-
+ # ----- Identify OS we are running under --------------------------------------
+ case "`uname`" in
+- CYGWIN*) cygwin=true;;
+ Darwin) darwin=true;;
+ esac
+
+ # ----- Verify and Set Required Environment Variables -------------------------
+
++#This will be filled in by the ebuild after install
++JRUBY_HOME=
++
+ ## resolve links - $0 may be a link to home
+ PRG=$0
+ progname=`basename "$0"`
+@@ -39,12 +39,14 @@
+ fi
+ done
+
+-JRUBY_HOME_1=`dirname "$PRG"` # the ./bin dir
+-if [ "$JRUBY_HOME_1" = '.' ] ; then
+- cwd=`pwd`
+- JRUBY_HOME=`dirname $cwd` # JRUBY-2699
+-else
+- JRUBY_HOME=`dirname "$JRUBY_HOME_1"` # the . dir
++if [ -z "$JRUBY_HOME" ]; then
++ JRUBY_HOME_1=`dirname "$PRG"`
++ if [ "$JRUBY_HOME_1" = '.' ] ; then
++ cwd=`pwd`
++ JRUBY_HOME=`dirname $cwd` # JRUBY-2699
++ else
++ JRUBY_HOME=`dirname "$JRUBY_HOME_1"` # the . dir
++ fi
+ fi
+
+ if [ -z "$JRUBY_OPTS" ] ; then
+@@ -74,85 +76,17 @@
+ done
+ JRUBY_OPTS=${JRUBY_OPTS_TEMP}
+
+-if [ -z "$JAVA_HOME" ] ; then
+- JAVA_CMD='java'
+-else
+- if $cygwin; then
+- JAVA_HOME=`cygpath -u "$JAVA_HOME"`
+- fi
+- JAVA_CMD="$JAVA_HOME/bin/java"
+-fi
+-
+-# If you're seeing odd exceptions, you may have a bad JVM install.
+-# Uncomment this and report the version to the JRuby team along with error.
+-#$JAVA_CMD -version
+-
+ JRUBY_SHELL=/bin/sh
+
+ # ----- Set Up The Boot Classpath -------------------------------------------
+
+-CP_DELIMITER=":"
+-
+-# add main jruby jar to the bootclasspath
+-for j in "$JRUBY_HOME"/lib/jruby.jar "$JRUBY_HOME"/lib/jruby-complete.jar; do
+- if [ ! -e "$j" ]; then
+- continue
+- fi
+- if [ "$JRUBY_CP" ]; then
+- JRUBY_CP="$JRUBY_CP$CP_DELIMITER$j"
+- else
+- JRUBY_CP="$j"
+- fi
+- if [ $JRUBY_ALREADY_ADDED ]; then
+- echo "WARNING: more than one JRuby JAR found in lib directory"
+- fi
+- JRUBY_ALREADY_ADDED=true
+-done
+-
+-if $cygwin; then
+- JRUBY_CP=`cygpath -p -w "$JRUBY_CP"`
+-fi
+-
+-# ----- Set Up The System Classpath -------------------------------------------
+-
+-if [ "$JRUBY_PARENT_CLASSPATH" != "" ]; then
+- # Use same classpath propagated from parent jruby
+- CP=$JRUBY_PARENT_CLASSPATH
+-else
+- # add other jars in lib to CP for command-line execution
+- for j in "$JRUBY_HOME"/lib/*.jar; do
+- if [ "$j" == "$JRUBY_HOME"/lib/jruby.jar ]; then
+- continue
+- fi
+- if [ "$j" == "$JRUBY_HOME"/lib/jruby-complete.jar ]; then
+- continue
+- fi
+- if [ "$CP" ]; then
+- CP="$CP$CP_DELIMITER$j"
+- else
+- CP="$j"
+- fi
+- done
+-
+- if $cygwin; then
+- CP=`cygpath -p -w "$CP"`
+- fi
+-fi
+-
+-if $cygwin; then
+- # switch delimiter only after building Unix style classpaths
+- CP_DELIMITER=";"
+-fi
++JRUBY_CP="$(java-config -d -p jruby)"
++CP="${JRUBY_PARENT_CLASSPATH}"
+
+ # ----- Execute The Requested Command -----------------------------------------
+
+-if [ -z "$JAVA_MEM" ] ; then
+- JAVA_MEM=-Xmx500m
+-fi
+-
+-if [ -z "$JAVA_STACK" ] ; then
+- JAVA_STACK=-Xss1024k
+-fi
++JAVA_MEM=${JAVA_MEM:--Xmx500m}
++JAVA_STACK=${JAVA_STACK:--Xss1024k}
+
+ JAVA_VM=-client
+ JAVA_ENCODING=""
+@@ -175,19 +109,19 @@
+ elif [ "${val:0:4}" = "-Xss" ]; then
+ JAVA_STACK=$val
+ elif [ "${val}" = "" ]; then
+- $JAVA_CMD -help
++ java -help
+ echo "(Prepend -J in front of these options when using 'jruby' command)"
+ exit
+ elif [ "${val}" = "-X" ]; then
+- $JAVA_CMD -X
++ java -X
+ echo "(Prepend -J in front of these options when using 'jruby' command)"
+ exit
+ elif [ "${val}" = "-classpath" ]; then
+- CP="$CP$CP_DELIMITER$2"
++ CP="$CP:$2"
+ CLASSPATH=""
+ shift
+ elif [ "${val}" = "-cp" ]; then
+- CP="$CP$CP_DELIMITER$2"
++ CP="$CP:$2"
+ CLASSPATH=""
+ shift
+ else
+@@ -224,15 +158,8 @@
+ java_args=("${java_args[@]}" "-Djava.awt.headless=true") ;;
+ # Run under JDB
+ --jdb)
+- if [ -z "$JAVA_HOME" ] ; then
+- JAVA_CMD='jdb'
+- else
+- if $cygwin; then
+- JAVA_HOME=`cygpath -u "$JAVA_HOME"`
+- fi
+- JAVA_CMD="$JAVA_HOME/bin/jdb"
+- fi
+- java_args=("${java_args[@]}" "-sourcepath" "$JRUBY_HOME/lib/ruby/1.8:.")
++ JAVA_CMD="jdb"
++ java_args=("${java_args[@]}" "-sourcepath" "$JRUBY_HOME/lib/ruby/1.8:.")
+ JRUBY_OPTS=("${JRUBY_OPTS[@]}" "-X+C") ;;
+ --client)
+ JAVA_VM=-client ;;
+@@ -275,51 +202,16 @@
+
+ JAVA_OPTS="$JAVA_OPTS $JAVA_MEM $JAVA_STACK"
+
+-JFFI_BOOT=""
+-if [ -d $JRUBY_HOME/lib/native/ ]; then
+- for d in $JRUBY_HOME/lib/native/*`uname -s`; do
+- if [ -z "$JFFI_BOOT" ]; then
+- JFFI_BOOT="$d"
+- else
+- JFFI_BOOT="$JFFI_BOOT:$d"
+- fi
+- done
+-fi
+-JFFI_OPTS="-Djffi.boot.library.path=$JFFI_BOOT"
+-
+-if $cygwin; then
+- JRUBY_HOME=`cygpath --mixed "$JRUBY_HOME"`
+- JRUBY_SHELL=`cygpath --mixed "$JRUBY_SHELL"`
+-
+- if [[ ( "${1:0:1}" = "/" ) && ( ( -f "$1" ) || ( -d "$1" )) ]]; then
+- win_arg=`cygpath -w "$1"`
+- shift
+- win_args=("$win_arg" "$@")
+- set -- "${win_args[@]}"
+- fi
+-
+- # fix JLine to use UnixTerminal
+- stty -icanon min 1 -echo > /dev/null 2>&1
+- if [ $? = 0 ]; then
+- JAVA_OPTS="$JAVA_OPTS -Djline.terminal=jline.UnixTerminal"
+- fi
+-
+-fi
++JFFI_OPTS="-Djffi.boot.library.path=$(java-config -dp jffi-0.4)"
+
+ if [ "$nailgun_client" != "" ]; then
+- if [ -f $JRUBY_HOME/tool/nailgun/ng ]; then
+- exec $JRUBY_HOME/tool/nailgun/ng org.jruby.util.NailMain $JRUBY_OPTS "$@"
+- else
+- echo "error: ng executable not found; run 'make' in ${JRUBY_HOME}/tool/nailgun"
+- exit 1
+- fi
+-else
+-if [ "$VERIFY_JRUBY" != "" ]; then
++ exec /usr/bin/ng org.jruby.util.NailMain $JRUBY_OPTS "$@"
++elif [ "$VERIFY_JRUBY" != "" ]; then
+ if [ "$PROFILE_ARGS" != "" ]; then
+ echo "Running with instrumented profiler"
+ fi
+
+- "$JAVA_CMD" $PROFILE_ARGS $JAVA_OPTS "$JFFI_OPTS" "${java_args[@]}" -classpath "$JRUBY_CP$CP_DELIMITER$CP$CP_DELIMITER$CLASSPATH" \
++ "${JAVA_CMD:-java}" $PROFILE_ARGS $JAVA_OPTS "$JFFI_OPTS" "${java_args[@]}" -classpath "$JRUBY_CP:$CP:$CLASSPATH" \
+ "-Djruby.home=$JRUBY_HOME" \
+ "-Djruby.lib=$JRUBY_HOME/lib" -Djruby.script=jruby \
+ "-Djruby.shell=$JRUBY_SHELL" \
+@@ -334,34 +226,14 @@
+ rm profile.txt
+ fi
+
+- if $cygwin; then
+- stty icanon echo > /dev/null 2>&1
+- fi
+-
+ exit $JRUBY_STATUS
+ else
+- if $cygwin; then
+- # exec doed not work correctly with cygwin bash
+- "$JAVA_CMD" $JAVA_OPTS "$JFFI_OPTS" "${java_args[@]}" -Xbootclasspath/a:"$JRUBY_CP" -classpath "$CP$CP_DELIMITER$CLASSPATH" \
+- "-Djruby.home=$JRUBY_HOME" \
+- "-Djruby.lib=$JRUBY_HOME/lib" -Djruby.script=jruby \
+- "-Djruby.shell=$JRUBY_SHELL" \
+- $java_class $JRUBY_OPTS "$@"
+-
+- # Record the exit status immediately, or it will be overridden.
+- JRUBY_STATUS=$?
+-
+- stty icanon echo > /dev/null 2>&1
++ exec "${JAVA_CMD:-java}" $JAVA_OPTS "$JFFI_OPTS" "${java_args[@]}" -Xbootclasspath/a:"$JRUBY_CP" -classpath "$CP:$CLASSPATH" \
++ "-Djruby.home=$JRUBY_HOME" \
++ "-Djruby.lib=$JRUBY_HOME/lib" -Djruby.script=jruby \
++ "-Djruby.shell=$JRUBY_SHELL" \
++ $java_class $JRUBY_OPTS "$@"
+
+- exit $JRUBY_STATUS
+- else
+- exec "$JAVA_CMD" $JAVA_OPTS "$JFFI_OPTS" "${java_args[@]}" -Xbootclasspath/a:"$JRUBY_CP" -classpath "$CP$CP_DELIMITER$CLASSPATH" \
+- "-Djruby.home=$JRUBY_HOME" \
+- "-Djruby.lib=$JRUBY_HOME/lib" -Djruby.script=jruby \
+- "-Djruby.shell=$JRUBY_SHELL" \
+- $java_class $JRUBY_OPTS "$@"
+- fi
+-fi
+ fi
+
+ # Be careful adding code down here, you might override the exit
diff --git a/dev-java/jruby/jruby-1.4.1.ebuild b/dev-java/jruby/jruby-1.4.1.ebuild
index 26711422b71c..01f6ddf19eb9 100644
--- a/dev-java/jruby/jruby-1.4.1.ebuild
+++ b/dev-java/jruby/jruby-1.4.1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-java/jruby/jruby-1.4.1.ebuild,v 1.1 2010/04/27 09:23:58 caster Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-java/jruby/jruby-1.4.1.ebuild,v 1.2 2010/06/19 11:07:14 ali_bush Exp $
EAPI="2"
JAVA_PKG_IUSE="doc source test"
@@ -51,7 +51,7 @@ PDEPEND="ssl? ( dev-ruby/jruby-openssl )"
# Tests work for ali_bush inside the ebuild env
# but fail when using vanilla src tarball.
# Restrict tests so we can stablise this package.
-#RESTRICT="test"
+RESTRICT="test"
S="${WORKDIR}/${PN}-${MY_PV}"
diff --git a/dev-java/jruby/jruby-1.5.1.ebuild b/dev-java/jruby/jruby-1.5.1.ebuild
new file mode 100644
index 000000000000..c10b6b3f6328
--- /dev/null
+++ b/dev-java/jruby/jruby-1.5.1.ebuild
@@ -0,0 +1,186 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-java/jruby/jruby-1.5.1.ebuild,v 1.1 2010/06/19 11:07:14 ali_bush Exp $
+
+EAPI="2"
+JAVA_PKG_IUSE="doc source test"
+inherit eutils java-pkg-2 java-ant-2
+
+MY_PV="${PV/_rc1/RC1}"
+
+DESCRIPTION="Java-based Ruby interpreter implementation"
+HOMEPAGE="http://jruby.codehaus.org/"
+SRC_URI="http://jruby.org.s3.amazonaws.com/downloads/${PV}/${PN}-src-${PV}.tar.gz"
+LICENSE="|| ( CPL-1.0 GPL-2 LGPL-2.1 )"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="bsf ssl"
+
+CDEPEND=">=dev-java/bytelist-1.0.2:0
+ >=dev-java/constantine-0.6:0
+ >=dev-java/jline-0.9.94:0
+ >=dev-java/joni-1.1.3:0
+ >=dev-java/jnr-posix-1.1.3:0
+ >=dev-java/jnr-netdb-1.0:0
+ >=dev-java/jvyamlb-0.2.5:0
+ >=dev-java/asm-3.2:3
+ dev-java/jcodings:0
+ >=dev-java/jffi-0.7_pre:0.4
+ dev-java/joda-time:0
+ dev-util/jay:0[java]
+ dev-java/nailgun:0
+ dev-java/jaffl:0
+ dev-java/jgrapht:0
+ dev-java/ant-core:0
+ dev-java/bsf:2.3"
+
+RDEPEND="${CDEPEND}
+ >=virtual/jre-1.6"
+
+DEPEND="${CDEPEND}
+ >=virtual/jdk-1.6
+ test? (
+ dev-java/ant-junit4:0
+ dev-java/ant-trax:0
+ dev-java/junit:4
+ java-virtuals/jdk-with-com-sun
+ )
+ !!<dev-ruby/jruby-1.3.1-r1"
+
+PDEPEND="ssl? ( dev-ruby/jruby-openssl )"
+
+# Tests fail completely.
+# Complaining about missing auto_gem
+RESTRICT="test"
+
+S="${WORKDIR}/${PN}-${MY_PV}"
+
+RUBY_HOME=/usr/share/${PN}/lib/ruby
+SITE_RUBY=${RUBY_HOME}/site_ruby
+GEMS=${RUBY_HOME}/gems
+
+JAVA_ANT_REWRITE_CLASSPATH="true"
+JAVA_ANT_IGNORE_SYSTEM_CLASSES="true"
+EANT_GENTOO_CLASSPATH="ant-core asm-3 bsf-2.3 bytelist constantine jay \
+jcodings jffi-0.4 jline constantine \
+joda-time joni jnr-posix jnr-netdb jvyamlb nailgun jaffl jgrapht"
+EANT_NEEDS_TOOLS="true"
+
+pkg_setup() {
+ java-pkg-2_pkg_setup
+
+ local fail
+
+ for directory in "${GEMS}" "${SITE_RUBY}"; do
+ if [[ -L ${directory} ]]; then
+ eerror "${directory} is a symlink. Please do the following to resolve the situation:"
+ echo 'emerge -an app-portage/gentoolkit'
+ echo 'equery -qC b '"${directory}"' | sort | uniq | sed s/^/=/ > ~/jruby.fix'
+ echo 'emerge -1C $(< ~/jruby.fix)'
+ echo "rm ${directory}"
+ echo 'emerge -1 $(< ~/jruby.fix)'
+ echo 'rm ~/jruby.fix'
+
+ eerror "For more information, please see http://bugs.gentoo.org/show_bug.cgi?id=302187"
+ fail="true"
+ fi
+ done
+
+ if [[ -n ${fail} ]]; then
+ die "Please address the above errors, then run emerge --resume"
+ fi
+}
+
+java_prepare() {
+ #epatch "${FILESDIR}/ftype-test-fixes.patch"
+ #epatch "${FILESDIR}/user-test-fixes.patch"
+ epatch "${FILESDIR}"/${PN}-1.5.0-system-jars.patch
+ epatch "${FILESDIR}"/${PN}-1.5.0-bindir.patch
+
+ # We don't need to use Retroweaver. There is a jarjar and a regular jar
+ # target but even with jarjarclean, both are a pain. The latter target
+ # is slightly easier so go with this one.
+ sed -r -i \
+ -e 's/maxmemory="128m"/maxmemory="192m"/' \
+ -e "/RetroWeaverTask/d" \
+ -e "/<zipfileset .+\/>/d" \
+ build.xml || die
+
+ sed -i -e '/Arndt/d' src/org/jruby/RubyBigDecimal.java
+
+ # Delete the bundled JARs but keep invokedynamic.jar.
+ # No source is available and it's only a dummy anyway.
+ find build_lib -name "*.jar" ! -name "jsr292-mock.jar" -delete || die
+ rm lib/profile.jar || die
+}
+
+src_compile() {
+ eant jar $(use_doc apidocs) -Djdk1.5+=true
+}
+
+src_test() {
+ if [ ${UID} == 0 ] ; then
+ ewarn 'The tests will fail if run as root so skipping them.'
+ ewarn 'Enable FEATURES="userpriv" if you want to run them.'
+ return
+ fi
+
+ mkdir -p usr
+
+ ln -s "${S}/bin" "${S}/usr/bin"
+
+ # TODO check this.
+ # ali_bush was getting crashes while attempting to run a test.
+ # No info about why it crashed seemed to be produced.
+ # remove it as temp fix.
+ #sed -i -e '/MRI/d' build.xml || die "Failed to sed build.xml"
+
+ # Our jruby.jar is unbundled so we need to add the classpath to this test.
+ sed -i "s:java -jar:java -Xbootclasspath/a\:#{ENV['JRUBY_CP']} -jar:g" test/test_load_compiled_ruby_class_from_classpath.rb || die
+
+ #bsf optionally depends on jruby, which means that the previously
+ #installed jruby will be added to classpath, nasty things will happen.
+ local cpath=`java-pkg_getjars ${EANT_GENTOO_CLASSPATH// /,},junit-4`
+ cpath="$(echo ${cpath} | sed -e "s_${ROOT}/usr/share/jruby/lib/jruby.jar:__g")"
+ EANT_GENTOO_CLASSPATH=""
+ ANT_TASKS="ant-junit4 ant-trax" \
+ JRUBY_CP="${cpath}" \
+ JRUBY_OPTS="" eant test -Djdk1.5+=true -Djruby.bindir=bin \
+ -Dgentoo.classpath="${cpath}"
+}
+
+src_install() {
+ local bin
+
+ java-pkg_dojar lib/${PN}.jar
+ dodoc README docs/{*.txt,README.*} || die
+
+ use doc && java-pkg_dojavadoc docs/api
+ use source && java-pkg_dosrc src/org
+
+ # We run the sed here in install so that we don't get the wrong
+ # data during the test phase!
+ sed \
+ -e '/++ebuild-cut-here++/, /--ebuild-cut-here--/ d' \
+ -e '/^JRUBY_HOME=/s:=:=/usr/share/jruby:' \
+ bin/jruby > "${T}"/jruby
+
+ dobin "${T}"/jruby "${S}"/bin/j{irb{,_swing},rubyc} || die
+
+ insinto "${RUBY_HOME}"
+ doins -r "${S}"/lib/ruby/{1.8,1.9,site_ruby} || die
+
+ # Remove all the references to RubyGems as we're just going to
+ # install it through dev-ruby/rubygems.
+ find "${D}${RUBY_HOME}" -type f \
+ '(' '(' -path '*rubygems*' -not -name 'jruby.rb' ')' -or -name 'ubygems.rb' -or -name 'datadir.rb' ')' \
+ -delete || die
+}
+
+pkg_postinst() {
+ ewarn "If you're updating from <=jruby-1.4.0, you're going to get errors related"
+ ewarn "to gentoo.rb load failure."
+ ewarn "This is due to a stray definition of JRUBY_OPTS variable from the previous ebuilds."
+ ewarn "To solve the problem, either login in a new shell, use 'env -i ${SHELL} --login'"
+ ewarn "or explicitly unset the variable before running jruby."
+}