diff options
author | glewis <glewis@FreeBSD.org> | 2008-02-22 15:52:48 +0000 |
---|---|---|
committer | glewis <glewis@FreeBSD.org> | 2008-02-22 15:52:48 +0000 |
commit | c3f11547dee4bac0a091462c49170ade15a319bb (patch) | |
tree | 6030bac8f1c7fc04d64957d8460aaf5db9bbb91f /java/eclipse-devel | |
parent | 5e223e73232e7730dc563e5bc22c59ddf3caec7c (diff) | |
download | FreeBSD-ports-c3f11547dee4bac0a091462c49170ade15a319bb.zip FreeBSD-ports-c3f11547dee4bac0a091462c49170ade15a319bb.tar.gz |
. Fix a crash caused by the "Open File" dialogue.
Submitted by: Pieter de Goeje <pieter@degoeje.nl>
Diffstat (limited to 'java/eclipse-devel')
-rw-r--r-- | java/eclipse-devel/Makefile | 3 | ||||
-rw-r--r-- | java/eclipse-devel/files/post-patch-plugins-swt-gtk-swt-FileDialog.java | 38 |
2 files changed, 40 insertions, 1 deletions
diff --git a/java/eclipse-devel/Makefile b/java/eclipse-devel/Makefile index 2c2d358..6bd855a 100644 --- a/java/eclipse-devel/Makefile +++ b/java/eclipse-devel/Makefile @@ -7,7 +7,7 @@ PORTNAME= eclipse-devel PORTVERSION= 3.3.1 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= java devel MASTER_SITES= ${MASTER_SITE_ECLIPSE} MASTER_SITE_SUBDIR= R-${PORTVERSION}-200709211145 @@ -107,6 +107,7 @@ post-patch: @${PATCH} ${PATCH_DIST_ARGS} "${SWTMOZ}/gtk/org/eclipse/swt/browser/MozillaDelegate.java" ${FILESDIR}/post-patch-plugins-swt-mozilla-gtk-swt-browser-MozillaDelegate.java @${PATCH} ${PATCH_DIST_ARGS} "${SWTGTK}/gtk/org/eclipse/swt/internal/gtk/OS.java" ${FILESDIR}/post-patch-plugins-swt-gtk-swt-internal-gtk-OS.java @${PATCH} ${PATCH_DIST_ARGS} "${SWTGTK}/gtk/library/os.c" ${FILESDIR}/post-patch-plugins-swt-gtk-library-os.c + @${PATCH} ${PATCH_DIST_ARGS} "${WRKSRC}/plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FileDialog.java" ${FILESDIR}/post-patch-plugins-swt-gtk-swt-FileDialog.java @${REINPLACE_CMD} -e 's|%%GECKO%%|${GECKO}|g' \ "${WRKSRC}/plugins/org.eclipse.swt/Eclipse SWT PI/gtk/library/build.sh" \ diff --git a/java/eclipse-devel/files/post-patch-plugins-swt-gtk-swt-FileDialog.java b/java/eclipse-devel/files/post-patch-plugins-swt-gtk-swt-FileDialog.java new file mode 100644 index 0000000..3d3e5bf --- /dev/null +++ b/java/eclipse-devel/files/post-patch-plugins-swt-gtk-swt-FileDialog.java @@ -0,0 +1,38 @@ +$FreeBSD$ + +--- plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FileDialog.java.orig 2007-09-21 18:58:07.000000000 +0200 ++++ plugins/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FileDialog.java 2008-02-05 20:49:58.000000000 +0100 +@@ -378,29 +378,29 @@ + stringBuffer.append ('.'); + } + byte [] buffer = Converter.wcsToMbcs (null, stringBuffer.toString (), true); ++ byte [] bufspc = new byte[1024]; + /* + * Bug in GTK. GtkFileChooser may crash on GTK versions 2.4.10 to 2.6 + * when setting a file name that is not a true canonical path. + * The fix is to use the canonical path. + */ +- int /*long*/ ptr = OS.realpath (buffer, null); ++ int /*long*/ ptr = OS.realpath (buffer, bufspc); + if (ptr != 0) { + OS.gtk_file_chooser_set_filename (handle, ptr); +- OS.g_free (ptr); + } + } else { + if (fileName.length () > 0) { + if (fileName.charAt (0) == SEPARATOR) { + byte [] buffer = Converter.wcsToMbcs (null, fileName, true); ++ byte [] bufspc = new byte[1024]; + /* + * Bug in GTK. GtkFileChooser may crash on GTK versions 2.4.10 to 2.6 + * when setting a file name that is not a true canonical path. + * The fix is to use the canonical path. + */ +- int /*long*/ ptr = OS.realpath (buffer, null); ++ int /*long*/ ptr = OS.realpath (buffer, bufspc); + if (ptr != 0) { + OS.gtk_file_chooser_set_filename (handle, ptr); +- OS.g_free (ptr); + } + } + } |