aboutsummaryrefslogtreecommitdiff
path: root/graphics/darktable/darktable-0.6-gkeyring.patch
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/darktable/darktable-0.6-gkeyring.patch')
-rw-r--r--graphics/darktable/darktable-0.6-gkeyring.patch66
1 files changed, 66 insertions, 0 deletions
diff --git a/graphics/darktable/darktable-0.6-gkeyring.patch b/graphics/darktable/darktable-0.6-gkeyring.patch
new file mode 100644
index 0000000000000..201b1b2213f74
--- /dev/null
+++ b/graphics/darktable/darktable-0.6-gkeyring.patch
@@ -0,0 +1,66 @@
+diff --git a/src/common/pwstorage/backend_gkeyring.c b/src/common/pwstorage/backend_gkeyring.c
+index e5fb43f..2dd0d56 100644
+--- a/src/common/pwstorage/backend_gkeyring.c
++++ b/src/common/pwstorage/backend_gkeyring.c
+@@ -20,7 +20,9 @@
+
+ #include "backend_gkeyring.h"
+ #include "control/conf.h"
++#ifdef HAVE_GNOME_KEYRING
+ #include <gnome-keyring.h>
++#endif
+ #include <glib.h>
+ #define DARKTABLE_KEYRING PACKAGE_NAME
+ #undef DARKTABLE_KEYRING
+@@ -29,6 +31,7 @@ const backend_gkeyring_context_t*
+ dt_pwstorage_gkeyring_new()
+ {
+ backend_gkeyring_context_t *context = (backend_gkeyring_context_t*)g_malloc(sizeof(backend_gkeyring_context_t));
++#ifdef HAVE_GNOME_KEYRING
+ #ifdef DARKTABLE_KEYRING
+ /* Check if darktable keyring exists, if not create it */
+ gboolean keyring_exists = FALSE;
+@@ -56,13 +59,14 @@ dt_pwstorage_gkeyring_new()
+ /* unlock darktable keyring */
+ // Keep this locked until accessed..
+ //gnome_keyring_lock_sync(DARKTABLE_KEYRING);
+-
++#endif
+ return context;
+ }
+
+ gboolean
+ dt_pwstorage_gkeyring_set(const gchar* slot, GHashTable* table)
+ {
++#ifdef HAVE_GNOME_KEYRING
+ GnomeKeyringResult result=0;
+ GnomeKeyringAttributeList * attributes;
+ gchar name[256]="Darktable account information for ";
+@@ -104,6 +108,9 @@ dt_pwstorage_gkeyring_set(const gchar* slot, GHashTable* table)
+ gnome_keyring_attribute_list_free(attributes);
+
+ return (result == GNOME_KEYRING_RESULT_OK);
++#else
++ return FALSE;
++#endif
+ }
+
+ GHashTable*
+@@ -111,7 +118,7 @@ dt_pwstorage_gkeyring_get(const gchar* slot)
+ {
+
+ GHashTable* table = g_hash_table_new (g_str_hash,g_str_equal);
+-
++#ifdef HAVE_GNOME_KEYRING
+ /* find item for slot */
+ GList *items=NULL;
+ GnomeKeyringAttributeList *attributes;
+@@ -144,5 +151,6 @@ dt_pwstorage_gkeyring_get(const gchar* slot)
+ gnome_keyring_attribute_list_free(attributes);
+ gnome_keyring_found_free (items->data);
+ }
++#endif
+ return table;
+ }
+--
+1.7.1