pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc ruby-gnome2-glib, ruby-gnome2-gtk: pull u...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/edc2e7ac4e0a
branches:  trunk
changeset: 306941:edc2e7ac4e0a
user:      tsutsui <tsutsui%pkgsrc.org@localhost>
date:      Sun Apr 29 15:36:44 2018 +0000
description:
ruby-gnome2-glib, ruby-gnome2-gtk: pull upstream fixes for issue #1162.

Fixes crashes on mikutter.
Bump PKGREVISIONs.

diffstat:

 devel/ruby-gnome2-glib/Makefile                                  |    3 +-
 devel/ruby-gnome2-glib/buildlink3.mk                             |    4 +-
 devel/ruby-gnome2-glib/distinfo                                  |   10 +-
 devel/ruby-gnome2-glib/patches/patch-ext_glib2_glib2.def         |   16 +
 devel/ruby-gnome2-glib/patches/patch-ext_glib2_rbglib.h          |   17 +
 devel/ruby-gnome2-glib/patches/patch-ext_glib2_rbgobj__binding.c |   23 +
 devel/ruby-gnome2-glib/patches/patch-ext_glib2_rbgobj__closure.c |   48 ++
 devel/ruby-gnome2-glib/patches/patch-ext_glib2_rbgobj__object.c  |  176 ++++++++++
 devel/ruby-gnome2-glib/patches/patch-ext_glib2_rbgobject.c       |  114 ++++++
 devel/ruby-gnome2-glib/patches/patch-ext_glib2_rbgobject.h       |   28 +
 devel/ruby-gnome2-glib/patches/patch-ext_glib2_rbgprivate.h      |   22 +
 x11/ruby-gnome2-gtk/Makefile                                     |    4 +-
 x11/ruby-gnome2-gtk/buildlink3.mk                                |    4 +-
 x11/ruby-gnome2-gtk/distinfo                                     |    5 +-
 x11/ruby-gnome2-gtk/patches/patch-ext_gtk2_rbgtkliststore.c      |   27 +
 x11/ruby-gnome2-gtk/patches/patch-ext_gtk2_rbgtktreestore.c      |   27 +
 x11/ruby-gnome2-gtk/patches/patch-ext_gtk2_rbgtktreeviewcolumn.c |   27 +
 17 files changed, 546 insertions(+), 9 deletions(-)

diffs (truncated from 667 to 300 lines):

diff -r 8f71a19ab30f -r edc2e7ac4e0a devel/ruby-gnome2-glib/Makefile
--- a/devel/ruby-gnome2-glib/Makefile   Sun Apr 29 14:58:48 2018 +0000
+++ b/devel/ruby-gnome2-glib/Makefile   Sun Apr 29 15:36:44 2018 +0000
@@ -1,8 +1,9 @@
-# $NetBSD: Makefile,v 1.30 2018/02/21 16:59:59 jperkin Exp $
+# $NetBSD: Makefile,v 1.31 2018/04/29 15:36:44 tsutsui Exp $
 #
 
 DISTNAME=              glib2-${VERSION}
 PKGNAME=               ${RUBY_PKGPREFIX}-gnome2-glib-${VERSION}
+PKGREVISION=           1
 COMMENT=               Ruby binding of GLib-2.x
 CATEGORIES=            devel
 
diff -r 8f71a19ab30f -r edc2e7ac4e0a devel/ruby-gnome2-glib/buildlink3.mk
--- a/devel/ruby-gnome2-glib/buildlink3.mk      Sun Apr 29 14:58:48 2018 +0000
+++ b/devel/ruby-gnome2-glib/buildlink3.mk      Sun Apr 29 15:36:44 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink3.mk,v 1.11 2014/03/14 12:45:49 obache Exp $
+# $NetBSD: buildlink3.mk,v 1.12 2018/04/29 15:36:44 tsutsui Exp $
 
 BUILDLINK_TREE+=       ruby-gnome2-glib
 
@@ -6,7 +6,7 @@
 RUBY_GNOME2_GLIB_BUILDLINK3_MK:=
 
 BUILDLINK_API_DEPENDS.ruby-gnome2-glib+=       ${RUBY_PKGPREFIX}-gnome2-glib>=0.17.0
-BUILDLINK_ABI_DEPENDS.ruby-gnome2-glib+=       ${RUBY_PKGPREFIX}-gnome2-glib>=2.2.0
+BUILDLINK_ABI_DEPENDS.ruby-gnome2-glib+=       ${RUBY_PKGPREFIX}-gnome2-glib>=2.2.4nb1
 BUILDLINK_PKGSRCDIR.ruby-gnome2-glib?=         ../../devel/ruby-gnome2-glib
 
 .include "../../devel/glib2/buildlink3.mk"
