diff options
author | Henning Heinold <heinold@inf.fu-berlin.de> | 2011-11-12 20:58:34 +0100 |
---|---|---|
committer | Henning Heinold <heinold@inf.fu-berlin.de> | 2011-11-26 23:41:44 +0100 |
commit | 57e069cde6617f00ca8834a82c6f360af43d5067 (patch) | |
tree | 48cbe15e96d217c45acfa64b0c13aad8c6424980 /recipes-core/jamvm | |
download | meta-java-57e069cde6617f00ca8834a82c6f360af43d5067.tar.gz |
meta-java: initial commit
* taken over mostly stuff from oe classic
* cleaned up recipes
* added license checksums
* bump icedtea6-native to 1.8.11
* use jamvm from git as native
Diffstat (limited to 'recipes-core/jamvm')
-rwxr-xr-x | recipes-core/jamvm/files/java-initial | 17 | ||||
-rw-r--r-- | recipes-core/jamvm/jamvm-initial/jamvm-initial.patch | 63 | ||||
-rw-r--r-- | recipes-core/jamvm/jamvm-initial/libffi.patch | 68 | ||||
-rw-r--r-- | recipes-core/jamvm/jamvm-initial_1.4.5.bb | 47 | ||||
-rw-r--r-- | recipes-core/jamvm/jamvm.inc | 47 | ||||
-rw-r--r-- | recipes-core/jamvm/jamvm/jamvm-jni_h-noinst.patch | 13 | ||||
-rw-r--r-- | recipes-core/jamvm/jamvm/libffi.patch | 69 | ||||
-rw-r--r-- | recipes-core/jamvm/jamvm_git.bb | 15 |
8 files changed, 339 insertions, 0 deletions
diff --git a/recipes-core/jamvm/files/java-initial b/recipes-core/jamvm/files/java-initial new file mode 100755 index 0000000..1b27f81 --- /dev/null +++ b/recipes-core/jamvm/files/java-initial | |||
@@ -0,0 +1,17 @@ | |||
1 | #!/bin/sh | ||
2 | # | ||
3 | # Wrapper which (almost) silently restarts the VM in case of segfaults. | ||
4 | |||
5 | error_counter=0; | ||
6 | error_occured=139 | ||
7 | while [ ${error_counter} -le 50 -a ${error_occured} -eq 139 ]; do | ||
8 | echo "Running JamVM-initial: ${@}" | ||
9 | jamvm-initial ${1+"$@"} | ||
10 | error_occured=$? | ||
11 | if [ ${error_occured} -eq 139 ]; then | ||
12 | echo "JamVM-initial crashed - silently trying again" | ||
13 | error_counter=$(( $error_counter + 1 )) | ||
14 | fi | ||
15 | done | ||
16 | |||
17 | exit ${error_occured} | ||
diff --git a/recipes-core/jamvm/jamvm-initial/jamvm-initial.patch b/recipes-core/jamvm/jamvm-initial/jamvm-initial.patch new file mode 100644 index 0000000..fb069f8 --- /dev/null +++ b/recipes-core/jamvm/jamvm-initial/jamvm-initial.patch | |||
@@ -0,0 +1,63 @@ | |||
1 | Index: jamvm-1.4.5/configure.ac | ||
2 | =================================================================== | ||
3 | --- jamvm-1.4.5.orig/configure.ac | ||
4 | +++ jamvm-1.4.5/configure.ac | ||
5 | @@ -1,6 +1,6 @@ | ||
6 | dnl Process this file with autoconf to produce a configure script. | ||
7 | AC_INIT(src/jam.c) | ||
8 | -AM_INIT_AUTOMAKE(jamvm, 1.4.5) | ||
9 | +AM_INIT_AUTOMAKE(jamvm-initial, 1.4.5) | ||
10 | AC_CONFIG_HEADERS([src/config.h]) | ||
11 | AC_PREFIX_DEFAULT(/usr/local/jamvm) | ||
12 | |||
13 | Index: jamvm-1.4.5/lib/Makefile.am | ||
14 | =================================================================== | ||
15 | --- jamvm-1.4.5.orig/lib/Makefile.am | ||
16 | +++ jamvm-1.4.5/lib/Makefile.am | ||
17 | @@ -1,4 +1,4 @@ | ||
18 | -@use_zip_yes@ GLIBJ_ZIP = ${with_classpath_install_dir}/share/classpath/glibj.zip | ||
19 | +@use_zip_yes@ GLIBJ_ZIP = ${with_classpath_install_dir}/share/classpath-initial/glibj.zip | ||
20 | @use_zip_no@ GLIBJ_ZIP = ${with_classpath_install_dir}/share/classpath/ | ||
21 | |||
22 | SUBDIRS = jamvm java gnu sun | ||
23 | Index: jamvm-1.4.5/src/dll.c | ||
24 | =================================================================== | ||
25 | --- jamvm-1.4.5.orig/src/dll.c | ||
26 | +++ jamvm-1.4.5/src/dll.c | ||
27 | @@ -294,7 +294,7 @@ char *getDllPath() { | ||
28 | } | ||
29 | |||
30 | char *getBootDllPath() { | ||
31 | - return CLASSPATH_INSTALL_DIR"/lib/classpath"; | ||
32 | + return CLASSPATH_INSTALL_DIR"/lib/classpath-initial"; | ||
33 | } | ||
34 | |||
35 | char *getDllName(char *name) { | ||
36 | Index: jamvm-1.4.5/src/Makefile.am | ||
37 | =================================================================== | ||
38 | --- jamvm-1.4.5.orig/src/Makefile.am | ||
39 | +++ jamvm-1.4.5/src/Makefile.am | ||
40 | @@ -2,7 +2,7 @@ SUBDIRS = os | ||
41 | DIST_SUBDIRS = os arch | ||
42 | |||
43 | bin_PROGRAMS = jamvm | ||
44 | -include_HEADERS = jni.h | ||
45 | +noinst_HEADERS = jni.h | ||
46 | |||
47 | lib_LTLIBRARIES = libjvm.la | ||
48 | noinst_LTLIBRARIES = libcore.la | ||
49 | Index: jamvm-1.4.5/src/class.c | ||
50 | =================================================================== | ||
51 | --- jamvm-1.4.5.orig/src/class.c | ||
52 | +++ jamvm-1.4.5/src/class.c | ||
53 | @@ -1653,8 +1653,8 @@ void scanDirsForJars(char *directories) | ||
54 | } | ||
55 | |||
56 | #ifdef USE_ZIP | ||
57 | -#define JAMVM_CLASSES INSTALL_DIR"/share/jamvm/classes.zip" | ||
58 | -#define CLASSPATH_CLASSES CLASSPATH_INSTALL_DIR"/share/classpath/glibj.zip" | ||
59 | +#define JAMVM_CLASSES INSTALL_DIR"/share/jamvm-initial/classes.zip" | ||
60 | +#define CLASSPATH_CLASSES CLASSPATH_INSTALL_DIR"/share/classpath-initial/glibj.zip" | ||
61 | #else | ||
62 | #define JAMVM_CLASSES INSTALL_DIR"/share/jamvm/classes" | ||
63 | #define CLASSPATH_CLASSES CLASSPATH_INSTALL_DIR"/share/classpath" | ||
diff --git a/recipes-core/jamvm/jamvm-initial/libffi.patch b/recipes-core/jamvm/jamvm-initial/libffi.patch new file mode 100644 index 0000000..216f03c --- /dev/null +++ b/recipes-core/jamvm/jamvm-initial/libffi.patch | |||
@@ -0,0 +1,68 @@ | |||
1 | Index: jamvm-1.4.5/configure.ac | ||
2 | =================================================================== | ||
3 | --- jamvm-1.4.5.orig/configure.ac 2007-02-05 04:18:05.000000000 +0100 | ||
4 | +++ jamvm-1.4.5/configure.ac 2011-11-25 19:34:58.473683844 +0100 | ||
5 | @@ -166,10 +166,25 @@ | ||
6 | enable_zip=no | ||
7 | fi]) | ||
8 | |||
9 | -AC_CHECK_LIB(ffi,ffi_call,, | ||
10 | - [if test "$enable_ffi" != no; then | ||
11 | - AC_MSG_ERROR(cannot find libffi) | ||
12 | - fi]) | ||
13 | +LIBFFI_FOUND=no | ||
14 | +if test "$enable_ffi" = yes | ||
15 | +then | ||
16 | +PKG_CHECK_MODULES([LIBFFI], [libffi], [LIBFFI_FOUND=yes], [LIBFFI_FOUND=no]) | ||
17 | +if test "x${LIBFFI_FOUND}" = xno | ||
18 | +then | ||
19 | + LIBFFI_FOUND= | ||
20 | + AC_CHECK_HEADER([ffi.h],[LIBFFI_CFLAGS=],[LIBFFI_FOUND=no]) | ||
21 | + AC_SEARCH_LIBS([ffi_call], [ffi],[LIBFFI_LIBS=-lffi],[LIBFFI_FOUND=no]) | ||
22 | + if test "x${LIBFFI_FOUND}" = xno | ||
23 | + then | ||
24 | + AC_MSG_ERROR([Could not find libffi headers - \ | ||
25 | + Instal libffi-devel or libffi-dev.]) | ||
26 | + fi | ||
27 | +fi | ||
28 | +fi | ||
29 | +AC_SUBST(LIBFFI_CFLAGS) | ||
30 | +AC_SUBST(LIBFFI_LIBS) | ||
31 | + | ||
32 | |||
33 | dnl Checks for header files. | ||
34 | AC_HEADER_STDC | ||
35 | @@ -180,11 +195,6 @@ | ||
36 | enable_zip=no | ||
37 | fi]) | ||
38 | |||
39 | -AC_CHECK_HEADER(ffi.h,, | ||
40 | - [if test "$enable_ffi" != no; then | ||
41 | - AC_MSG_ERROR(cannot find ffi.h) | ||
42 | - fi]) | ||
43 | - | ||
44 | if test "$enable_zip" != no; then | ||
45 | AC_DEFINE([USE_ZIP],1,[use zip]) | ||
46 | use_zip_yes= | ||
47 | @@ -197,7 +207,7 @@ | ||
48 | AC_SUBST(use_zip_yes) | ||
49 | AC_SUBST(use_zip_no) | ||
50 | |||
51 | -if test "$enable_ffi" != no; then | ||
52 | +if test "x${LIBFFI_FOUND}" != no; then | ||
53 | AC_DEFINE([USE_FFI],1,[use FFI]) | ||
54 | fi | ||
55 | |||
56 | Index: jamvm-1.4.5/src/Makefile.am | ||
57 | =================================================================== | ||
58 | --- jamvm-1.4.5.orig/src/Makefile.am 2006-12-25 05:10:18.000000000 +0100 | ||
59 | +++ jamvm-1.4.5/src/Makefile.am 2011-11-25 19:35:26.537723112 +0100 | ||
60 | @@ -19,6 +19,7 @@ | ||
61 | |||
62 | jamvm_LDADD = libcore.la | ||
63 | libjvm_la_LIBADD = libcore.la | ||
64 | -libcore_la_LIBADD = os/@os@/@arch@/libnative.la os/@os@/libos.la | ||
65 | +libcore_la_LIBADD = os/@os@/@arch@/libnative.la os/@os@/libos.la $(LIBFFI_LIBS) | ||
66 | +libcore_la_CPPFLAGS = $(LIBFFI_CFLAGS) | ||
67 | |||
68 | DISTCLEANFILES = arch.h | ||
diff --git a/recipes-core/jamvm/jamvm-initial_1.4.5.bb b/recipes-core/jamvm/jamvm-initial_1.4.5.bb new file mode 100644 index 0000000..57caa64 --- /dev/null +++ b/recipes-core/jamvm/jamvm-initial_1.4.5.bb | |||
@@ -0,0 +1,47 @@ | |||
1 | SUMMARY = "A compact Java Virtual Machine which conforms to the JVM specification version 2." | ||
2 | HOMEPAGE = "http://jamvm.sourceforge.net/" | ||
3 | LICENSE = "GPL" | ||
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3" | ||
5 | |||
6 | DEPENDS = "zlib-native classpath-initial jikes-initial libffi-native" | ||
7 | |||
8 | PROVIDES = "virtual/java-initial" | ||
9 | |||
10 | S = "${WORKDIR}/jamvm-${PV}" | ||
11 | |||
12 | SRC_URI = "${SOURCEFORGE_MIRROR}/jamvm/jamvm-${PV}.tar.gz \ | ||
13 | file://libffi.patch \ | ||
14 | file://jamvm-initial.patch \ | ||
15 | file://java-initial \ | ||
16 | " | ||
17 | |||
18 | # This uses 32 bit arm, so force the instruction set to arm, not thumb | ||
19 | ARM_INSTRUCTION_SET = "arm" | ||
20 | |||
21 | inherit native autotools | ||
22 | |||
23 | # libdir must be modified so that jamvm-initial and -native | ||
24 | # do not interfere | ||
25 | EXTRA_OECONF = "\ | ||
26 | --with-classpath-install-dir=${prefix} \ | ||
27 | --program-suffix=-initial \ | ||
28 | --libdir=${STAGING_LIBDIR}/jamvm-initial \ | ||
29 | --enable-ffi \ | ||
30 | " | ||
31 | |||
32 | # jamvm-initial has to run some binaries which need lots of memory. | ||
33 | CFLAGS += "-DDEFAULT_MAX_HEAP=512*MB" | ||
34 | |||
35 | do_compile() { | ||
36 | oe_runmake \ | ||
37 | JAVAC=jikes-initial \ | ||
38 | GLIBJ_ZIP=${STAGING_DATADIR_NATIVE}/classpath-initial/glibj.zip | ||
39 | } | ||
40 | |||
41 | do_install_append() { | ||
42 | install -d ${D}${bindir}/ | ||
43 | install -m 0755 ${WORKDIR}/java-initial ${D}${bindir}/ | ||
44 | } | ||
45 | |||
46 | SRC_URI[md5sum] = "3f538bab6e1c77aed331e5e71f754f5b" | ||
47 | SRC_URI[sha256sum] = "f329d1c8f42c06b53a3e82763d33900b100b8e9acd7afe02f7583c51253fd6e5" | ||
diff --git a/recipes-core/jamvm/jamvm.inc b/recipes-core/jamvm/jamvm.inc new file mode 100644 index 0000000..4eab1c1 --- /dev/null +++ b/recipes-core/jamvm/jamvm.inc | |||
@@ -0,0 +1,47 @@ | |||
1 | DESCRIPTION = "A compact Java Virtual Machine which conforms to the JVM specification version 2." | ||
2 | HOMEPAGE = "http://jamvm.sourceforge.net/" | ||
3 | LICENSE = "GPL" | ||
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3" | ||
5 | |||
6 | DEPENDS = "zlib classpath virtual/javac-native libffi" | ||
7 | DEPENDS_virtclass-native = "zlib-native classpath-native ecj-initial libffi-native" | ||
8 | |||
9 | RDEPENDS_${PN} = "classpath" | ||
10 | RDEPENDS_${PN}_virtclass-native = "" | ||
11 | |||
12 | PROVIDES_virtclass-native = "virtual/java-native" | ||
13 | RPROVIDES_${PN} = "java2-runtime" | ||
14 | RPROVIDES_${PN}_virtclass-native = "" | ||
15 | |||
16 | BBCLASSEXTEND = "native" | ||
17 | |||
18 | SRC_URI = "${SOURCEFORGE_MIRROR}/jamvm/jamvm-${PV}.tar.gz \ | ||
19 | file://jamvm-jni_h-noinst.patch \ | ||
20 | file://libffi.patch \ | ||
21 | " | ||
22 | |||
23 | |||
24 | inherit java autotools update-alternatives | ||
25 | |||
26 | # This uses 32 bit arm, so force the instruction set to arm, not thumb | ||
27 | ARM_INSTRUCTION_SET = "arm" | ||
28 | |||
29 | |||
30 | EXTRA_OECONF = "--with-classpath-install-dir=${prefix} --libdir=${libdir}/jamvm --enable-ffi" | ||
31 | |||
32 | # Enforce usage of ecj-initial. | ||
33 | EXTRA_OMAKE_virtclass-native = "JAVAC=${STAGING_BINDIR_NATIVE}/ecj-initial" | ||
34 | |||
35 | do_install_append_virtclass-native() { | ||
36 | install -d ${D}${bindir} | ||
37 | ln -s ${bindir}/jamvm ${D}${bindir}/java | ||
38 | } | ||
39 | |||
40 | PRIVATE_LIBS = "libjvm.so" | ||
41 | |||
42 | FILES_${PN} += "${libdir}/jamvm/lib*.so" | ||
43 | |||
44 | ALTERNATIVE_NAME = "java" | ||
45 | ALTERNATIVE_PATH = "${bindir}/jamvm" | ||
46 | ALTERNATIVE_PRIORITY = "4" | ||
47 | |||
diff --git a/recipes-core/jamvm/jamvm/jamvm-jni_h-noinst.patch b/recipes-core/jamvm/jamvm/jamvm-jni_h-noinst.patch new file mode 100644 index 0000000..f0884fd --- /dev/null +++ b/recipes-core/jamvm/jamvm/jamvm-jni_h-noinst.patch | |||
@@ -0,0 +1,13 @@ | |||
1 | Index: jamvm-1.5.3/src/Makefile.am | ||
2 | =================================================================== | ||
3 | --- jamvm-1.5.3.orig/src/Makefile.am 2009-09-29 09:29:13.386565473 +0200 | ||
4 | +++ jamvm-1.5.3/src/Makefile.am 2009-09-29 09:33:47.702565852 +0200 | ||
5 | @@ -23,7 +23,7 @@ | ||
6 | DIST_SUBDIRS = os arch interp | ||
7 | |||
8 | bin_PROGRAMS = jamvm | ||
9 | -include_HEADERS = jni.h | ||
10 | +noinst_HEADERS = jni.h | ||
11 | |||
12 | lib_LTLIBRARIES = libjvm.la | ||
13 | noinst_LTLIBRARIES = libcore.la | ||
diff --git a/recipes-core/jamvm/jamvm/libffi.patch b/recipes-core/jamvm/jamvm/libffi.patch new file mode 100644 index 0000000..1f68c5e --- /dev/null +++ b/recipes-core/jamvm/jamvm/libffi.patch | |||
@@ -0,0 +1,69 @@ | |||
1 | Index: git/configure.ac | ||
2 | =================================================================== | ||
3 | --- git.orig/configure.ac 2011-11-18 15:47:15.339088111 +0100 | ||
4 | +++ git/configure.ac 2011-11-18 15:47:15.742392674 +0100 | ||
5 | @@ -273,9 +273,24 @@ | ||
6 | AC_CHECK_LIB(z,inflate,,AC_MSG_ERROR(zlib is missing)) | ||
7 | fi | ||
8 | |||
9 | -if test "$enable_ffi" != no; then | ||
10 | - AC_CHECK_LIB(ffi,ffi_call,,AC_MSG_ERROR(libffi is missing)) | ||
11 | +LIBFFI_FOUND=no | ||
12 | +if test "$enable_ffi" = yes | ||
13 | +then | ||
14 | +PKG_CHECK_MODULES([LIBFFI], [libffi], [LIBFFI_FOUND=yes], [LIBFFI_FOUND=no]) | ||
15 | +if test "x${LIBFFI_FOUND}" = xno | ||
16 | +then | ||
17 | + LIBFFI_FOUND= | ||
18 | + AC_CHECK_HEADER([ffi.h],[LIBFFI_CFLAGS=],[LIBFFI_FOUND=no]) | ||
19 | + AC_SEARCH_LIBS([ffi_call], [ffi],[LIBFFI_LIBS=-lffi],[LIBFFI_FOUND=no]) | ||
20 | + if test "x${LIBFFI_FOUND}" = xno | ||
21 | + then | ||
22 | + AC_MSG_ERROR([Could not find libffi headers - \ | ||
23 | + Instal libffi-devel or libffi-dev.]) | ||
24 | + fi | ||
25 | +fi | ||
26 | fi | ||
27 | +AC_SUBST(LIBFFI_CFLAGS) | ||
28 | +AC_SUBST(LIBFFI_LIBS) | ||
29 | |||
30 | dnl Checks for header files. | ||
31 | AC_HEADER_STDC | ||
32 | @@ -285,10 +300,6 @@ | ||
33 | AC_CHECK_HEADER(zlib.h,,AC_MSG_ERROR(zlib.h is missing)) | ||
34 | fi | ||
35 | |||
36 | -if test "$enable_ffi" != no; then | ||
37 | - AC_CHECK_HEADER(ffi.h,,AC_MSG_ERROR(ffi.h is missing)) | ||
38 | -fi | ||
39 | - | ||
40 | if test "$enable_zip" != no; then | ||
41 | AC_DEFINE([USE_ZIP],1,[use zip]) | ||
42 | use_zip_yes= | ||
43 | @@ -302,7 +313,9 @@ | ||
44 | AC_SUBST(use_zip_no) | ||
45 | |||
46 | if test "$enable_ffi" != no; then | ||
47 | - AC_DEFINE([USE_FFI],1,[use FFI]) | ||
48 | + if test "$LIBFFI_FOUND" != no; then | ||
49 | + AC_DEFINE([USE_FFI],1,[use FFI]) | ||
50 | + fi | ||
51 | fi | ||
52 | |||
53 | if test "$enable_md_stubs" != no; then | ||
54 | Index: git/src/Makefile.am | ||
55 | =================================================================== | ||
56 | --- git.orig/src/Makefile.am 2011-11-18 15:47:15.685730049 +0100 | ||
57 | +++ git/src/Makefile.am 2011-11-18 15:49:43.881825251 +0100 | ||
58 | @@ -43,8 +43,9 @@ | ||
59 | jamvm_LDADD = libcore.la | ||
60 | libjvm_la_LIBADD = libcore.la | ||
61 | libcore_la_LIBADD = interp/libinterp.la os/@os@/@arch@/libnative.la \ | ||
62 | - os/@os@/libos.la classlib/@classlib@/libclasslib.la | ||
63 | + os/@os@/libos.la classlib/@classlib@/libclasslib.la \ | ||
64 | + $(LIBFFI_LIBS) | ||
65 | |||
66 | -AM_CPPFLAGS = -I$(top_srcdir)/src/interp/engine | ||
67 | +AM_CPPFLAGS = -I$(top_srcdir)/src/interp/engine $(LIBFFI_CFLAGS) | ||
68 | |||
69 | DISTCLEANFILES = arch.h classlib.h classlib-defs.h classlib-symbol.h | ||
diff --git a/recipes-core/jamvm/jamvm_git.bb b/recipes-core/jamvm/jamvm_git.bb new file mode 100644 index 0000000..6d06552 --- /dev/null +++ b/recipes-core/jamvm/jamvm_git.bb | |||
@@ -0,0 +1,15 @@ | |||
1 | # Note: You *must* use this together with classpath-native 0.98. | ||
2 | # Otherwise it won't work! | ||
3 | |||
4 | require jamvm.inc | ||
5 | |||
6 | SRCREV = "4617da717ecb05654ea5bb9572338061106a414d" | ||
7 | PV = "0.0+git${SRCPV}" | ||
8 | |||
9 | SRC_URI = "git://git.berlios.de/jamvm;protocol=git \ | ||
10 | file://jamvm-jni_h-noinst.patch \ | ||
11 | file://libffi.patch \ | ||
12 | " | ||
13 | |||
14 | S = "${WORKDIR}/git" | ||
15 | |||