aboutsummaryrefslogtreecommitdiff
path: root/recipes/jamvm/jamvm-initial/jamvm_1.4.5-initial.patch
blob: 175052dbf3d916297641ecf16274e78775d019e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
Index: jamvm-1.4.5/configure.ac
===================================================================
--- jamvm-1.4.5.orig/configure.ac
+++ jamvm-1.4.5/configure.ac
@@ -1,6 +1,6 @@
 dnl Process this file with autoconf to produce a configure script.
 AC_INIT(src/jam.c)
-AM_INIT_AUTOMAKE(jamvm, 1.4.5)
+AM_INIT_AUTOMAKE(jamvm-initial, 1.4.5)
 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
+++ jamvm-1.4.5/lib/Makefile.am
@@ -1,4 +1,4 @@
-@use_zip_yes@ GLIBJ_ZIP = ${with_classpath_install_dir}/share/classpath/glibj.zip
+@use_zip_yes@ GLIBJ_ZIP = ${with_classpath_install_dir}/share/classpath-initial/glibj.zip
 @use_zip_no@ GLIBJ_ZIP = ${with_classpath_install_dir}/share/classpath/
 
 SUBDIRS = jamvm java gnu sun
Index: jamvm-1.4.5/src/dll.c
===================================================================
--- jamvm-1.4.5.orig/src/dll.c
+++ jamvm-1.4.5/src/dll.c
@@ -294,7 +294,7 @@ char *getDllPath() {
 }
 
 char *getBootDllPath() {
-    return CLASSPATH_INSTALL_DIR"/lib/classpath";
+    return CLASSPATH_INSTALL_DIR"/lib/classpath-initial";
 }
 
 char *getDllName(char *name) {
Index: jamvm-1.4.5/src/Makefile.am
===================================================================
--- jamvm-1.4.5.orig/src/Makefile.am
+++ jamvm-1.4.5/src/Makefile.am
@@ -2,7 +2,7 @@ SUBDIRS = os
 DIST_SUBDIRS = os arch
 
 bin_PROGRAMS = jamvm
-include_HEADERS = jni.h
+noinst_HEADERS = jni.h
 
 lib_LTLIBRARIES = libjvm.la
 noinst_LTLIBRARIES = libcore.la
Index: jamvm-1.4.5/src/class.c
===================================================================
--- jamvm-1.4.5.orig/src/class.c
+++ jamvm-1.4.5/src/class.c
@@ -1653,8 +1653,8 @@ void scanDirsForJars(char *directories) 
 }
 
 #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 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"