pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/x11/py-gtk2 py-gtk2: add upstream patches to fix leaks



details:   https://anonhg.NetBSD.org/pkgsrc/rev/fa12da979494
branches:  trunk
changeset: 339124:fa12da979494
user:      gutteridge <gutteridge%pkgsrc.org@localhost>
date:      Sat Sep 07 04:32:14 2019 +0000

description:
py-gtk2: add upstream patches to fix leaks

These were committed upstream years ago, but there was no further
release that incorporated them.

diffstat:

 x11/py-gtk2/Makefile                          |   4 ++--
 x11/py-gtk2/distinfo                          |   4 +++-
 x11/py-gtk2/patches/patch-gtk_gtk-2.10.defs   |  22 ++++++++++++++++++++++
 x11/py-gtk2/patches/patch-pangocairo.override |  27 +++++++++++++++++++++++++++
 4 files changed, 54 insertions(+), 3 deletions(-)

diffs (89 lines):

diff -r b03cd6573ebd -r fa12da979494 x11/py-gtk2/Makefile
--- a/x11/py-gtk2/Makefile      Sat Sep 07 04:17:42 2019 +0000
+++ b/x11/py-gtk2/Makefile      Sat Sep 07 04:32:14 2019 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.120 2019/09/02 13:20:14 adam Exp $
+# $NetBSD: Makefile,v 1.121 2019/09/07 04:32:14 gutteridge Exp $
 
 DISTNAME=      pygtk-2.24.0
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME:S/pygtk/gtk2/}
-PKGREVISION=   28
+PKGREVISION=   29
 CATEGORIES=    x11 python
 MASTER_SITES=  ${MASTER_SITE_GNOME:=sources/pygtk/2.24/}
 EXTRACT_SUFX=  .tar.bz2
diff -r b03cd6573ebd -r fa12da979494 x11/py-gtk2/distinfo
--- a/x11/py-gtk2/distinfo      Sat Sep 07 04:17:42 2019 +0000
+++ b/x11/py-gtk2/distinfo      Sat Sep 07 04:32:14 2019 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.31 2019/08/29 10:33:59 wiz Exp $
+$NetBSD: distinfo,v 1.32 2019/09/07 04:32:14 gutteridge Exp $
 
 SHA1 (pygtk-2.24.0.tar.bz2) = 344e6a32a5e8c7e0aaeb807e0636a163095231c2
 RMD160 (pygtk-2.24.0.tar.bz2) = 33f597def646261483cbbf5491aeb27bf0d22ea6
@@ -9,6 +9,8 @@
 SHA1 (patch-configure.ac) = f09ff6d8e2f8989a175b60ae288408a56d41f233
 SHA1 (patch-gtk_Makefile.am) = 50556ac7074c9156db574e4a60863ff00e638981
 SHA1 (patch-gtk_Makefile.in) = 4fed9e802bd0e306e5070cf2ac7e44c86715a3e7
+SHA1 (patch-gtk_gtk-2.10.defs) = f944ab3f2304d11503dee628547ffd677531530f
 SHA1 (patch-pango-types.defs) = 386bd3b60595a6741dcae15b35977f5a3e6b3342
 SHA1 (patch-pango.defs) = e8ec316ddd635291ba958001b7cc729b14e9ec37
 SHA1 (patch-pango.override) = d7e5919d3e7c753900a15c63e9e8354c9d03a8c2
+SHA1 (patch-pangocairo.override) = 53eeba8c1c66e07d64c109ab0fd304e5f03d0eb3
diff -r b03cd6573ebd -r fa12da979494 x11/py-gtk2/patches/patch-gtk_gtk-2.10.defs
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/py-gtk2/patches/patch-gtk_gtk-2.10.defs       Sat Sep 07 04:32:14 2019 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-gtk_gtk-2.10.defs,v 1.1 2019/09/07 04:32:14 gutteridge Exp $
+
+Fix object leaks. Committed by upstream, but never branched for release.
+https://bugzilla.gnome.org/show_bug.cgi?id=660216
+
+--- gtk/gtk-2.10.defs.orig     2011-04-01 10:37:25.000000000 +0000
++++ gtk/gtk-2.10.defs
+@@ -1388,12 +1388,14 @@
+ (define-method create_pango_context
+   (of-object "GtkPrintContext")
+   (c-name "gtk_print_context_create_pango_context")
++  (caller-owns-return #t)
+   (return-type "PangoContext*")
+ )
+ 
+ (define-method create_pango_layout
+   (of-object "GtkPrintContext")
+   (c-name "gtk_print_context_create_pango_layout")
++  (caller-owns-return #t)
+   (return-type "PangoLayout*")
+ )
+ 
diff -r b03cd6573ebd -r fa12da979494 x11/py-gtk2/patches/patch-pangocairo.override
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/py-gtk2/patches/patch-pangocairo.override     Sat Sep 07 04:32:14 2019 +0000
@@ -0,0 +1,27 @@
+$NetBSD: patch-pangocairo.override,v 1.1 2019/09/07 04:32:14 gutteridge Exp $
+
+Fix object leaks. Committed by upstream, but never branched for release.
+https://bugzilla.gnome.org/show_bug.cgi?id=660216
+
+--- pangocairo.override.orig   2011-04-01 10:37:25.000000000 +0000
++++ pangocairo.override
+@@ -118,11 +118,16 @@ _wrap_pango_cairo_update_context(PyGObje
+ static PyObject *
+ _wrap_pango_cairo_create_layout(PyGObject *self)
+ {
+-    PangoLayout *ret;
++    PangoLayout *layout;
++    PyObject *ret;
+ 
+-    ret = pango_cairo_create_layout(PycairoContext_GET(self));
++    layout = pango_cairo_create_layout(PycairoContext_GET(self));
+     /* pygobject_new handles NULL checking */
+-    return pygobject_new((GObject *)ret);
++    ret = pygobject_new((GObject *)layout);
++    if (layout)
++      g_object_unref(layout);
++
++    return ret;
+ }
+ 
+ static PyObject *



Home | Main Index | Thread Index | Old Index