summaryrefslogtreecommitdiff
path: root/dev-java/rhino/rhino-1.7.7-r1.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-java/rhino/rhino-1.7.7-r1.ebuild
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-java/rhino/rhino-1.7.7-r1.ebuild')
-rw-r--r--dev-java/rhino/rhino-1.7.7-r1.ebuild93
1 files changed, 93 insertions, 0 deletions
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
+}