aboutsummaryrefslogtreecommitdiffstats
path: root/net-im
diff options
context:
space:
mode:
authormarcus <marcus@FreeBSD.org>2009-02-05 04:34:32 +0800
committermarcus <marcus@FreeBSD.org>2009-02-05 04:34:32 +0800
commit9c5e505a66f4cfcb497892db41d496a9f4d2ffa4 (patch)
tree9ac7ee11ca2335015c5a0d49040dd11235daf4a0 /net-im
parentd01e9657e34f6c2af4c7fd4c8ea087d6fd2369ae (diff)
downloadfreebsd-ports-graphics-9c5e505a66f4cfcb497892db41d496a9f4d2ffa4.tar.gz
freebsd-ports-graphics-9c5e505a66f4cfcb497892db41d496a9f4d2ffa4.tar.zst
freebsd-ports-graphics-9c5e505a66f4cfcb497892db41d496a9f4d2ffa4.zip
Fix jingle on 64-bit platforms.
Diffstat (limited to 'net-im')
-rw-r--r--net-im/telepathy-gabble/Makefile1
-rw-r--r--net-im/telepathy-gabble/files/patch-src_jingle-content.c50
-rw-r--r--net-im/telepathy-gabble/files/patch-src_jingle-factory.c42
-rw-r--r--net-im/telepathy-gabble/files/patch-src_jingle-factory.h14
-rw-r--r--net-im/telepathy-gabble/files/patch-src_jingle-session.c48
5 files changed, 155 insertions, 0 deletions
diff --git a/net-im/telepathy-gabble/Makefile b/net-im/telepathy-gabble/Makefile
index 321159be847..0706ddaca1d 100644
--- a/net-im/telepathy-gabble/Makefile
+++ b/net-im/telepathy-gabble/Makefile
@@ -7,6 +7,7 @@
PORTNAME= telepathy-gabble
PORTVERSION= 0.7.20
+PORTREVISION= 1
CATEGORIES= net-im
MASTER_SITES= http://telepathy.freedesktop.org/releases/${PORTNAME}/
diff --git a/net-im/telepathy-gabble/files/patch-src_jingle-content.c b/net-im/telepathy-gabble/files/patch-src_jingle-content.c
new file mode 100644
index 00000000000..4331ca44b60
--- /dev/null
+++ b/net-im/telepathy-gabble/files/patch-src_jingle-content.c
@@ -0,0 +1,50 @@
+--- src/jingle-content.c.orig 2009-02-04 15:11:10.000000000 -0500
++++ src/jingle-content.c 2009-02-04 15:32:51.000000000 -0500
+@@ -217,9 +217,12 @@ gabble_jingle_content_set_property (GObj
+
+ if (priv->transport_ns != NULL)
+ {
+- GType transport_type = GPOINTER_TO_INT (
+- g_hash_table_lookup (self->conn->jingle_factory->transports,
+- priv->transport_ns));
++ GabbleJingleFactoryHashType *htype;
++ GType transport_type = 0;
++ htype = g_hash_table_lookup (self->conn->jingle_factory->transports,
++ priv->transport_ns);
++ if (htype)
++ transport_type = htype->type;
+
+ g_assert (transport_type != 0);
+
+@@ -448,6 +451,7 @@ gabble_jingle_content_parse_add (GabbleJ
+ GabbleJingleContentPrivate *priv = GABBLE_JINGLE_CONTENT_GET_PRIVATE (c);
+ const gchar *name, *creator, *senders, *disposition;
+ LmMessageNode *trans_node, *desc_node;
++ GabbleJingleFactoryHashType *htype;
+ GType transport_type = 0;
+ GabbleJingleTransportIface *trans = NULL;
+ JingleDialect dialect;
+@@ -480,8 +484,9 @@ gabble_jingle_content_parse_add (GabbleJ
+
+ dialect = JINGLE_DIALECT_GTALK3;
+ g_object_set (c->session, "dialect", JINGLE_DIALECT_GTALK3, NULL);
+- transport_type = GPOINTER_TO_INT (
+- g_hash_table_lookup (c->conn->jingle_factory->transports, ""));
++ htype = g_hash_table_lookup (c->conn->jingle_factory->transports, "");
++ if (htype)
++ transport_type = htype->type;
+ priv->transport_ns = g_strdup ("");
+ }
+ }
+@@ -499,8 +504,9 @@ gabble_jingle_content_parse_add (GabbleJ
+ {
+ const gchar *ns = lm_message_node_get_namespace (trans_node);
+
+- transport_type = GPOINTER_TO_INT (
+- g_hash_table_lookup (c->conn->jingle_factory->transports, ns));
++ htype = g_hash_table_lookup (c->conn->jingle_factory->transports, ns);
++ if (htype)
++ transport_type = htype->type;
+
+ if (transport_type == 0)
+ {
diff --git a/net-im/telepathy-gabble/files/patch-src_jingle-factory.c b/net-im/telepathy-gabble/files/patch-src_jingle-factory.c
new file mode 100644
index 00000000000..d27706e700b
--- /dev/null
+++ b/net-im/telepathy-gabble/files/patch-src_jingle-factory.c
@@ -0,0 +1,42 @@
+--- src/jingle-factory.c.orig 2009-02-04 15:04:28.000000000 -0500
++++ src/jingle-factory.c 2009-02-04 15:10:48.000000000 -0500
+@@ -91,10 +91,10 @@ gabble_jingle_factory_init (GabbleJingle
+ g_free, g_object_unref);
+
+ obj->transports = g_hash_table_new_full (g_str_hash, g_str_equal,
+- NULL, NULL);
++ NULL, (GDestroyNotify) g_free);
+
+ obj->content_types = g_hash_table_new_full (g_str_hash, g_str_equal,
+- NULL, NULL);
++ NULL, (GDestroyNotify) g_free);
+
+ priv->jingle_cb = NULL;
+
+@@ -606,16 +606,22 @@ void
+ gabble_jingle_factory_register_transport (GabbleJingleFactory *factory,
+ gchar *namespace, GType transport_type)
+ {
+- g_hash_table_insert (factory->transports, namespace,
+- GINT_TO_POINTER (transport_type));
++ GabbleJingleFactoryHashType *htype;
++
++ htype = g_new (GabbleJingleFactoryHashType, 1);
++ htype->type = transport_type;
++ g_hash_table_insert (factory->transports, namespace, htype);
+ }
+
+ void
+ gabble_jingle_factory_register_content_type (GabbleJingleFactory *factory,
+ gchar *namespace, GType content_type)
+ {
+- g_hash_table_insert (factory->content_types, namespace,
+- GINT_TO_POINTER (content_type));
++ GabbleJingleFactoryHashType *htype;
++
++ htype = g_new (GabbleJingleFactoryHashType, 1);
++ htype->type = content_type;
++ g_hash_table_insert (factory->content_types, namespace, htype);
+ }
+
+ static void
diff --git a/net-im/telepathy-gabble/files/patch-src_jingle-factory.h b/net-im/telepathy-gabble/files/patch-src_jingle-factory.h
new file mode 100644
index 00000000000..eac2087980a
--- /dev/null
+++ b/net-im/telepathy-gabble/files/patch-src_jingle-factory.h
@@ -0,0 +1,14 @@
+--- src/jingle-factory.h.orig 2009-02-04 15:04:34.000000000 -0500
++++ src/jingle-factory.h 2009-02-04 15:06:02.000000000 -0500
+@@ -94,6 +94,11 @@ typedef enum {
+ } JingleCandidateType;
+
+ typedef struct _GabbleJingleFactoryClass GabbleJingleFactoryClass;
++typedef struct _GabbleJingleFactoryHashType GabbleJingleFactoryHashType;
++
++struct _GabbleJingleFactoryHashType {
++ GType type;
++};
+
+ GType gabble_jingle_factory_get_type (void);
+
diff --git a/net-im/telepathy-gabble/files/patch-src_jingle-session.c b/net-im/telepathy-gabble/files/patch-src_jingle-session.c
new file mode 100644
index 00000000000..05a91404072
--- /dev/null
+++ b/net-im/telepathy-gabble/files/patch-src_jingle-session.c
@@ -0,0 +1,48 @@
+--- src/jingle-session.c.orig 2009-02-04 15:15:32.000000000 -0500
++++ src/jingle-session.c 2009-02-04 15:33:12.000000000 -0500
+@@ -602,6 +602,7 @@ _each_content_add (GabbleJingleSession *
+ const gchar *name = lm_message_node_get_attribute (content_node, "name");
+ LmMessageNode *desc_node = lm_message_node_get_child_any_ns (content_node,
+ "description");
++ GabbleJingleFactoryHashType *htype;
+ GType content_type = 0;
+ const gchar *content_ns = NULL;
+
+@@ -609,9 +610,10 @@ _each_content_add (GabbleJingleSession *
+ {
+ content_ns = lm_message_node_get_namespace (desc_node);
+ DEBUG ("namespace: %s", content_ns);
+- content_type =
+- GPOINTER_TO_INT (g_hash_table_lookup (priv->conn->jingle_factory->content_types,
+- content_ns));
++ htype = g_hash_table_lookup (priv->conn->jingle_factory->content_types,
++ content_ns);
++ if (htype)
++ content_type = htype->type;
+ }
+
+ if (content_type == 0)
+@@ -1597,7 +1599,8 @@ gabble_jingle_session_add_content (Gabbl
+ {
+ GabbleJingleSessionPrivate *priv = GABBLE_JINGLE_SESSION_GET_PRIVATE (sess);
+ GabbleJingleContent *c;
+- GType content_type;
++ GabbleJingleFactoryHashType *htype;
++ GType content_type = 0;
+ gchar *name = NULL;
+ gint id = g_hash_table_size (priv->contents) + 1;
+
+@@ -1608,9 +1611,10 @@ gabble_jingle_session_add_content (Gabbl
+ }
+ while (g_hash_table_lookup (priv->contents, name) != NULL);
+
+- content_type =
+- GPOINTER_TO_INT (g_hash_table_lookup (priv->conn->jingle_factory->content_types,
+- content_ns));
++ htype = g_hash_table_lookup (priv->conn->jingle_factory->content_types,
++ content_ns);
++ if (htype)
++ content_type = htype->type;
+
+ g_assert (content_type != 0);
+