aboutsummaryrefslogtreecommitdiffstats
path: root/packages/cacao
diff options
context:
space:
mode:
authorRobert Schuster <thebohemian@gmx.net>2008-01-14 14:35:45 +0000
committerRobert Schuster <thebohemian@gmx.net>2008-01-14 14:35:45 +0000
commitc0c3fee3141e11c088a5b1f845773a12a19bb237 (patch)
tree6cd1dd5169f5703c4ded19aafec2d04cadb344ba /packages/cacao
parent3b1747b9ce29a934e8acb9e25daac5191237f462 (diff)
downloadopenembedded-c0c3fee3141e11c088a5b1f845773a12a19bb237.tar.gz
cacao 0.98+hg20071001: Added snapshot version.
cacao-cldc: Added an include recipe. classpath: Moved versions prior 0.95 to obsolete/ . classpath-minimal: Moved versions prior 0.95 to obsolete/ . classpath-gtk: Moved to obsolete/. classpath cvs: Moved to obsolete/. classpath 0.96.1: Added new version. classpath 0.95: Added new version. classpath-minimal 0.96.1: Added new version. midpath-cldc: Removed notion of virtual/cldc-api-1.1 - install cldc1.1.jar as midpath-cldc1.1.jar to ${datadir}/midpath-cldc
Diffstat (limited to 'packages/cacao')
-rw-r--r--packages/cacao/cacao-cldc.inc64
-rw-r--r--packages/cacao/cacao-cldc_0.98.bb42
-rw-r--r--packages/cacao/cacao.inc52
-rw-r--r--packages/cacao/cacao_0.98+hg20071001.bb16
-rw-r--r--packages/cacao/cacaoh-cldc-native_0.98.bb25
-rw-r--r--packages/cacao/cacaoh-native.inc28
-rw-r--r--packages/cacao/cacaoh-native_0.98+hg20071001.bb5
-rw-r--r--packages/cacao/files/cacao-0.98+hg-arm-cacheflush-workaround.patch50
-rw-r--r--packages/cacao/files/cacao-0.98+hg-attachthread.patch12
-rw-r--r--packages/cacao/files/cacao-0.98+svn-classpath_var.patch56
-rw-r--r--packages/cacao/files/cacao-0.98+svn-libdir.diff30
11 files changed, 331 insertions, 49 deletions
diff --git a/packages/cacao/cacao-cldc.inc b/packages/cacao/cacao-cldc.inc
new file mode 100644
index 0000000000..86df369a32
--- /dev/null
+++ b/packages/cacao/cacao-cldc.inc
@@ -0,0 +1,64 @@
+DESCRIPTION = "Cacao-cldc is a Java Virtual Machine, which uses MIDPath CLDC as default Java core library"
+HOMEPAGE = "http://www.cacaojvm.org/"
+LICENSE = "GPL"
+PRIORITY = "optional"
+SECTION = "interpreters"
+
+DEPENDS = "zlib libtool classpath midpath-cldc cacaoh-cldc-native virtual/javac-native"
+
+# Avoid version number here, otherwise dpkg will expect a package name
+# and cannot be satisfied with a package that provides classpath.
+RDEPENDS = "midpath-cldc"
+
+PROVIDES = "cacao-cldc virtual/java-cldc"
+RPROVIDES_cacao-cldc = "java-cldc-runtime"
+
+inherit autotools update-alternatives
+
+EXTRA_OECONF = "\
+ ${@['','--enable-softfloat'][bb.data.getVar('TARGET_FPU',d,1) == 'soft']} \
+ --enable-debug \
+ --enable-jni \
+ --disable-libjvm \
+ --enable-java=cldc1.1 \
+ --with-classpath=cldc1.1 \
+ --with-classpath-classes=${STAGING_DATADIR}/midpath-cldc/midpath-cldc1.1.jar \
+ --with-target-classpath-classes=${datadir}/midpath-cldc/midpath-cldc1.1.jar \
+ --with-cacaoh=${STAGING_BINDIR_NATIVE}/cacaoh-cldc-${PV} \
+ --with-classpath-libdir=${STAGING_LIBDIR}/classpath \
+ --with-classpath-includedir=${STAGING_INCDIR}/classpath \
+ --with-vm-zip=${datadir}/cacao-cldc/vm.zip \
+ --libdir=${libdir}/cacao-cldc \
+ --program-suffix=-cldc \
+ "
+
+S = "${WORKDIR}/cacao-${PV}"
+
+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-cldc"
+ALTERNATIVE_LINK = "${bindir}/${ALTERNATIVE_NAME}"
+ALTERNATIVE_PATH = "${bindir}/cacao-cldc"
+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
+}
+
+do_configure_append() {
+ # Fix the executable name in the wrapper script.
+ sed -i -e "s|exec cacao|exec cacao-cldc|" src/scripts/java.in
+}
+
diff --git a/packages/cacao/cacao-cldc_0.98.bb b/packages/cacao/cacao-cldc_0.98.bb
index b791296d82..f5a48c40a9 100644
--- a/packages/cacao/cacao-cldc_0.98.bb
+++ b/packages/cacao/cacao-cldc_0.98.bb
@@ -1,35 +1,17 @@
+# Compatible with GNU Classpath 0.95 only!
-require cacao.inc
+require cacao-cldc.inc
-SRC_URI +="file://midpath.patch;patch=1 \
- file://offsets_make.patch;patch=1 \
- file://classpath_var.patch;patch=1 \
- file://libmath.patch;patch=1 \
- file://arm_mmap.patch;patch=1 \
- "
-SRC_URI_append_arm = "file://offset.h_arm.patch;patch=1"
-
-DEPENDS = "cacaoh-cldc-native virtual/javac-native classpath-minimal-native virtual/cldc-api-1.1 libtool zlib"
-RDEPENDS = "virtual/cldc-api-1.1 libltdl"
-RPROVIDES = "virtual/java"
+PR = "r1"
-EXTRA_OECONF += "--with-classpath-libdir=${STAGING_DATADIR}/classpath-minimal \
- --with-classpath-includedir=${STAGING_INCDIR}/classpath-minimal \
- --enable-jni \
- --enable-java=cldc1.1 \
- --with-classpath=cldc1.1 \
- --with-classpath-classes=${STAGING_DATADIR}/java/cldc1.1.jar \
- --with-target-classpath-classes=${datadir}/java/cldc1.1.jar \
- --with-cacaoh=${STAGING_BINDIR_NATIVE}/cacaoh \
- --disable-libjvm \
- "
+SRC_URI += "\
+ http://www.complang.tuwien.ac.at/cacaojvm/download/cacao-${PV}/cacao-${PV}.tar.bz2;md5sum=8b8907c8b925761c9410bcadb9705346 \
+ file://midpath.patch;patch=1 \
+ file://offsets_make.patch;patch=1 \
+ file://classpath_var.patch;patch=1 \
+ file://libmath.patch;patch=1 \
+ file://arm_mmap.patch;patch=1 \
+ "
-PACKAGES = "${PN} ${PN}-doc ${PN}-dbg"
-
-FILES_${PN} = "${bindir}/cacao"
-FILES_${PN}-doc = "${datadir}/man"
-FILES_${PN}-dbg = "${bindir}/.debug"
+SRC_URI_append_arm = "file://offset.h_arm.patch;patch=1"
-ALTERNATIVE_NAME = "java"
-ALTERNATIVE_PATH = "${bindir}/cacao"
-ALTERNATIVE_PRIORITY = "10"
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']} \
- "
diff --git a/packages/cacao/cacao_0.98+hg20071001.bb b/packages/cacao/cacao_0.98+hg20071001.bb
new file mode 100644
index 0000000000..38fcb37b82
--- /dev/null
+++ b/packages/cacao/cacao_0.98+hg20071001.bb
@@ -0,0 +1,16 @@
+require cacao.inc
+
+PR = "r5"
+
+SRC_URI = "\
+ http://jalimo.evolvis.org/repository/sources/cacao-${PV}.tar.bz2;md5sum=9ff10c929bd0cbf15909107c1aff7518 \
+ file://cacao-0.98+svn-libdir.diff;patch=1 \
+ file://cacao-0.98+svn-classpath_var.patch;patch=1 \
+ file://cacao-0.98+hg-arm-cacheflush-workaround.patch;patch=1 \
+ file://cacao-0.98+hg-attachthread.patch;patch=1 \
+ "
+
+EXTRA_OECONF += "\
+ --enable-annotations \
+ "
+
diff --git a/packages/cacao/cacaoh-cldc-native_0.98.bb b/packages/cacao/cacaoh-cldc-native_0.98.bb
index 73546f8e16..e2c92cc328 100644
--- a/packages/cacao/cacaoh-cldc-native_0.98.bb
+++ b/packages/cacao/cacaoh-cldc-native_0.98.bb
@@ -1,16 +1,19 @@
+require cacaoh-native.inc
-require cacao.inc
+DEPENDS += "midpath-cldc-native"
-DEPENDS = "virtual/javac-native classpath-minimal-native virtual/cldc-api-1.1-native libtool-native zlib-native"
+SRC_URI = "\
+ http://www.complang.tuwien.ac.at/cacaojvm/download/cacao-${PV}/cacao-${PV}.tar.bz2;md5sum=8b8907c8b925761c9410bcadb9705346 \
+ "
-inherit native
-
-EXTRA_OECONF += "--with-classpath-includedir=${STAGING_INCDIR}/classpath-minimal \
- --enable-jni \
- --enable-java=cldc1.1 \
- --with-classpath=cldc1.1 \
- --with-classpath-classes=${STAGING_DATADIR}/java/cldc1.1.jar \
- "
+EXTRA_OECONF += "\
+ --with-classpath-includedir=${STAGING_INCDIR}/classpath \
+ --enable-jni \
+ --enable-java=cldc1.1 \
+ --with-classpath=cldc1.1 \
+ --with-classpath-classes=${STAGING_DATADIR}/midpath-cldc/midpath-cldc1.1.jar \
+"
+
do_stage() {
- install -m 0755 src/cacaoh/.libs/cacaoh ${STAGING_BINDIR}/
+ install -m 0755 src/cacaoh/.libs/cacaoh ${STAGING_BINDIR}/cacaoh-cldc-${PV}
}
diff --git a/packages/cacao/cacaoh-native.inc b/packages/cacao/cacaoh-native.inc
new file mode 100644
index 0000000000..1f81672e7f
--- /dev/null
+++ b/packages/cacao/cacaoh-native.inc
@@ -0,0 +1,28 @@
+DESCRIPTION = "Header generator for Cacao JVM - Needed for cross-compilation builds"
+HOMEPAGE = "http://www.cacaojvm.org/"
+LICENSE = "GPL"
+
+DEPENDS = "libtool-native zlib-native virtual/javac-native classpath-native"
+
+S = "${WORKDIR}/cacao-${PV}"
+
+PR = "r1"
+
+inherit autotools
+inherit native
+
+EXTRA_OECONF = " \
+ --with-classpath-includedir=${STAGING_INCDIR}/classpath \
+ --with-classpath-classes=${STAGING_DATADIR}/classpath/glibj.zip \
+ "
+
+do_compile() {
+ # Compile the header generator only (and what is needed for it).
+ oe_runmake -C src/toolbox libtoolbox.la
+ oe_runmake -C src/vmcore libvmcore.la
+ oe_runmake -C src/cacaoh cacaoh
+}
+
+do_stage() {
+ install -m 0755 src/cacaoh/.libs/cacaoh ${STAGING_BINDIR}/cacaoh-${PV}
+}
diff --git a/packages/cacao/cacaoh-native_0.98+hg20071001.bb b/packages/cacao/cacaoh-native_0.98+hg20071001.bb
new file mode 100644
index 0000000000..cb552df827
--- /dev/null
+++ b/packages/cacao/cacaoh-native_0.98+hg20071001.bb
@@ -0,0 +1,5 @@
+require cacaoh-native.inc
+
+SRC_URI = "http://jalimo.evolvis.org/repository/sources/cacao-${PV}.tar.bz2;md5sum=9ff10c929bd0cbf15909107c1aff7518"
+
+
diff --git a/packages/cacao/files/cacao-0.98+hg-arm-cacheflush-workaround.patch b/packages/cacao/files/cacao-0.98+hg-arm-cacheflush-workaround.patch
new file mode 100644
index 0000000000..813cb683f6
--- /dev/null
+++ b/packages/cacao/files/cacao-0.98+hg-arm-cacheflush-workaround.patch
@@ -0,0 +1,50 @@
+Index: cacao-0.98+hg7750/src/vm/jit/arm/asmpart.S
+===================================================================
+--- cacao-0.98+hg7750.orig/src/vm/jit/arm/asmpart.S 2007-11-28 10:14:51.000000000 +0100
++++ cacao-0.98+hg7750/src/vm/jit/arm/asmpart.S 2007-11-28 10:15:31.000000000 +0100
+@@ -302,35 +302,21 @@
+ * *
+ *******************************************************************************/
+
+-.equ sys_cacheflush,__ARM_NR_cacheflush /* syscall number for cache flushing */
+-
++.equ sys_cacheflush, 0x9f0002
+ asm_cacheflush:
+- add a1, a0, a1
+- mov a2, #0
+-
+-#if defined(__ARM_EABI__)
+- /* According to EABI, the syscall number should be passed via R7,
+- see "http://wiki.debian.org/ArmEabiPort" for additional details. */
+-
+- stmfd sp!, {r7}
+- mov r7, #0x0f0000
+- add r7, r7, #0x000002
+-#endif
++ add a1, a0, a1
++ mov a2, #0
+
+ #if 0
+- /* TWISTI: required on iyonix, maybe a linux-2.4 bug */
+- mov a0, #0x0
+- mov a1, #0xff000000
++ /* TWISTI: required on iyonix, maybe a linux-2.4 bug */
++ /* TODO: repeair this! */
++ /* cacheflush is messed up beyond all repair! */
++ mov a0, #0x0
++ mov a1, #0xff000000
+ #endif
+
+- swi sys_cacheflush
+-
+-#if defined(__ARM_EABI__)
+- ldmfd sp!, {r7}
+-#endif
+-
+- mov pc, lr
+-
++ swi #sys_cacheflush
++ mov pc, lr
+
+ /* disable exec-stacks ********************************************************/
+
diff --git a/packages/cacao/files/cacao-0.98+hg-attachthread.patch b/packages/cacao/files/cacao-0.98+hg-attachthread.patch
new file mode 100644
index 0000000000..b3dfabc625
--- /dev/null
+++ b/packages/cacao/files/cacao-0.98+hg-attachthread.patch
@@ -0,0 +1,12 @@
+diff -r d8fe2c3ba284 src/threads/native/threads.c
+--- a/src/threads/native/threads.c Sun Dec 30 17:43:35 2007 +0100
++++ b/src/threads/native/threads.c Wed Jan 02 16:41:57 2008 +0100
+@@ -1432,6 +1432,8 @@ bool threads_attach_current_thread(JavaV
+
+ threads_thread_set_object(thread, (java_handle_t *) t);
+
++ threads_set_current_threadobject(thread);
++
+ /* thread is completely initialized */
+
+ threads_thread_state_runnable(thread);
diff --git a/packages/cacao/files/cacao-0.98+svn-classpath_var.patch b/packages/cacao/files/cacao-0.98+svn-classpath_var.patch
new file mode 100644
index 0000000000..255281d386
--- /dev/null
+++ b/packages/cacao/files/cacao-0.98+svn-classpath_var.patch
@@ -0,0 +1,56 @@
+Index: cacao-trunk/src/vm/properties.c
+===================================================================
+--- cacao-trunk.orig/src/vm/properties.c 2007-08-31 13:28:53.000000000 +0200
++++ cacao-trunk/src/vm/properties.c 2007-09-03 00:36:14.000000000 +0200
+@@ -294,14 +294,14 @@
+ len =
+ strlen(CACAO_VM_ZIP) +
+ strlen(":") +
+- strlen(CLASSPATH_CLASSES) +
++ strlen(TARGET_CLASSPATH_CLASSES) +
+ strlen("0");
+
+ boot_class_path = MNEW(char, len);
+
+ strcpy(boot_class_path, CACAO_VM_ZIP);
+ strcat(boot_class_path, ":");
+- strcat(boot_class_path, CLASSPATH_CLASSES);
++ strcat(boot_class_path, TARGET_CLASSPATH_CLASSES);
+
+ # elif defined(WITH_CLASSPATH_SUN)
+
+Index: cacao-trunk/configure.ac
+===================================================================
+--- cacao-trunk.orig/configure.ac 2007-08-31 13:22:03.000000000 +0200
++++ cacao-trunk/configure.ac 2007-08-31 13:30:44.000000000 +0200
+@@ -851,6 +851,7 @@
+ AC_CHECK_WITH_CLASSPATH
+ AC_CHECK_WITH_CLASSPATH_PREFIX
+ AC_CHECK_WITH_CLASSPATH_CLASSES
++AC_CHECK_WITH_TARGET_CLASSPATH_CLASSES
+ AC_CHECK_WITH_CLASSPATH_LIBDIR
+ AC_CHECK_WITH_CLASSPATH_INCLUDEDIR
+
+Index: cacao-trunk/m4/classpath.m4
+===================================================================
+--- cacao-trunk.orig/m4/classpath.m4 2007-08-31 13:22:21.000000000 +0200
++++ cacao-trunk/m4/classpath.m4 2007-08-31 13:30:55.000000000 +0200
+@@ -98,6 +98,18 @@
+ AC_SUBST(CLASSPATH_CLASSES)
+ ])
+
++dnl where are Java core library classes installed on the target
++
++AC_DEFUN([AC_CHECK_WITH_TARGET_CLASSPATH_CLASSES],[
++AC_MSG_CHECKING(where Java core library classes are installed on the target)
++AC_ARG_WITH([target-classpath-classes],
++ [AS_HELP_STRING(--with-target-classpath-classes=<path>,path to Java core library classes (includes the name of the file and may be flat) [[default=/usr/local/classpath/share/classpath/glibj.zip]])],
++ [TARGET_CLASSPATH_CLASSES=${withval}],
++ [TARGET_CLASSPATH_CLASSES=${CLASSPATH_PREFIX}/share/classpath/glibj.zip])
++AC_MSG_RESULT(${TARGET_CLASSPATH_CLASSES})
++AC_DEFINE_UNQUOTED([TARGET_CLASSPATH_CLASSES], "${TARGET_CLASSPATH_CLASSES}", [Java core library classes on the target])
++AC_SUBST(TARGET_CLASSPATH_CLASSES)
++])
+
+ dnl where are Java core library native libraries installed
+
diff --git a/packages/cacao/files/cacao-0.98+svn-libdir.diff b/packages/cacao/files/cacao-0.98+svn-libdir.diff
new file mode 100644
index 0000000000..f5cf9ba5a1
--- /dev/null
+++ b/packages/cacao/files/cacao-0.98+svn-libdir.diff
@@ -0,0 +1,30 @@
+Index: cacao-trunk/src/vm/properties.c
+===================================================================
+--- cacao-trunk.orig/src/vm/properties.c 2007-08-31 13:20:41.000000000 +0200
++++ cacao-trunk/src/vm/properties.c 2007-09-04 14:54:19.000000000 +0200
+@@ -210,15 +210,22 @@
+
+ # if defined(WITH_CLASSPATH_GNU)
+
+- boot_library_path = CLASSPATH_LIBDIR"/classpath";
++ boot_library_path = CLASSPATH_LIBDIR"/classpath:OE_LIBDIR_JNI";
+
+ # elif defined(WITH_CLASSPATH_SUN)
+
+- boot_library_path = CLASSPATH_LIBDIR;
++ boot_library_path = CLASSPATH_LIBDIR":OE_LIBDIR_JNI";
+
+ # elif defined(WITH_CLASSPATH_CLDC1_1)
+
+- /* No boot_library_path required. */
++ /* No boot_library_path required.
++ Well, don't be that strict on Debian-like
++ environments. Setting this to /usr/lib/jni
++ makes it unneccessary to fumble with
++ LD_LIBRARY_PATH to get things like MIDPath
++ running.
++ */
++ boot_library_path = "OE_LIBDIR_JNI";
+
+ # else
+ # error unknown classpath configuration