aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-core/rhino/rhino_1.7r4.bb
blob: d645e8a93724a3c9fb53ee4fb034a1de14895da4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
SUMMARY = "Lexical analyzer generator for Java"
LICENSE = "MPL-2.0"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=8e2372bdbf22c99279ae4599a13cc458"

DEPENDS:class-native += "classpath-native"

BBCLASSEXTEND = "native"

PACKAGE_ARCH = "${TUNE_PKGARCH}"

inherit java-library

SRCREV = "82ffb8f3e09e77e3b1f5782c35b621e7ca742b58"
SRC_URI = "\
	git://github.com/mozilla/rhino;protocol=https;branch=master \
	file://rhino \
	file://rhino-jsc \
	"

S = "${WORKDIR}/git"

PACKAGES = "${JPN} rhino"

FILES:${PN} = "${bindir}/rhino ${bindir}/rhino-jsc"
RDEPENDS:${PN} = "java2-runtime ${JPN}"
RDEPENDS:${PN}:class-native = ""

do_compile() {
	mkdir -p build

	# Compatibility fix for jamvm which has non-genericised
	# java.lang classes. :(
	bcp_arg="-bootclasspath ${STAGING_DATADIR_NATIVE}/classpath/glibj.zip"

	javac $bcp_arg -source 1.6 -sourcepath src -d build `find src -name "*.java"`

	mkdir -p build/org/mozilla/javascript/resources
	cp src/org/mozilla/javascript/resources/*.properties build/org/mozilla/javascript/resources

	fastjar cfm ${JARFILENAME} ${S}/src/manifest -C build .
}

do_install:append() {
	install -d ${D}${bindir}

	install -m 0755 ${WORKDIR}/rhino ${D}${bindir}
	install -m 0755 ${WORKDIR}/rhino-jsc ${D}${bindir}
}