1 DESCRIPTION = "Cacao-cldc is a Java Virtual Machine, which uses MIDPath CLDC as default Java core library"
2 HOMEPAGE = "http://www.cacaojvm.org/"
5 SECTION = "interpreters"
7 DEPENDS = "zlib libtool classpath midpath-cldc cacaoh-cldc-native virtual/javac-native"
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"
13 PROVIDES = "cacao-cldc virtual/java-cldc"
14 RPROVIDES_cacao-cldc = "java-cldc-runtime"
16 inherit autotools update-alternatives
19 ${@['','--enable-softfloat'][bb.data.getVar('TARGET_FPU',d,1) == 'soft']} \
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 \
35 S = "${WORKDIR}/cacao-${PV}"
37 PACKAGES = "${PN} ${PN}-doc ${PN}-dbg"
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*"
43 ALTERNATIVE_NAME = "java-cldc"
44 ALTERNATIVE_LINK = "${bindir}/${ALTERNATIVE_NAME}"
45 ALTERNATIVE_PATH = "${bindir}/cacao-cldc"
46 ALTERNATIVE_PRIORITY = "10"
48 do_configure_prepend() {
49 # Replaces the placeholder OE_LIBDIR_JNI with the JNI library directory
51 if [ -e src/vm/properties.c ]; then
52 sed -i -e "s|OE_LIBDIR_JNI|${libdir}/jni|" src/vm/properties.c
55 if [ -e src/vm/properties.c ]; then
56 sed -i -e "s|OE_LIBDIR_JNI|${libdir}/jni|" src/vm/vm.c
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