[oe-commits] org.oe.dev jamvm: Added support for variable JNI path.

thebohemian commit openembedded-commits at lists.openembedded.org
Sat Feb 9 03:49:08 UTC 2008


jamvm: Added support for variable JNI path.

Author: thebohemian at openembedded.org
Branch: org.openembedded.dev
Revision: c43938825fe3c6e7a5fe5625efd1a80fa519c60f
ViewMTN: http://monotone.openembedded.org/revision/info/c43938825fe3c6e7a5fe5625efd1a80fa519c60f
Files:
1
packages/jamvm/files/debian-jni.patch
packages/jamvm/jamvm.inc
packages/jamvm/jamvm_1.5.0.bb
Diffs:

#
# mt diff -rb250ba17021e8536994dfe7df9782756f8801c14 -rc43938825fe3c6e7a5fe5625efd1a80fa519c60f
#
# 
# 
# add_file "packages/jamvm/files/debian-jni.patch"
#  content [fde8e06ffb742cd42a2d3f9da5e021a1188c7bce]
# 
# patch "packages/jamvm/jamvm.inc"
#  from [5edcfc7c22cf4daf00c3d364962aa42af749237e]
#    to [1eb0be17dafb30f822a0fad779c2d82f62088d2a]
# 
# patch "packages/jamvm/jamvm_1.5.0.bb"
#  from [645cab3c8ecedf36901ba0d416cb8956c85f04b1]
#    to [7f3f0abf4aff253a69554613cd74fe49da01168d]
# 
============================================================
--- packages/jamvm/files/debian-jni.patch	fde8e06ffb742cd42a2d3f9da5e021a1188c7bce
+++ packages/jamvm/files/debian-jni.patch	fde8e06ffb742cd42a2d3f9da5e021a1188c7bce
@@ -0,0 +1,19 @@
+--- src/dll.c.orig	2004-09-09 15:48:45.000000000 +0000
++++ src/dll.c	2004-09-09 15:50:32.000000000 +0000
+@@ -189,6 +189,16 @@
+ #ifndef NO_JNI
+     /* Init hash table, and create lock */
+     initHashTable(hash_table, HASHTABSZE, TRUE);
++
++    /* XXX: Add Debian JNI directory.  */
++    char* path = getenv("LD_LIBRARY_PATH");
++
++    if (path != NULL)
++      path = strcat(path, ":OE_LIBDIR_JNI");
++    else
++      path = "OE_LIBDIR_JNI";
++    
++    setenv("LD_LIBRARY_PATH", path, 1);
+ #endif
+ }
+ 
============================================================
--- packages/jamvm/jamvm.inc	5edcfc7c22cf4daf00c3d364962aa42af749237e
+++ packages/jamvm/jamvm.inc	1eb0be17dafb30f822a0fad779c2d82f62088d2a
@@ -12,7 +12,7 @@ ARM_INSTRUCTION_SET = "arm"
 # This uses 32 bit arm, so force the instruction set to arm, not thumb
 ARM_INSTRUCTION_SET = "arm"
 
-inherit autotools update-alternatives
+inherit java autotools update-alternatives
 
 EXTRA_OECONF = "--with-classpath-install-dir=${prefix}"
 CFLAGS += "-DDEFAULT_MAX_HEAP=16*MB"
============================================================
--- packages/jamvm/jamvm_1.5.0.bb	645cab3c8ecedf36901ba0d416cb8956c85f04b1
+++ packages/jamvm/jamvm_1.5.0.bb	7f3f0abf4aff253a69554613cd74fe49da01168d
@@ -1,5 +1,12 @@ require jamvm.inc
 require jamvm.inc
 
-PR = "r0"
+SRC_URI += "file://debian-jni.patch;patch=1;pnum=0"
 
+PR = "r1"
 
+do_configure_prepend() {
+  # Replaces the placeholder OE_LIBDIR_JNI with the JNI library directory
+  # configured in OE.
+  sed -i -e "s|OE_LIBDIR_JNI|${libdir_jni}|" src/dll.c
+}
+






More information about the Openembedded-commits mailing list