View | Details | Raw Unified | Return to bug 249735
Collapse All | Expand All

(-)net-im/telepathy-idle/Makefile (-1 / +1 lines)
Lines 14-20 COMMENT= IRC Connection Manager for Telepathy Framework Link Here
14
LIB_DEPENDS=	libdbus-glib-1.so:devel/dbus-glib \
14
LIB_DEPENDS=	libdbus-glib-1.so:devel/dbus-glib \
15
		libtelepathy-glib.so:net-im/telepathy-glib
15
		libtelepathy-glib.so:net-im/telepathy-glib
16
16
17
USES=		gmake gnome libtool pathfix pkgconfig python:2.7,build ssl
17
USES=		gmake gnome libtool pathfix pkgconfig python:build ssl
18
USE_GNOME=	glib20 libxslt:build
18
USE_GNOME=	glib20 libxslt:build
19
GNU_CONFIGURE=	yes
19
GNU_CONFIGURE=	yes
20
CPPFLAGS+=	-I${LOCALBASE}/include
20
CPPFLAGS+=	-I${LOCALBASE}/include
(-)net-im/telepathy-idle/files/patch-tools_glib-ginterface-gen.py (+56 lines)
Added Link Here
1
--- tools/glib-ginterface-gen.py.orig	2020-09-28 19:59:50 UTC
2
+++ tools/glib-ginterface-gen.py
3
@@ -22,6 +22,7 @@
4
 # License along with this library; if not, write to the Free Software
5
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
6
 
7
+import functools
8
 import sys
9
 import os.path
10
 import xml.dom.minidom
11
@@ -85,18 +86,12 @@ class Generator(object):
12
         self.allow_havoc = allow_havoc
13
 
14
     def h(self, s):
15
-        if isinstance(s, unicode):
16
-            s = s.encode('utf-8')
17
         self.__header.append(s)
18
 
19
     def b(self, s):
20
-        if isinstance(s, unicode):
21
-            s = s.encode('utf-8')
22
         self.__body.append(s)
23
 
24
     def d(self, s):
25
-        if isinstance(s, unicode):
26
-            s = s.encode('utf-8')
27
         self.__docs.append(s)
28
 
29
     def do_node(self, node):
30
@@ -733,7 +728,7 @@ class Generator(object):
31
 
32
     def __call__(self):
33
         nodes = self.dom.getElementsByTagName('node')
34
-        nodes.sort(cmp_by_name)
35
+        nodes.sort(key=functools.cmp_to_key(cmp_by_name))
36
 
37
         self.h('#include <glib-object.h>')
38
         self.h('#include <dbus/dbus-glib.h>')
39
@@ -768,7 +763,7 @@ class Generator(object):
40
         file_set_contents(self.basename + '-gtk-doc.h', '\n'.join(self.__docs))
41
 
42
 def cmdline_error():
43
-    print """\
44
+    print ("""\
45
 usage:
46
     gen-ginterface [OPTIONS] xmlfile Prefix_
47
 options:
48
@@ -788,7 +783,7 @@ options:
49
             void symbol (DBusGMethodInvocation *context)
50
         and return some sort of "not implemented" error via
51
             dbus_g_method_return_error (context, ...)
52
-"""
53
+""")
54
     sys.exit(1)
55
 
56
 
(-)net-im/telepathy-idle/files/patch-tools_libglibcodegen.py (+17 lines)
Added Link Here
1
--- tools/libglibcodegen.py.orig	2013-09-19 15:01:59 UTC
2
+++ tools/libglibcodegen.py
3
@@ -154,7 +154,7 @@ def type_to_gtype(s):
4
         return ("GHashTable *", "DBUS_TYPE_G_STRING_STRING_HASHTABLE", "BOXED", False)
5
     elif s[:2] == 'a{':  #some arbitrary hash tables
6
         if s[2] not in ('y', 'b', 'n', 'q', 'i', 'u', 's', 'o', 'g'):
7
-            raise Exception, "can't index a hashtable off non-basic type " + s
8
+            raise Exception("can't index a hashtable off non-basic type " + s)
9
         first = type_to_gtype(s[2])
10
         second = type_to_gtype(s[3:-1])
11
         return ("GHashTable *", "(dbus_g_type_get_map (\"GHashTable\", " + first[1] + ", " + second[1] + "))", "BOXED", False)
12
@@ -169,4 +169,4 @@ def type_to_gtype(s):
13
         return ("GValueArray *", gtype, "BOXED", True)
14
 
15
     # we just don't know ..
16
-    raise Exception, "don't know the GType for " + s
17
+    raise(Exception, "don't know the GType for " + s)

Return to bug 249735