aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-core/jamvm/jamvm.inc
blob: da1ca29db5a6892a0d6eda677872e4b4f3a842f7 (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
49
50
51
52
53
54
55
56
57
58
59
60
DESCRIPTION = "A compact Java Virtual Machine which conforms to the JVM specification version 2."
HOMEPAGE = "http://jamvm.sourceforge.net/"
LICENSE = "GPL-2.0"
LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"

DEPENDS = "zlib classpath virtual/javac-native libffi virtual/java-initial-native"
DEPENDS_class-native = "virtual/java-initial-native classpath-initial-native zlib-native classpath-native ecj-initial-native libffi-native"

RDEPENDS_${PN} = "classpath"
RDEPENDS_${PN}_class-native = ""

PROVIDES_class-native = "virtual/java-native"
RPROVIDES_${PN} = "java2-runtime"
RPROVIDES_${PN}_class-native = ""

BBCLASSEXTEND = "native"


inherit java autotools update-alternatives pkgconfig relative_symlinks

# This uses 32 bit arm, so force the instruction set to arm, not thumb
ARM_INSTRUCTION_SET = "arm"

do_configure_append_class-native() {
	sed -i -e"s|STAGING_LIBDIR_NATIVE|${STAGING_LIBDIR_NATIVE}|g" \
		-e "s|STAGING_DATADIR_NATIVE|${STAGING_DATADIR_NATIVE}|g" \
	${WORKDIR}/java
}


EXTRA_OECONF = "--with-classpath-install-dir=${prefix} --libdir=${libdir}/jamvm --enable-ffi"

# Needed for big compilation targets like OpenJDK
CFLAGS_append_class-native = " -DDEFAULT_MAX_HEAP=1024*MB"

# Enforce usage of ecj-initial.
EXTRA_OEMAKE = "JAVAC=${STAGING_BINDIR_NATIVE}/ecj-initial \
                GLIBJ_ZIP=${STAGING_DATADIR_NATIVE}/classpath/glibj.zip \
               "

do_install_append_class-native() {
	install -d ${D}${bindir}
	install -m 0755 ${WORKDIR}/java ${D}${bindir}/java

}

PRIVATE_LIBS = "libjvm.so"
INSANE_SKIP_${PN} = "dev-so"

FILES_${PN} += "${libdir}/jamvm/lib*.so"

ALTERNATIVE_${PN} = "java"
ALTERNATIVE_TARGET = "${bindir}/jamvm"
ALTERNATIVE_PRIORITY = "4"
# shared state for jamvm-native does not work
# since the paths are hardcoded
#SSTATE_MIRRORS_class-native = ""
export LD_LIBRARY_PATH
export BOOTCLASSPATH