summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Rostovtsev <tetromino@gentoo.org>2013-10-02 17:15:51 +0000
committerAlexandre Rostovtsev <tetromino@gentoo.org>2013-10-02 17:15:51 +0000
commit1ac599428a39b50a77458fa6ce26d8383c4b5085 (patch)
tree4a7f728cf979e20aaf28a3d1f73db509c4bd8c39
parentbump of radvd to 1.9.5 (diff)
downloadhistorical-1ac599428a39b50a77458fa6ce26d8383c4b5085.tar.gz
historical-1ac599428a39b50a77458fa6ce26d8383c4b5085.tar.bz2
historical-1ac599428a39b50a77458fa6ce26d8383c4b5085.zip
Fix class interface setup to be compatible with glib-2.36. Remove old alternatives symlink removal hack since it fails badly with binpkgs (bug #459180, thanks to Fabio Erculiani).
Package-Manager: portage-2.2.7/cvs/Linux x86_64 Manifest-Sign-Key: 0xCF0ADD61
-rw-r--r--dev-python/pygobject/ChangeLog11
-rw-r--r--dev-python/pygobject/Manifest26
-rw-r--r--dev-python/pygobject/files/pygobject-2.28.6-glib-2.36-class_init.patch315
-rw-r--r--dev-python/pygobject/pygobject-2.28.6-r54.ebuild135
4 files changed, 470 insertions, 17 deletions
diff --git a/dev-python/pygobject/ChangeLog b/dev-python/pygobject/ChangeLog
index 6c04ede1f5dc..332b6c5f5b41 100644
--- a/dev-python/pygobject/ChangeLog
+++ b/dev-python/pygobject/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for dev-python/pygobject
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/pygobject/ChangeLog,v 1.222 2013/09/17 19:42:55 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/pygobject/ChangeLog,v 1.223 2013/10/02 17:15:46 tetromino Exp $
+
+*pygobject-2.28.6-r54 (02 Oct 2013)
+
+ 02 Oct 2013; Alexandre Rostovtsev <tetromino@gentoo.org>
+ +pygobject-2.28.6-r54.ebuild,
+ +files/pygobject-2.28.6-glib-2.36-class_init.patch:
+ Fix class interface setup to be compatible with glib-2.36. Remove old
+ alternatives symlink removal hack since it fails badly with binpkgs (bug
+ #459180, thanks to Fabio Erculiani).
17 Sep 2013; Michał Górny <mgorny@gentoo.org> pygobject-2.28.6-r53.ebuild:
Force python-exec:0 since the ebuild does hackery on top of script wrapping.
diff --git a/dev-python/pygobject/Manifest b/dev-python/pygobject/Manifest
index ceb08f076e70..a34ed0feab11 100644
--- a/dev-python/pygobject/Manifest
+++ b/dev-python/pygobject/Manifest
@@ -7,6 +7,7 @@ AUX pygobject-2.28.3-make_check.patch 2705 SHA256 91ddf8f2d1d767f771b91568c1d669
AUX pygobject-2.28.3-support_multiple_python_versions.patch 3938 SHA256 7269f232a9b4ffe1c920c610796cb8f1dc5bcdc5cd5d03ebc7045f45d5f5d089 SHA512 b835c503ea1baa831d1f258221998c5194ea58750e33564ff7b22870a8f47dfef37d986aa282d527dd2ea2b9e598ffede38ed7dd8f966788e32e8719ac94035f WHIRLPOOL e91084a146717ca5de9528a17e8a9e4d1b396704e6a5c4529695ca67f67b2b3f91d12472b846c3b076c24aac1b8fdea66b5e4591acaed1c5f621b372222babc0
AUX pygobject-2.28.6-disable-failing-tests.patch 3549 SHA256 b75efed51ff82724eab61b08079feb59cdb6ed49bd63ddfcbdafbc89d40e39f6 SHA512 1ff3b9474c1fbf7e4fe7f2346f862f1ba1da0748d955ebcfd606d74b885c12daa2673c31aa594925c441bfaa29390d9324e56696e291d3f7e301cbf114491cb3 WHIRLPOOL b82d77e5ea445f9dee3b9c116a7cd666de6a047e260d1e1172b3fa658ee5b3be6414369ab77ed9a3b4748efe31aefa784087a47172c7e4ac44df99d160e5e061
AUX pygobject-2.28.6-gio-types-2.32.patch 1231 SHA256 76b8636556b56143eac3afa002c5a8938d87e613668cfce0a73ce1f1e3d6c810 SHA512 86a34f73a4436ff77488743fc15c0cc901c27b55dad9bcfdc9c32ff184bccc277217d5a0e13bc36982e14e34ab5fee5224e055879a0036a1ccdf5dc26bc737d4 WHIRLPOOL 9b66b44a994970a11e75c7ede64403eed01e10bd0e5edda9c1d95771a07457da0fefea425e217633d1eae78c02c4e980a6cb5dbeac580b63e56fd8a962d8e0d1
+AUX pygobject-2.28.6-glib-2.36-class_init.patch 11038 SHA256 02d4ec14ecdea96ffb64c7c58abdea8e38b3076cec872525449823137f7dea63 SHA512 e8acc5970ac540dc01551759591ee693ae12dd1512130b135e397e528d920159f0f8866bb8a611e2c06cd96f899ef7239153b59a2ec0318e1fd08266acf95e04 WHIRLPOOL e18b3e24109c01b61c24f7be69d62f7eea415cf43b4b9683e539d8352b28a8a2b95fd89dbc29ec4978479ea3cb50f06785733d66897c0064f3c7c41027e06d5e
AUX pygobject-2.28.6-set_qdata.patch 847 SHA256 1dda085e0aadedf70eb8290e9c12fd27227173d3313a28d40ab923316b35bde3 SHA512 19025af51a8387061276ec9d6c8eb0ecadb5124bba2c4ab3755ab653df467896d19c366d80ce9313fd46e43b493b7c536f780014cf18a6ac47f4b1d2ad4bedb4 WHIRLPOOL 4d3be4952242d8b10b47fb3ee7d0d3e9716b6e358c3151e5c472580e3bc15c501040f7a6363b7fdef050c00bf68f65b8eacb918fd85483b0fa098af18ea34a62
AUX pygobject-2.28.6-tests-no-introspection.patch 1257 SHA256 f10000ce8cf232240099fd319a046920eaa582fcb3f6eb20e3468145f89cd51e SHA512 7d57cb9bbd0b16f4fb0ed9d5eca310c47daf86b89daefa41fb0cf5dd470a6f6a31d0dad31dd261332c039d39bd778f9de8de7260c5856f1b718f72b9aabc01b4 WHIRLPOOL 02100886c5932114fa7ceaabcfceb6297e0bc2f3a12cd4b17e77e863fcfeebbbcab235f1d79c7cd65c201d628e818d58813c4f46b906dce4fa95c7aae8767935
AUX pygobject-2.90.1-make_check.patch 2572 SHA256 e665baf786eb565cd095ca1651a696264b112dcbc534593c4fa3da2d4e3b2ddf SHA512 2162dc214b86cdfb9b4a465066cd2847419be9608dab55e911166e8c646d19da2ef5f4553926459f1b061bacc380aae9645365390b6852f56db4da25925a1417 WHIRLPOOL 0f67999b760486014aa108a2761983ccf07b80aa0c69e5dac814130b53541c7e916998250e35251c68b77681f569f60c183e991d70f2ba93f4a18c9934724b2e
@@ -21,27 +22,20 @@ DIST pygobject-3.2.2.tar.xz 564712 SHA256 4653790baaff0176fd814b88cfb5378c45906a
DIST pygobject-3.4.2.tar.xz 615032 SHA256 2b87ef3170be3a20a53fbdb348ae4ecb41a72a17ec6531baa67147c3437d2aad SHA512 ff22d2825896246564230949b93e6d6075f885cbe4c633b8fdd6505287bc167dd50d3c3a3f4ed9ff690c0b70a81fb893a9fbf947ed9ff043ad61a61af192412d WHIRLPOOL df50588c9da9b56b50370530b1b70a10addc1d89e44ede7efbbcc7e9039e35816c105477c9e33caa52bbae9d6bd33b6532e6a0b8df3b8de0aab6f838bf00a10f
DIST pygobject-3.8.3.tar.xz 657196 SHA256 384b3e1b8d1e7c8796d7eb955380d62946dd0ed9c54ecf0817af2d6b254e082c SHA512 e037aaf2ce78cffb09676282fe50d5188a5f4e832cd4cbb215e44fa515ded4c3591fa9df3b9a2a4f31f1e5c2951967fd429c1373739b23b73db46d36dfb14144 WHIRLPOOL fc4612df384c955a0b927ea473f76112bddb707a170815f8fcc53e1fe255e9a2cc2ac408d68ac84991fbe3e6bc7726e47af10ccf1082925a811b80fc4f4e79ed
EBUILD pygobject-2.28.6-r53.ebuild 4496 SHA256 946256560ddc0c8e382beed01a39b6ab3561d80fdcef5d79159c1b549213b304 SHA512 5ac0a5734ba48e1b56762a614ccb3b2a7c11b2fccfde40cae504d042058e1016d678be2e0412b8ed09fd840699e85699ea36510c382e9f5406434373aec8fddb WHIRLPOOL 91996c13cc4cf4b33727eae875d38f98db788c102419f9536a426034514c54950e6b0d76feffcb1708a2e33f0cf8ef043c7d7fd45835af67df5e2043de6f31fb
+EBUILD pygobject-2.28.6-r54.ebuild 3750 SHA256 0189ace3e22d5335c13e1067774db8870c81c7a20ce7a23c5217bd71df41a41b SHA512 31e814fab7165b220c3376c2a6fb1e7a9a9d5b5c9ecaa01a94ebcc57f200458a05e647a6ee582052474436fe2d4577d0726f1b2d09e0d4b889e08a6ae9bd00ee WHIRLPOOL 2a4a375f76d41e8bf14062bda09d6e1d1237b9cc9c4098a02a8d48b134753675cba7d753b4ebe592f74a750b9f3a7f86f6e088789836b201675b2040200af2d1
EBUILD pygobject-3.2.2-r1.ebuild 3003 SHA256 93a203125c5f5cdb2d46c7637330e6677549d55d54f81dde202998ecfa9600e4 SHA512 c7e8f7fc55dba934787294e53e3e38e91370d66fe7c49ce94c89f0b6fbddc50ca5a74215fbcc276fa71e33a410219331805d9039f319fa17ef2f379ddc1f14e2 WHIRLPOOL 666d4b0835228cfb119145b6df1ec205d6f3a87959a21bb123113c08c985de0409b6bfa5fe2804c7ef2b21bdb4b326324e7442be9a554088aa1fdba7ca81ceb3
EBUILD pygobject-3.4.2-r1.ebuild 3115 SHA256 589a3788d0b783aed17a40e24fa158ff2042672b19f9c243651ecadbc9b4ae50 SHA512 974ba9348a0efd343c4807a0206d1f6dee4230d1ee3832916eedbc2e3bbebe7ed935bab0fe18df87700c1f2fd5ecd3fb8cb9d8475579f4b58eeef9c06eb87f38 WHIRLPOOL bd6b00c4ab3941efb72cb8ad87232761c49e841360090c53f8659a7513780df9ceeec22a75aac51fa2a212f1094362372a55db024d1cb4c96004a430059218cb
EBUILD pygobject-3.8.3.ebuild 2808 SHA256 de0609c2e23df52445ec9e29597c2ff2b237fd808f7f7189a451a6b7fa6c9cd5 SHA512 e1d74e93ea6ff8ba2e175325af03b253fbcf0a732cb785fbb836decc83b161a922ee12d30e25686aa7518d3de9d78d95590bbb6dd4bd42614766bcad7af9b574 WHIRLPOOL ca1bee8915e1a30f5ee58343dbc1640418b3c281024ee6aea5f5d5a1d92539e0fcb51f1cfea0c780936011dd3939b63baf88c260d627c92732ab806e85ea4caa
-MISC ChangeLog 36548 SHA256 44a14a2ca85105ea066eddc760d6f65cfd18c82d650024e2daee857cc382bfc0 SHA512 fcf2a420ecdb69552f6265c111f232d0f2a2a3cb4fa2e563b9e931b2603fe87a685911f48fed63cd032f0d38ea3292c3532bcbbc4108904d1469d302031fb61b WHIRLPOOL d1b45e063f3ffdae84e488130c85cba61bcf65f8c6133b80b02687cbafa7b5faca9b1e3b43aa8d42aaec220f9bb263d7f048e6a4d767909205c7e5dc136c2745
+MISC ChangeLog 36920 SHA256 2f49f6f21c3998c1e89921b0184bcd846c498fbcf308d956b43f2e4593c523ad SHA512 150512322a61a8e23d7142b7bbf4d4431768e0f8f3fee114b58dadc084aa88e0176910a76c994b23b57b2b066ee840149a142d6b888123c3ddd578772632fe75 WHIRLPOOL 65e16f508a9838c562e235b5a913cdf1bfd48a3a36664a3f245268f40eb4ae0c3408d93a89c1e6211831dac0bfac01cb83fbc733e1da0cee9f3937e657515cee
MISC metadata.xml 178 SHA256 aeea09173ed30175422e4f951e369e1882919be3d56e655468e5d4bffea0fc3c SHA512 090602f45b8fe37eb4ec23c568d815bd1ea41903eb2ad2592c251915aeb3edd957eae84957d556eb3b4b3fbb5acf6aae7594e1640ee5e04297cb6e2efc6c4c41 WHIRLPOOL 69136c1dbfe808f569ccf5362e9df219ef8ba594cc608893dbf854ee6482111c5c969c2510f2f92b659b3a94e1a669490062815891988e71e76a8d0782b871e6
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.21 (GNU/Linux)
-iQJ8BAEBCABmBQJSOLDnXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
-ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2REJCMDdDQzRGMERBRDA2RUEwQUZFNDFC
-MDdBMUFFQUVGQjQ0NjRFAAoJELB6GurvtEZOydkP/jmvWs8SXzB+eHdnh+pNtW1F
-TRrSd4vCoU/y6j86xSu9s4P/PDr3Q5p6VK+IKmjHyM/wk0JmvhpaARzQJTdLtsx+
-eKLrDi00V7v/oWNJHC/U12SA77IOoNS1+wKpJdx5pQ8Fv3bnNfI+IIBg6jR3ipjk
-ZikJ984s6PudncTXLxCqWjcGoTGSHWeJi2ZBX6RDlmUjhGbSSY/L+kotK795PVzw
-lqPs0r10jNCeXcxy55gEcSaic1ia8Nuvq/DjWTNpn1tD7dRCdzYMDmbUel04mFaY
-gv3QSPDnmiDAW2zPkqjnQG65HR81A68p6BuekJmQv555Wt5VUR1jthSelZnnhDS6
-UZE1NOTrYYYIb8aLzb4XesyOhLPLliqaAJFHv7A7XXP4b5UJr/lsrZyw9MBdJ5tC
-24+gAiUZFj1psQGYJqm1y97aeagPzKbBHmzw/HWY2LS+3A1HvRP4TPra7MgvUL3G
-bXDEPdZQTFv+5VI6XRiP6hOAZx55+Z+fEpUPSdvjoCz8cs+2718RYl3Q901BaIRa
-WP7RAWy+EzxaOVqtDDNL2CWu5XfTXvevE5vYUrkAHQJ99JAyy7/phyXHa8L9KuJj
-Xj1KL/GO1A0XVURbzr60eL/4iz+j9WdHxe6UGfoBkcg3+rlW1Whouri0EkEvk22G
-1R/5LQrFBwdPGowrPQVr
-=2ukW
+iQEcBAEBCAAGBQJSTFTeAAoJEJ0WA1zPCt1hDCcH/0agQWBmeZosU2Qdb3sIX4EG
+rdfpYIG1p/RUrprsvVxqUYkN06jAvAG1WfVM8w/g04wuyEHbfymLV9ou6Ew2vw9w
+Zm+AGrUkWrKOMXg/N8bZWMbbG9k8hbrjzzvNdj21I3qrfLdYbBF1ruOcQlCA+dv1
+5sc3WUeOFIJhjaeXCBGoQB1hzfIPbQdYfETddi3Ittx6E1tFX6QpxAfO+Lys/Jdt
+4Jkdl71gGXdR2Lta1p8IIuHc/2W0kCLWO1QpHGtsu2QtRIyraGe+dfc78PjaC3FQ
+IzRxCJuU4o6PQ32zO0ukE8SWS1Dq/qgHAp5Yx3OH9szEOCKZA3K33VAys37WoBk=
+=rSP8
-----END PGP SIGNATURE-----
diff --git a/dev-python/pygobject/files/pygobject-2.28.6-glib-2.36-class_init.patch b/dev-python/pygobject/files/pygobject-2.28.6-glib-2.36-class_init.patch
new file mode 100644
index 000000000000..b2f9b147f847
--- /dev/null
+++ b/dev-python/pygobject/files/pygobject-2.28.6-glib-2.36-class_init.patch
@@ -0,0 +1,315 @@
+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.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=694108
+---
+ 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.3.2
+
diff --git a/dev-python/pygobject/pygobject-2.28.6-r54.ebuild b/dev-python/pygobject/pygobject-2.28.6-r54.ebuild
new file mode 100644
index 000000000000..aa14668ada99
--- /dev/null
+++ b/dev-python/pygobject/pygobject-2.28.6-r54.ebuild
@@ -0,0 +1,135 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-python/pygobject/pygobject-2.28.6-r54.ebuild,v 1.1 2013/10/02 17:15:46 tetromino Exp $
+
+EAPI="5"
+GCONF_DEBUG="no"
+GNOME2_LA_PUNT="yes"
+PYTHON_COMPAT=( python{2_6,2_7} )
+
+inherit autotools eutils gnome2 python-r1 virtualx
+
+DESCRIPTION="GLib's GObject library bindings for Python"
+HOMEPAGE="http://www.pygtk.org/"
+
+LICENSE="LGPL-2.1+"
+SLOT="2"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="examples libffi test"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+COMMON_DEPEND=">=dev-libs/glib-2.24.0:2
+ libffi? ( virtual/libffi:= )
+ ${PYTHON_DEPS}
+"
+DEPEND="${COMMON_DEPEND}
+ dev-python/python-exec:0
+ dev-util/gtk-doc-am
+ virtual/pkgconfig
+ test? (
+ media-fonts/font-cursor-misc
+ media-fonts/font-misc-misc )
+"
+RDEPEND="${COMMON_DEPEND}
+ !<dev-python/pygtk-2.23"
+
+# disable python-exec:2 support, bug #484406
+_PYTHON_WANT_PYTHON_EXEC2=0
+
+src_prepare() {
+ # Fix FHS compliance, see upstream bug #535524
+ epatch "${FILESDIR}/${PN}-2.28.3-fix-codegen-location.patch"
+
+ # Do not build tests if unneeded, bug #226345
+ epatch "${FILESDIR}/${PN}-2.28.3-make_check.patch"
+
+ # Support installation for multiple Python versions, upstream bug #648292
+ epatch "${FILESDIR}/${PN}-2.28.3-support_multiple_python_versions.patch"
+
+ # Disable tests that fail
+ epatch "${FILESDIR}/${P}-disable-failing-tests.patch"
+
+ # Disable introspection tests when we build with --disable-introspection
+ epatch "${FILESDIR}/${P}-tests-no-introspection.patch"
+
+ # Fix warning spam
+ epatch "${FILESDIR}/${P}-set_qdata.patch"
+ epatch "${FILESDIR}/${P}-gio-types-2.32.patch"
+
+ # Fix glib-2.36 compatibility, bug #486602
+ epatch "${FILESDIR}/${P}-glib-2.36-class_init.patch"
+
+ sed -i \
+ -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' \
+ -e 's:AM_PROG_CC_STDC:AC_PROG_CC:' \
+ configure.ac || die
+
+ eautoreconf
+ gnome2_src_prepare
+
+ python_copy_sources
+
+ prepare_shebangs() {
+ # Make a backup with unconverted shebangs to keep python_doscript happy
+ cp codegen/codegen.py pygobject-codegen-2.0
+ sed -e "s%#! \?/usr/bin/env python%#!${PYTHON}%" \
+ -i codegen/*.py || die "shebang convertion failed"
+ }
+ python_foreach_impl run_in_build_dir prepare_shebangs
+}
+
+src_configure() {
+ DOCS="AUTHORS ChangeLog* NEWS README"
+ # --disable-introspection and --disable-cairo because we use pygobject:3
+ # for introspection support
+ G2CONF="${G2CONF}
+ --disable-introspection
+ --disable-cairo
+ $(use_with libffi ffi)"
+
+ python_foreach_impl run_in_build_dir gnome2_src_configure
+}
+
+src_compile() {
+ python_foreach_impl run_in_build_dir gnome2_src_compile
+}
+
+# FIXME: With python multiple ABI support, tests return 1 even when they pass
+src_test() {
+ unset DBUS_SESSION_BUS_ADDRESS
+ export GIO_USE_VFS="local" # prevents odd issues with deleting ${T}/.gvfs
+
+ testing() {
+ export XDG_CACHE_HOME="${T}/${EPYTHON}"
+ run_in_build_dir Xemake -j1 check
+ unset XDG_CACHE_HOME
+ }
+ python_foreach_impl testing
+ unset GIO_USE_VFS
+}
+
+src_install() {
+ installing() {
+ local f prefixed_sitedir
+
+ gnome2_src_install
+
+ python_doscript pygobject-codegen-2.0
+
+ # Don't keep multiple copies of pygobject-codegen-2.0 script
+ prefixed_sitedir=$(python_get_sitedir)
+ dosym "${prefixed_sitedir#${EPREFIX}}/gtk-2.0/codegen/codegen.py" /usr/bin/pygobject-codegen-2.0-${EPYTHON}
+ }
+ python_foreach_impl run_in_build_dir installing
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}
+ doins -r examples
+ fi
+}
+
+run_in_build_dir() {
+ pushd "${BUILD_DIR}" > /dev/null || die
+ "$@"
+ popd > /dev/null
+}