diff options
author | gutteridge <gutteridge@pkgsrc.org> | 2019-09-07 04:32:14 +0000 |
---|---|---|
committer | gutteridge <gutteridge@pkgsrc.org> | 2019-09-07 04:32:14 +0000 |
commit | 109e171383cb63b116e0458dd5c61f58543e0c6e (patch) | |
tree | c9995871c82e3676e10d3886a2d259e9fda1156c /x11 | |
parent | dba0d85027c7ee20e34afbc72d988f7b9168cb8d (diff) | |
download | pkgsrc-109e171383cb63b116e0458dd5c61f58543e0c6e.tar.gz |
py-gtk2: add upstream patches to fix leaks
These were committed upstream years ago, but there was no further
release that incorporated them.
Diffstat (limited to 'x11')
-rw-r--r-- | x11/py-gtk2/Makefile | 4 | ||||
-rw-r--r-- | x11/py-gtk2/distinfo | 4 | ||||
-rw-r--r-- | x11/py-gtk2/patches/patch-gtk_gtk-2.10.defs | 22 | ||||
-rw-r--r-- | x11/py-gtk2/patches/patch-pangocairo.override | 27 |
4 files changed, 54 insertions, 3 deletions
diff --git a/x11/py-gtk2/Makefile b/x11/py-gtk2/Makefile index be676589e75..2813fed5a84 100644 --- a/x11/py-gtk2/Makefile +++ b/x11/py-gtk2/Makefile @@ -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 --git a/x11/py-gtk2/distinfo b/x11/py-gtk2/distinfo index 1d0ac5a844f..1d592440400 100644 --- a/x11/py-gtk2/distinfo +++ b/x11/py-gtk2/distinfo @@ -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) = 6c3ea1881685b0d3be49c667054aecbf5ac05b0e 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 --git a/x11/py-gtk2/patches/patch-gtk_gtk-2.10.defs b/x11/py-gtk2/patches/patch-gtk_gtk-2.10.defs new file mode 100644 index 00000000000..8b07815df25 --- /dev/null +++ b/x11/py-gtk2/patches/patch-gtk_gtk-2.10.defs @@ -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 --git a/x11/py-gtk2/patches/patch-pangocairo.override b/x11/py-gtk2/patches/patch-pangocairo.override new file mode 100644 index 00000000000..5f38a084941 --- /dev/null +++ b/x11/py-gtk2/patches/patch-pangocairo.override @@ -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 * |