diff options
Diffstat (limited to 'dev-java/rhino')
-rw-r--r-- | dev-java/rhino/Manifest | 4 | ||||
-rw-r--r-- | dev-java/rhino/files/rhino-1.7.7-testsrc-build.xml.patch | 40 | ||||
-rw-r--r-- | dev-java/rhino/metadata.xml | 16 | ||||
-rw-r--r-- | dev-java/rhino/rhino-1.7.7-r1.ebuild | 93 |
4 files changed, 153 insertions, 0 deletions
diff --git a/dev-java/rhino/Manifest b/dev-java/rhino/Manifest new file mode 100644 index 000000000000..ec4dda43054f --- /dev/null +++ b/dev-java/rhino/Manifest @@ -0,0 +1,4 @@ +AUX rhino-1.7.7-testsrc-build.xml.patch 1414 BLAKE2B c96d595d6c0bcd0225f8df9ac63e28a68cd6045b0f5395a13826fd7b7c7bce01ccc6963e58e2a07e41cd3c138de92cabd2627163cb16b5b2c21bc4f91b4a7eac SHA512 f7fa8d77a584399e6049414ed46b138c14f984148b6dda6e20e376c4312295728de24f31331d20c2b1dc62f81c8d9bd8732227ad64fcf430f2ba721b8de490fe +DIST Rhino1_7_7_RELEASE.zip 6059127 BLAKE2B 431885bf287da524cfc82e6594802c93e75d48177b4056e9b893d7c852c3c3b30291d616a140981e520fdebacf5cbc8b802a6137f0e29a369f1d01cc771c6b77 SHA512 ce89b6a153d62dd459a86360c67d6db4b05922d8ab49a8d45ccb0deb0f639cd819f0ad75cb4929eda6b7f0fd6ddb5879a4035de6968283317bfd0e93d2bb744e +EBUILD rhino-1.7.7-r1.ebuild 2052 BLAKE2B c48a12c3aa6f5cef28d58e3fd6f0f5b14dcd12dcab67f949f0961e76058da2ed36f0d8f9cefa0fe734e8c9f15fc09c556860d3fdee71541cd322c07a7d065337 SHA512 0a4e9beb1503b80e8ee801ced0e4a94f94a871179f19ee7c6a7242e02a097336a2a13ba798e182bb43fb4beaa727d3e05de6d18734490bb604e7855938d975bd +MISC metadata.xml 509 BLAKE2B 7b61b016be8e7149ead29ef6ec73f2da96d3bc864650845b68d452dd2a5c3d6e1093b7e432a4be7ee7a8f4721ada8b998982876ef709ff2bb4f36568c30a0947 SHA512 73d3c55306da2299fb537dda46cd2551db5913d130bf069ef24b5481a233f84a164338aa31b37dbbcd351d4de2d90d7411d93010d531815977ebed73646d41cd 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/metadata.xml b/dev-java/rhino/metadata.xml new file mode 100644 index 000000000000..d039e67cf9e1 --- /dev/null +++ b/dev-java/rhino/metadata.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>java@gentoo.org</email> + <name>Java</name> + </maintainer> + <longdescription> + Rhino is an implementation of JavaScript written entirely in Java. + It is typically embedded into Java applications to provide scripting + to end users. + </longdescription> + <upstream> + <remote-id type="github">mozilla/rhino</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-java/rhino/rhino-1.7.7-r1.ebuild b/dev-java/rhino/rhino-1.7.7-r1.ebuild new file mode 100644 index 000000000000..6183419c40ea --- /dev/null +++ b/dev-java/rhino/rhino-1.7.7-r1.ebuild @@ -0,0 +1,93 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +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.6" +KEYWORDS="amd64 ~arm ~arm64 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" + +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() { + java-pkg_clean + + 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 +} |