summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Köster <koesterreich@fastmail.fm>2013-03-22 11:05:57 +0100
committerFabian Köster <koesterreich@fastmail.fm>2013-03-22 11:05:57 +0100
commit79a0dac3ca2532d4d692a91ce280ad29a2331f23 (patch)
tree38ac5d83b86345b3f542e743cdf5e22771ee7dc0
parentFix swt-chart symlink in hibiscus (diff)
downloadhibiscus-79a0dac3ca2532d4d692a91ce280ad29a2331f23.tar.gz
hibiscus-79a0dac3ca2532d4d692a91ce280ad29a2331f23.tar.bz2
hibiscus-79a0dac3ca2532d4d692a91ce280ad29a2331f23.zip
Jameica Scripting plugin now functional
-rw-r--r--dev-java/jameica-scripting/files/jre-missing-scripting.patch23
-rw-r--r--dev-java/jameica-scripting/jameica-scripting-2.5.0_pre.ebuild56
2 files changed, 79 insertions, 0 deletions
diff --git a/dev-java/jameica-scripting/files/jre-missing-scripting.patch b/dev-java/jameica-scripting/files/jre-missing-scripting.patch
new file mode 100644
index 0000000..2791b64
--- /dev/null
+++ b/dev-java/jameica-scripting/files/jre-missing-scripting.patch
@@ -0,0 +1,23 @@
+Index: jameica.scripting/src/de/willuhn/jameica/scripting/services/impl/ScriptingServiceImpl.java
+===================================================================
+--- jameica.scripting.orig/src/de/willuhn/jameica/scripting/services/impl/ScriptingServiceImpl.java
++++ jameica.scripting/src/de/willuhn/jameica/scripting/services/impl/ScriptingServiceImpl.java
+@@ -89,6 +89,11 @@ public class ScriptingServiceImpl implem
+ // 1. Script-Engine laden
+ ScriptEngineManager factory = new ScriptEngineManager();
+ this.engine = factory.getEngineByName("JavaScript");
++
++ // Some JREs do not necessarily provide a JavaScript engine
++ if (this.engine == null)
++ throw new RuntimeException("Your Java Runtime Environment does not provide a JavaScript engine. Jameica Scripting won't work");
++
+ this.engine.put("events",this.events);
+
+ // 2. Vom Benutzer registrierte Scripts ausfuehren.
+@@ -273,4 +278,4 @@ public class ScriptingServiceImpl implem
+ * Revision 1.1 2010-07-23 12:58:33 willuhn
+ * @N initial import
+ *
+- **********************************************************************/
+\ No newline at end of file
++ **********************************************************************/
diff --git a/dev-java/jameica-scripting/jameica-scripting-2.5.0_pre.ebuild b/dev-java/jameica-scripting/jameica-scripting-2.5.0_pre.ebuild
new file mode 100644
index 0000000..241689c
--- /dev/null
+++ b/dev-java/jameica-scripting/jameica-scripting-2.5.0_pre.ebuild
@@ -0,0 +1,56 @@
+EAPI="2"
+JAVA_PKG_IUSE="doc source"
+
+WANT_ANT_TASKS="ant-nodeps"
+inherit eutils java-pkg-2 java-ant-2 versionator
+
+MY_PV="$(get_version_component_range 1-3)"
+MY_PN="jameica.scripting"
+
+DESCRIPTION="Scripting extension for Jameica"
+HOMEPAGE="http://www.willuhn.de/products/jameica/extensions.php#${MY_PN}"
+SRC_URI="http://www.willuhn.de/products/jameica/releases/nightly/${MY_PN}-${MY_PV}-nightly.src.zip"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE=""
+
+# TODO We a jre with scripting support (USE="javascript"), can we map this via
+# virtual/jre ?
+COMMON_DEP=">=dev-java/jameica-2.3.0"
+RDEPEND=">=virtual/jre-1.5
+ ${COMMON_DEP}"
+
+DEPEND=">=virtual/jdk-1.5
+ app-arch/unzip
+ ${COMMON_DEP}"
+
+S="${WORKDIR}/${MY_PN}"
+
+java_prepare() {
+ epatch "${FILESDIR}/disable-examples.patch"
+ epatch "${FILESDIR}/jre-missing-scripting.patch"
+
+ cd "${S}"
+
+ EANT_GENTOO_CLASSPATH="jameica"
+ mkdir lib
+ java-pkg_jar-from --with-dependencies --into lib "${EANT_GENTOO_CLASSPATH}"
+}
+
+src_compile() {
+ eant -f build/build.xml jar $(use_doc javadoc)
+}
+
+src_install() {
+ local INST_DIR="/usr/share/jameica/plugins/${MY_PN}"
+
+ dodir "$INST_DIR"
+ insinto ${INST_DIR}
+ doins releases/${MY_PV}-0/${MY_PN}/${MY_PN}.jar || die "doins failed"
+ doins releases/${MY_PV}-0/${MY_PN}/plugin.xml || die "doins failed"
+
+ #use doc && java-pkg_dojavadoc releases/${PV}-0/javadoc
+ #use source && java-pkg_dosrc src/de
+}