surpport seeking the recorded video
[vuplus_openembedded] / recipes / cacao / cacao-cldc.inc
1 DESCRIPTION = "Cacao-cldc is a Java Virtual Machine, which uses MIDPath CLDC as default Java core library"
2 HOMEPAGE = "http://www.cacaojvm.org/"
3 LICENSE  = "GPL"
4 PRIORITY = "optional"
5 SECTION  = "interpreters"
6
7 DEPENDS = "zlib libtool classpath midpath-cldc cacaoh-cldc-native virtual/javac-native"
8
9 # Avoid version number here, otherwise dpkg will expect a package name
10 # and cannot be satisfied with a package that provides classpath.
11 RDEPENDS = "midpath-cldc"
12
13 PROVIDES = "cacao-cldc virtual/java-cldc"
14 RPROVIDES_cacao-cldc = "java-cldc-runtime"
15
16 inherit autotools update-alternatives
17
18 EXTRA_OECONF = "\
19         ${@['','--enable-softfloat'][bb.data.getVar('TARGET_FPU',d,1) == 'soft']} \
20         --enable-debug \
21         --enable-jni \
22         --disable-libjvm \
23         --enable-java=cldc1.1 \
24         --with-classpath=cldc1.1 \
25         --with-classpath-classes=${STAGING_DATADIR}/midpath-cldc/midpath-cldc1.1.jar \
26         --with-target-classpath-classes=${datadir}/midpath-cldc/midpath-cldc1.1.jar \
27         --with-cacaoh=${STAGING_BINDIR_NATIVE}/cacaoh-cldc-${PV} \
28         --with-classpath-libdir=${STAGING_LIBDIR}/classpath \
29         --with-classpath-includedir=${STAGING_INCDIR}/classpath \
30         --with-vm-zip=${datadir}/cacao-cldc/vm.zip \
31         --libdir=${libdir}/cacao-cldc \
32         --program-suffix=-cldc \
33         "
34
35 S = "${WORKDIR}/cacao-${PV}"
36
37 PACKAGES = "${PN} ${PN}-doc ${PN}-dbg"
38
39 FILES_${PN} = "${bindir}/${PN} ${libdir}/lib*.so* ${datadir}/${PN}"
40 FILES_${PN}-doc = "${datadir}/man"
41 FILES_${PN}-dbg += "${bindir}/.debug ${libdir}/.debug/lib*.so*"
42
43 ALTERNATIVE_NAME = "java-cldc"
44 ALTERNATIVE_LINK = "${bindir}/${ALTERNATIVE_NAME}"
45 ALTERNATIVE_PATH = "${bindir}/cacao-cldc"
46 ALTERNATIVE_PRIORITY = "10"
47
48 do_configure_prepend() {
49   # Replaces the placeholder OE_LIBDIR_JNI with the JNI library directory
50   # configured in OE.
51   if [ -e src/vm/properties.c ]; then
52     sed -i -e "s|OE_LIBDIR_JNI|${libdir}/jni|" src/vm/properties.c
53   fi
54
55   if [ -e src/vm/properties.c ]; then
56     sed -i -e "s|OE_LIBDIR_JNI|${libdir}/jni|" src/vm/vm.c
57   fi
58 }
59
60 do_configure_append() {
61   # Fix the executable name in the wrapper script.
62   sed -i -e "s|exec cacao|exec cacao-cldc|" src/scripts/java.in
63 }
64