diff options
| author | Martin Owens <doctormo@gmail.com> | 2016-12-30 23:09:39 +0000 |
|---|---|---|
| committer | Martin Owens <doctormo@gmail.com> | 2016-12-30 23:09:39 +0000 |
| commit | 9090f27c2203e1ee3cc747e49cb5ad8db983ca1d (patch) | |
| tree | 591205ad0ee11f2091d5d1fcf01c57f31b384666 /packaging/macosx/ports/python/py-gobject | |
| parent | [Bug #1574561] Italian translation update. (diff) | |
| download | inkscape-9090f27c2203e1ee3cc747e49cb5ad8db983ca1d.tar.gz inkscape-9090f27c2203e1ee3cc747e49cb5ad8db983ca1d.zip | |
Remove MacOSX packaging and make space for future 0.93 osx packagers.
(bzr r15377.1.1)
Diffstat (limited to 'packaging/macosx/ports/python/py-gobject')
5 files changed, 0 insertions, 499 deletions
diff --git a/packaging/macosx/ports/python/py-gobject/Portfile b/packaging/macosx/ports/python/py-gobject/Portfile deleted file mode 100644 index 3503ef1db..000000000 --- a/packaging/macosx/ports/python/py-gobject/Portfile +++ /dev/null @@ -1,77 +0,0 @@ -# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 -# $Id$ - -PortSystem 1.0 -PortGroup python 1.0 - -name py-gobject -set my_name pygobject -version 2.28.6 -revision 101 -epoch 20110613 -set branch [join [lrange [split ${version} .] 0 1] .] -categories-append gnome -license LGPL-2.1+ -maintainers jwa openmaintainer -platforms darwin -python.versions 26 27 33 34 - -description Python bindings for GObject. - -long_description \ - PyGObject provides a convenient wrapper for the GObject+ library \ - for use in Python programs, and takes care of many of the boring details \ - such as managing memory and type casting. \ - When combined with PyGTK, PyORBit and gnome-python, \ - it can be used to write full featured Gnome applications. - -homepage http://www.pygtk.org/ -master_sites gnome:sources/${my_name}/${branch}/ -distname ${my_name}-${version} -use_xz yes - -checksums rmd160 4bc5e8546a5029d3d6b154629ab3fa4023d96bef \ - sha256 fb8a1d4f665130a125011659bd347c7339c944232163dbb9a34fd0686577adb8 - -if {$subport ne $name} { - depends_build-append port:pkgconfig - depends_lib-append path:lib/pkgconfig/glib-2.0.pc:glib2 \ - port:libffi \ - port:py${python.version}-cairo \ - port:gobject-introspection - - patch.pre_args -p1 - patchfiles patch-pygi-info.c-p1.diff \ - 00git_class_init.patch \ - 00git_fix_qdata_warning.patch \ - 00git_gio_flag_type.patch - - use_configure yes - configure.python ${python.bin} - configure.env-append PKG_CONFIG_PATH='${python.prefix}/lib/pkgconfig' - configure.pre_args --prefix='${python.prefix}' - configure.args-append --disable-glibtest \ - --enable-introspection=no - configure.cppflags-append \ - -I${python.prefix}/include \ - -I${prefix}/include/cairo - build.cmd [portbuild::build_getmaketype] - build.target - - destroot.cmd ${build.cmd} - destroot.target install - destroot.destdir DESTDIR=${destroot} - - test.run yes - test.env PYTHONPATH=[glob -nocomplain ${worksrcpath}/build/lib*] - test.target check - - post-destroot { - set docdir ${prefix}/share/doc/${subport} - xinstall -d ${destroot}${docdir} - xinstall -m 0644 -W ${worksrcpath} AUTHORS COPYING ChangeLog NEWS README \ - ${destroot}${docdir} - } -} - -livecheck.type none diff --git a/packaging/macosx/ports/python/py-gobject/files/00git_class_init.patch b/packaging/macosx/ports/python/py-gobject/files/00git_class_init.patch deleted file mode 100644 index 01f79d6ce..000000000 --- a/packaging/macosx/ports/python/py-gobject/files/00git_class_init.patch +++ /dev/null @@ -1,316 +0,0 @@ -From 9456ba70fdb98b3a4eb7ee2f630182387a54ca00 Mon Sep 17 00:00:00 2001 -From: Martin Pitt <martinpitt@gnome.org> -Date: Tue, 19 Feb 2013 15:39:56 +0100 -Subject: [PATCH] Move property and signal creation into _class_init() - -We must not add class interfaces after g_type_class_ref() has been called the -first time. Move signal and property creation from pyg_type_register() into -pyg_object_class_init(), and drop the hack of registering interfaces twice. - -This is a backport of commit efcb0f9fd for 2.28.x. This allows old pygtk -applications to work with pygobject 2.28.x and glib 2.35.x. - -Bug: https://bugzilla.gnome.org/show_bug.cgi?id=694108 -Bug-Ubuntu: https://launchpad.net/bugs/1129309 ---- - gobject/gobjectmodule.c | 177 +++++++++++++++++++----------------------------- - 1 file changed, 70 insertions(+), 107 deletions(-) - -diff --git a/gobject/gobjectmodule.c b/gobject/gobjectmodule.c -index 2a84606..91f7315 100644 ---- a/gobject/gobjectmodule.c -+++ b/gobject/gobjectmodule.c -@@ -312,13 +312,6 @@ pyg_object_get_property (GObject *object, guint property_id, - pyglib_gil_state_release(state); - } - --static void --pyg_object_class_init(GObjectClass *class, PyObject *py_class) --{ -- class->set_property = pyg_object_set_property; -- class->get_property = pyg_object_get_property; --} -- - typedef struct _PyGSignalAccumulatorData { - PyObject *callable; - PyObject *user_data; -@@ -484,15 +477,14 @@ override_signal(GType instance_type, const gchar *signal_name) - } - - static PyObject * --add_signals (GType instance_type, PyObject *signals) -+add_signals (GObjectClass *klass, PyObject *signals) - { - gboolean ret = TRUE; -- GObjectClass *oclass; - Py_ssize_t pos = 0; - PyObject *key, *value, *overridden_signals = NULL; -+ GType instance_type = G_OBJECT_CLASS_TYPE (klass); - - overridden_signals = PyDict_New(); -- oclass = g_type_class_ref(instance_type); - while (PyDict_Next(signals, &pos, &key, &value)) { - const gchar *signal_name; - gchar *signal_name_canon, *c; -@@ -530,7 +522,6 @@ add_signals (GType instance_type, PyObject *signals) - if (!ret) - break; - } -- g_type_class_unref(oclass); - if (ret) - return overridden_signals; - else { -@@ -800,14 +791,12 @@ pyg_param_spec_from_object (PyObject *tuple) - } - - static gboolean --add_properties (GType instance_type, PyObject *properties) -+add_properties (GObjectClass *klass, PyObject *properties) - { - gboolean ret = TRUE; -- GObjectClass *oclass; - Py_ssize_t pos = 0; - PyObject *key, *value; - -- oclass = g_type_class_ref(instance_type); - while (PyDict_Next(properties, &pos, &key, &value)) { - const gchar *prop_name; - GType prop_type; -@@ -873,7 +862,7 @@ add_properties (GType instance_type, PyObject *properties) - Py_DECREF(slice); - - if (pspec) { -- g_object_class_install_property(oclass, 1, pspec); -+ g_object_class_install_property(klass, 1, pspec); - } else { - PyObject *type, *value, *traceback; - ret = FALSE; -@@ -883,7 +872,7 @@ add_properties (GType instance_type, PyObject *properties) - g_snprintf(msg, 256, - "%s (while registering property '%s' for GType '%s')", - PYGLIB_PyUnicode_AsString(value), -- prop_name, g_type_name(instance_type)); -+ prop_name, G_OBJECT_CLASS_NAME(klass)); - Py_DECREF(value); - value = PYGLIB_PyUnicode_FromString(msg); - } -@@ -892,11 +881,63 @@ add_properties (GType instance_type, PyObject *properties) - } - } - -- g_type_class_unref(oclass); - return ret; - } - - static void -+pyg_object_class_init(GObjectClass *class, PyObject *py_class) -+{ -+ PyObject *gproperties, *gsignals, *overridden_signals; -+ PyObject *class_dict = ((PyTypeObject*) py_class)->tp_dict; -+ -+ class->set_property = pyg_object_set_property; -+ class->get_property = pyg_object_get_property; -+ -+ /* install signals */ -+ /* we look this up in the instance dictionary, so we don't -+ * accidentally get a parent type's __gsignals__ attribute. */ -+ gsignals = PyDict_GetItemString(class_dict, "__gsignals__"); -+ if (gsignals) { -+ if (!PyDict_Check(gsignals)) { -+ PyErr_SetString(PyExc_TypeError, -+ "__gsignals__ attribute not a dict!"); -+ return; -+ } -+ if (!(overridden_signals = add_signals(class, gsignals))) { -+ return; -+ } -+ if (PyDict_SetItemString(class_dict, "__gsignals__", -+ overridden_signals)) { -+ return; -+ } -+ Py_DECREF(overridden_signals); -+ -+ PyDict_DelItemString(class_dict, "__gsignals__"); -+ } else { -+ PyErr_Clear(); -+ } -+ -+ /* install properties */ -+ /* we look this up in the instance dictionary, so we don't -+ * accidentally get a parent type's __gproperties__ attribute. */ -+ gproperties = PyDict_GetItemString(class_dict, "__gproperties__"); -+ if (gproperties) { -+ if (!PyDict_Check(gproperties)) { -+ PyErr_SetString(PyExc_TypeError, -+ "__gproperties__ attribute not a dict!"); -+ return; -+ } -+ if (!add_properties(class, gproperties)) { -+ return; -+ } -+ PyDict_DelItemString(class_dict, "__gproperties__"); -+ /* Borrowed reference. Py_DECREF(gproperties); */ -+ } else { -+ PyErr_Clear(); -+ } -+} -+ -+static void - pyg_register_class_init(GType gtype, PyGClassInitFunc class_init) - { - GSList *list; -@@ -1068,7 +1109,7 @@ pygobject__g_instance_init(GTypeInstance *instance, - */ - static void - pyg_type_add_interfaces(PyTypeObject *class, GType instance_type, -- PyObject *bases, gboolean new_interfaces, -+ PyObject *bases, - GType *parent_interfaces, guint n_parent_interfaces) - { - int i; -@@ -1082,7 +1123,6 @@ pyg_type_add_interfaces(PyTypeObject *class, GType instance_type, - guint k; - PyObject *base = PyTuple_GET_ITEM(bases, i); - GType itype; -- gboolean is_new = TRUE; - const GInterfaceInfo *iinfo; - GInterfaceInfo iinfo_copy; - -@@ -1099,16 +1139,6 @@ pyg_type_add_interfaces(PyTypeObject *class, GType instance_type, - if (!G_TYPE_IS_INTERFACE(itype)) - continue; - -- for (k = 0; k < n_parent_interfaces; ++k) { -- if (parent_interfaces[k] == itype) { -- is_new = FALSE; -- break; -- } -- } -- -- if ((new_interfaces && !is_new) || (!new_interfaces && is_new)) -- continue; -- - iinfo = pyg_lookup_interface_info(itype); - if (!iinfo) { - gchar *error; -@@ -1129,7 +1159,7 @@ pyg_type_add_interfaces(PyTypeObject *class, GType instance_type, - int - pyg_type_register(PyTypeObject *class, const char *type_name) - { -- PyObject *gtype, *gsignals, *gproperties, *overridden_signals; -+ PyObject *gtype; - GType parent_type, instance_type; - GType *parent_interfaces; - guint n_parent_interfaces; -@@ -1216,88 +1246,22 @@ pyg_type_register(PyTypeObject *class, const char *type_name) - } - - /* -- * Note: Interfaces to be implemented are searched twice. First -- * we register interfaces that are already implemented by a parent -- * type. The second time, the remaining interfaces are -- * registered, i.e. the ones that are not implemented by a parent -- * type. In between these two loops, properties and signals are -- * registered. It has to be done this way, in two steps, -- * otherwise glib will complain. If registering all interfaces -- * always before properties, you get an error like: -- * -- * ../gobject:121: Warning: Object class -- * test_interface+MyObject doesn't implement property -- * 'some-property' from interface 'TestInterface' -- * -- * If, on the other hand, you register interfaces after -- * registering the properties, you get something like: -- * -- * ../gobject:121: Warning: cannot add interface type -- * `TestInterface' to type `test_interface+MyUnknown', since -- * type `test_interface+MyUnknown' already conforms to -- * interface -- * -- * This looks like a GLib quirk, but no bug has been filed -- * upstream. However we have a unit test for this particular -- * problem, which can be found in test_interfaces.py, class -- * TestInterfaceImpl. -+ * Note, all interfaces need to be registered before the first -+ * g_type_class_ref(), see bug #686149. - * - * See also comment above pyg_type_add_interfaces(). - */ -- pyg_type_add_interfaces(class, instance_type, class->tp_bases, FALSE, -+ pyg_type_add_interfaces(class, instance_type, class->tp_bases, - parent_interfaces, n_parent_interfaces); - -- /* we look this up in the instance dictionary, so we don't -- * accidentally get a parent type's __gsignals__ attribute. */ -- gsignals = PyDict_GetItemString(class->tp_dict, "__gsignals__"); -- if (gsignals) { -- if (!PyDict_Check(gsignals)) { -- PyErr_SetString(PyExc_TypeError, -- "__gsignals__ attribute not a dict!"); -- g_free(parent_interfaces); -- return -1; -- } -- if (!(overridden_signals = add_signals(instance_type, gsignals))) { -- g_free(parent_interfaces); -- return -1; -- } -- if (PyDict_SetItemString(class->tp_dict, "__gsignals__", -- overridden_signals)) { -- g_free(parent_interfaces); -- return -1; -- } -- Py_DECREF(overridden_signals); -- } else { -- PyErr_Clear(); -- } - -- /* we look this up in the instance dictionary, so we don't -- * accidentally get a parent type's __gsignals__ attribute. */ -- gproperties = PyDict_GetItemString(class->tp_dict, "__gproperties__"); -- if (gproperties) { -- if (!PyDict_Check(gproperties)) { -- PyErr_SetString(PyExc_TypeError, -- "__gproperties__ attribute not a dict!"); -- g_free(parent_interfaces); -- return -1; -- } -- if (!add_properties(instance_type, gproperties)) { -- g_free(parent_interfaces); -- return -1; -- } -- PyDict_DelItemString(class->tp_dict, "__gproperties__"); -- /* Borrowed reference. Py_DECREF(gproperties); */ -- } else { -- PyErr_Clear(); -+ gclass = g_type_class_ref(instance_type); -+ if (PyErr_Occurred() != NULL) { -+ g_type_class_unref(gclass); -+ g_free(parent_interfaces); -+ return -1; - } - -- /* Register new interfaces, that are _not_ already defined by -- * the parent type. FIXME: See above. -- */ -- pyg_type_add_interfaces(class, instance_type, class->tp_bases, TRUE, -- parent_interfaces, n_parent_interfaces); -- -- gclass = g_type_class_ref(instance_type); - if (pyg_run_class_init(instance_type, gclass, class)) { - g_type_class_unref(gclass); - g_free(parent_interfaces); -@@ -1306,9 +1270,8 @@ pyg_type_register(PyTypeObject *class, const char *type_name) - g_type_class_unref(gclass); - g_free(parent_interfaces); - -- if (gsignals) -- PyDict_DelItemString(class->tp_dict, "__gsignals__"); -- -+ if (PyErr_Occurred() != NULL) -+ return -1; - return 0; - } - --- -1.8.1.2 - diff --git a/packaging/macosx/ports/python/py-gobject/files/00git_fix_qdata_warning.patch b/packaging/macosx/ports/python/py-gobject/files/00git_fix_qdata_warning.patch deleted file mode 100644 index ed4b5d2b9..000000000 --- a/packaging/macosx/ports/python/py-gobject/files/00git_fix_qdata_warning.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 42d871eb0b08ee6d55e95cc7e4b90844919555b9 Mon Sep 17 00:00:00 2001 -From: Ivan Stankovic <ivan.stankovic@avl.com> -Date: Tue, 21 Feb 2012 12:24:58 +0100 -Subject: [PATCH 1/2] Fix set_qdata warning on accessing NULL gobject property - -https://bugzilla.gnome.org/show_bug.cgi?id=661155 ---- - gobject/pygobject.c | 4 +++- - 1 files changed, 3 insertions(+), 1 deletions(-) - -diff --git a/gobject/pygobject.c b/gobject/pygobject.c -index 6c2f06c..70dc89a 100644 ---- a/gobject/pygobject.c -+++ b/gobject/pygobject.c -@@ -991,7 +991,9 @@ pygobject_new(GObject *obj) - PyObject * - pygobject_new_sunk(GObject *obj) - { -- g_object_set_qdata (obj, pygobject_ref_sunk_key, GINT_TO_POINTER (1)); -+ if (obj) -+ g_object_set_qdata (obj, pygobject_ref_sunk_key, GINT_TO_POINTER (1)); -+ - return pygobject_new_full(obj, TRUE, NULL); - } - --- -1.7.9.1 - diff --git a/packaging/macosx/ports/python/py-gobject/files/00git_gio_flag_type.patch b/packaging/macosx/ports/python/py-gobject/files/00git_gio_flag_type.patch deleted file mode 100644 index 78e7ddfd5..000000000 --- a/packaging/macosx/ports/python/py-gobject/files/00git_gio_flag_type.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 42d01f060c5d764baa881d13c103d68897163a49 Mon Sep 17 00:00:00 2001 -From: Ryan Lortie <desrt@desrt.ca> -Date: Mon, 12 Mar 2012 16:44:14 -0400 -Subject: gio-types.defs: change some enums to flags - -These flags types were originally incorrectly handled in glib as being -enums. That bug was fixed, but they're still enums here, leading to -warnings about the mismatch. - -Change them to flags. - -https://bugzilla.gnome.org/show_bug.cgi?id=668522 ---- - gio/gio-types.defs | 6 +++--- - 1 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/gio/gio-types.defs b/gio/gio-types.defs -index 331e0bc..7eee5c8 100644 ---- a/gio/gio-types.defs -+++ b/gio/gio-types.defs -@@ -526,7 +526,7 @@ - ) - ) - --(define-enum MountMountFlags -+(define-flags MountMountFlags - (in-module "gio") - (c-name "GMountMountFlags") - (gtype-id "G_TYPE_MOUNT_MOUNT_FLAGS") -@@ -545,7 +545,7 @@ - ) - ) - --(define-enum DriveStartFlags -+(define-flags DriveStartFlags - (in-module "gio") - (c-name "GDriveStartFlags") - (gtype-id "G_TYPE_DRIVE_START_FLAGS") -@@ -770,7 +770,7 @@ - ) - ) - --(define-enum SocketMsgFlags -+(define-flags SocketMsgFlags - (in-module "gio") - (c-name "GSocketMsgFlags") - (gtype-id "G_TYPE_SOCKET_MSG_FLAGS") --- -1.7.9.1 - diff --git a/packaging/macosx/ports/python/py-gobject/files/patch-pygi-info.c-p1.diff b/packaging/macosx/ports/python/py-gobject/files/patch-pygi-info.c-p1.diff deleted file mode 100644 index b5a3d519d..000000000 --- a/packaging/macosx/ports/python/py-gobject/files/patch-pygi-info.c-p1.diff +++ /dev/null @@ -1,28 +0,0 @@ ---- a/gi/pygi-info.c.orig 2014-01-15 09:16:11.000000000 +0200 -+++ b/gi/pygi-info.c 2014-01-15 09:16:52.000000000 +0200 -@@ -162,9 +162,6 @@ - case GI_INFO_TYPE_CONSTANT: - type = &PyGIConstantInfo_Type; - break; -- case GI_INFO_TYPE_ERROR_DOMAIN: -- type = &PyGIErrorDomainInfo_Type; -- break; - case GI_INFO_TYPE_UNION: - type = &PyGIUnionInfo_Type; - break; -@@ -481,7 +478,6 @@ - case GI_INFO_TYPE_INVALID: - case GI_INFO_TYPE_FUNCTION: - case GI_INFO_TYPE_CONSTANT: -- case GI_INFO_TYPE_ERROR_DOMAIN: - case GI_INFO_TYPE_VALUE: - case GI_INFO_TYPE_SIGNAL: - case GI_INFO_TYPE_PROPERTY: -@@ -860,7 +856,6 @@ - case GI_INFO_TYPE_INVALID: - case GI_INFO_TYPE_FUNCTION: - case GI_INFO_TYPE_CONSTANT: -- case GI_INFO_TYPE_ERROR_DOMAIN: - case GI_INFO_TYPE_VALUE: - case GI_INFO_TYPE_SIGNAL: - case GI_INFO_TYPE_PROPERTY: |
