summaryrefslogtreecommitdiff
path: root/libre/clementine-libre/imobiledevice.patch
blob: 9d387fd2f32dd9d3fcf70ec226b2974fc3ee6038 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
--- clementine-1.0.1/src/CMakeLists.txt.orig	2012-04-12 09:26:47.932990539 +0100
+++ clementine-1.0.1/src/CMakeLists.txt	2012-04-12 09:28:40.553993173 +0100
@@ -17,6 +17,10 @@
   include_directories(../3rdparty/qtwin)
 endif(WIN32)
 
+if(ENABLE_IMOBILEDEVICE AND IMOBILEDEVICE_VERSION VERSION_GREATER 1.1.1)
+  set(IMOBILEDEVICE_USES_UDIDS ON)
+endif()
+
 include_directories(${CMAKE_BINARY_DIR})
 include_directories(${GLIB_INCLUDE_DIRS})
 include_directories(${LIBXML_INCLUDE_DIRS})
@@ -1008,6 +1012,7 @@
     ${USBMUXD_LIBRARIES}
     gstafcsrc
   )
+  link_directories(${IMOBILEDEVICE_LIBRARY_DIRS})
   link_directories(${USBMUXD_LIBRARY_DIRS})
 endif(HAVE_IMOBILEDEVICE)
 
--- clementine-1.0.1/src/config.h.in.orig	2011-12-02 21:24:43.000000000 +0000
+++ clementine-1.0.1/src/config.h.in	2012-04-12 09:28:40.554993154 +0100
@@ -38,6 +38,7 @@
 #cmakedefine HAVE_SPOTIFY
 #cmakedefine HAVE_STATIC_SQLITE
 #cmakedefine HAVE_WIIMOTEDEV
+#cmakedefine IMOBILEDEVICE_USES_UDIDS
 #cmakedefine LEOPARD
 #cmakedefine SNOW_LEOPARD
 #cmakedefine USE_INSTALL_PREFIX
--- clementine-1.0.1/src/devices/ilister.cpp.orig	2012-04-12 09:28:38.407993781 +0100
+++ clementine-1.0.1/src/devices/ilister.cpp	2012-04-12 09:28:40.554993154 +0100
@@ -1,3 +1,4 @@
+#include "config.h"
 #include "ilister.h"
 #include "imobiledeviceconnection.h"
 
@@ -17,7 +18,11 @@
 void iLister::EventCallback(const idevice_event_t* event, void* context) {
   iLister* me = reinterpret_cast<iLister*>(context);
 
+#ifdef IMOBILEDEVICE_USES_UDIDS
+  const char* uuid = event->udid;
+#else
   const char* uuid = event->uuid;
+#endif
 
   switch (event->event) {
     case IDEVICE_DEVICE_ADD: