aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--recipes/jamvm/files/jamvm_1.5.0-initial.patch91
-rwxr-xr-xrecipes/jamvm/files/java-initial17
-rw-r--r--recipes/jamvm/jamvm-initial/jamvm-initial.patch (renamed from recipes/jamvm/files/jamvm_1.4.5-initial.patch)19
-rw-r--r--recipes/jamvm/jamvm-initial_1.4.5.bb22
-rw-r--r--recipes/jamvm/jamvm/debian-jni.patch (renamed from recipes/jamvm/files/debian-jni.patch)0
-rw-r--r--recipes/jamvm/jamvm/jamvm-1.3.1-size-defaults.patch (renamed from recipes/jamvm/files/jamvm-1.3.1-size-defaults.patch)0
-rw-r--r--recipes/jamvm/jamvm/jamvm-1.5.3-jni_h-noinst.patch (renamed from recipes/jamvm/files/jamvm-1.5.3-jni_h-noinst.patch)0
-rw-r--r--recipes/jamvm/jamvm/libffi.patch66
8 files changed, 95 insertions, 120 deletions
diff --git a/recipes/jamvm/files/jamvm_1.5.0-initial.patch b/recipes/jamvm/files/jamvm_1.5.0-initial.patch
deleted file mode 100644
index 1f63dba..0000000
--- a/recipes/jamvm/files/jamvm_1.5.0-initial.patch
+++ /dev/null
@@ -1,91 +0,0 @@
-Index: jamvm-1.5.0/configure.ac
-===================================================================
---- jamvm-1.5.0.orig/configure.ac 2007-12-20 00:01:08.000000000 +0100
-+++ jamvm-1.5.0/configure.ac 2007-12-20 00:03:40.000000000 +0100
-@@ -22,7 +22,7 @@
- dnl Process this file with autoconf to produce a configure script.
-
- AC_INIT(src/jam.c)
--AM_INIT_AUTOMAKE(jamvm, 1.5.0)
-+AM_INIT_AUTOMAKE(jamvm-initial, 1.5.0)
- AC_CONFIG_HEADERS([src/config.h])
- AC_PREFIX_DEFAULT(/usr/local/jamvm)
-
-Index: jamvm-1.5.0/java-initial
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ jamvm-1.5.0/java-initial 2007-12-20 00:03:27.000000000 +0100
-@@ -0,0 +1,14 @@
-+#!/bin/sh
-+#
-+# Wrapper which (almost) silently restarts the VM in case of segfaults.
-+
-+redo_from_start=1;
-+while [ $redo_from_start -eq 1 ]; do
-+ echo "Running JamVM-initial: ${@}"
-+ redo_from_start=0;
-+ jamvm-initial ${1+"$@"}
-+ if [ $? -eq 139 ]; then
-+ echo "JamVM-initial crashed - silently trying again"
-+ redo_from_start=1;
-+ fi
-+done
-Index: jamvm-1.5.0/lib/Makefile.am
-===================================================================
---- jamvm-1.5.0.orig/lib/Makefile.am 2007-12-20 00:05:24.000000000 +0100
-+++ jamvm-1.5.0/lib/Makefile.am 2007-12-20 00:05:28.000000000 +0100
-@@ -19,7 +19,7 @@
- ## Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- ##
-
--CP_LIB_DIR = ${with_classpath_install_dir}/share/classpath
-+CP_LIB_DIR = ${with_classpath_install_dir}/share/classpath-initial
- GLIBJ_ZIP = ${CP_LIB_DIR}/glibj.zip
-
- SUBDIRS = jamvm java gnu sun
-Index: jamvm-1.5.0/src/class.h
-===================================================================
---- jamvm-1.5.0.orig/src/class.h 2007-12-20 00:06:34.000000000 +0100
-+++ jamvm-1.5.0/src/class.h 2007-12-20 00:16:41.000000000 +0100
-@@ -39,11 +39,11 @@
- separate class files in a directory structure */
-
- #ifdef USE_ZIP
--#define JAMVM_CLASSES INSTALL_DIR"/share/jamvm/classes.zip"
--#define CLASSPATH_CLASSES CLASSPATH_INSTALL_DIR"/share/classpath/glibj.zip"
-+#define JAMVM_CLASSES CLASSPATH_INSTALL_DIR"/share/jamvm-initial/classes.zip"
-+#define CLASSPATH_CLASSES CLASSPATH_INSTALL_DIR"/share/classpath-initial/glibj.zip"
- #else
--#define JAMVM_CLASSES INSTALL_DIR"/share/jamvm/classes"
--#define CLASSPATH_CLASSES CLASSPATH_INSTALL_DIR"/share/classpath"
-+#define JAMVM_CLASSES CLASSPATH_INSTALL_DIR"/share/jamvm-initial/classes"
-+#define CLASSPATH_CLASSES CLASSPATH_INSTALL_DIR"/share/classpath-initial"
- #endif
-
- #define DFLT_BCP JAMVM_CLASSES":"CLASSPATH_CLASSES
-Index: jamvm-1.5.0/src/dll.c
-===================================================================
---- jamvm-1.5.0.orig/src/dll.c 2007-12-20 00:01:24.000000000 +0100
-+++ jamvm-1.5.0/src/dll.c 2007-12-20 00:03:27.000000000 +0100
-@@ -294,7 +294,7 @@
- }
-
- char *getBootDllPath() {
-- return CLASSPATH_INSTALL_DIR"/lib/classpath";
-+ return CLASSPATH_INSTALL_DIR"/lib/classpath-initial";
- }
-
- char *getDllName(char *name) {
-Index: jamvm-1.5.0/src/Makefile.am
-===================================================================
---- jamvm-1.5.0.orig/src/Makefile.am 2007-12-20 00:21:37.000000000 +0100
-+++ jamvm-1.5.0/src/Makefile.am 2007-12-20 00:21:46.000000000 +0100
-@@ -23,7 +23,7 @@
- DIST_SUBDIRS = os arch interp
-
- bin_PROGRAMS = jamvm
--include_HEADERS = jni.h
-+noinst_HEADERS = jni.h
-
- lib_LTLIBRARIES = libjvm.la
- noinst_LTLIBRARIES = libcore.la
diff --git a/recipes/jamvm/files/java-initial b/recipes/jamvm/files/java-initial
new file mode 100755
index 0000000..1b27f81
--- /dev/null
+++ b/recipes/jamvm/files/java-initial
@@ -0,0 +1,17 @@
+#!/bin/sh
+#
+# Wrapper which (almost) silently restarts the VM in case of segfaults.
+
+error_counter=0;
+error_occured=139
+while [ ${error_counter} -le 50 -a ${error_occured} -eq 139 ]; do
+ echo "Running JamVM-initial: ${@}"
+ jamvm-initial ${1+"$@"}
+ error_occured=$?
+ if [ ${error_occured} -eq 139 ]; then
+ echo "JamVM-initial crashed - silently trying again"
+ error_counter=$(( $error_counter + 1 ))
+ fi
+done
+
+exit ${error_occured}
diff --git a/recipes/jamvm/files/jamvm_1.4.5-initial.patch b/recipes/jamvm/jamvm-initial/jamvm-initial.patch
index 175052d..fb069f8 100644
--- a/recipes/jamvm/files/jamvm_1.4.5-initial.patch
+++ b/recipes/jamvm/jamvm-initial/jamvm-initial.patch
@@ -10,25 +10,6 @@ Index: jamvm-1.4.5/configure.ac
AC_CONFIG_HEADERS([src/config.h])
AC_PREFIX_DEFAULT(/usr/local/jamvm)
-Index: jamvm-1.4.5/java-initial
-===================================================================
---- /dev/null
-+++ jamvm-1.4.5/java-initial
-@@ -0,0 +1,14 @@
-+#!/bin/sh
-+#
-+# Wrapper which (almost) silently restarts the VM in case of segfaults.
-+
-+redo_from_start=1;
-+while [ $redo_from_start -eq 1 ]; do
-+ echo "Running JamVM-initial: ${@}"
-+ redo_from_start=0;
-+ jamvm-initial ${1+"$@"}
-+ if [ $? -eq 139 ]; then
-+ echo "JamVM-initial crashed - silently trying again"
-+ redo_from_start=1;
-+ fi
-+done
Index: jamvm-1.4.5/lib/Makefile.am
===================================================================
--- jamvm-1.4.5.orig/lib/Makefile.am
diff --git a/recipes/jamvm/jamvm-initial_1.4.5.bb b/recipes/jamvm/jamvm-initial_1.4.5.bb
index 55bd5f9..a662077 100644
--- a/recipes/jamvm/jamvm-initial_1.4.5.bb
+++ b/recipes/jamvm/jamvm-initial_1.4.5.bb
@@ -1,17 +1,20 @@
SUMMARY = "A compact Java Virtual Machine which conforms to the JVM specification version 2."
HOMEPAGE = "http://jamvm.sourceforge.net/"
LICENSE = "GPL"
+LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
DEPENDS = "zlib-native classpath-initial jikes-initial libffi-native"
-PR = "r3"
-
PROVIDES = "virtual/java-initial"
+PR = "r4"
+
S = "${WORKDIR}/jamvm-${PV}"
SRC_URI = "${SOURCEFORGE_MIRROR}/jamvm/jamvm-${PV}.tar.gz \
- file://jamvm_${PV}-initial.patch \
+ file://libffi.patch \
+ file://jamvm-initial.patch \
+ file://java-initial \
"
# This uses 32 bit arm, so force the instruction set to arm, not thumb
@@ -25,20 +28,19 @@ EXTRA_OECONF = "\
--with-classpath-install-dir=${prefix} \
--program-suffix=-initial \
--libdir=${STAGING_LIBDIR}/jamvm-initial \
+ --enable-ffi \
"
# jamvm-initial has to run some binaries which need lots of memory.
CFLAGS += "-DDEFAULT_MAX_HEAP=512*MB"
-do_compile() {
- oe_runmake \
- JAVAC=jikes-initial \
- GLIBJ_ZIP=${STAGING_DATADIR_NATIVE}/classpath-initial/glibj.zip
-}
-
+# Enforce usage of jikes-initial.
+EXTRA_OEMAKE = "JAVAC=${STAGING_BINDIR_NATIVE}/jikes-initial \
+ GLIBJ_ZIP=${STAGING_DATADIR_NATIVE}/classpath-inital/glibj.zip \
+ "
do_install_append() {
install -d ${D}${bindir}/
- install -m 0755 java-initial ${D}${bindir}/
+ install -m 0755 ${WORKDIR}/java-initial ${D}${bindir}/
}
SRC_URI[md5sum] = "3f538bab6e1c77aed331e5e71f754f5b"
diff --git a/recipes/jamvm/files/debian-jni.patch b/recipes/jamvm/jamvm/debian-jni.patch
index 040163d..040163d 100644
--- a/recipes/jamvm/files/debian-jni.patch
+++ b/recipes/jamvm/jamvm/debian-jni.patch
diff --git a/recipes/jamvm/files/jamvm-1.3.1-size-defaults.patch b/recipes/jamvm/jamvm/jamvm-1.3.1-size-defaults.patch
index a41beee..a41beee 100644
--- a/recipes/jamvm/files/jamvm-1.3.1-size-defaults.patch
+++ b/recipes/jamvm/jamvm/jamvm-1.3.1-size-defaults.patch
diff --git a/recipes/jamvm/files/jamvm-1.5.3-jni_h-noinst.patch b/recipes/jamvm/jamvm/jamvm-1.5.3-jni_h-noinst.patch
index f0884fd..f0884fd 100644
--- a/recipes/jamvm/files/jamvm-1.5.3-jni_h-noinst.patch
+++ b/recipes/jamvm/jamvm/jamvm-1.5.3-jni_h-noinst.patch
diff --git a/recipes/jamvm/jamvm/libffi.patch b/recipes/jamvm/jamvm/libffi.patch
new file mode 100644
index 0000000..c705ad2
--- /dev/null
+++ b/recipes/jamvm/jamvm/libffi.patch
@@ -0,0 +1,66 @@
+diff -Nurd /home/sledz/jamvm-1.4.5.orig/configure.ac jamvm-1.4.5/configure.ac
+--- /home/sledz/jamvm-1.4.5.orig/configure.ac 2012-10-02 15:14:03.000000000 +0200
++++ jamvm-1.4.5/configure.ac 2012-10-02 15:14:49.000000000 +0200
+@@ -166,10 +166,25 @@
+ enable_zip=no
+ fi])
+
+-AC_CHECK_LIB(ffi,ffi_call,,
+- [if test "$enable_ffi" != no; then
+- AC_MSG_ERROR(cannot find libffi)
+- fi])
++LIBFFI_FOUND=no
++if test "$enable_ffi" = yes
++then
++PKG_CHECK_MODULES([LIBFFI], [libffi], [LIBFFI_FOUND=yes], [LIBFFI_FOUND=no])
++if test "x${LIBFFI_FOUND}" = xno
++then
++ LIBFFI_FOUND=
++ AC_CHECK_HEADER([ffi.h],[LIBFFI_CFLAGS=],[LIBFFI_FOUND=no])
++ AC_SEARCH_LIBS([ffi_call], [ffi],[LIBFFI_LIBS=-lffi],[LIBFFI_FOUND=no])
++ if test "x${LIBFFI_FOUND}" = xno
++ then
++ AC_MSG_ERROR([Could not find libffi headers - \
++ Instal libffi-devel or libffi-dev.])
++ fi
++fi
++fi
++AC_SUBST(LIBFFI_CFLAGS)
++AC_SUBST(LIBFFI_LIBS)
++
+
+ dnl Checks for header files.
+ AC_HEADER_STDC
+@@ -180,11 +195,6 @@
+ enable_zip=no
+ fi])
+
+-AC_CHECK_HEADER(ffi.h,,
+- [if test "$enable_ffi" != no; then
+- AC_MSG_ERROR(cannot find ffi.h)
+- fi])
+-
+ if test "$enable_zip" != no; then
+ AC_DEFINE([USE_ZIP],1,[use zip])
+ use_zip_yes=
+@@ -197,7 +207,7 @@
+ AC_SUBST(use_zip_yes)
+ AC_SUBST(use_zip_no)
+
+-if test "$enable_ffi" != no; then
++if test "x${LIBFFI_FOUND}" != no; then
+ AC_DEFINE([USE_FFI],1,[use FFI])
+ fi
+
+diff -Nurd /home/sledz/jamvm-1.4.5.orig/src/Makefile.am jamvm-1.4.5/src/Makefile.am
+--- /home/sledz/jamvm-1.4.5.orig/src/Makefile.am 2012-10-02 15:14:03.000000000 +0200
++++ jamvm-1.4.5/src/Makefile.am 2012-10-02 15:14:49.000000000 +0200
+@@ -19,6 +19,7 @@
+
+ jamvm_LDADD = libcore.la
+ libjvm_la_LIBADD = libcore.la
+-libcore_la_LIBADD = os/@os@/@arch@/libnative.la os/@os@/libos.la
++libcore_la_LIBADD = os/@os@/@arch@/libnative.la os/@os@/libos.la $(LIBFFI_LIBS)
++libcore_la_CPPFLAGS = $(LIBFFI_CFLAGS)
+
+ DISTCLEANFILES = arch.h