diff -r 8f71a19ab30f -r edc2e7ac4e0a devel/ruby-gnome2-glib/distinfo
--- a/devel/ruby-gnome2-glib/distinfo   Sun Apr 29 14:58:48 2018 +0000
+++ b/devel/ruby-gnome2-glib/distinfo   Sun Apr 29 15:36:44 2018 +0000
@@ -1,6 +1,14 @@
-$NetBSD: distinfo,v 1.14 2018/04/13 16:31:09 tsutsui Exp $
+$NetBSD: distinfo,v 1.15 2018/04/29 15:36:44 tsutsui Exp $
 
 SHA1 (glib2-3.2.4.gem) = a1aa0ea0d88fe241825daee9f2a7e9a444cb60fe
 RMD160 (glib2-3.2.4.gem) = f6b6da60e27bf9ebaee6757d0fa7df01b9dcb73e
 SHA512 (glib2-3.2.4.gem) = d766787ad15ead3f0b8ff0a334fd0a8df5b6ea719fee36aa5c3aa38273d1e4ccfb1ceab4564b0c01e597a413a8e49009adf70a6ac27b930465a9aa7d8b033418
 Size (glib2-3.2.4.gem) = 142336 bytes
+SHA1 (patch-ext_glib2_glib2.def) = 9f6e593c494930e28c683689d7438d14333377b8
+SHA1 (patch-ext_glib2_rbglib.h) = 97a9088fb749f0985d415ee068eceb1e78237661
+SHA1 (patch-ext_glib2_rbgobj__binding.c) = 1c6459564d08d86570ad631dbd95b20f9ff22ba5
+SHA1 (patch-ext_glib2_rbgobj__closure.c) = 6655f9a2e49f8bfd1eb0ec2208ab566d5d13b02e
+SHA1 (patch-ext_glib2_rbgobj__object.c) = c0099a33d3805d2137b1f76f8050bb1c075bfefa
+SHA1 (patch-ext_glib2_rbgobject.c) = 5e81544395ee1dc543ab5cf926ea19d1ade89431
+SHA1 (patch-ext_glib2_rbgobject.h) = 8023d86bc2d119f83d37c27e7686f6a55816616c
+SHA1 (patch-ext_glib2_rbgprivate.h) = 9cad0b23a174b500a940d5d1fa4d66a6aeac3566
diff -r 8f71a19ab30f -r edc2e7ac4e0a devel/ruby-gnome2-glib/patches/patch-ext_glib2_glib2.def
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/ruby-gnome2-glib/patches/patch-ext_glib2_glib2.def  Sun Apr 29 15:36:44 2018 +0000
@@ -0,0 +1,16 @@
+$NetBSD: patch-ext_glib2_glib2.def,v 1.1 2018/04/29 15:36:44 tsutsui Exp $
+
+- pull upstream fix for issue #1162
+
+--- ext/glib2/glib2.def.orig   2018-04-29 15:03:29.000000000 +0000
++++ ext/glib2/glib2.def
+@@ -61,6 +61,9 @@ EXPORTS
+       rbgobj_class_init_func
+       rbgobj_register_type
+       rbgobj_object_alloc_func
++      rbgobj_object_add_relative
++      rbgobj_object_remove_relative
++      rbgobj_object_remove_relatives
+       rbgobj_set_signal_func
+       rbgobj_get_signal_func
+       rbgobj_set_signal_call_func
diff -r 8f71a19ab30f -r edc2e7ac4e0a devel/ruby-gnome2-glib/patches/patch-ext_glib2_rbglib.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/ruby-gnome2-glib/patches/patch-ext_glib2_rbglib.h   Sun Apr 29 15:36:44 2018 +0000
@@ -0,0 +1,17 @@
+$NetBSD: patch-ext_glib2_rbglib.h,v 1.1 2018/04/29 15:36:44 tsutsui Exp $
+
+- pull upstream fix for issue #1162
+
+--- ext/glib2/rbglib.h.orig    2018-04-29 15:03:29.000000000 +0000
++++ ext/glib2/rbglib.h
+@@ -46,6 +46,10 @@ extern "C" {
+ #  endif
+ #endif
+ 
++#ifndef RB_ALLOC
++#  define RB_ALLOC(type) ALLOC(type)
++#endif
++
+ #ifndef RB_ALLOC_N
+ #  define RB_ALLOC_N(type, n) ALLOC_N(type, n)
+ #endif
diff -r 8f71a19ab30f -r edc2e7ac4e0a devel/ruby-gnome2-glib/patches/patch-ext_glib2_rbgobj__binding.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/ruby-gnome2-glib/patches/patch-ext_glib2_rbgobj__binding.c  Sun Apr 29 15:36:44 2018 +0000
@@ -0,0 +1,23 @@
+$NetBSD: patch-ext_glib2_rbgobj__binding.c,v 1.1 2018/04/29 15:36:44 tsutsui Exp $
+
+- pull upstream fix for issue #1162
+
+--- ext/glib2/rbgobj_binding.c.orig    2018-04-29 15:03:30.000000000 +0000
++++ ext/glib2/rbgobj_binding.c
+@@ -28,7 +28,15 @@
+ static VALUE
+ rg_unbind(VALUE self)
+ {
+-    g_binding_unbind(_SELF(self));
++    GBinding *binding = _SELF(self);
++    GObject *source;
++    VALUE rb_source;
++
++    source = g_binding_get_source(binding);
++    rb_source = GOBJ2RVAL(source);
++    rbgobj_object_remove_relative(rb_source, self);
++    g_binding_unbind(binding);
++
+     return self;
+ }
+ #endif
diff -r 8f71a19ab30f -r edc2e7ac4e0a devel/ruby-gnome2-glib/patches/patch-ext_glib2_rbgobj__closure.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/ruby-gnome2-glib/patches/patch-ext_glib2_rbgobj__closure.c  Sun Apr 29 15:36:44 2018 +0000
@@ -0,0 +1,48 @@
+$NetBSD: patch-ext_glib2_rbgobj__closure.c,v 1.1 2018/04/29 15:36:44 tsutsui Exp $
+
+- pull upstream fix for issue #1162
+
+--- ext/glib2/rbgobj_closure.c.orig    2018-04-29 15:03:30.000000000 +0000
++++ ext/glib2/rbgobj_closure.c
+@@ -1,6 +1,6 @@
+ /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
+ /*
+- *  Copyright (C) 2011-2016  Ruby-GNOME2 Project Team
++ *  Copyright (C) 2011-2018  Ruby-GNOME2 Project Team
+  *  Copyright (C) 2002-2006  Ruby-GNOME2 Project
+  *  Copyright (C) 2002,2003  Masahiro Sakai
+  *
+@@ -191,8 +191,9 @@ rclosure_invalidate(G_GNUC_UNUSED gpoint
+         for (next = rclosure->objects; next; next = next->next) {
+             GObject *object = G_OBJECT(next->data);
+             VALUE obj = rbgobj_ruby_object_from_instance2(object, FALSE);
+-            if (!NIL_P(rclosure->rb_holder) && !NIL_P(obj))
+-                G_REMOVE_RELATIVE(obj, id_closures, rclosure->rb_holder);
++            if (!NIL_P(rclosure->rb_holder) && !NIL_P(obj)) {
++                rbgobj_object_remove_relative(obj, rclosure->rb_holder);
++            }
+         }
+ 
+         rclosure_unref(rclosure);
+@@ -286,16 +287,15 @@ rclosure_weak_notify(gpointer data, GObj
+ void
+ g_rclosure_attach(GClosure *closure, VALUE object)
+ {
+-    static VALUE mGLibObject = (VALUE)NULL;
++    static VALUE cGLibObject = Qnil;
+     GRClosure *rclosure = (GRClosure *)closure;
+ 
+-    G_RELATIVE2(object, Qnil, id_closures, rclosure->rb_holder);
+-
+-    if (!mGLibObject) {
+-        mGLibObject = rb_const_get(mGLib, rb_intern("Object"));
++    if (NIL_P(cGLibObject)) {
++        cGLibObject = rb_const_get(mGLib, rb_intern("Object"));
+     }
+-    if (rb_obj_is_kind_of(object, mGLibObject)) {
++    if (rb_obj_is_kind_of(object, cGLibObject)) {
+         GObject *gobject;
++        rbgobj_object_add_relative(object, rclosure->rb_holder);
+         gobject = RVAL2GOBJ(object);
+         rclosure->count++;
+         g_object_weak_ref(gobject, rclosure_weak_notify, rclosure);
diff -r 8f71a19ab30f -r edc2e7ac4e0a devel/ruby-gnome2-glib/patches/patch-ext_glib2_rbgobj__object.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/ruby-gnome2-glib/patches/patch-ext_glib2_rbgobj__object.c   Sun Apr 29 15:36:44 2018 +0000
@@ -0,0 +1,176 @@
+$NetBSD: patch-ext_glib2_rbgobj__object.c,v 1.1 2018/04/29 15:36:44 tsutsui Exp $
+
+- pull upstream fix for issue #1162
+
+--- ext/glib2/rbgobj_object.c.orig     2018-04-29 15:03:30.000000000 +0000
++++ ext/glib2/rbgobj_object.c
+@@ -43,7 +43,8 @@ weak_notify(gpointer data, G_GNUC_UNUSED
+     gobj_holder *holder = data;
+ 
+     rbgobj_instance_call_cinfo_free(holder->gobj);
+-    rbgobj_invalidate_relatives(holder->self);
++    g_hash_table_unref(holder->rb_relatives);
++    holder->rb_relatives = NULL;
+     holder->destroyed = TRUE;
+ 
+     g_object_unref(holder->gobj);
+@@ -51,11 +52,24 @@ weak_notify(gpointer data, G_GNUC_UNUSED
+ }
+ 
+ static void
++holder_relatives_mark(gpointer key, gpointer value, gpointer user_data)
++{
++    VALUE rb_relative = (VALUE)value;
++    rb_gc_mark(rb_relative);
++}
++
++static void
+ holder_mark(void *data)
+ {
+     gobj_holder *holder = data;
+-    if (holder->gobj && !holder->destroyed)
+-        rbgobj_instance_call_cinfo_mark(holder->gobj);
++
++    if (!holder->gobj)
++        return;
++    if (holder->destroyed)
++        return;
++
++    rbgobj_instance_call_cinfo_mark(holder->gobj);
++    g_hash_table_foreach(holder->rb_relatives, holder_relatives_mark, NULL);
+ }
+ 
+ static void
+@@ -91,6 +105,59 @@ static const rb_data_type_t rg_glib_obje
+     RUBY_TYPED_FREE_IMMEDIATELY,
+ };
+ 
++void
++rbgobj_object_add_relative(VALUE rb_gobject, VALUE rb_relative)
++{
++    gobj_holder *holder;
++    TypedData_Get_Struct(rb_gobject,
++                         gobj_holder,
++                         &rg_glib_object_type,
++                         holder);
++    if (holder->rb_relatives) {
++        g_hash_table_insert(holder->rb_relatives,
++                            (gpointer)(rb_relative),
++                            (gpointer)(rb_relative));
++    }
++}
++
++void
++rbgobj_object_remove_relative(VALUE rb_gobject, VALUE rb_relative)
++{
++    gobj_holder *holder;
++    TypedData_Get_Struct(rb_gobject,
++                         gobj_holder,
++                         &rg_glib_object_type,
++                         holder);
++    if (holder->rb_relatives) {
++        g_hash_table_remove(holder->rb_relatives,
++                            (gpointer)(rb_relative));
++    }
++}
++
++static gboolean
++rbgobj_object_remove_relatives_body(gpointer key,
++                                    gpointer value,
++                                    gpointer user_data)
++{
++    VALUE rb_relative = (VALUE)value;
++    VALUE rb_relative_class = (VALUE)user_data;
++
++    return RVAL2CBOOL(rb_obj_is_kind_of(rb_relative, rb_relative_class));
++}
++
++void
++rbgobj_object_remove_relatives(VALUE rb_gobject, VALUE rb_relative_class)
++{
++    gobj_holder *holder;
++    TypedData_Get_Struct(rb_gobject,
++                         gobj_holder,
++                         &rg_glib_object_type,
++                         holder);
++    g_hash_table_foreach_remove(holder->rb_relatives,
++                                rbgobj_object_remove_relatives_body,
++                                (gpointer)(rb_relative_class));
++}
++
+ VALUE
+ rbgobj_object_alloc_func(VALUE klass)
+ {
+@@ -105,6 +172,7 @@ rbgobj_object_alloc_func(VALUE klass)
+     holder->gobj  = NULL;
+     holder->cinfo = NULL;
+     holder->destroyed = FALSE;
++    holder->rb_relatives = g_hash_table_new(g_direct_hash, g_direct_equal);
+ 
+     return result;
+ }
+@@ -686,13 +754,6 @@ static void
+ rg_destroy_bind_property_full_data(gpointer user_data)
+ {
+     RGBindPropertyCallbackData *data = (RGBindPropertyCallbackData *)user_data;
+-
+-    if (!NIL_P(data->transform_to_callback))
+-        G_CHILD_REMOVE(data->self, data->transform_to_callback);
+-
+-    if (!NIL_P(data->transform_from_callback))
+-        G_CHILD_REMOVE(data->self, data->transform_from_callback);
+-
+     xfree(data);
+ }
+ 



Home | Main Index | Thread Index | Old Index