aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenning Heinold <h.heinold@tarent.de>2010-07-12 16:45:26 +0200
committerHenning Heinold <h.heinold@tarent.de>2010-07-26 15:35:21 +0200
commitd61b36cd2f21a377022be377d645d631591a4b17 (patch)
tree666b26c039251fde7cf9f0ca9f402834a2c1db54
parent0a363eaa190f6598a170bef6a4105c7102377736 (diff)
downloadopenembedded-d61b36cd2f21a377022be377d645d631591a4b17.zip
openembedded-d61b36cd2f21a377022be377d645d631591a4b17.tar.gz
openembedded-d61b36cd2f21a377022be377d645d631591a4b17.tar.bz2
inetlib: backport from openembedded-dev
* checksum are already in conf/checksums.ini Acked-by: Koen Kooi <koen@openembedded.org> Acked-by: Marcin Juszkiewicz <marcin@juszkiewicz.com.pl>
-rw-r--r--recipes/classpath/files/toolwrapper-exithook.patch46
-rw-r--r--recipes/classpath/inetlib-1.1.1/datadir_java.patch23
-rw-r--r--recipes/classpath/inetlib-native_1.1.1.bb3
-rw-r--r--recipes/classpath/inetlib_1.1.1.bb30
4 files changed, 102 insertions, 0 deletions
diff --git a/recipes/classpath/files/toolwrapper-exithook.patch b/recipes/classpath/files/toolwrapper-exithook.patch
new file mode 100644
index 0000000..49b6631
--- /dev/null
+++ b/recipes/classpath/files/toolwrapper-exithook.patch
@@ -0,0 +1,46 @@
+Index: classpath-0.97.2/tools/toolwrapper.c
+===================================================================
+--- classpath-0.97.2.orig/tools/toolwrapper.c 2006-12-13 18:56:44.000000000 +0100
++++ classpath-0.97.2/tools/toolwrapper.c 2009-12-24 13:16:44.295000627 +0100
+@@ -59,6 +59,10 @@
+ /* Typedef for JNI_CreateJavaVM dlopen call. */
+ typedef jint createVM (JavaVM **, void **, void *);
+
++void exit_hook(jint);
++
++int return_code = 1;
++
+ int
+ main (int argc, const char** argv)
+ {
+@@ -143,6 +147,17 @@
+ vm_args.options[vm_args.nOptions++].optionString = "-Xbootclasspath/p:" TOOLS_ZIP;
+ }
+
++ /* Set the exit hook */
++ vm_args.options = (JavaVMOption*) realloc (vm_args.options, (vm_args.nOptions + 1) * sizeof (JavaVMOption));
++
++ if (vm_args.options == NULL)
++ {
++ fprintf (stderr, TOOLNAME ": realloc failed.\n");
++ goto destroy;
++ }
++ vm_args.options[vm_args.nOptions].optionString = "exit";
++ vm_args.options[vm_args.nOptions++].extraInfo = (void *) exit_hook;
++
+ /* Terminate vm_args.options with a NULL element. */
+ vm_args.options = (JavaVMOption*) realloc (vm_args.options, (vm_args.nOptions + 1) * sizeof (JavaVMOption));
+ if (vm_args.options == NULL)
+@@ -260,5 +275,11 @@
+ if (lt_dlexit () != 0)
+ fprintf (stderr, TOOLNAME ": lt_dlexit failed.\n");
+
+- return 1;
++ return return_code;
++}
++
++void exit_hook(jint code)
++{
++ return_code = code;
+ }
++
diff --git a/recipes/classpath/inetlib-1.1.1/datadir_java.patch b/recipes/classpath/inetlib-1.1.1/datadir_java.patch
new file mode 100644
index 0000000..16302cd
--- /dev/null
+++ b/recipes/classpath/inetlib-1.1.1/datadir_java.patch
@@ -0,0 +1,23 @@
+Index: inetlib-1.1.1/Makefile.am
+===================================================================
+--- inetlib-1.1.1.orig/Makefile.am 2008-03-01 10:49:49.000000000 +0100
++++ inetlib-1.1.1/Makefile.am 2008-03-01 10:52:21.000000000 +0100
+@@ -7,6 +7,8 @@
+ JAVADOC = @JAVADOC@
+ JAVADOCFLAGS = @JAVADOCFLAGS@
+
++JARDIR = $(datadir)/java
++
+ src = @srcdir@/source
+ dst = classes
+ doc = @srcdir@/docs
+@@ -280,7 +282,7 @@
+ find $(dst) -name '*.class' -exec rm -f '{}' ';'
+
+ install-data-local:
+- $(mkinstalldirs) $(prefix)/share/java
+- $(INSTALL_DATA) $(inetlib_jar) $(prefix)/share/java
++ $(mkinstalldirs) $(DESTDIR)/$(JARDIR)
++ $(INSTALL_DATA) $(inetlib_jar) $(DESTDIR)/$(JARDIR)
+
+ # End of Makefile.am
diff --git a/recipes/classpath/inetlib-native_1.1.1.bb b/recipes/classpath/inetlib-native_1.1.1.bb
new file mode 100644
index 0000000..53ee782
--- /dev/null
+++ b/recipes/classpath/inetlib-native_1.1.1.bb
@@ -0,0 +1,3 @@
+require inetlib_${PV}.bb
+
+inherit native
diff --git a/recipes/classpath/inetlib_1.1.1.bb b/recipes/classpath/inetlib_1.1.1.bb
new file mode 100644
index 0000000..1fba4b4
--- /dev/null
+++ b/recipes/classpath/inetlib_1.1.1.bb
@@ -0,0 +1,30 @@
+DESCRIPTION = "A Java library of clients for common internet protocols"
+LICENSE = "GPL + library exception"
+AUTHOR = "GNU Classpath"
+HOMEPAGE = "http://gnu.org/software/classpath/inetlib.html"
+
+SRC_URI = "\
+ http://ftp.gnu.org/gnu/classpath/${BP}.tar.gz \
+ file://datadir_java.patch;patch=1 \
+ "
+
+inherit java-library autotools
+
+DEPENDS = "fastjar-native"
+
+JPN = "libgnuinet-java"
+
+export JAVAC = "javac"
+
+export JAVA = "java"
+
+# We fake this, it is not neccessary anyway.
+export JAVADOC = "true"
+
+do_compile() {
+ oe_runmake JARDIR=${datadir_java} inetlib_jar=${JARFILENAME}
+}
+
+do_install_append() {
+ java_install
+}