diff options
Diffstat (limited to 'recipes-core/rhino')
-rw-r--r-- | recipes-core/rhino/rhino/rhino | 8 | ||||
-rw-r--r-- | recipes-core/rhino/rhino/rhino-jsc | 8 | ||||
-rw-r--r-- | recipes-core/rhino/rhino_1.7r2.bb | 46 |
3 files changed, 62 insertions, 0 deletions
diff --git a/recipes-core/rhino/rhino/rhino b/recipes-core/rhino/rhino/rhino new file mode 100644 index 0000000..e2f87f6 --- /dev/null +++ b/recipes-core/rhino/rhino/rhino | |||
@@ -0,0 +1,8 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | if [ ! $JAVA ]; then | ||
4 | JAVA=java | ||
5 | fi | ||
6 | |||
7 | $JAVA -jar /usr/share/java/js.jar $@ | ||
8 | |||
diff --git a/recipes-core/rhino/rhino/rhino-jsc b/recipes-core/rhino/rhino/rhino-jsc new file mode 100644 index 0000000..d5f50e8 --- /dev/null +++ b/recipes-core/rhino/rhino/rhino-jsc | |||
@@ -0,0 +1,8 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | if [ ! $JAVA ]; then | ||
4 | JAVA=java | ||
5 | fi | ||
6 | |||
7 | $JAVA -cp .:/usr/share/java/js.jar org.mozilla.javascript.tools.jsc.Main $@ | ||
8 | |||
diff --git a/recipes-core/rhino/rhino_1.7r2.bb b/recipes-core/rhino/rhino_1.7r2.bb new file mode 100644 index 0000000..3a3f553 --- /dev/null +++ b/recipes-core/rhino/rhino_1.7r2.bb | |||
@@ -0,0 +1,46 @@ | |||
1 | DESCRIPTION = "Lexical analyzer generator for Java" | ||
2 | LICENSE = "GPL MPL" | ||
3 | LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=b8ba559ba419681dbf8280b6721df0af" | ||
4 | |||
5 | BBCLASSEXTEND = "native" | ||
6 | |||
7 | inherit java-library | ||
8 | |||
9 | SRC_URI = "\ | ||
10 | ftp://ftp.mozilla.org/pub/mozilla.org/js/rhino1_7R2.zip \ | ||
11 | file://rhino \ | ||
12 | file://rhino-jsc \ | ||
13 | " | ||
14 | |||
15 | S = "${WORKDIR}/rhino1_7R2" | ||
16 | |||
17 | PACKAGES = "${JPN} rhino" | ||
18 | |||
19 | FILES_${PN} = "${bindir}/rhino ${bindir}/rhino-jsc" | ||
20 | RDEPENDS_${PN} = "java2-runtime ${JPN}" | ||
21 | RDEPENDS_${PN}_virtclass-native = "" | ||
22 | |||
23 | do_compile() { | ||
24 | mkdir -p build | ||
25 | |||
26 | # Compatibility fix for jamvm which has non-genericised | ||
27 | # java.lang classes. :( | ||
28 | bcp_arg="-bootclasspath ${STAGING_DATADIR_NATIVE}/classpath/glibj.zip" | ||
29 | |||
30 | javac $bcp_arg -source 1.5 -sourcepath src -d build `find src -name "*.java"` | ||
31 | |||
32 | mkdir -p build/org/mozilla/javascript/resources | ||
33 | cp src/org/mozilla/javascript/resources/*.properties build/org/mozilla/javascript/resources | ||
34 | |||
35 | fastjar -m ${S}/src/manifest -C build -c -f ${JARFILENAME} . | ||
36 | } | ||
37 | |||
38 | do_install_append() { | ||
39 | install -d ${D}${bindir} | ||
40 | |||
41 | install -m 0755 ${WORKDIR}/rhino ${D}${bindir} | ||
42 | install -m 0755 ${WORKDIR}/rhino-jsc ${D}${bindir} | ||
43 | } | ||
44 | |||
45 | SRC_URI[md5sum] = "40d0a9abec8169e42920214b37fa8e0e" | ||
46 | SRC_URI[sha256sum] = "677f7dc1b67a1587bc03974d5f0720474a56b8f29835e1d860739908df8462dc" | ||