public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in gnome-base/gvfs/files: gvfs-1.10.1-libimobiledevice-1.1.2.patch
@ 2012-04-02  7:34 Alexandre Rostovtsev (tetromino)
  0 siblings, 0 replies; only message in thread
From: Alexandre Rostovtsev (tetromino) @ 2012-04-02  7:34 UTC (permalink / raw
  To: gentoo-commits

tetromino    12/04/02 07:34:47

  Added:                gvfs-1.10.1-libimobiledevice-1.1.2.patch
  Log:
  Fix building against >=libimobiledevice-1.1.2 (bug #410411, thanks to Leo Laursen for reporting).
  
  (Portage version: 2.2.0_alpha98/cvs/Linux x86_64)

Revision  Changes    Path
1.1                  gnome-base/gvfs/files/gvfs-1.10.1-libimobiledevice-1.1.2.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/gnome-base/gvfs/files/gvfs-1.10.1-libimobiledevice-1.1.2.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/gnome-base/gvfs/files/gvfs-1.10.1-libimobiledevice-1.1.2.patch?rev=1.1&content-type=text/plain

Index: gvfs-1.10.1-libimobiledevice-1.1.2.patch
===================================================================
From 9668b2601e43a7a32471383c63cd3839aa721c51 Mon Sep 17 00:00:00 2001
From: Alexandre Rostovtsev <tetromino@gentoo.org>
Date: Mon, 2 Apr 2012 03:15:30 -0400
Subject: [PATCH] afc: Fix building against libimobiledevice-1.1.2

In 1.1.2, the struct idevice_event_t uuid field was renamed to udid.
Since libimobiledevice lacks a library version macro, we are forced
to check for the pkgconfig version in configure.
---
 configure.ac                   |    3 +++
 daemon/gvfsbackendafc.c        |   10 +++++++++-
 monitor/afc/afcvolumemonitor.c |   11 +++++++++--
 3 files changed, 21 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index e31fb50..081cc09 100644
--- a/configure.ac
+++ b/configure.ac
@@ -327,6 +327,9 @@ if test "x$enable_afc" != "xno" ; then
   if test "x$msg_afc" = "xyes"; then
     PKG_CHECK_MODULES(AFC, libimobiledevice-1.0 libplist)
     AC_DEFINE(HAVE_AFC, 1, [Define to 1 if AFC is going to be built])
+    PKG_CHECK_EXISTS(libimobiledevice-1.0 >= 1.1.2,
+                     [AC_DEFINE(HAVE_LIBIMOBILEDEVICE_1_1_2, 1,
+                                [Define to 1 if libimobiledevice-1.1.2 found])])
   fi
 fi
 
diff --git a/daemon/gvfsbackendafc.c b/daemon/gvfsbackendafc.c
index ab7094f..a62a197 100644
--- a/daemon/gvfsbackendafc.c
+++ b/daemon/gvfsbackendafc.c
@@ -339,11 +339,19 @@ static void
 _idevice_event_cb (const idevice_event_t *event, void *user_data)
 {
   GVfsBackendAfc *afc_backend = G_VFS_BACKEND_AFC (user_data);
+  gchar *event_udid;
 
   g_return_if_fail (afc_backend->uuid != NULL);
   if (event->event != IDEVICE_DEVICE_REMOVE)
     return;
-  if (g_str_equal (event->uuid, afc_backend->uuid) == FALSE)
+
+#ifdef HAVE_LIBIMOBILEDEVICE_1_1_2
+  event_udid = event->udid;
+#else
+  event_udid = event->uuid;
+#endif
+
+  if (g_str_equal (event_udid, afc_backend->uuid) == FALSE)
     return;
 
   g_print ("Shutting down AFC backend for device uuid %s\n", afc_backend->uuid);
diff --git a/monitor/afc/afcvolumemonitor.c b/monitor/afc/afcvolumemonitor.c
index dfc3fa5..9f24753 100644
--- a/monitor/afc/afcvolumemonitor.c
+++ b/monitor/afc/afcvolumemonitor.c
@@ -83,15 +83,22 @@ static void
 g_vfs_afc_monitor_idevice_event (const idevice_event_t *event, void *user_data)
 {
   GVfsAfcVolumeMonitor *self;
+  gchar *event_udid;
 
   g_return_if_fail (event != NULL);
 
   self = G_VFS_AFC_VOLUME_MONITOR(user_data);
 
+#ifdef HAVE_LIBIMOBILEDEVICE_1_1_2
+  event_udid = event->udid;
+#else
+  event_udid = event->uuid;
+#endif
+
   if (event->event == IDEVICE_DEVICE_ADD)
-    g_vfs_afc_monitor_create_volume (self, event->uuid);
+    g_vfs_afc_monitor_create_volume (self, event_udid);
   else
-    g_vfs_afc_monitor_remove_volume (self, event->uuid);
+    g_vfs_afc_monitor_remove_volume (self, event_udid);
 }
 
 static GObject *
-- 
1.7.8.5







^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2012-04-02  7:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-02  7:34 [gentoo-commits] gentoo-x86 commit in gnome-base/gvfs/files: gvfs-1.10.1-libimobiledevice-1.1.2.patch Alexandre Rostovtsev (tetromino)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox