diff options
| author | Denys Dmytriyenko <denis@denix.org> | 2009-03-17 14:32:59 -0400 |
|---|---|---|
| committer | Denys Dmytriyenko <denis@denix.org> | 2009-03-17 14:32:59 -0400 |
| commit | 709c4d66e0b107ca606941b988bad717c0b45d9b (patch) | |
| tree | 37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/classpath | |
| parent | fa6cd5a3b993f16c27de4ff82b42684516d433ba (diff) | |
rename packages/ to recipes/ per earlier agreement
See links below for more details:
http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326
http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816
Signed-off-by: Denys Dmytriyenko <denis@denix.org>
Acked-by: Mike Westerhof <mwester@dls.net>
Acked-by: Philip Balister <philip@balister.org>
Acked-by: Khem Raj <raj.khem@gmail.com>
Acked-by: Marcin Juszkiewicz <hrw@openembedded.org>
Acked-by: Koen Kooi <koen@openembedded.org>
Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/classpath')
27 files changed, 1982 insertions, 0 deletions
diff --git a/recipes/classpath/classpath-0.97.2/autotools.patch b/recipes/classpath/classpath-0.97.2/autotools.patch new file mode 100644 index 0000000000..e36e143b5f --- /dev/null +++ b/recipes/classpath/classpath-0.97.2/autotools.patch @@ -0,0 +1,13 @@ +Index: classpath-0.97.2/configure.ac +=================================================================== +--- classpath-0.97.2.orig/configure.ac 2008-06-06 02:58:57.000000000 +0200 ++++ classpath-0.97.2/configure.ac 2008-08-02 00:58:16.537364104 +0200 +@@ -41,6 +41,8 @@ + AC_CONFIG_HEADERS([include/config.h]) + AC_PREFIX_DEFAULT(/usr/local/classpath) + ++AC_CONFIG_MACRO_DIR([m4]) ++ + dnl ----------------------------------------------------------- + dnl Enable collections.jar (disabled by default) + dnl ----------------------------------------------------------- diff --git a/recipes/classpath/classpath-0.97.2/drawpolyline.patch b/recipes/classpath/classpath-0.97.2/drawpolyline.patch new file mode 100644 index 0000000000..407f991306 --- /dev/null +++ b/recipes/classpath/classpath-0.97.2/drawpolyline.patch @@ -0,0 +1,26 @@ +Index: gnu/java/awt/peer/gtk/CairoGraphics2D.java +=================================================================== +RCS file: /sources/classpath/classpath/gnu/java/awt/peer/gtk/CairoGraphics2D.java,v +retrieving revision 1.73 +diff -u -r1.73 CairoGraphics2D.java +--- gnu/java/awt/peer/gtk/CairoGraphics2D.java 8 Feb 2008 22:17:39 -0000 1.73 ++++ gnu/java/awt/peer/gtk/CairoGraphics2D.java 14 Oct 2008 06:50:57 -0000 +@@ -1246,7 +1246,10 @@ + + public void drawPolyline(int[] xPoints, int[] yPoints, int nPoints) + { +- draw(new Polygon(xPoints, yPoints, nPoints)); ++ for (int i = 1; i < nPoints; i++) ++ draw(new Line2D.Double( ++ xPoints[i - 1], yPoints[i - 1], ++ xPoints[i], yPoints[i])); + } + + public void drawOval(int x, int y, int width, int height) +@@ -2171,4 +2174,4 @@ + + return new Rectangle2D.Double(minX, minY, (maxX - minX), (maxY - minY)); + } +-} +\ No newline at end of file ++} diff --git a/recipes/classpath/classpath-0.97.2/gtk-fix.patch b/recipes/classpath/classpath-0.97.2/gtk-fix.patch new file mode 100644 index 0000000000..0addec87ac --- /dev/null +++ b/recipes/classpath/classpath-0.97.2/gtk-fix.patch @@ -0,0 +1,147 @@ +Index: gnu/java/awt/peer/gtk/FreetypeGlyphVector.java +=================================================================== +--- gnu/java/awt/peer/gtk/FreetypeGlyphVector.java.orig 2007-04-12 22:18:09.000000000 +0200 ++++ gnu/java/awt/peer/gtk/FreetypeGlyphVector.java 2008-11-28 18:29:50.000000000 +0100 +@@ -247,7 +247,8 @@ + /** + * Returns the kerning of a glyph pair + */ +- private native Point2D getKerning(int leftGlyph, int rightGlyph, long font); ++ private native void getKerning(int leftGlyph, int rightGlyph, long font, ++ float[] p); + + private native double[] getMetricsNative(int glyphCode, long font); + +@@ -301,6 +302,7 @@ + GlyphMetrics gm = null; + float x = 0; + float y = 0; ++ float[] p = {0.0f, 0.0f}; + for(int i = 0; i < nGlyphs; i++) + { + gm = getGlyphMetrics( i ); +@@ -314,9 +316,9 @@ + // using the same font + if (i != nGlyphs-1 && fontSet[i] == fontSet[i+1]) + { +- Point2D p = getKerning(glyphCodes[i], glyphCodes[i + 1], fontSet[i]); +- x += p.getX(); +- y += p.getY(); ++ getKerning(glyphCodes[i], glyphCodes[i + 1], fontSet[i], p); ++ x += p[0]; ++ y += p[1]; + } + } + glyphPositions[nGlyphs * 2] = x; +Index: include/gnu_java_awt_peer_gtk_FreetypeGlyphVector.h +=================================================================== +--- include/gnu_java_awt_peer_gtk_FreetypeGlyphVector.h.orig 2008-06-06 04:10:00.000000000 +0200 ++++ include/gnu_java_awt_peer_gtk_FreetypeGlyphVector.h 2008-11-28 18:29:50.000000000 +0100 +@@ -13,7 +13,7 @@ + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_FreetypeGlyphVector_dispose (JNIEnv *env, jobject, jlongArray); + JNIEXPORT jlong JNICALL Java_gnu_java_awt_peer_gtk_FreetypeGlyphVector_getNativeFontPointer (JNIEnv *env, jobject, jint); + JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_FreetypeGlyphVector_getGlyphs (JNIEnv *env, jobject, jintArray, jintArray, jlongArray); +-JNIEXPORT jobject JNICALL Java_gnu_java_awt_peer_gtk_FreetypeGlyphVector_getKerning (JNIEnv *env, jobject, jint, jint, jlong); ++JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_FreetypeGlyphVector_getKerning (JNIEnv *env, jobject, jint, jint, jlong, jfloatArray); + JNIEXPORT jdoubleArray JNICALL Java_gnu_java_awt_peer_gtk_FreetypeGlyphVector_getMetricsNative (JNIEnv *env, jobject, jint, jlong); + JNIEXPORT jobject JNICALL Java_gnu_java_awt_peer_gtk_FreetypeGlyphVector_getGlyphOutlineNative (JNIEnv *env, jobject, jint, jlong); + +Index: native/jni/gtk-peer/gnu_java_awt_peer_gtk_FreetypeGlyphVector.c +=================================================================== +--- native/jni/gtk-peer/gnu_java_awt_peer_gtk_FreetypeGlyphVector.c.orig 2007-04-25 16:53:03.000000000 +0200 ++++ native/jni/gtk-peer/gnu_java_awt_peer_gtk_FreetypeGlyphVector.c 2008-11-28 18:29:50.000000000 +0100 +@@ -169,15 +169,13 @@ + (*env)->ReleaseLongArrayElements (env, fonts, fontArray, 0); + } + +-JNIEXPORT jobject JNICALL ++JNIEXPORT void JNICALL + Java_gnu_java_awt_peer_gtk_FreetypeGlyphVector_getKerning +-(JNIEnv *env, jobject obj __attribute__((unused)), jint rightGlyph, jint leftGlyph, jlong fnt) ++ (JNIEnv *env, jobject obj __attribute__((unused)), jint rightGlyph, ++ jint leftGlyph, jlong fnt, jfloatArray p) + { + FT_Face ft_face; + FT_Vector kern; +- jclass cls; +- jmethodID method; +- jvalue values[2]; + PangoFcFont *font; + + font = JLONG_TO_PTR(PangoFcFont, fnt); +@@ -187,12 +185,10 @@ + + pango_fc_font_unlock_face( font ); + +- values[0].d = (jdouble)kern.x/64.0; +- values[1].d = (jdouble)kern.y/64.0; +- +- cls = (*env)->FindClass (env, "java/awt/geom/Point2D$Double"); +- method = (*env)->GetMethodID (env, cls, "<init>", "(DD)V"); +- return (*env)->NewObjectA(env, cls, method, values); ++ jfloat *pelements = (*env)->GetPrimitiveArrayCritical(env, p, NULL); ++ pelements[0] = (jfloat)kern.x/64.0; ++ pelements[1] = (jfloat)kern.y/64.0; ++ (*env)->ReleasePrimitiveArrayCritical (env, p, pelements, 0); + } + + JNIEXPORT jdoubleArray JNICALL +Index: gnu/java/awt/peer/gtk/GtkFileDialogPeer.java +=================================================================== +--- gnu/java/awt/peer/gtk/GtkFileDialogPeer.java.orig 2008-12-01 07:51:00.000000000 +0100 ++++ gnu/java/awt/peer/gtk/GtkFileDialogPeer.java 2008-12-01 07:52:04.000000000 +0100 +@@ -67,7 +67,7 @@ + + FileDialog fd = (FileDialog) awtComponent; + +- nativeSetDirectory(System.getProperty("user.dir")); ++ nativeSetDirectory(System.getProperty("user.dir", ".")); + setDirectory(fd.getDirectory()); + setFile(fd.getFile()); + +@@ -108,18 +108,26 @@ + if (fileName == null || fileName.equals ("")) + { + currentFile = ""; +- nativeSetFile (""); ++ nativeSetFile (new File("").getAbsolutePath()); + return; + } + + // GtkFileChooser requires absolute filenames. If the given filename + // is not absolute, let's construct it based on current directory. + currentFile = fileName; +- if (fileName.indexOf(FS) == 0) ++ File f = new File(fileName); ++ if (f.isAbsolute()) + nativeSetFile(fileName); + else +- nativeSetFile(nativeGetDirectory() + FS + fileName); +- } ++ { ++ // Try with gtk API. ++ String temp = nativeGetDirectory(); ++ if (temp != null) ++ f = new File(temp, fileName); ++ ++ nativeSetFile(f.getAbsolutePath()); ++ } ++} + + public void setDirectory (String directory) + { +Index: native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollPanePeer.c +=================================================================== +--- native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollPanePeer.c.orig 2008-12-01 07:53:00.000000000 +0100 ++++ native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollPanePeer.c 2008-12-01 07:53:17.000000000 +0100 +@@ -58,6 +58,10 @@ + gtkpeer_set_global_ref (env, obj); + + sw = gtk_scrolled_window_new (NULL, NULL); ++ ++ /* Sanitize width and height. gtk+ does not accept anything below -1. */ ++ width = (width < -1 ? 0 : width); ++ height = (height < -1 ? 0 : height); + gtk_widget_set_size_request (sw, width, height); + eventbox = gtk_event_box_new (); + gtk_container_add (GTK_CONTAINER (eventbox), sw); diff --git a/recipes/classpath/classpath-initial_0.93.bb b/recipes/classpath/classpath-initial_0.93.bb new file mode 100644 index 0000000000..84cc55ec33 --- /dev/null +++ b/recipes/classpath/classpath-initial_0.93.bb @@ -0,0 +1,33 @@ +# 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." + +PR = "r6" + +DEPENDS = "zip-native fastjar-native jikes-native gettext-native" + +SRC_URI += "\ + file://autotools.patch;patch=1 \ + file://miscompilation-0.93.patch;patch=1 \ + " + +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 \ + " diff --git a/recipes/classpath/classpath-minimal_0.96.1.bb b/recipes/classpath/classpath-minimal_0.96.1.bb new file mode 100644 index 0000000000..94f8dec610 --- /dev/null +++ b/recipes/classpath/classpath-minimal_0.96.1.bb @@ -0,0 +1,22 @@ +require classpath.inc + +PR = "r7" + +SRC_URI += "\ + file://gjar-prefix-patch.diff;patch=1;pnum=0 \ + file://xmlstream-fix.patch;patch=1;pnum=0 \ + " + +PROVIDES = "${PN} classpath" + +EXTRA_OECONF += "\ + --enable-local-sockets \ + --disable-alsa \ + --disable-gconf-peer \ + --disable-gtk-peer \ + --disable-plugin \ + --disable-dssi \ + --disable-examples \ + " + +CPPACKAGES = "${PBN}-common ${PBN}-tools" diff --git a/recipes/classpath/classpath-minimal_0.97.2.bb b/recipes/classpath/classpath-minimal_0.97.2.bb new file mode 100644 index 0000000000..e03dc85760 --- /dev/null +++ b/recipes/classpath/classpath-minimal_0.97.2.bb @@ -0,0 +1,30 @@ +require classpath.inc + +FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/${PBN}-${PV}" + +SRC_URI += "\ + file://netif_16.patch;patch=1;pnum=0 \ + file://SimpleName.diff;patch=1;pnum=0 \ + file://javanet-local.patch;patch=1;pnum=0 \ + file://ecj_java_dir.patch;patch=1 \ + file://autotools.patch;patch=1 \ + file://decimalformat.patch;patch=1 \ + file://cp-byte-loophelper.patch;patch=1;pnum=0 \ + " + +PR = "r3" + +PROVIDES = "${PN} classpath" + +EXTRA_OECONF += "\ + --enable-local-sockets \ + --disable-alsa \ + --disable-gconf-peer \ + --disable-gtk-peer \ + --disable-plugin \ + --disable-dssi \ + --disable-examples \ + " + +CPPACKAGES = "${PBN}-common ${PBN}-tools" + diff --git a/recipes/classpath/classpath-native.inc b/recipes/classpath/classpath-native.inc new file mode 100644 index 0000000000..bee62fae91 --- /dev/null +++ b/recipes/classpath/classpath-native.inc @@ -0,0 +1,40 @@ +DESCRIPTION = "GNU Classpath standard Java libraries - For native Java-dependent programs" +HOMEPAGE = "http://www.gnu.org/software/classpath/" +LICENSE = "Classpath" + +inherit autotools native + +DEPENDS = "ecj-initial fastjar-native zip-native gettext-native" + +SRC_URI = "${GNU_MIRROR}/classpath/classpath-${PV}.tar.gz" + +do_configure_prepend () { + + cp ${STAGING_DATADIR_NATIVE}/gettext/config.rpath ${S} +} + +export JAVAC="${STAGING_BINDIR_NATIVE}/ecj-initial" +export JAVACFLAGS="-nowarn" + +# Note: the --with-ecj options seems redundant but is +# for compatibility with older classpath versions. +EXTRA_OECONF = "\ + --with-ecj=${STAGING_BINDIR_NATIVE}/ecj-initial \ + --with-glibj \ + --with-fastjar=fastjar \ + --enable-local-sockets \ + --disable-Werror \ + --disable-alsa \ + --disable-gconf-peer \ + --disable-gtk-peer \ + --disable-plugin \ + --disable-dssi \ + --enable-examples \ + --enable-tools \ + --includedir=${STAGING_INCDIR}/classpath \ + --with-vm=java \ + " + +do_stage() { + oe_runmake install +} diff --git a/recipes/classpath/classpath-native_0.96.1.bb b/recipes/classpath/classpath-native_0.96.1.bb new file mode 100644 index 0000000000..2d7ebad76f --- /dev/null +++ b/recipes/classpath/classpath-native_0.96.1.bb @@ -0,0 +1,11 @@ +require classpath-native.inc + +PR = "r4" + +SRC_URI += "\ + file://gjar-prefix-patch.diff;patch=1;pnum=0 \ + file://xmlstream-fix.patch;patch=1;pnum=0 \ + file://getopt-filelist.patch;patch=1;pnum=0 \ + file://sun-security-getproperty_0.96.1.patch;patch=1;pnum=0 \ + " + diff --git a/recipes/classpath/classpath-native_0.97.2.bb b/recipes/classpath/classpath-native_0.97.2.bb new file mode 100644 index 0000000000..0024136b97 --- /dev/null +++ b/recipes/classpath/classpath-native_0.97.2.bb @@ -0,0 +1,32 @@ +require classpath-native.inc + +PR = "r4" + +# The code affected by the javanet-local patch +# is usually not compiled. However if someone changes +# to --enable-local-sockets it will. +SRC_URI += "\ + file://netif_16.patch;patch=1;pnum=0 \ + file://SimpleName.diff;patch=1;pnum=0 \ + file://javanet-local.patch;patch=1;pnum=0 \ + file://sun-security-getproperty_0.96.1.patch;patch=1;pnum=0 \ + file://ecj_java_dir.patch;patch=1 \ + file://autotools.patch;patch=1 \ + file://decimalformat.patch;patch=1 \ + file://cp-byte-loophelper.patch;patch=1;pnum=0 \ + file://miscompilation.patch;patch=1 \ + " + +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 + diff --git a/recipes/classpath/classpath-tools-native.bb b/recipes/classpath/classpath-tools-native.bb new file mode 100644 index 0000000000..df5df33407 --- /dev/null +++ b/recipes/classpath/classpath-tools-native.bb @@ -0,0 +1,7 @@ +# Java recipes which need gjar, gjavah and so on need to depend on this +# recipe. +# This makes sure we not only have the tools' bytecode but also a proper +# interpreter that can run it. +DESCRIPTION = "Provides working jar, javah etc. from the GNU Classpath project" + +DEPENDS = "virtual/java-native classpath-native" diff --git a/recipes/classpath/classpath.inc b/recipes/classpath/classpath.inc new file mode 100644 index 0000000000..da3273bc97 --- /dev/null +++ b/recipes/classpath/classpath.inc @@ -0,0 +1,84 @@ +DESCRIPTION = "GNU Classpath standard Java libraries" +HOMEPAGE = "http://www.gnu.org/software/classpath/" +SECTION = "libs" +PRIORITY = "optional" +LICENSE = "Classpath" +PBN = "classpath" + +DEPENDS = "virtual/javac-native fastjar-native zip-native" +RPROVIDES = "" + +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 \ + " + +inherit autotools + +do_configure_prepend () { + + cp ${STAGING_DATADIR_NATIVE}/gettext/config.rpath ${S} +} + + +do_stage() { + install -d ${STAGING_INCDIR}/classpath + install -m 0644 include/jni.h ${STAGING_INCDIR}/classpath + install -m 0644 include/jni_md.h ${STAGING_INCDIR}/classpath/ + install -m 0644 include/jawt.h ${STAGING_INCDIR}/classpath + install -m 0644 include/jawt_md.h ${STAGING_INCDIR}/classpath/ + + install -d ${STAGING_DATADIR}/classpath + install -m 0644 lib/glibj.zip ${STAGING_DATADIR}/classpath +} + +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/classpath/classpath_0.95.bb b/recipes/classpath/classpath_0.95.bb new file mode 100644 index 0000000000..6952cda72f --- /dev/null +++ b/recipes/classpath/classpath_0.95.bb @@ -0,0 +1,24 @@ +require classpath.inc + +SRC_URI += "\ + file://gjar-prefix-patch.diff;patch=1;pnum=0 \ + file://xmlstream-fix.patch;patch=1;pnum=0 \ + file://javanet-local.patch;patch=1;pnum=0 \ + " + +PR = "r6" + +DEPENDS += "gtk+ gconf libxtst" + +EXTRA_OECONF += "\ + --disable-alsa \ + --disable-dssi \ + --disable-qt4-peer \ + --disable-plugin \ + --enable-gconf-peer \ + --enable-gtk-peer \ + --enable-local-sockets \ + --with-vm=java \ + " + + diff --git a/recipes/classpath/classpath_0.96.1.bb b/recipes/classpath/classpath_0.96.1.bb new file mode 100644 index 0000000000..cc3505a293 --- /dev/null +++ b/recipes/classpath/classpath_0.96.1.bb @@ -0,0 +1,22 @@ +require classpath.inc + +SRC_URI += "\ + file://gjar-prefix-patch.diff;patch=1;pnum=0 \ + file://xmlstream-fix.patch;patch=1;pnum=0 \ + file://javanet-local.patch;patch=1;pnum=0 \ + " + +PR = "r8" + +DEPENDS += "gtk+ gconf libxtst" + +EXTRA_OECONF += "\ + --disable-alsa \ + --disable-dssi \ + --disable-qt4-peer \ + --disable-plugin \ + --enable-gconf-peer \ + --enable-gtk-peer \ + --enable-local-sockets \ + --with-vm=java \ + " diff --git a/recipes/classpath/classpath_0.97.2.bb b/recipes/classpath/classpath_0.97.2.bb new file mode 100644 index 0000000000..1daaa1aa2c --- /dev/null +++ b/recipes/classpath/classpath_0.97.2.bb @@ -0,0 +1,29 @@ +require classpath.inc + +SRC_URI += "\ + file://netif_16.patch;patch=1;pnum=0 \ + file://SimpleName.diff;patch=1;pnum=0 \ + file://javanet-local.patch;patch=1;pnum=0 \ + file://ecj_java_dir.patch;patch=1 \ + file://autotools.patch;patch=1 \ + file://decimalformat.patch;patch=1 \ + file://cp-byte-loophelper.patch;patch=1;pnum=0 \ + file://drawpolyline.patch;patch=1;pnum=0 \ + file://gtk-fix.patch;patch=1;pnum=0 \ + " + +PR = "r8" + +DEPENDS += "gtk+ gconf libxtst" + +EXTRA_OECONF += "\ + --disable-alsa \ + --disable-dssi \ + --disable-qt4-peer \ + --disable-plugin \ + --enable-gconf-peer \ + --enable-gtk-peer \ + --enable-local-sockets \ + --with-vm=java \ + " + diff --git a/recipes/classpath/files/SimpleName.diff b/recipes/classpath/files/SimpleName.diff new file mode 100644 index 0000000000..ff2bec0f1c --- /dev/null +++ b/recipes/classpath/files/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/classpath/files/autotools.patch b/recipes/classpath/files/autotools.patch new file mode 100644 index 0000000000..663c0340cd --- /dev/null +++ b/recipes/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 diff --git a/recipes/classpath/files/cp-byte-loophelper.patch b/recipes/classpath/files/cp-byte-loophelper.patch new file mode 100644 index 0000000000..4fac362cba --- /dev/null +++ b/recipes/classpath/files/cp-byte-loophelper.patch @@ -0,0 +1,68 @@ +Index: gnu/java/nio/charset/ByteDecodeLoopHelper.java +=================================================================== +RCS file: /sources/classpath/classpath/gnu/java/nio/charset/ByteDecodeLoopHelper.java,v +retrieving revision 1.1 +diff -u -r1.1 ByteDecodeLoopHelper.java +--- gnu/java/nio/charset/ByteDecodeLoopHelper.java 23 Nov 2007 16:11:17 -0000 1.1 ++++ gnu/java/nio/charset/ByteDecodeLoopHelper.java 3 Sep 2008 23:11:29 -0000 +@@ -119,6 +119,8 @@ + int inRemaining = in.remaining(); + int outRemaining = out.remaining(); + CoderResult result; ++ ++ bailOut: + if (inRemaining <= outRemaining) + { + for (int i = 0; i < inRemaining; i++) +@@ -129,7 +131,7 @@ + { + inPos--; + result = CoderResult.unmappableForLength(1); +- break; ++ break bailOut; + } + char c = mapToChar(b); + outArray[outPos] = c; +@@ -147,7 +149,7 @@ + { + inPos--; + result = CoderResult.unmappableForLength(1); +- break; ++ break bailOut; + } + char c = mapToChar(b); + outArray[outPos] = c; +Index: gnu/java/nio/charset/ByteEncodeLoopHelper.java +=================================================================== +RCS file: /sources/classpath/classpath/gnu/java/nio/charset/ByteEncodeLoopHelper.java,v +retrieving revision 1.1 +diff -u -r1.1 ByteEncodeLoopHelper.java +--- gnu/java/nio/charset/ByteEncodeLoopHelper.java 23 Nov 2007 16:11:17 -0000 1.1 ++++ gnu/java/nio/charset/ByteEncodeLoopHelper.java 3 Sep 2008 23:11:29 -0000 +@@ -120,6 +120,8 @@ + int inRemaining = in.remaining(); + int outRemaining = out.remaining(); + CoderResult result; ++ ++ bailOut: + if (inRemaining <= outRemaining) + { + for (int i = 0; i < inRemaining; i++) +@@ -130,7 +132,7 @@ + { + inPos--; + result = CoderResult.unmappableForLength(1); +- break; ++ break bailOut; + } + byte b = mapToByte(inChar); + outArray[outPos] = b; +@@ -148,7 +150,7 @@ + { + inPos--; + result = CoderResult.unmappableForLength(1); +- break; ++ break bailOut |
