summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-java')
-rw-r--r--dev-java/rhino/ChangeLog8
-rw-r--r--dev-java/rhino/files/rhino-1.7.7-testsrc-build.xml.patch40
-rw-r--r--dev-java/rhino/rhino-1.7.7.ebuild100
3 files changed, 147 insertions, 1 deletions
diff --git a/dev-java/rhino/ChangeLog b/dev-java/rhino/ChangeLog
index 8dc3e667da22..9034e96abbcc 100644
--- a/dev-java/rhino/ChangeLog
+++ b/dev-java/rhino/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-java/rhino
# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-java/rhino/ChangeLog,v 1.78 2015/06/13 21:57:24 monsieurp Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-java/rhino/ChangeLog,v 1.79 2015/08/06 10:01:23 monsieurp Exp $
+
+*rhino-1.7.7 (06 Aug 2015)
+
+ 06 Aug 2015; Patrice Clement <monsieurp@gentoo.org>
+ +files/rhino-1.7.7-testsrc-build.xml.patch, +rhino-1.7.7.ebuild:
+ Version bump. Fixes bug 524528.
13 Jun 2015; Patrice Clement <monsieurp@gentoo.org> -rhino-1.5.5-r4.ebuild,
-rhino-1.5.5-r5.ebuild:
diff --git a/dev-java/rhino/files/rhino-1.7.7-testsrc-build.xml.patch b/dev-java/rhino/files/rhino-1.7.7-testsrc-build.xml.patch
new file mode 100644
index 000000000000..4760e980245d
--- /dev/null
+++ b/dev-java/rhino/files/rhino-1.7.7-testsrc-build.xml.patch
@@ -0,0 +1,40 @@
+--- testsrc/build.xml.orig 2015-08-05 23:41:56.815000000 +0000
++++ testsrc/build.xml 2015-08-05 23:46:10.026000000 +0000
+@@ -46,15 +46,8 @@
+ -->
+ <property name="test.vm.mx" value="256m" />
+
+- <target name="get-junit" unless="offline">
+- <mkdir dir="lib"/>
+- <get src="${test.junit.url}" dest="lib/junit.jar" usetimestamp="true"/>
+- <get src="${test.hamcrest.url}" dest="lib/hamcrest.jar" usetimestamp="true"/>
+- </target>
+-
+ <target name="junit-compile">
+ <mkdir dir="${test.classes}" />
+- <antcall target="get-junit"/>
+ <javac
+ destdir="${test.classes}" debug="true"
+ encoding="UTF-8"
+@@ -75,7 +68,6 @@
+
+ <target name="compile">
+ <mkdir dir="${test.classes}" />
+- <antcall target="get-junit"/>
+ <javac
+ srcdir="testsrc"
+ destdir="${test.classes}" debug="true"
+@@ -105,12 +97,7 @@
+ <delete dir="${test.classes}" />
+ </target>
+
+- <target name="get-emma" unless="offline">
+- <get src="${test.emma.url}" dest="lib/emma.jar" usetimestamp="true"/>
+- <get src="${test.emma_ant.url}" dest="lib/emma_ant.jar" usetimestamp="true"/>
+- </target>
+-
+- <target name="coverage-instrument" depends="get-emma">
++ <target name="coverage-instrument">
+ <property name="coverage.dir" location="${build.dir}/coverage"/>
+ <property name="coverage.classes.dir" location="${build.dir}/coverage/classes"/>
+ <mkdir dir="${coverage.classes.dir}"/>
diff --git a/dev-java/rhino/rhino-1.7.7.ebuild b/dev-java/rhino/rhino-1.7.7.ebuild
new file mode 100644
index 000000000000..2fb834d606ec
--- /dev/null
+++ b/dev-java/rhino/rhino-1.7.7.ebuild
@@ -0,0 +1,100 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-java/rhino/rhino-1.7.7.ebuild,v 1.1 2015/08/06 10:01:23 monsieurp Exp $
+
+EAPI="5"
+JAVA_PKG_IUSE="doc examples source test"
+inherit java-pkg-2 java-ant-2 versionator
+
+# rhino -> Rhino
+MY_PN="${PN^}"
+
+# 1.7.7 -> 1_7_7
+MY_PV="$(replace_all_version_separators _ ${PV})"
+
+# rhino1.7.7
+MY_P="${PN}${PV}"
+
+# Rhino1_7_7_RELEASE
+MY_RELEASE="${MY_PN}${MY_PV}_RELEASE"
+
+DESCRIPTION="An open-source implementation of JavaScript written in Java"
+SRC_URI="https://github.com/mozilla/${PN}/archive/${MY_RELEASE}.zip"
+HOMEPAGE="http://www.mozilla.org/rhino/"
+
+LICENSE="MPL-1.1 GPL-2"
+SLOT="1.7"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+IUSE=""
+
+# ../rhino-Rhino1_7_7_RELEASE
+S="${WORKDIR}/${PN}-${MY_RELEASE}"
+
+CDEPEND=""
+RDEPEND=">=virtual/jre-1.6
+ ${CDEPEND}"
+DEPEND=">=virtual/jdk-1.6
+ test? (
+ dev-java/emma:0
+ dev-java/junit:4
+ dev-java/ant-junit:0
+ dev-java/hamcrest-core:1.3
+ )
+ ${CDEPEND}"
+
+JAVA_ANT_REWRITE_CLASSPATH="yes"
+EANT_BUILD_XML="${S}/build.xml"
+EANT_BUILD_TARGET="jar"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-testsrc-build.xml.patch
+)
+
+EANT_TEST_TARGET="junit"
+
+# StackOverFlow errors arise on some tests.
+# Further, the test suite takes way too much time (> 5 min).
+# Maybe reduce the numbers of tests?
+RESTRICT="test"
+
+java_prepare() {
+ find . \
+ -type f \
+ -name \*.jar \
+ -print \
+ -exec rm -v {} \; || die "Couldn't delete bundled jar files."
+
+ epatch ${PATCHES[@]}
+
+ if use test; then
+ mkdir lib || die
+ java-pkg_jar-from --build-only emma emma.jar lib/emma.jar
+ java-pkg_jar-from --build-only emma emma_ant.jar lib/emma_ant.jar
+ java-pkg_jar-from --build-only hamcrest-core-1.3 hamcrest-core.jar lib/hamcrest.jar
+ java-pkg_jar-from --build-only junit-4 junit.jar lib/junit.jar
+ fi
+}
+
+src_compile() {
+ java-pkg-2_src_compile
+
+ if use source; then
+ EANT_BUILD_TARGET="source-zip" \
+ java-pkg-2_src_compile
+ fi
+}
+
+src_test() {
+ java-pkg-2_src_test
+}
+
+src_install() {
+ java-pkg_dojar build/${MY_P}/js.jar
+
+ java-pkg_dolauncher jsscript-${SLOT} \
+ --main org.mozilla.javascript.tools.shell.Main
+
+ use doc && java-pkg_dojavadoc "build/${MY_P}/javadoc"
+ use examples && java-pkg_doexamples examples
+ use source && java-pkg_dosrc {src,toolsrc,xmlimplsrc}/org
+}