summaryrefslogtreecommitdiffstats
path: root/security/seahorse
diff options
context:
space:
mode:
authormarcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059>2008-11-24 10:44:50 +0800
committermarcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059>2008-11-24 10:44:50 +0800
commite81bb3c253c0200d5c5b810eea6521db4ce382e5 (patch)
tree2351acdf15b33cb51d0afc32dbffb69916c4715b /security/seahorse
parent8b0f82110f4c73000164d94511b7c90301ee0486 (diff)
downloadmarcuscom-ports-e81bb3c253c0200d5c5b810eea6521db4ce382e5.tar
marcuscom-ports-e81bb3c253c0200d5c5b810eea6521db4ce382e5.tar.gz
marcuscom-ports-e81bb3c253c0200d5c5b810eea6521db4ce382e5.tar.bz2
marcuscom-ports-e81bb3c253c0200d5c5b810eea6521db4ce382e5.tar.lz
marcuscom-ports-e81bb3c253c0200d5c5b810eea6521db4ce382e5.tar.xz
marcuscom-ports-e81bb3c253c0200d5c5b810eea6521db4ce382e5.tar.zst
marcuscom-ports-e81bb3c253c0200d5c5b810eea6521db4ce382e5.zip
Fix crashes on 64-bit platforms.
git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@11769 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'security/seahorse')
-rw-r--r--security/seahorse/Makefile3
-rw-r--r--security/seahorse/files/patch-common_seahorse-registry.c76
-rw-r--r--security/seahorse/files/patch-common_seahorse-registry.h21
-rw-r--r--security/seahorse/files/patch-src_seahorse-generate-select.c14
-rw-r--r--security/seahorse/files/patch-src_seahorse-viewer.c17
5 files changed, 130 insertions, 1 deletions
diff --git a/security/seahorse/Makefile b/security/seahorse/Makefile
index 405e29589..e62ecec9a 100644
--- a/security/seahorse/Makefile
+++ b/security/seahorse/Makefile
@@ -3,11 +3,12 @@
# Whom: Dave McKay <dave@mu.org>
#
# $FreeBSD$
-# $MCom: ports/security/seahorse/Makefile,v 1.71 2008/09/21 06:46:58 kwm Exp $
+# $MCom: ports/security/seahorse/Makefile,v 1.72 2008/10/20 02:51:20 mezz Exp $
#
PORTNAME= seahorse
PORTVERSION= 2.24.1
+PORTREVISION= 1
CATEGORIES= security gnome
MASTER_SITES= GNOME
DIST_SUBDIR= gnome2
diff --git a/security/seahorse/files/patch-common_seahorse-registry.c b/security/seahorse/files/patch-common_seahorse-registry.c
new file mode 100644
index 000000000..a9b0cc424
--- /dev/null
+++ b/security/seahorse/files/patch-common_seahorse-registry.c
@@ -0,0 +1,76 @@
+--- common/seahorse-registry.c.orig 2008-11-23 18:26:38.000000000 -0500
++++ common/seahorse-registry.c 2008-11-23 19:20:08.000000000 -0500
+@@ -49,6 +49,25 @@ cleanup_registry (void *unused)
+ registry_singleton = NULL;
+ }
+
++static guint registry_hash (gconstpointer key)
++{
++ SeahorseRegistryType *rtype;
++
++ rtype = (SeahorseRegistryType *) key;
++
++ return (guint) rtype->type;
++}
++
++static gboolean registry_equal (gconstpointer a, gconstpointer b)
++{
++ SeahorseRegistryType *rta, *rtb;
++
++ rta = (SeahorseRegistryType *) a;
++ rtb = (SeahorseRegistryType *) b;
++
++ return (rta->type == rtb->type);
++}
++
+ static void
+ keys_to_list (gpointer key, gpointer value, gpointer user_data)
+ {
+@@ -61,6 +80,7 @@ register_type_for_category (SeahorseRegi
+ {
+ SeahorseRegistryPrivate *pv = SEAHORSE_REGISTRY_GET_PRIVATE (registry);
+ GHashTable *set;
++ SeahorseRegistryType *rtype;
+
+ g_return_if_fail (SEAHORSE_IS_REGISTRY (registry));
+ g_return_if_fail (category);
+@@ -68,11 +88,14 @@ register_type_for_category (SeahorseRegi
+
+ set = g_hash_table_lookup (pv->categories, category);
+ if (!set) {
+- set = g_hash_table_new_full (g_direct_hash, g_direct_equal, NULL, NULL);
++ set = g_hash_table_new_full (registry_hash, registry_equal, (GDestroyNotify) g_free, NULL);
+ g_hash_table_replace (pv->categories, g_strdup (category), set);
+ }
++
++ rtype = g_new (SeahorseRegistryType, 1);
++ rtype->type = type;
+
+- g_hash_table_replace (set, GUINT_TO_POINTER (type), NO_VALUE);
++ g_hash_table_replace (set, rtype, NO_VALUE);
+ }
+
+ static GList*
+@@ -115,6 +138,7 @@ lookup_types (SeahorseRegistry *registry
+
+ /* Go through each item in list and make sure it exists in this cat */
+ for (l = types; l; l = l ? g_list_next (l) : types) {
++ SeahorseRegistryType *rtype;
+ type = l;
+ if (!g_hash_table_lookup (set, type->data)) {
+ l = g_list_previous (l);
+@@ -224,8 +248,12 @@ seahorse_registry_find_type (SeahorseReg
+ va_end (cats);
+
+ type = 0;
+- if (types)
+- type = GPOINTER_TO_UINT (types->data);
++ if (types) {
++ SeahorseRegistryType *rtype;
++
++ rtype = (SeahorseRegistryType *) types->data;
++ type = rtype->type;
++ }
+ g_list_free (types);
+ return type;
+ }
diff --git a/security/seahorse/files/patch-common_seahorse-registry.h b/security/seahorse/files/patch-common_seahorse-registry.h
new file mode 100644
index 000000000..f1f57de3b
--- /dev/null
+++ b/security/seahorse/files/patch-common_seahorse-registry.h
@@ -0,0 +1,21 @@
+--- common/seahorse-registry.h.orig 2008-11-23 18:26:42.000000000 -0500
++++ common/seahorse-registry.h 2008-11-23 18:26:47.000000000 -0500
+@@ -35,6 +35,7 @@ G_BEGIN_DECLS
+
+ typedef struct _SeahorseRegistry SeahorseRegistry;
+ typedef struct _SeahorseRegistryClass SeahorseRegistryClass;
++typedef struct _SeahorseRegistryType SeahorseRegistryType;
+
+ struct _SeahorseRegistry {
+ GObject parent;
+@@ -44,6 +45,10 @@ struct _SeahorseRegistryClass {
+ GObjectClass parent_class;
+ };
+
++struct _SeahorseRegistryType {
++ GType type;
++};
++
+ /* member functions */
+ GType seahorse_registry_get_type (void) G_GNUC_CONST;
+
diff --git a/security/seahorse/files/patch-src_seahorse-generate-select.c b/security/seahorse/files/patch-src_seahorse-generate-select.c
new file mode 100644
index 000000000..7de1b7ff4
--- /dev/null
+++ b/security/seahorse/files/patch-src_seahorse-generate-select.c
@@ -0,0 +1,14 @@
+--- src/seahorse-generate-select.c.orig 2008-11-23 18:28:34.000000000 -0500
++++ src/seahorse-generate-select.c 2008-11-23 18:29:30.000000000 -0500
+@@ -197,8 +197,10 @@ static GObject * seahorse_generate_selec
+ GList* typ_it;
+ typ_collection = types;
+ for (typ_it = typ_collection; typ_it != NULL; typ_it = typ_it->next) {
++ SeahorseRegistryType *rtype;
+ GType typ;
+- typ = GPOINTER_TO_INT (typ_it->data);
++ rtype = (SeahorseRegistryType *) typ_it->data;
++ typ = rtype->type;
+ {
+ SeahorseGenerator* generator;
+ gint _tmp5;
diff --git a/security/seahorse/files/patch-src_seahorse-viewer.c b/security/seahorse/files/patch-src_seahorse-viewer.c
new file mode 100644
index 000000000..5acb2e00d
--- /dev/null
+++ b/security/seahorse/files/patch-src_seahorse-viewer.c
@@ -0,0 +1,17 @@
+--- src/seahorse-viewer.c.orig 2008-11-23 18:27:49.000000000 -0500
++++ src/seahorse-viewer.c 2008-11-23 18:28:27.000000000 -0500
+@@ -556,10 +556,13 @@ seahorse_viewer_constructor (GType type,
+ /* Setup the commands */
+ types = seahorse_registry_find_types (seahorse_registry_get (), "commands", NULL, NULL);
+ for (l = types; l; l = g_list_next (l)) {
+- GType typ = GPOINTER_TO_INT (l->data);
++ SeahorseRegistryType *rtype = (SeahorseRegistryType *) l->data;
++ GType typ;
+ SeahorseCommands *commands;
+ GtkActionGroup *actions;
+ const gchar *uidef;
++
++ typ = rtype->type;
+
+ /* Add each commands to our hash table */
+ commands = g_object_new (typ, "view", self, NULL);