From 57e069cde6617f00ca8834a82c6f360af43d5067 Mon Sep 17 00:00:00 2001 From: Henning Heinold Date: Sat, 12 Nov 2011 20:58:34 +0100 Subject: 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 --- .../classpath/classpath-0.98/SimpleName.diff | 66 +++ .../classpath/classpath-0.98/ecj_java_dir.patch | 37 ++ .../classpath/classpath-0.98/fix-gmp.patch | 19 + .../classpath/classpath-0.98/javanet-local.patch | 37 ++ .../classpath/classpath-0.98/miscompilation.patch | 13 + .../classpath-0.98/sun-security-getproperty.patch | 503 +++++++++++++++++++++ .../classpath-0.98/toolwrapper-exithook.patch | 46 ++ .../classpath-initial-0.93/miscompilation.patch | 13 + recipes-core/classpath/classpath-initial_0.93.bb | 37 ++ recipes-core/classpath/classpath-native.inc | 34 ++ recipes-core/classpath/classpath-native_0.98.bb | 29 ++ recipes-core/classpath/classpath.inc | 86 ++++ recipes-core/classpath/classpath_0.98.bb | 13 + recipes-core/classpath/files/autotools.patch | 24 + 14 files changed, 957 insertions(+) create mode 100644 recipes-core/classpath/classpath-0.98/SimpleName.diff create mode 100644 recipes-core/classpath/classpath-0.98/ecj_java_dir.patch create mode 100644 recipes-core/classpath/classpath-0.98/fix-gmp.patch create mode 100644 recipes-core/classpath/classpath-0.98/javanet-local.patch create mode 100644 recipes-core/classpath/classpath-0.98/miscompilation.patch create mode 100644 recipes-core/classpath/classpath-0.98/sun-security-getproperty.patch create mode 100644 recipes-core/classpath/classpath-0.98/toolwrapper-exithook.patch create mode 100644 recipes-core/classpath/classpath-initial-0.93/miscompilation.patch create mode 100644 recipes-core/classpath/classpath-initial_0.93.bb create mode 100644 recipes-core/classpath/classpath-native.inc create mode 100644 recipes-core/classpath/classpath-native_0.98.bb create mode 100644 recipes-core/classpath/classpath.inc create mode 100644 recipes-core/classpath/classpath_0.98.bb create mode 100644 recipes-core/classpath/files/autotools.patch (limited to 'recipes-core/classpath') diff --git a/recipes-core/classpath/classpath-0.98/SimpleName.diff b/recipes-core/classpath/classpath-0.98/SimpleName.diff new file mode 100644 index 0000000..ff2bec0 --- /dev/null +++ b/recipes-core/classpath/classpath-0.98/SimpleName.diff @@ -0,0 +1,66 @@ +Index: vm/reference/java/lang/VMClass.java +=================================================================== +RCS file: /sources/classpath/classpath/vm/reference/java/lang/VMClass.java,v +retrieving revision 1.20 +diff -u -r1.20 VMClass.java +--- vm/reference/java/lang/VMClass.java 18 Sep 2007 21:52:38 -0000 1.20 ++++ vm/reference/java/lang/VMClass.java 19 Apr 2008 15:19:00 -0000 +@@ -296,27 +296,43 @@ + */ + static String getSimpleName(Class klass) + { ++ int arrayCount = 0; ++ while (klass.isArray()) ++ { ++ klass = klass.getComponentType(); ++ ++arrayCount; ++ } ++ // now klass is the component type ++ ++ String simpleComponentName = null; + if (isAnonymousClass(klass)) +- return ""; +- if (isArray(klass)) + { +- return getComponentType(klass).getSimpleName() + "[]"; ++ simpleComponentName = ""; + } +- String fullName = getName(klass); +- int pos = fullName.lastIndexOf("$"); +- if (pos == -1) +- pos = 0; + else + { +- ++pos; +- while (Character.isDigit(fullName.charAt(pos))) +- ++pos; ++ String fullName = getName(klass); ++ int pos = fullName.lastIndexOf("$"); ++ if (pos != -1) ++ { //inner class or local class ++ // skip digits of local classes ++ while (Character.isDigit(fullName.charAt(pos+1))) ++ pos++; ++ } ++ else ++ { ++ pos = fullName.lastIndexOf("."); ++ } ++ simpleComponentName = fullName.substring(pos+1); + } +- int packagePos = fullName.lastIndexOf(".", pos); +- if (packagePos == -1) +- return fullName.substring(pos); +- else +- return fullName.substring(packagePos + 1); ++ ++ if (arrayCount == 0) ++ return simpleComponentName; ++ ++ StringBuffer sb = new StringBuffer(simpleComponentName); ++ while (arrayCount-- > 0) ++ sb.append("[]"); ++ return sb.toString(); + } + + /** diff --git a/recipes-core/classpath/classpath-0.98/ecj_java_dir.patch b/recipes-core/classpath/classpath-0.98/ecj_java_dir.patch new file mode 100644 index 0000000..1455a24 --- /dev/null +++ b/recipes-core/classpath/classpath-0.98/ecj_java_dir.patch @@ -0,0 +1,37 @@ +Index: classpath-0.98/lib/gen-classlist.sh.in +=================================================================== +--- classpath-0.98.orig/lib/gen-classlist.sh.in 2010-06-24 21:18:02.776819217 +0200 ++++ classpath-0.98/lib/gen-classlist.sh.in 2010-06-24 21:18:35.625566191 +0200 +@@ -148,4 +148,7 @@ + done + fi + ++# hack for javac that uses -d and do not make the directories ++@AWK@ -F " " '{print $1}' classes.1 | uniq | awk -F " " '{system("mkdir -p " $0)}' ++ + exit 0 +Index: classpath-0.98/tools/Makefile.am +=================================================================== +--- classpath-0.98.orig/tools/Makefile.am 2010-06-24 21:18:02.783479881 +0200 ++++ classpath-0.98/tools/Makefile.am 2010-06-24 21:20:04.925557253 +0200 +@@ -323,6 +323,8 @@ + endif + ## Compile ASM separately as it is latin-1 encoded. + find $(srcdir)/external/asm -name '*.java' -print > asm.lst ++ @AWK@ -F "/" '{OFS=FS;gsub("/"$$2"/"$$3,"",$$0);gsub("/"$$NF,"",$$0); print $$0}' asm.lst | \ ++ sort | uniq | @AWK@ -F " " '{system("mkdir -p asm/" $$0)}' + AC=`echo $(JCOMPILER) | sed -e 's/UTF-8/ISO-8859-1/g'`; \ + $$AC -g -d asm @asm.lst + find $(srcdir)/gnu/classpath/tools \ +@@ -334,7 +336,10 @@ + $(srcdir)/sun/rmi/rmic \ + $(GJDOC_EX) \ + -name '*.java' -print > classes.lst +- $(JCOMPILER) -g -d classes @classes.lst ++ @AWK@ -F "/" '{OFS=FS;gsub("/"$$NF,"",$$0); print $$0}' classes.lst | \ ++ sort | uniq | @AWK@ -F " " '{system("mkdir -p classes/" $$0)}' ++ BC=`echo $(JCOMPILER) | sed -e 's/UTF-8/ISO-8859-1/g'`; \ ++ $$BC -g -d classes @classes.lst + cat classes.lst asm.lst > all-classes.lst + ## Copy over tools resource files. + @list=`cd $(srcdir)/resource && find gnu/classpath/tools com/sun/tools/javac \ diff --git a/recipes-core/classpath/classpath-0.98/fix-gmp.patch b/recipes-core/classpath/classpath-0.98/fix-gmp.patch new file mode 100644 index 0000000..3f0dfbe --- /dev/null +++ b/recipes-core/classpath/classpath-0.98/fix-gmp.patch @@ -0,0 +1,19 @@ +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- classpath-0.98.orig/configure.ac ++++ classpath-0.98/configure.ac +@@ -766,11 +766,11 @@ if test "x${COMPILE_JNI}" = xyes; then + dnl __gmpz_mul_si for earlier versions (>= 3.1). + dnl IMPORTANT: if you decide to look for __gmpz_combit, don't forget to + dnl change the name of the corresponding ac_ variable on lines 860... + if test "x${COMPILE_GMP}" = xyes; then + AC_CHECK_LIB(gmp, __gmpz_mul_si, +- [GMP_CFLAGS=-I/usr/include ++ [GMP_CFLAGS= + GMP_LIBS=-lgmp ], + [GMP_CFLAGS= + GMP_LIBS= ]) + AC_SUBST(GMP_CFLAGS) + AC_SUBST(GMP_LIBS) diff --git a/recipes-core/classpath/classpath-0.98/javanet-local.patch b/recipes-core/classpath/classpath-0.98/javanet-local.patch new file mode 100644 index 0000000..b8d1584 --- /dev/null +++ b/recipes-core/classpath/classpath-0.98/javanet-local.patch @@ -0,0 +1,37 @@ +Index: native/jni/java-net/local.c +=================================================================== +RCS file: /sources/classpath/classpath/native/jni/java-net/local.c,v +retrieving revision 1.4 +diff -u -r1.4 local.c +--- native/jni/java-net/local.c 17 Apr 2007 21:46:27 -0000 1.4 ++++ native/jni/java-net/local.c 27 Jun 2008 13:14:40 -0000 +@@ -73,27 +73,18 @@ + return socket (PF_UNIX, stream ? SOCK_STREAM : SOCK_DGRAM, 0); + } + +-static int gcc_sucks = 0; +- + int + local_bind (int fd, const char *addr) + { + struct sockaddr_un saddr; + +- /* For some reason, GCC 4.0.1 on Darwin/x86 MODIFIES the `addr' +- pointer in the CALLER's STACK FRAME after calling this function, +- but if we add this statement below, it doesn't! */ +- if (gcc_sucks) +- fprintf (stderr, "bind %p\n", addr); +- +- if (strlen (addr) > sizeof (saddr.sun_path)) ++ if (strlen (addr) >= sizeof (saddr.sun_path)) + { + errno = ENAMETOOLONG; + return -1; + } + +- strncpy (saddr.sun_path, addr, sizeof (saddr.sun_path)); +- saddr.sun_path[sizeof (saddr.sun_path)] = '\0'; ++ strcpy (saddr.sun_path, addr); + saddr.sun_family = AF_LOCAL; + + return bind (fd, (struct sockaddr *) &saddr, SUN_LEN (&saddr)); diff --git a/recipes-core/classpath/classpath-0.98/miscompilation.patch b/recipes-core/classpath/classpath-0.98/miscompilation.patch new file mode 100644 index 0000000..c61b214 --- /dev/null +++ b/recipes-core/classpath/classpath-0.98/miscompilation.patch @@ -0,0 +1,13 @@ +Index: classpath-0.97.2/native/jni/java-io/java_io_VMFile.c +=================================================================== +--- classpath-0.97.2.orig/native/jni/java-io/java_io_VMFile.c 2008-10-10 15:24:54.000000000 +0200 ++++ classpath-0.97.2/native/jni/java-io/java_io_VMFile.c 2008-10-10 15:25:36.000000000 +0200 +@@ -439,7 +439,7 @@ + { + #ifndef WITHOUT_FILESYSTEM + const char *filename; +- int result; ++ volatile int result; + + /* Don't use the JCL convert function because it throws an exception + on failure */ diff --git a/recipes-core/classpath/classpath-0.98/sun-security-getproperty.patch b/recipes-core/classpath/classpath-0.98/sun-security-getproperty.patch new file mode 100644 index 0000000..fb9cd9d --- /dev/null +++ b/recipes-core/classpath/classpath-0.98/sun-security-getproperty.patch @@ -0,0 +1,503 @@ +Index: gnu/classpath/debug/Simple1LineFormatter.java +=================================================================== +--- gnu/classpath/debug/Simple1LineFormatter.java.orig 2006-07-11 18:03:59.000000000 +0200 ++++ gnu/classpath/debug/Simple1LineFormatter.java 2009-03-19 19:00:47.000000000 +0100 +@@ -38,8 +38,6 @@ + + package gnu.classpath.debug; + +-import gnu.java.security.action.GetPropertyAction; +- + import java.io.PrintWriter; + import java.io.StringWriter; + import java.security.AccessController; +@@ -51,6 +49,8 @@ + import java.util.logging.Formatter; + import java.util.logging.LogRecord; + ++import sun.security.action.GetPropertyAction; ++ + /** + * A simple 1-line formatter to use instead of the 2-line SimpleFormatter used + * by default in the JDK logging handlers. +Index: gnu/classpath/debug/SystemLogger.java +=================================================================== +--- gnu/classpath/debug/SystemLogger.java.orig 2006-12-10 21:25:41.000000000 +0100 ++++ gnu/classpath/debug/SystemLogger.java 2009-03-19 19:00:47.000000000 +0100 +@@ -38,13 +38,13 @@ + + package gnu.classpath.debug; + +-import gnu.java.security.action.GetPropertyAction; +- + import java.security.AccessController; + import java.util.StringTokenizer; + import java.util.logging.Level; + import java.util.logging.Logger; + ++import sun.security.action.GetPropertyAction; ++ + public final class SystemLogger extends Logger + { + public static final SystemLogger SYSTEM = new SystemLogger(); +Index: gnu/java/security/PolicyFile.java +=================================================================== +--- gnu/java/security/PolicyFile.java.orig 2008-06-16 00:07:30.000000000 +0200 ++++ gnu/java/security/PolicyFile.java 2009-03-19 19:01:31.000000000 +0100 +@@ -41,7 +41,6 @@ + import gnu.classpath.debug.SystemLogger; + + import gnu.java.lang.CPStringBuilder; +-import gnu.java.security.action.GetPropertyAction; + + import java.io.File; + import java.io.IOException; +@@ -74,6 +73,8 @@ + import java.util.StringTokenizer; + import java.util.logging.Logger; + ++import sun.security.action.GetPropertyAction; ++ + /** + * An implementation of a {@link java.security.Policy} object whose + * permissions are specified by a policy file. +Index: gnu/java/security/action/GetPropertyAction.java +=================================================================== +--- gnu/java/security/action/GetPropertyAction.java 2006-12-10 21:25:42.000000000 +0100 ++++ /dev/null 1970-01-01 00:00:00.000000000 +0000 +@@ -1,89 +0,0 @@ +-/* GetPropertyAction.java +- Copyright (C) 2004 Free Software Foundation, Inc. +- +-This file is part of GNU Classpath. +- +-GNU Classpath is free software; you can redistribute it and/or modify +-it under the terms of the GNU General Public License as published by +-the Free Software Foundation; either version 2, or (at your option) +-any later version. +- +-GNU Classpath is distributed in the hope that it will be useful, but +-WITHOUT ANY WARRANTY; without even the implied warranty of +-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-General Public License for more details. +- +-You should have received a copy of the GNU General Public License +-along with GNU Classpath; see the file COPYING. If not, write to the +-Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +-02110-1301 USA. +- +-Linking this library statically or dynamically with other modules is +-making a combined work based on this library. Thus, the terms and +-conditions of the GNU General Public License cover the whole +-combination. +- +-As a special exception, the copyright holders of this library give you +-permission to link this library with independent modules to produce an +-executable, regardless of the license terms of these independent +-modules, and to copy and distribute the resulting executable under +-terms of your choice, provided that you also meet, for each linked +-independent module, the terms and conditions of the license of that +-module. An independent module is a module which is not derived from +-or based on this library. If you modify this library, you may extend +-this exception to your version of the library, but you are not +-obligated to do so. If you do not wish to do so, delete this +-exception statement from your version. */ +- +-package gnu.java.security.action; +- +-import java.security.PrivilegedAction; +- +-/** +- * PrivilegedAction implementation that calls System.getProperty() with +- * the property name passed to its constructor. +- * +- * Example of use: +- * +- * GetPropertyAction action = new GetPropertyAction("http.proxyPort"); +- * String port = AccessController.doPrivileged(action); +- * +- */ +-public class GetPropertyAction implements PrivilegedAction +-{ +- String name; +- String value = null; +- +- public GetPropertyAction() +- { +- } +- +- public GetPropertyAction(String propName) +- { +- setParameters(propName); +- } +- +- public GetPropertyAction(String propName, String defaultValue) +- { +- setParameters(propName, defaultValue); +- } +- +- public String run() +- { +- return System.getProperty(name, value); +- } +- +- public GetPropertyAction setParameters(String propName) +- { +- this.name = propName; +- this.value = null; +- return this; +- } +- +- public GetPropertyAction setParameters(String propName, String defaultValue) +- { +- this.name = propName; +- this.value = defaultValue; +- return this; +- } +-} +Index: gnu/java/security/key/dss/DSSKey.java +=================================================================== +--- gnu/java/security/key/dss/DSSKey.java.orig 2008-03-16 23:04:49.000000000 +0100 ++++ gnu/java/security/key/dss/DSSKey.java 2009-03-19 19:00:47.000000000 +0100 +@@ -41,7 +41,6 @@ + import gnu.java.lang.CPStringBuilder; + + import gnu.java.security.Registry; +-import gnu.java.security.action.GetPropertyAction; + import gnu.java.security.util.FormatUtil; + + import java.math.BigInteger; +@@ -51,6 +50,8 @@ + import java.security.interfaces.DSAParams; + import java.security.spec.DSAParameterSpec; + ++import sun.security.action.GetPropertyAction; ++ + /** + * A base asbtract class for both public and private DSS (Digital Signature + * Standard) keys. It encapsulates the three DSS numbers: p, +Index: gnu/java/security/key/dss/DSSPrivateKey.java +=================================================================== +--- gnu/java/security/key/dss/DSSPrivateKey.java.orig 2008-03-16 23:04:49.000000000 +0100 ++++ gnu/java/security/key/dss/DSSPrivateKey.java 2009-03-19 19:00:47.000000000 +0100 +@@ -42,7 +42,6 @@ + + import gnu.java.security.Configuration; + import gnu.java.security.Registry; +-import gnu.java.security.action.GetPropertyAction; + import gnu.java.security.key.IKeyPairCodec; + + import java.math.BigInteger; +@@ -50,6 +49,8 @@ + import java.security.PrivateKey; + import java.security.interfaces.DSAPrivateKey; + ++import sun.security.action.GetPropertyAction; ++ + /** + * An object that embodies a DSS (Digital Signature Standard) private key. + * +Index: gnu/java/security/key/dss/DSSPublicKey.java +=================================================================== +--- gnu/java/security/key/dss/DSSPublicKey.java.orig 2008-03-16 23:04:49.000000000 +0100 ++++ gnu/java/security/key/dss/DSSPublicKey.java 2009-03-19 19:00:47.000000000 +0100 +@@ -41,7 +41,6 @@ + import gnu.java.lang.CPStringBuilder; + + import gnu.java.security.Registry; +-import gnu.java.security.action.GetPropertyAction; + import gnu.java.security.key.IKeyPairCodec; + + import java.math.BigInteger; +@@ -49,6 +48,8 @@ + import java.security.PublicKey; + import java.security.interfaces.DSAPublicKey; + ++import sun.security.action.GetPropertyAction; ++ + /** + * An object that embodies a DSS (Digital Signature Standard) public key. + * +Index: gnu/java/security/key/rsa/GnuRSAKey.java +=================================================================== +--- gnu/java/security/key/rsa/GnuRSAKey.java.orig 2008-03-16 23:04:49.000000000 +0100 ++++ gnu/java/security/key/rsa/GnuRSAKey.java 2009-03-19 19:00:47.000000000 +0100 +@@ -41,7 +41,6 @@ + import gnu.java.lang.CPStringBuilder; + + import gnu.java.security.Registry; +-import gnu.java.security.action.GetPropertyAction; + import gnu.java.security.util.FormatUtil; + + import java.math.BigInteger; +@@ -49,6 +48,8 @@ + import java.security.Key; + import java.security.interfaces.RSAKey; + ++import sun.security.action.GetPropertyAction; ++ + /** + * A base asbtract class for both public and private RSA keys. + */ +Index: gnu/java/security/key/rsa/GnuRSAPrivateKey.java +=================================================================== +--- gnu/java/security/key/rsa/GnuRSAPrivateKey.java.orig 2008-03-16 23:04:50.000000000 +0100 ++++ gnu/java/security/key/rsa/GnuRSAPrivateKey.java 2009-03-19 19:00:47.000000000 +0100 +@@ -41,7 +41,6 @@ + import gnu.java.lang.CPStringBuilder; + + import gnu.java.security.Configuration; +-import gnu.java.security.action.GetPropertyAction; + import gnu.java.security.Registry; + import gnu.java.security.key.IKeyPairCodec; + +@@ -51,6 +50,8 @@ + import java.security.interfaces.RSAPrivateCrtKey; + import java.security.interfaces.RSAPrivateKey; + ++import sun.security.action.GetPropertyAction; ++ + /** + * An object that embodies an RSA private key. + *

+Index: gnu/java/security/key/rsa/GnuRSAPublicKey.java +=================================================================== +--- gnu/java/security/key/rsa/GnuRSAPublicKey.java.orig 2008-03-16 23:04:50.000000000 +0100 ++++ gnu/java/security/key/rsa/GnuRSAPublicKey.java 2009-03-19 19:00:47.000000000 +0100 +@@ -41,7 +41,6 @@ + import gnu.java.lang.CPStringBuilder; + + import gnu.java.security.Registry; +-import gnu.java.security.action.GetPropertyAction; + import gnu.java.security.key.IKeyPairCodec; + + import java.math.BigInteger; +@@ -49,6 +48,8 @@ + import java.security.PublicKey; + import java.security.interfaces.RSAPublicKey; + ++import sun.security.action.GetPropertyAction; ++ + /** + * An object that encapsulates an RSA public key. + *

+Index: gnu/javax/crypto/key/dh/GnuDHKey.java +=================================================================== +--- gnu/javax/crypto/key/dh/GnuDHKey.java.orig 2006-07-11 18:03:59.000000000 +0200 ++++ gnu/javax/crypto/key/dh/GnuDHKey.java 2009-03-19 19:00:47.000000000 +0100 +@@ -39,7 +39,6 @@ + package gnu.javax.crypto.key.dh; + + import gnu.java.security.Registry; +-import gnu.java.security.action.GetPropertyAction; + import gnu.java.security.util.FormatUtil; + + import java.math.BigInteger; +@@ -49,6 +48,8 @@ + import javax.crypto.interfaces.DHKey; + import javax.crypto.spec.DHParameterSpec; + ++import sun.security.action.GetPropertyAction; ++ + /** + * A base asbtract class for both public and private Diffie-Hellman keys. It + * encapsulates the two DH numbers: p, and g. +Index: gnu/javax/crypto/key/dh/GnuDHPrivateKey.java +=================================================================== +--- gnu/javax/crypto/key/dh/GnuDHPrivateKey.java.orig 2006-07-11 18:03:59.000000000 +0200 ++++ gnu/javax/crypto/key/dh/GnuDHPrivateKey.java 2009-03-19 19:00:47.000000000 +0100 +@@ -40,7 +40,6 @@ + + import gnu.java.security.Configuration; + import gnu.java.security.Registry; +-import gnu.java.security.action.GetPropertyAction; + import gnu.java.security.key.IKeyPairCodec; + + import java.math.BigInteger; +@@ -48,6 +47,8 @@ + + import javax.crypto.interfaces.DHPrivateKey; + ++import sun.security.action.GetPropertyAction; ++ + /** + * An implementation of the Diffie-Hellman private key. + *

+Index: gnu/javax/crypto/key/dh/GnuDHPublicKey.java +=================================================================== +--- gnu/javax/crypto/key/dh/GnuDHPublicKey.java.orig 2006-07-11 18:03:59.000000000 +0200 ++++ gnu/javax/crypto/key/dh/GnuDHPublicKey.java 2009-03-19 19:00:47.000000000 +0100 +@@ -39,7 +39,6 @@ + package gnu.javax.crypto.key.dh; + + import gnu.java.security.Registry; +-import gnu.java.security.action.GetPropertyAction; + import gnu.java.security.key.IKeyPairCodec; + + import java.math.BigInteger; +@@ -47,6 +46,8 @@ + + import javax.crypto.interfaces.DHPublicKey; + ++import sun.security.action.GetPropertyAction; ++ + /** + * An implementation of the Diffie-Hellman public key. + *

+Index: gnu/javax/crypto/sasl/plain/PasswordFile.java +=================================================================== +--- gnu/javax/crypto/sasl/plain/PasswordFile.java.orig 2008-05-05 23:29:46.000000000 +0200 ++++ gnu/javax/crypto/sasl/plain/PasswordFile.java 2009-03-19 19:00:47.000000000 +0100 +@@ -40,7 +40,6 @@ + + import gnu.java.lang.CPStringBuilder; + +-import gnu.java.security.action.GetPropertyAction; + import gnu.javax.crypto.sasl.NoSuchUserException; + import gnu.javax.crypto.sasl.UserAlreadyExistsException; + +@@ -58,6 +57,8 @@ + import java.util.NoSuchElementException; + import java.util.StringTokenizer; + ++import sun.security.action.GetPropertyAction; ++ + /** + * A representation of a Plain password file. + */ +Index: gnu/javax/net/ssl/provider/X509TrustManagerFactory.java +=================================================================== +--- gnu/javax/net/ssl/provider/X509TrustManagerFactory.java.orig 2006-12-10 21:25:43.000000000 +0100 ++++ gnu/javax/net/ssl/provider/X509TrustManagerFactory.java 2009-03-19 19:00:47.000000000 +0100 +@@ -66,11 +66,12 @@ + import javax.net.ssl.TrustManagerFactorySpi; + import javax.net.ssl.X509TrustManager; + +-import gnu.java.security.action.GetPropertyAction; + import gnu.java.security.x509.X509CertPath; + import gnu.javax.net.ssl.NullManagerParameters; + import gnu.javax.net.ssl.StaticTrustAnchors; + ++import sun.security.action.GetPropertyAction; ++ + /** + * This class implements a {@link javax.net.ssl.TrustManagerFactory} engine + * for the ``JessieX509'' algorithm. +Index: gnu/xml/aelfred2/XmlParser.java +=================================================================== +--- gnu/xml/aelfred2/XmlParser.java.orig 2008-01-11 22:22:59.000000000 +0100 ++++ gnu/xml/aelfred2/XmlParser.java 2009-03-19 19:00:47.000000000 +0100 +@@ -53,8 +53,6 @@ + + package gnu.xml.aelfred2; + +-import gnu.java.security.action.GetPropertyAction; +- + import java.io.BufferedInputStream; + import java.io.CharConversionException; + import java.io.EOFException; +@@ -74,6 +72,7 @@ + import org.xml.sax.InputSource; + import org.xml.sax.SAXException; + ++import sun.security.action.GetPropertyAction; + + /** + * Parse XML documents and return parse events through call-backs. +Index: sun/security/action/GetPropertyAction.java +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ sun/security/action/GetPropertyAction.java 2009-03-19 19:00:47.000000000 +0100 +@@ -0,0 +1,92 @@ ++/* GetPropertyAction.java ++ Copyright (C) 2004, 2008 Free Software Foundation, Inc. ++ ++This file is part of GNU Classpath. ++ ++GNU Classpath is free software; you can redistribute it and/or modify ++it under the terms of the GNU General Public License as published by ++the Free Software Foundation; either version 2, or (at your option) ++any later version. ++ ++GNU Classpath is distributed in the hope that it will be useful, but ++WITHOUT ANY WARRANTY; without even the implied warranty of ++MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++General Public License for more details. ++ ++You should have received a copy of the GNU General Public License ++along with GNU Classpath; see the file COPYING. If not, write to the ++Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA ++02110-1301 USA. ++ ++Linking this library statically or dynamically with other modules is ++making a combined work based on this library. Thus, the terms and ++conditions of the GNU General Public License cover the whole ++combination. ++ ++As a special exception, the copyright holders of this library give you ++permission to link this library with independent modules to produce an ++executable, regardless of the license terms of these independent ++modules, and to copy and distribute the resulting executable under ++terms of your choice, provided that you also meet, for each linked ++independent module, the terms and conditions of the license of that ++module. An independent module is a module which is not derived from ++or based on this library. If you modify this library, you may extend ++this exception to your version of the library, but you are not ++obligated to do so. If you do not wish to do so, delete this ++exception statement from your version. */ ++ ++package sun.security.action; ++ ++import java.security.PrivilegedAction; ++ ++/** ++ * PrivilegedAction implementation that calls System.getProperty() with ++ * the property name passed to its constructor. ++ * ++ * Example of use: ++ * ++ * GetPropertyAction action = new GetPropertyAction("http.proxyPort"); ++ * String port = AccessController.doPrivileged(action); ++ * ++ * ++ * Note: Usage of this class is discouraged as it is not a part of the ++ * J2SE API. ++ */ ++public class GetPropertyAction implements PrivilegedAction ++{ ++ String name; ++ String value = null; ++ ++ public GetPropertyAction() ++ { ++ } ++ ++ public GetPropertyAction(String propName) ++ { ++ setParameters(propName); ++ } ++ ++ public GetPropertyAction(String propName, String defaultValue) ++ { ++ setParameters(propName, defaultValue); ++ } ++ ++ public String run() ++ { ++ return System.getProperty(name, value); ++ } ++ ++ public GetPropertyAction setParameters(String propName) ++ { ++ this.name = propName; ++ this.value = null; ++ return this; ++ } ++ ++ public GetPropertyAction setParameters(String propName, String defaultValue) ++ { ++ this.name = propName; ++ this.value = defaultValue; ++ return this; ++ } ++} diff --git a/recipes-core/classpath/classpath-0.98/toolwrapper-exithook.patch b/recipes-core/classpath/classpath-0.98/toolwrapper-exithook.patch new file mode 100644 index 0000000..49b6631 --- /dev/null +++ b/recipes-core/classpath/classpath-0.98/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-core/classpath/classpath-initial-0.93/miscompilation.patch b/recipes-core/classpath/classpath-initial-0.93/miscompilation.patch new file mode 100644 index 0000000..99db6f3 --- /dev/null +++ b/recipes-core/classpath/classpath-initial-0.93/miscompilation.patch @@ -0,0 +1,13 @@ +Index: classpath-0.93/native/jni/java-io/java_io_VMFile.c +=================================================================== +--- classpath-0.93.orig/native/jni/java-io/java_io_VMFile.c 2006-09-23 07:17:45.000000000 +0200 ++++ classpath-0.93/native/jni/java-io/java_io_VMFile.c 2008-11-14 13:41:27.000000000 +0100 +@@ -239,7 +239,7 @@ + { + #ifndef WITHOUT_FILESYSTEM + const char *filename; +- int result; ++ volatile int result; + + /* Don't use the JCL convert function because it throws an exception + on failure */ diff --git a/recipes-core/classpath/classpath-initial_0.93.bb b/recipes-core/classpath/classpath-initial_0.93.bb new file mode 100644 index 0000000..77831c1 --- /dev/null +++ b/recipes-core/classpath/classpath-initial_0.93.bb @@ -0,0 +1,37 @@ +# No later version of Classpath may be used because this is the latest that can be compiled +# by jikes! + +require classpath-native.inc + +DESCRIPTION="Java1.4-compatible GNU Classpath variant that is used as bootclasspath for jikes-native." +LIC_FILES_CHKSUM = "file://COPYING;md5=af0004801732bc4b20d90f351cf80510" + +DEPENDS = "zip-native fastjar-native jikes-native gettext-native" + +SRC_URI += " \ + file://autotools.patch \ + file://miscompilation.patch \ + " + +EXTRA_OECONF = " \ + --with-jikes=jikes \ + --with-fastjar=fastjar \ + --with-glibj \ + --disable-Werror \ + --disable-local-sockets \ + --disable-alsa \ + --disable-gconf-peer \ + --disable-gtk-peer \ + --disable-plugin \ + --disable-dssi \ + --disable-examples \ + --disable-tools \ + --with-glibj-dir=${STAGING_DATADIR_NATIVE}/classpath-initial \ + --with-native-libdir=${STAGING_LIBDIR_NATIVE}/classpath-initial \ + --includedir=${STAGING_INCDIR_NATIVE}/classpath-initial \ + --with-vm=java \ + " + +SRC_URI[md5sum] = "ffa9e9cac31c5acbf0ea9eff9efa923d" +SRC_URI[sha256sum] = "df2d093612abd23fe67e9409d89bb2a8e79b1664fe2b2da40e1c8ed693e32945" + diff --git a/recipes-core/classpath/classpath-native.inc b/recipes-core/classpath/classpath-native.inc new file mode 100644 index 0000000..aefbf6d --- /dev/null +++ b/recipes-core/classpath/classpath-native.inc @@ -0,0 +1,34 @@ +DESCRIPTION = "GNU Classpath standard Java libraries - For native Java-dependent programs" +HOMEPAGE = "http://www.gnu.org/software/classpath/" +LICENSE = "Classpath" + +DEPENDS = "ecj-initial fastjar-native zip-native gettext-native" + +inherit autotools native + +SRC_URI = "${GNU_MIRROR}/classpath/classpath-${PV}.tar.gz" + +do_configure_prepend () { + + cp ${STAGING_DATADIR_NATIVE}/gettext/config.rpath ${S} +} + +export JAVA="${STAGING_BINDIR_NATIVE}/java-initial" +export JAVAC="${STAGING_BINDIR_NATIVE}/ecj-initial" +export JAVACFLAGS="-nowarn" + +EXTRA_OECONF = " \ + --with-glibj \ + --enable-local-sockets \ + --disable-Werror \ + --disable-alsa \ + --disable-gconf-peer \ + --disable-gtk-peer \ + --disable-plugin \ + --disable-dssi \ + --disable-gjdoc \ + --disable-examples \ + --enable-tools \ + --includedir=${STAGING_INCDIR}/classpath \ + " + diff --git a/recipes-core/classpath/classpath-native_0.98.bb b/recipes-core/classpath/classpath-native_0.98.bb new file mode 100644 index 0000000..55022fb --- /dev/null +++ b/recipes-core/classpath/classpath-native_0.98.bb @@ -0,0 +1,29 @@ +require classpath-native.inc + +LIC_FILES_CHKSUM = "file://COPYING;md5=af0004801732bc4b20d90f351cf80510" + +SRC_URI += " \ + file://SimpleName.diff;striplevel=0 \ + file://sun-security-getproperty.patch;striplevel=0 \ + file://ecj_java_dir.patch \ + file://autotools.patch \ + file://miscompilation.patch \ + file://toolwrapper-exithook.patch \ + " + +do_unpackpost() { + # Kind of patch: Moves package "org.w3c.dom.html2" to "org.w3c.dom.html" + mv external/w3c_dom/org/w3c/dom/html2 \ + external/w3c_dom/org/w3c/dom/html + + find examples/gnu/classpath/examples/html gnu/xml/dom/html2 external/w3c_dom/org/w3c/dom/html -name "*.java" \ + -exec sed -i -e"s|org.w3c.dom.html2|org.w3c.dom.html|" {} \; + + sed -i -e"s|org/w3c/dom/html2|org/w3c/dom/html|" external/w3c_dom/Makefile.am +} + +addtask unpackpost after do_unpack before do_patch + +SRC_URI[md5sum] = "90c6571b8b0309e372faa0f9f6255ea9" +SRC_URI[sha256sum] = "501b5acd4dff79b6100da22cef15080f31071821ce3cea6f1b739bc1b56fac3f" + diff --git a/recipes-core/classpath/classpath.inc b/recipes-core/classpath/classpath.inc new file mode 100644 index 0000000..dfe4a68 --- /dev/null +++ b/recipes-core/classpath/classpath.inc @@ -0,0 +1,86 @@ +DESCRIPTION = "GNU Classpath standard Java libraries" +HOMEPAGE = "http://www.gnu.org/software/classpath/" +SECTION = "libs" +PRIORITY = "optional" +LICENSE = "Classpath" +PBN = "classpath" + + +inherit autotools java + +DEPENDS = "virtual/javac-native fastjar-native zip-native gettext-native gmp antlr-native gtk+ gconf libxtst" + +RPROVIDES_${PN} = "" + +RDEPENDS_${PN} = "${PBN}-common (>= ${PV})" +RDEPENDS_${PN}-examples = "java2-runtime ${PN}-awt" +RDEPENDS_${PN}-tools = "java2-runtime" + +RPROVIDES_${PN} = "${PBN}" +RPROVIDES_${PN}-common = "${PBN}-common" +RPROVIDES_${PN}-gtk = "${PBN}-awt" + +SRC_URI = "${GNU_MIRROR}/classpath/classpath-${PV}.tar.gz" + +S = "${WORKDIR}/${PBN}-${PV}" + +export JAVA = "java" + +EXTRA_OECONF = "\ + --with-glibj \ + --with-ecj=javac \ + --with-fastjar=fastjar \ + --includedir=${includedir}/classpath \ + --with-vm=java \ + --disable-Werror \ + --with-antlr-jar=${STAGING_DATADIR_JAVA_NATIVE}/antlr.jar \ + --disable-alsa \ + --disable-dssi \ + --disable-qt4-peer \ + --disable-plugin \ + --enable-gconf-peer \ + --enable-gtk-peer \ + --enable-local-sockets \ + --with-vm=java \ + " + + +EXTRA_OECONF += "\ + " + +do_configure_prepend () { + cp ${STAGING_DATADIR_NATIVE}/gettext/config.rpath ${S} +} + + +do_install() { + autotools_do_install + mv ${D}${libdir}/security ${D}${libdir}/${PBN} +} + +# Defines the packages that this classpath recipe creates. +# This allows the classpath-minimal variants to override this +# again. +CPPACKAGES = "${PBN}-common ${PN}-examples \ + ${PN}-tools ${PN}-tools-doc \ + ${PN}-gtk ${PN}-gconf" + +PACKAGES =+ "${CPPACKAGES}" + +FILES_${PN}-dev += "${libdir}/${PBN}/*.la ${incdir}/${PBN}" + +FILES_${PBN}-common = "${datadir}/${PBN}/glibj.zip ${libdir}/logging.properties ${libdir}/${PBN}/security" +FILES_${PN}-examples = "${datadir}/${PBN}/examples" + +FILES_${PN}-tools = "${datadir}/${PBN}/tools.zip ${bindir}" +FILES_${PN}-tools-doc = "${mandir}" + +FILES_${PN}-dbg += "${libdir}/${PBN}/.debug" +FILES_${PN}-doc = "${infodir}" + +# gcjwebplugin - not built yet +#FILES_${PN}-gcjwebplugin = "${libdir}/${PBN}/libgcjwebplugin.so" +FILES_${PN}-gtk = "${libdir}/${PBN}/libgtkpeer.so ${libdir}/${PBN}/libjawt.so" +FILES_${PN}-gconf = "${libdir}/${PBN}/libgconfpeer.so" +FILES_${PN} = "${libdir}/${PBN}/lib*so*" + diff --git a/recipes-core/classpath/classpath_0.98.bb b/recipes-core/classpath/classpath_0.98.bb new file mode 100644 index 0000000..21223c9 --- /dev/null +++ b/recipes-core/classpath/classpath_0.98.bb @@ -0,0 +1,13 @@ +require classpath.inc + +SRC_URI += " \ + file://SimpleName.diff;striplevel=0 \ + file://ecj_java_dir.patch \ + file://autotools.patch \ + file://fix-gmp.patch \ + file://toolwrapper-exithook.patch \ + " + +SRC_URI[md5sum] = "90c6571b8b0309e372faa0f9f6255ea9" +SRC_URI[sha256sum] = "501b5acd4dff79b6100da22cef15080f31071821ce3cea6f1b739bc1b56fac3f" + diff --git a/recipes-core/classpath/files/autotools.patch b/recipes-core/classpath/files/autotools.patch new file mode 100644 index 0000000..663c034 --- /dev/null +++ b/recipes-core/classpath/files/autotools.patch @@ -0,0 +1,24 @@ +Index: classpath-0.93/configure.ac +=================================================================== +--- classpath-0.93.orig/configure.ac 2006-12-08 20:22:50.000000000 +0100 ++++ classpath-0.93/configure.ac 2008-08-25 22:07:40.711946598 +0200 +@@ -41,6 +41,11 @@ + AC_CONFIG_HEADERS([include/config.h]) + AC_PREFIX_DEFAULT(/usr/local/classpath) + ++AC_CONFIG_MACRO_DIR([m4]) ++ ++ ++AM_ICONV_LINK ++ + dnl ----------------------------------------------------------- + dnl Enable collections.jar (disabled by default) + dnl ----------------------------------------------------------- +@@ -312,6 +317,7 @@ + dnl AC_PROG_AWK + AC_PROG_CC + AC_PROG_CPP ++AM_PROG_CC_C_O + + # Handle -Werror default case. + if test "$ENABLE_WERROR" = default; then -- cgit v1.2.3-54-g00ecf