diff options
Diffstat (limited to 'dev-java/rhino')
-rw-r--r-- | dev-java/rhino/Manifest | 6 | ||||
-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, 155 insertions, 0 deletions
diff --git a/dev-java/rhino/Manifest b/dev-java/rhino/Manifest new file mode 100644 index 000000000000..ca46b351ba55 --- /dev/null +++ b/dev-java/rhino/Manifest @@ -0,0 +1,6 @@ +AUX rhino-1.7.7-testsrc-build.xml.patch 1414 SHA256 b47039364188c26900d838ed4bd5f6887ca5059f9d35eab87d60f798675c30a4 SHA512 f7fa8d77a584399e6049414ed46b138c14f984148b6dda6e20e376c4312295728de24f31331d20c2b1dc62f81c8d9bd8732227ad64fcf430f2ba721b8de490fe WHIRLPOOL 15754728010b5db04e11bbc743c4eb0bca07214a19b33ed44d40747a1017549c5a18d4b16fe9f301e0d69044ec3b0d3aeb77fcab1d27bd10966d69db79e4cbdd +DIST Rhino1_7_7_RELEASE.zip 6059127 SHA256 0ef505aee093c690025c4484ce108b6e735e05baa3181bb56fdec4cb6b8b0107 SHA512 ce89b6a153d62dd459a86360c67d6db4b05922d8ab49a8d45ccb0deb0f639cd819f0ad75cb4929eda6b7f0fd6ddb5879a4035de6968283317bfd0e93d2bb744e WHIRLPOOL 0f54840077e46a6ac31e23784b3c13881a774356df14274fc9ffdf93eb3d7b92e8666630d8e51494931819a609a971bb6744cf961c2c168bb94b4e42d3eb0896 +EBUILD rhino-1.7.7-r1.ebuild 2052 SHA256 ba00e8aa2dbbd09baeef22dbc97bd58fb21a39b967d5e502ba3c66df326a651b SHA512 0a4e9beb1503b80e8ee801ced0e4a94f94a871179f19ee7c6a7242e02a097336a2a13ba798e182bb43fb4beaa727d3e05de6d18734490bb604e7855938d975bd WHIRLPOOL 27e777000c73687421d4ca710ce3c9e4473bfabfa5e02444da22242da0b6bca229df531e8c2ff0c669ea5cb80ce2cdc75c45c94030d8d23ca567b54d9cf88a44 +MISC ChangeLog 4135 SHA256 22c5316a23ead58fb6a1e08c878d5b84d8c8bece0cdc24dddb2026773a2de53d SHA512 8d603be3a47bc09897f2d1472071dffae911ec6aeff40afb618f2939959f8a04543ac4d16a5c13d715e4ddb1c8b1ca105cafe56fb6a97bdd18f0d538f52aff43 WHIRLPOOL 00e43216b21acf4eb35268bb19c273cbb86c81afba0fd91002f66c18de7701b8ffaed0d4067dc84ee26aeff895cf3d4b35fcca67b9a3a5cb60dd27c3b73a4b0c +MISC ChangeLog-2015 10767 SHA256 d1c9c9c97319b6621a2c209537463a7f68cc95f37ef4b640e24a1122ac76e269 SHA512 0f6f373a9f3b7a089d55b79d2d661e6402d82dcb88c0ccbee8ca11a72ce0427b1e349c3c5240817aa8f3c13f330096e0b5d36026973ec23fb397865bf386b7d0 WHIRLPOOL cb483f529aca0b523ab1d6f777c2525d52c1f0bc665ea99563546606da8f44963f1eb849e7de463703b87ad14f5901806b5f39c85afdf0fa8df8f02cabd90068 +MISC metadata.xml 509 SHA256 4ae22fcf5140a3e7426aa4bfe2e06508c67df386fb9d38451715b6b8ff8b83a1 SHA512 73d3c55306da2299fb537dda46cd2551db5913d130bf069ef24b5481a233f84a164338aa31b37dbbcd351d4de2d90d7411d93010d531815977ebed73646d41cd WHIRLPOOL 27bee6bcc842034c0e37e4f40d62896c7e07e183eb192678ded27a2efe893445eb2dba7c8353a96f02288bf9d24b985365f71a69141c2420b2151d6ab3983a72 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 +} |