Package: libimobiledevice
Version: 1.1.1-4
Severity: normal
Tags: patch
User: [email protected]
Usertags: origin-ubuntu quantal ubuntu-patch

Dear Maintainer,

With the latest libusbmuxd, libimobiledevice FTBFS.  They renamed parts of
their API.  The attached patch, adapted from upstream git, deals with that.

Alternatively, updating to at least 1.1.3 would do it.

Thanks for considering the patch.


-- System Information:
Debian Release: wheezy/sid
  APT prefers quantal-updates
  APT policy: (500, 'quantal-updates'), (500, 'quantal-security'), (500, 
'quantal')
Architecture: i386 (i686)

Kernel: Linux 3.5.0-5-generic (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff -Nru libimobiledevice-1.1.1/debian/changelog libimobiledevice-1.1.1/debian/changelog
diff -Nru libimobiledevice-1.1.1/debian/patches/07_git_libusbmuxd_api.patch libimobiledevice-1.1.1/debian/patches/07_git_libusbmuxd_api.patch
--- libimobiledevice-1.1.1/debian/patches/07_git_libusbmuxd_api.patch	1969-12-31 19:00:00.000000000 -0500
+++ libimobiledevice-1.1.1/debian/patches/07_git_libusbmuxd_api.patch	2012-07-20 17:36:27.000000000 -0400
@@ -0,0 +1,54 @@
+From 0f5d47beb4a278d3eb25aadff9abfdac80d525c2 Mon Sep 17 00:00:00 2001
+From: Martin Szulecki
+Date: Sat, 07 Apr 2012 23:42:07 +0000
+Subject: idevice: Bump libusbmuxd dependency to 1.0.8 and adopt idevice.c to API changes
+
+---
+Index: libimobiledevice-1.1.1/configure.ac
+===================================================================
+--- libimobiledevice-1.1.1.orig/configure.ac	2012-07-20 12:12:57.000000000 -0400
++++ libimobiledevice-1.1.1/configure.ac	2012-07-20 17:09:30.226564699 -0400
+@@ -26,7 +26,7 @@
+ AC_PROG_LIBTOOL
+ 
+ # Checks for libraries.
+-PKG_CHECK_MODULES(libusbmuxd, libusbmuxd >= 0.1.4)
++PKG_CHECK_MODULES(libusbmuxd, libusbmuxd >= 1.0.8)
+ PKG_CHECK_MODULES(libglib2, glib-2.0 >= 2.14.1)
+ PKG_CHECK_MODULES(libgthread2, gthread-2.0 >= 2.14.1)
+ PKG_CHECK_MODULES(libgnutls, gnutls >= 1.6.3 )
+Index: libimobiledevice-1.1.1/src/idevice.c
+===================================================================
+--- libimobiledevice-1.1.1.orig/src/idevice.c	2011-04-25 04:40:06.000000000 -0400
++++ libimobiledevice-1.1.1/src/idevice.c	2012-07-20 17:35:56.558614368 -0400
+@@ -37,7 +37,7 @@
+ 	idevice_event_t ev;
+ 
+ 	ev.event = event->event;
+-	ev.uuid = event->device.uuid;
++	ev.uuid = event->device.udid;
+ 	ev.conn_type = CONNECTION_USBMUXD;
+ 
+ 	if (event_cb) {
+@@ -110,7 +110,7 @@
+ 
+ 	for (i = 0; dev_list[i].handle > 0; i++) {
+ 		newlist = realloc(*devices, sizeof(char*) * (newcount+1));
+-		newlist[newcount++] = strdup(dev_list[i].uuid);
++		newlist[newcount++] = strdup(dev_list[i].udid);
+ 		*devices = newlist;
+ 	}
+ 	usbmuxd_device_list_free(&dev_list);
+@@ -158,10 +158,10 @@
+ idevice_error_t idevice_new(idevice_t * device, const char *uuid)
+ {
+ 	usbmuxd_device_info_t muxdev;
+-	int res = usbmuxd_get_device_by_uuid(uuid, &muxdev);
++	int res = usbmuxd_get_device_by_udid(uuid, &muxdev);
+ 	if (res > 0) {
+ 		idevice_t phone = (idevice_t) malloc(sizeof(struct idevice_private));
+-		phone->uuid = strdup(muxdev.uuid);
++		phone->uuid = strdup(muxdev.udid);
+ 		phone->conn_type = CONNECTION_USBMUXD;
+ 		phone->conn_data = (void*)(long)muxdev.handle;
+ 		*device = phone;
diff -Nru libimobiledevice-1.1.1/debian/patches/series libimobiledevice-1.1.1/debian/patches/series
--- libimobiledevice-1.1.1/debian/patches/series	2012-03-18 11:26:17.000000000 -0400
+++ libimobiledevice-1.1.1/debian/patches/series	2012-07-20 17:09:57.000000000 -0400
@@ -5,3 +5,4 @@
 04_libplist_DSO_linking.patch
 05_remove_gcry_need.patch
 06_git_ios5_handle_error.patch
+07_git_libusbmuxd_api.patch

Reply via email to