aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenning Heinold <heinold@inf.fu-berlin.de>2012-02-17 17:53:05 +0100
committerHenning Heinold <heinold@inf.fu-berlin.de>2012-02-21 12:32:47 +0100
commitdee11af6bc099c2a5ebe601752a88df65c2640da (patch)
tree5ab6a74c838302d77151acf96350b9dc77bc30e0
parent57d2e51561f94c268ecaec1fecf560332b0b0d0b (diff)
downloadopenembedded-dee11af6bc099c2a5ebe601752a88df65c2640da.zip
openembedded-dee11af6bc099c2a5ebe601752a88df65c2640da.tar.gz
openembedded-dee11af6bc099c2a5ebe601752a88df65c2640da.tar.bz2
jamvm-inital: rework libffi detection
* this patch allows us to real enable or disable libffi and it does not let sneak host libs in
-rw-r--r--recipes/jamvm/jamvm-initial/libffi.patch68
-rw-r--r--recipes/jamvm/jamvm-initial_1.4.5.bb12
2 files changed, 74 insertions, 6 deletions
diff --git a/recipes/jamvm/jamvm-initial/libffi.patch b/recipes/jamvm/jamvm-initial/libffi.patch
new file mode 100644
index 0000000..52c7e10
--- /dev/null
+++ b/recipes/jamvm/jamvm-initial/libffi.patch
@@ -0,0 +1,68 @@
+Index: jamvm-1.4.5/configure.ac
+===================================================================
+--- jamvm-1.4.5.orig/configure.ac 2007-02-05 04:18:05.000000000 +0100
++++ jamvm-1.4.5/configure.ac 2012-02-16 22:38:03.687663901 +0100
+@@ -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}" != xno; then
+ AC_DEFINE([USE_FFI],1,[use FFI])
+ fi
+
+Index: jamvm-1.4.5/src/Makefile.am
+===================================================================
+--- jamvm-1.4.5.orig/src/Makefile.am 2006-12-25 05:10:18.000000000 +0100
++++ jamvm-1.4.5/src/Makefile.am 2012-02-16 22:36:26.211385087 +0100
+@@ -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
diff --git a/recipes/jamvm/jamvm-initial_1.4.5.bb b/recipes/jamvm/jamvm-initial_1.4.5.bb
index 55bd5f9..de790a4 100644
--- a/recipes/jamvm/jamvm-initial_1.4.5.bb
+++ b/recipes/jamvm/jamvm-initial_1.4.5.bb
@@ -4,13 +4,14 @@ LICENSE = "GPL"
DEPENDS = "zlib-native classpath-initial jikes-initial libffi-native"
-PR = "r3"
+PR = "r4"
PROVIDES = "virtual/java-initial"
S = "${WORKDIR}/jamvm-${PV}"
SRC_URI = "${SOURCEFORGE_MIRROR}/jamvm/jamvm-${PV}.tar.gz \
+ file://libffi.patch \
file://jamvm_${PV}-initial.patch \
"
@@ -22,6 +23,7 @@ inherit native autotools
# libdir must be modified so that jamvm-initial and -native
# do not interfere
EXTRA_OECONF = "\
+ --enable-ffi \
--with-classpath-install-dir=${prefix} \
--program-suffix=-initial \
--libdir=${STAGING_LIBDIR}/jamvm-initial \
@@ -30,11 +32,9 @@ EXTRA_OECONF = "\
# 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
-}
+EXTRA_OEMAKE = "JAVAC=${STAGING_BINDIR_NATIVE}/jikes-initial \
+ GLIBJ_ZIP=${STAGING_DATADIR_NATIVE}/classpath-inital/glibj.zip \
+ "
do_install_append() {
install -d ${D}${bindir}/