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.inc33
1 files changed, 18 insertions, 15 deletions
diff --git a/packages/cacao/cacao.inc b/packages/cacao/cacao.inc
index 0d2b4c7ae1..e08cd5ec80 100644
--- a/packages/cacao/cacao.inc
+++ b/packages/cacao/cacao.inc
@@ -15,17 +15,33 @@ RPROVIDES_cacao = "java2-runtime"
inherit java autotools update-alternatives
+# Old and new options do not interfere.
EXTRA_OECONF = "\
${@['','--enable-softfloat'][bb.data.getVar('TARGET_FPU',d,1) == 'soft']} \
--enable-debug \
+ --with-vm-zip=${datadir}/cacao/vm.zip \
--with-cacaoh=${STAGING_BINDIR_NATIVE}/cacaoh-${PV} \
+ ${OLD_CACAO_OECONF} \
+ ${NEW_CACAO_OECONF} \
+ "
+
+# Options needed for Cacao < 0.99 (including hg snapshots)
+OLD_CACAO_OECONF = "\
--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} \
+ --with-classpath-libdir=${libdir_jni}:${libdir} \
"
+# Options needed for Cacao >= 0.99
+NEW_CACAO_OECONF = "\
+ --with-build-java-runtime-library-classes=${STAGING_DATADIR}/classpath/glibj.zip \
+ --with-java-runtime-library-classes=${datadir}/classpath/glibj.zip \
+ --with-java-runtime-library-libdir=${libdir_jni}:${libdir} \
+ --with-jni_md_h=${STAGING_INCDIR}/classpath \
+ --with-jni_h=${STAGING_INCDIR}/classpath \
+ "
+
PACKAGES = "${PN} ${PN}-doc ${PN}-dbg"
FILES_${PN} = "${bindir}/${PN} ${libdir}/lib*.so* ${datadir}/${PN}"
@@ -36,16 +52,3 @@ 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
-}
-