summaryrefslogtreecommitdiff
path: root/packages/cacao/cacao.inc
diff options
context:
space:
mode:
Diffstat (limited to 'packages/cacao/cacao.inc')
-rw-r--r--packages/cacao/cacao.inc52
1 files changed, 44 insertions, 8 deletions
diff --git a/packages/cacao/cacao.inc b/packages/cacao/cacao.inc
index 9315babfb9..cc107abf27 100644
--- a/packages/cacao/cacao.inc
+++ b/packages/cacao/cacao.inc
@@ -1,16 +1,52 @@
-DESCRIPTION = "cacao is a Java Virtual Machine, which uses GNU Classpath as default Java core library"
+DESCRIPTION = "Cacao is a Java Virtual Machine, which uses GNU Classpath as default Java core library"
HOMEPAGE = "http://www.cacaojvm.org/"
LICENSE = "GPL"
PRIORITY = "optional"
SECTION = "interpreters"
-PR = "r1"
-inherit autotools
+DEPENDS = "zlib libtool classpath cacaoh-native virtual/javac-native"
-SRC_URI = "http://www.complang.tuwien.ac.at/cacaojvm/download/cacao-0.98/cacao-${PV}.tar.bz2;md5sum=8b8907c8b925761c9410bcadb9705346"
+# Avoid version number here, otherwise dpkg will expect a package name
+# and cannot be satisfied with a package that provides classpath.
+RDEPENDS = "classpath"
-S = "${WORKDIR}/cacao-${PV}"
+PROVIDES = "cacao virtual/java"
+RPROVIDES_cacao = "java2-runtime"
+
+inherit autotools update-alternatives
+
+EXTRA_OECONF = "\
+ ${@['','--enable-softfloat'][bb.data.getVar('TARGET_FPU',d,1) == 'soft']} \
+ --enable-debug \
+ --with-cacaoh=${STAGING_BINDIR_NATIVE}/cacaoh-${PV} \
+ --with-classpath-libdir=${STAGING_LIBDIR}/classpath \
+ --with-classpath-includedir=${STAGING_INCDIR}/classpath \
+ --with-classpath-classes=${STAGING_DATADIR}/classpath/glibj.zip \
+ --with-target-classpath-classes=${datadir}/classpath/glibj.zip \
+ --with-vm-zip=${datadir}/cacao/vm.zip \
+ --with-classpath-libdir=${libdir} \
+ "
+
+PACKAGES = "${PN} ${PN}-doc ${PN}-dbg"
+
+FILES_${PN} = "${bindir}/${PN} ${libdir}/lib*.so* ${datadir}/${PN}"
+FILES_${PN}-doc = "${datadir}/man"
+FILES_${PN}-dbg = "${bindir}/.debug ${libdir}/.debug/lib*.so*"
+
+ALTERNATIVE_NAME = "java"
+ALTERNATIVE_LINK = "${bindir}/${ALTERNATIVE_NAME}"
+ALTERNATIVE_PATH = "${bindir}/cacao"
+ALTERNATIVE_PRIORITY = "10"
+
+do_configure_prepend() {
+ # Replaces the placeholder OE_LIBDIR_JNI with the JNI library directory
+ # configured in OE.
+ if [ -e src/vm/properties.c ]; then
+ sed -i -e "s|OE_LIBDIR_JNI|${libdir}/jni|" src/vm/properties.c
+ fi
+
+ if [ -e src/vm/properties.c ]; then
+ sed -i -e "s|OE_LIBDIR_JNI|${libdir}/jni|" src/vm/vm.c
+ fi
+}
-EXTRA_OECONF = "--disable-debug \
- ${@['','--enable-softfloat'][bb.data.getVar('TARGET_FPU',d,1) == 'soft']} \
- "