aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenning Heinold <heinold@inf.fu-berlin.de>2013-09-29 13:59:14 +0000
committerHenning Heinold <heinold@inf.fu-berlin.de>2013-09-29 21:52:23 +0200
commitb7fe352e2cec76424b6c1017dbf84a28294ad9b7 (patch)
treedda616f52b9760ca4f492bb97aa19474273ee250
parent1f41f82b9241a69a4a1d61e2c547477a1ac84b5a (diff)
downloadmeta-java-b7fe352e2cec76424b6c1017dbf84a28294ad9b7.tar.gz
meta-java-b7fe352e2cec76424b6c1017dbf84a28294ad9b7.tar.bz2
meta-java-b7fe352e2cec76424b6c1017dbf84a28294ad9b7.zip
jamvm-native: separate bootclasspath out into shell script
* instead of hardcode BCP and LD_LIBRARY_PATH into serval files use a shell script and set them there * this allow us again to use other vms for java-native
-rw-r--r--classes/java-library.bbclass3
-rw-r--r--recipes-core/classpath/classpath.inc2
-rw-r--r--recipes-core/icedtea/icedtea7-native.inc2
-rwxr-xr-xrecipes-core/jamvm/files/java6
-rw-r--r--recipes-core/jamvm/jamvm.inc9
5 files changed, 14 insertions, 8 deletions
diff --git a/classes/java-library.bbclass b/classes/java-library.bbclass
index 749f1fb..a74c8d3 100644
--- a/classes/java-library.bbclass
+++ b/classes/java-library.bbclass
@@ -9,9 +9,6 @@
# to set JPN manually!
inherit java
-export LD_LIBRARY_PATH = "$LD_LIBRARY_PATH:${STAGING_LIBDIR_NATIVE}/classpath:${STAGING_LIBDIR_NATIVE}/jamvm"
-export BOOTCLASSPATH = "${STAGING_DATADIR_NATIVE}/jamvm/classes.zip:${STAGING_DATADIR_NATIVE}/classpath/glibj.zip"
-
# use java_stage for native packages
JAVA_NATIVE_STAGE_INSTALL = "1"
diff --git a/recipes-core/classpath/classpath.inc b/recipes-core/classpath/classpath.inc
index 81476c0..1bdfd78 100644
--- a/recipes-core/classpath/classpath.inc
+++ b/recipes-core/classpath/classpath.inc
@@ -28,8 +28,6 @@ SRC_URI = "${GNU_MIRROR}/classpath/classpath-${PV}.tar.gz"
S = "${WORKDIR}/${PBN}-${PV}"
export JAVA = "java"
-export LD_LIBRARY_PATH = "$LD_LIBRARY_PATH:${STAGING_LIBDIR_NATIVE}/classpath:${STAGING_LIBDIR_NATIVE}/jamvm"
-export BOOTCLASSPATH = "${STAGING_DATADIR_NATIVE}/jamvm/classes.zip:${STAGING_DATADIR_NATIVE}/classpath/glibj.zip"
EXTRA_OECONF = "\
--with-glibj \
diff --git a/recipes-core/icedtea/icedtea7-native.inc b/recipes-core/icedtea/icedtea7-native.inc
index aa105b7..1f193e1 100644
--- a/recipes-core/icedtea/icedtea7-native.inc
+++ b/recipes-core/icedtea/icedtea7-native.inc
@@ -35,8 +35,6 @@ B = "${S}/build"
# openjdk looks in /usr/include and /usr/lib for freetype by default.
export ALT_FREETYPE_HEADERS_PATH = "${STAGING_INCDIR}/freetype2"
export ALT_FREETYPE_LIB_PATH = "${STAGING_LIBDIR}"
-export LD_LIBRARY_PATH = "$LD_LIBRARY_PATH:${STAGING_LIBDIR}/classpath:${STAGING_LIBDIR}/jamvm"
-export BOOTCLASSPATH = "${STAGING_DATADIR}/jamvm/classes.zip:${STAGING_DATADIR}/classpath/glibj.zip"
# OpenJDK supports parallel compilation but uses a plain number for this.
# In OE we have PARALLEL_MAKE which is the actual option passed to make,
diff --git a/recipes-core/jamvm/files/java b/recipes-core/jamvm/files/java
new file mode 100755
index 0000000..27cf094
--- /dev/null
+++ b/recipes-core/jamvm/files/java
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+IFS=""
+export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:STAGING_LIBDIR_NATIVE/classpath:STAGING_LIBDIR_NATIVE/jamvm"
+export BOOTCLASSPATH="STAGING_DATADIR_NATIVE/jamvm/classes.zip:STAGING_DATADIR_NATIVE/classpath/glibj.zip"
+exec jamvm ${1+"$@"}
diff --git a/recipes-core/jamvm/jamvm.inc b/recipes-core/jamvm/jamvm.inc
index e82a780..991b413 100644
--- a/recipes-core/jamvm/jamvm.inc
+++ b/recipes-core/jamvm/jamvm.inc
@@ -26,6 +26,12 @@ inherit java autotools update-alternatives
# This uses 32 bit arm, so force the instruction set to arm, not thumb
ARM_INSTRUCTION_SET = "arm"
+do_configure_append_virtclass-native() {
+ sed -i -e"s|STAGING_LIBDIR_NATIVE|${STAGING_LIBDIR_NATIVE}|g" \
+ -e "s|STAGING_DATADIR_NATIVE|${STAGING_DATADIR_NATIVE}|g" \
+ ${WORKDIR}/java
+}
+
EXTRA_OECONF = "--with-classpath-install-dir=${prefix} --libdir=${libdir}/jamvm --enable-ffi"
@@ -36,7 +42,8 @@ EXTRA_OEMAKE = "JAVAC=${STAGING_BINDIR_NATIVE}/ecj-initial \
do_install_append_virtclass-native() {
install -d ${D}${bindir}
- ln -s ${bindir}/jamvm ${D}${bindir}/java
+ install -m 0755 ${WORKDIR}/java ${D}${bindir}/java
+
}
PRIVATE_LIBS = "libjvm.so"