summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-java/java-gnome')
-rw-r--r--dev-java/java-gnome/ChangeLog9
-rw-r--r--dev-java/java-gnome/files/java-gnome-4.0.9-crashfix.patch173
-rw-r--r--dev-java/java-gnome/java-gnome-4.0.9-r1.ebuild (renamed from dev-java/java-gnome/java-gnome-4.0.9.ebuild)6
3 files changed, 186 insertions, 2 deletions
diff --git a/dev-java/java-gnome/ChangeLog b/dev-java/java-gnome/ChangeLog
index 9d9cf6b22c47..56f50360f905 100644
--- a/dev-java/java-gnome/ChangeLog
+++ b/dev-java/java-gnome/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for dev-java/java-gnome
# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-java/java-gnome/ChangeLog,v 1.72 2008/10/14 00:56:24 ken69267 Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-java/java-gnome/ChangeLog,v 1.73 2008/12/27 08:13:11 serkan Exp $
+
+*java-gnome-4.0.9-r1 (27 Dec 2008)
+
+ 27 Dec 2008; Serkan Kaba <serkan@gentoo.org>
+ +files/java-gnome-4.0.9-crashfix.patch, -java-gnome-4.0.9.ebuild,
+ +java-gnome-4.0.9-r1.ebuild:
+ Revbump to backport fix for crash in TextMark. See GNOME bug #565745.
14 Oct 2008; Kenneth Prugh <ken69267@gentoo.org> java-gnome-4.0.9.ebuild:
Fix multilib-strict
diff --git a/dev-java/java-gnome/files/java-gnome-4.0.9-crashfix.patch b/dev-java/java-gnome/files/java-gnome-4.0.9-crashfix.patch
new file mode 100644
index 000000000000..74b86b61e70e
--- /dev/null
+++ b/dev-java/java-gnome/files/java-gnome-4.0.9-crashfix.patch
@@ -0,0 +1,173 @@
+=== modified file 'src/bindings/org/gnome/gtk/GtkWindowOverride.c'
+--- src/bindings/org/gnome/gtk/GtkWindowOverride.c 2007-11-13 05:08:42 +0000
++++ src/bindings/org/gnome/gtk/GtkWindowOverride.c 2008-12-27 04:02:05 +0000
+@@ -59,7 +59,7 @@
+ )
+ {
+ if (DEBUG_MEMORY_MANAGEMENT) {
+- g_print("mem: delete caught for\t\t%ld\n", (long) object);
++ g_printerr("mem: delete caught for\t\t%s\n", bindings_java_memory_pointerToString(object));
+ }
+ gtk_widget_hide(object);
+
+@@ -102,7 +102,7 @@
+ )
+ {
+ if (DEBUG_MEMORY_MANAGEMENT) {
+- g_print("mem: hide caught for\t\t%ld\n", (long) widget);
++ g_printerr("mem: hide caught for\t\t%s\n", bindings_java_memory_pointerToString(widget));
+ }
+ gdk_threads_add_timeout_full(G_PRIORITY_LOW, 100, window_hide_deref, widget, NULL);
+ }
+@@ -123,7 +123,7 @@
+ )
+ {
+ if (DEBUG_MEMORY_MANAGEMENT) {
+- g_print("mem: show caught for\t\t%ld\n", (long) widget);
++ g_printerr("mem: show caught for\t\t%s\n", bindings_java_memory_pointerToString(widget));
+ }
+ g_object_ref(widget);
+ }
+
+=== modified file 'src/jni/bindings_java_memory.c'
+--- src/jni/bindings_java_memory.c 2008-04-06 08:23:22 +0000
++++ src/jni/bindings_java_memory.c 2008-12-27 04:02:05 +0000
+@@ -65,7 +65,7 @@
+ * GObject, and remove strong Java reference
+ */
+ if (DEBUG_MEMORY_MANAGEMENT) {
+- g_print("mem: toggle Java ref to WEAK\t%s\n", bindings_java_memory_pointerToString(object));
++ g_printerr("mem: toggle Java ref to WEAK\t%s\n", bindings_java_memory_pointerToString(object));
+ }
+ weak = (*env)->NewWeakGlobalRef(env, ref);
+ g_object_set_data(object, REFERENCE, weak);
+@@ -77,7 +77,7 @@
+ * replaced it with a strong one.
+ */
+ if (DEBUG_MEMORY_MANAGEMENT) {
+- g_print("mem: toggle Java ref to STRONG\t%s\n", bindings_java_memory_pointerToString(object));
++ g_printerr("mem: toggle Java ref to STRONG\t%s\n", bindings_java_memory_pointerToString(object));
+ }
+
+ strong = (*env)->NewGlobalRef(env, ref);
+@@ -109,7 +109,7 @@
+
+
+ if (DEBUG_MEMORY_MANAGEMENT) {
+- g_print("mem: drop GObject ref\t\t%s\n", bindings_java_memory_pointerToString(object));
++ g_printerr("mem: drop GObject ref\t\t%s\n", bindings_java_memory_pointerToString(object));
+ }
+ g_object_unref(object);
+ return FALSE;
+@@ -145,7 +145,7 @@
+ */
+
+ if (DEBUG_MEMORY_MANAGEMENT) {
+- g_print("mem: add STRONG Java ref\t%s\n", bindings_java_memory_pointerToString(object));
++ g_printerr("mem: add STRONG Java ref\t%s\n", bindings_java_memory_pointerToString(object));
+ }
+ strong = (*env)->NewGlobalRef(env, target);
+ g_object_set_data(object, REFERENCE, strong);
+@@ -189,12 +189,23 @@
+ )
+ {
+ if (DEBUG_MEMORY_MANAGEMENT) {
+- g_print("mem: remove toggle ref for\t%s\n", bindings_java_memory_pointerToString(object));
++ g_printerr("mem: remove toggle ref for\t%s\n", bindings_java_memory_pointerToString(object));
+ }
+
+ g_object_remove_toggle_ref(object, bindings_java_toggle, NULL);
+ }
+
++/**
++ * Ensure we properly own a GObject.
++ *
++ * This is really important. The aggregate result ensures that we own one Ref
++ * count to the object - no more, no less - which we can then turn into a
++ * ToggleRef. It needs to be called anywhere we are preparing to create a
++ * Proxy.
++ */
++/*
++ * TODO This needs a better name
++ */
+ void
+ bindings_java_memory_cleanup
+ (
+@@ -217,7 +228,7 @@
+ if (owner) {
+ if (G_IS_INITIALLY_UNOWNED(object) && g_object_is_floating(object)) {
+ if (DEBUG_MEMORY_MANAGEMENT) {
+- g_print("mem: sink GObject ref\t\t%s\n", bindings_java_memory_pointerToString(object));
++ g_printerr("mem: sink GObject ref\t\t%s\n", bindings_java_memory_pointerToString(object));
+ }
+ g_object_ref_sink(object);
+ }
+@@ -227,7 +238,7 @@
+ * Object constructor assumes we actually own the object.
+ */
+ if (DEBUG_MEMORY_MANAGEMENT) {
+- g_print("mem: added extra ref for\t%s\n", bindings_java_memory_pointerToString(object));
++ g_printerr("mem: added extra ref for\t%s\n", bindings_java_memory_pointerToString(object));
+ }
+ g_object_ref(object);
+ }
+@@ -240,7 +251,7 @@
+ */
+ if (owner) {
+ if (DEBUG_MEMORY_MANAGEMENT) {
+- g_print("mem: remove ref for\t%s\n", bindings_java_memory_pointerToString(object));
++ g_printerr("mem: remove ref for\t%s\n", bindings_java_memory_pointerToString(object));
+ }
+ g_object_unref(object);
+ }
+
+=== modified file 'src/jni/bindings_java_signal.c'
+--- src/jni/bindings_java_signal.c 2008-08-05 04:11:54 +0000
++++ src/jni/bindings_java_signal.c 2008-12-27 03:13:14 +0000
+@@ -97,13 +97,14 @@
+
+ jstring _str;
+ gchar* str;
++ GObject* obj;
+
+ /*
+ * Begin marshaller by downcasting the GClosure we got.
+ */
+
+ bjc = (BindingsJavaClosure*) closure;
+-
++
+ /*
+ * Get the JNIEnv interface pointer
+ */
+@@ -131,12 +132,12 @@
+ */
+
+ jargs = g_newa(jvalue, n_param_values + 1);
+-
++
+ jargs[0].l = bjc->handler;
+-
++
+ for(i = 0; i < n_param_values; i++) {
+- type = G_VALUE_TYPE(&param_values[i]);
+- switch(G_TYPE_FUNDAMENTAL(type)) {
++ type = G_VALUE_TYPE(&param_values[i]);
++ switch(G_TYPE_FUNDAMENTAL(type)) {
+ case G_TYPE_CHAR:
+ jargs[i+1].c = g_value_get_char(&param_values[i]);
+ break;
+@@ -193,8 +194,10 @@
+ * address across the boundary to be looked up and
+ * either an existing Proxy returned or a new Proxy
+ * created.
+- */
+- jargs[i+1].j = (jlong) g_value_get_object(&param_values[i]);
++ */
++ obj = g_value_get_object(&param_values[i]);
++ bindings_java_memory_cleanup(obj, FALSE);
++ jargs[i+1].j = (jlong) obj;
+ break;
+
+ case G_TYPE_BOXED:
+
diff --git a/dev-java/java-gnome/java-gnome-4.0.9.ebuild b/dev-java/java-gnome/java-gnome-4.0.9-r1.ebuild
index 6f318e693c6d..b05407b3bf0a 100644
--- a/dev-java/java-gnome/java-gnome-4.0.9.ebuild
+++ b/dev-java/java-gnome/java-gnome-4.0.9-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-java/java-gnome/java-gnome-4.0.9.ebuild,v 1.2 2008/10/14 00:56:24 ken69267 Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-java/java-gnome/java-gnome-4.0.9-r1.ebuild,v 1.1 2008/12/27 08:13:11 serkan Exp $
EAPI=2
JAVA_PKG_IUSE="doc examples source"
@@ -37,6 +37,10 @@ RESTRICT="test"
S="${WORKDIR}/${MY_P}"
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-crashfix.patch
+}
+
src_configure() {
# Handwritten in perl so not using econf
./configure prefix=/usr libdir=/usr/$(get_libdir)/${PN}-${SLOT} jardir=/usr/share/${PN}-${SLOT}/lib || die