--- /dev/null
+diff -uprN rhino1_6R1.orig/build.properties rhino1_6R1/build.properties
+--- rhino1_6R1.orig/build.properties 2004-11-30 22:11:12.000000000 +0100
++++ rhino1_6R1/build.properties 2004-12-22 19:41:54.452624448 +0100
+@@ -49,6 +49,7 @@ classes: ${build.dir}/classes
+ # compilation settings
+ debug: on
+ target-jvm: 1.1
++source-jvm: 1.3
+
+ # jar generation settings
+ jar-compression: true
+diff -uprN rhino1_6R1.orig/src/build.xml rhino1_6R1/src/build.xml
+--- rhino1_6R1.orig/src/build.xml 2004-11-30 22:11:12.000000000 +0100
++++ rhino1_6R1/src/build.xml 2004-12-22 19:42:23.355230584 +0100
+@@ -15,6 +15,7 @@ Requires Ant version 1.2
+ deprecation="on"
+ debug="${debug}"
+ target="${target-jvm}"
++ source="${source-jvm}"
+ >
+ </javac>
+ <copy todir="${classes}">
+diff -uprN rhino1_6R1.orig/toolsrc/build.xml rhino1_6R1/toolsrc/build.xml
+--- rhino1_6R1.orig/toolsrc/build.xml 2004-11-30 22:11:12.000000000 +0100
++++ rhino1_6R1/toolsrc/build.xml 2004-12-22 19:42:40.661599616 +0100
+@@ -18,7 +18,8 @@ Requires Ant version 1.2
+ destdir="${classes}"
+ includes="org/**/*.java"
+ deprecation="on"
+- debug="${debug}"
++ debug="${debug}"
++ source="${source-jvm}"
+ target="${target-jvm}">
+ </javac>
+ <copy todir="${classes}">
+diff -uprN rhino1_6R1.orig/toolsrc/org/mozilla/javascript/tools/debugger/build.xml rhino1_6R1/toolsrc/org/mozilla/javascript/tools/debugger/build.xml
+--- rhino1_6R1.orig/toolsrc/org/mozilla/javascript/tools/debugger/build.xml 2004-11-30 22:11:12.000000000 +0100
++++ rhino1_6R1/toolsrc/org/mozilla/javascript/tools/debugger/build.xml 2004-12-22 19:06:04.299497408 +0100
+@@ -3,7 +3,6 @@
+ <project name="toolsrc" default="help" basedir=".">
+
+ <target name="properties">
+- <property name="swing-ex-url" value="http://java.sun.com/products/jfc/tsc/articles/treetable2/downloads/src.zip"/>
+ <available file="downloaded/AbstractCellEditor.java"
+ property="swing-ex-available"/>
+ </target>
+@@ -13,8 +12,7 @@
+ the files we don't need, and change the package
+ -->
+ <mkdir dir="downloaded"/>
+- <get src="${swing-ex-url}" dest="downloaded/swingExSrc.zip"/>
+- <unzip src="downloaded/swingExSrc.zip" dest="downloaded/">
++ <unzip src="../../../../../../swingExSrc.zip" dest="downloaded/">
+ <patternset>
+ <include name="AbstractCellEditor.java"/>
+ <include name="JTreeTable.java"/>
+diff -uprN rhino1_6R1.orig/xmlimplsrc/build.xml rhino1_6R1/xmlimplsrc/build.xml
+--- rhino1_6R1.orig/xmlimplsrc/build.xml 2004-11-30 22:11:12.000000000 +0100
++++ rhino1_6R1/xmlimplsrc/build.xml 2004-12-22 19:42:52.882741720 +0100
+@@ -12,7 +12,6 @@
+ <target name="compile" unless="without-xmlimpl">
+
+ <available property="xbean-present?" file="${xbean.jar}" />
+- <antcall target="xbean-get" />
+
+ <condition property="xmlimpl-compile?">
+ <and>
+@@ -35,7 +34,6 @@
+ </condition>
+
+ <antcall target="do-compile" />
+- <antcall target="do-not-compile" />
+
+ </target>
+
+@@ -48,6 +46,7 @@
+ deprecation="on"
+ debug="${debug}"
+ target="${target-jvm}"
++ source="${source-jvm}"
+ classpathref="xmlimpl.classpath"
+ failonerror="${xmlimpl.compile.failonerror}"
+ >
+@@ -55,15 +54,6 @@
+
+ </target>
+
+- <target name="do-not-compile" unless="xmlimpl-compile?">
+-
+-<echo>
+-Skipping compilation of E4X implementation due to lack of
+-javax.xml.namespace.*, org.apache.xmlbeans.* classes
+-</echo>
+-
+- </target>
+-
+ <target name="copy-source">
+ <mkdir dir="${dist.dir}/xmlimplsrc"/>
+ <copy todir="${dist.dir}/xmlimplsrc">
+@@ -79,39 +69,4 @@ javax.xml.namespace.*, org.apache.xmlbea
+ includes="org/mozilla/javascript/xmlimpl/**"/>
+ </delete>
+ </target>
+-
+-
+- <target name="xbean-get" unless="xbean-present?">
+-
+- <property
+- name="xbean.url"
+- value="http://www.apache.org/dist/xml/xmlbeans/xmlbeans-current.zip"
+- />
+-
+- <property name="xbean.tmp" location="${build.dir}/tmp-xbean" />
+- <property name="xbean.zip" location="${xbean.tmp}/xbean.zip" />
+-
+- <mkdir dir="${xbean.tmp}"/>
+- <get src="${xbean.url}" dest="${xbean.zip}" ignoreerrors="true" />
+-
+- <available property="xbean-zip-present?" file="${xbean.zip}" />
+-
+- <antcall target="xbean-unzip" />
+- </target>
+-
+- <target name="xbean-unzip" if="xbean-zip-present?">
+-
+- <unzip src="${xbean.zip}" dest="${xbean.tmp}">
+- <patternset includes="xmlbeans-*/lib/xbean.jar" />
+- </unzip>
+- <mkdir dir="${lib}" />
+- <copy tofile="${xbean.jar}">
+- <fileset dir="${xbean.tmp}" includes="xmlbeans-*/lib/xbean.jar" />
+- </copy>
+-
+- <delete dir="${xbean.tmp}" />
+- </target>
+-
+-
+-
+ </project>
--- /dev/null
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-java/rhino/rhino-1.6.1.ebuild,v 1.1 2004/12/22 19:24:02 karltk Exp $
+
+inherit java-pkg eutils
+
+MY_P="rhino1_6R1"
+DESCRIPTION="Rhino is an open-source implementation of JavaScript written entirely in Java. It is typically embedded into Java applications to provide scripting to end users"
+SRC_URI="ftp://ftp.mozilla.org/pub/mozilla.org/js/${MY_P}.zip http://dev.gentoo.org/~karltk/projects/java/distfiles/rhino-swing-ex-1.0.zip"
+HOMEPAGE="http://www.mozilla.org/rhino/"
+LICENSE="NPL-1.1"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE="jikes doc"
+S="${WORKDIR}/${MY_P}"
+DEPEND="dev-java/ant-core
+ >=virtual/jdk-1.4
+ app-arch/unzip
+ jikes? ( dev-java/jikes )"
+RDEPEND=">=virtual/jre-1.4
+ >=dev-java/xml-xmlbeans-20041217"
+
+src_unpack() {
+ unpack ${MY_P}.zip
+ cd ${S}
+
+ epatch ${FILESDIR}/rhino-1.6-gentoo.patch
+
+ cp ${DISTDIR}/rhino-swing-ex-1.0.zip swingExSrc.zip
+
+ mkdir lib/ && cd lib/
+ java-pkg_jar-from xml-xmlbeans-1 xbean.jar
+}
+
+src_compile() {
+ local antflags="jar"
+ if use jikes; then
+ antflags="${antflags} -Dbuild.compiler=jikes"
+ fi
+ ant ${antflags} || die "compilation error"
+}
+
+src_install() {
+ dobin ${FILESDIR}/jsscript
+ java-pkg_dojar build/*/js.jar
+ if use doc; then
+ java-pkg_dohtml -r docs/*
+ fi
+}