[packages/libimobiledevice] - added cython patch to fix build with Cython 0.16 and 0.17

qboosh qboosh at pld-linux.org
Thu Sep 6 19:57:09 CEST 2012


commit 900a03c2c7010c86cde36f36bdc4e26bdac7e478
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Thu Sep 6 19:57:33 2012 +0200

    - added cython patch to fix build with Cython 0.16 and 0.17

 libimobiledevice-cython.patch | 103 ++++++++++++++++++++++++++++++++++++++++++
 libimobiledevice.spec         |   9 ++--
 2 files changed, 109 insertions(+), 3 deletions(-)
---
diff --git a/libimobiledevice.spec b/libimobiledevice.spec
index 0de52a6..de1a959 100644
--- a/libimobiledevice.spec
+++ b/libimobiledevice.spec
@@ -1,9 +1,9 @@
 #
 # Conditional build:
 %bcond_without	static_libs	# don't build static libraries
-%bcond_without	cython	# build with Cython based Python bindings
-%bcond_without	openssl	# build with openssl for SSL support
-%bcond_with	gnutls	# build with GnuTLS for SSL support
+%bcond_without	cython		# build with Cython based Python bindings
+%bcond_without	openssl		# build with openssl for SSL support
+%bcond_with	gnutls		# build with GnuTLS for SSL support
 
 %if %{with gnutls}
 %undefine	with_openssl
@@ -16,8 +16,10 @@ Version:	1.1.4
 Release:	1
 License:	LGPL v2+
 Group:		Libraries
+#Source0Download: http://www.libimobiledevice.org/
 Source0:	http://www.libimobiledevice.org/downloads/%{name}-%{version}.tar.bz2
 # Source0-md5:	3f28cbc6a2e30d34685049c0abde5183
+Patch0:		%{name}-cython.patch
 URL:		http://www.libimobiledevice.org/
 BuildRequires:	autoconf >= 2.61
 BuildRequires:	automake
@@ -86,6 +88,7 @@ Wiązania libimobiledevice dla Pythona.
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 %{__libtoolize}
diff --git a/libimobiledevice-cython.patch b/libimobiledevice-cython.patch
new file mode 100644
index 0000000..ad3a662
--- /dev/null
+++ b/libimobiledevice-cython.patch
@@ -0,0 +1,103 @@
+--- libimobiledevice-1.1.4/m4/ac_pkg_cython.m4.orig	2012-04-07 16:14:02.000000000 +0200
++++ libimobiledevice-1.1.4/m4/ac_pkg_cython.m4	2012-09-06 16:49:26.457727996 +0200
+@@ -6,7 +6,7 @@
+                 CYTHON=false
+         elif test -n "$1" ; then
+                 AC_MSG_CHECKING([for Cython version])
+-                [cython_version=`$CYTHON --version 2>&1 | grep 'Cython version' | sed 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/g'`]
++                [cython_version=`$CYTHON --version 2>&1 | grep 'Cython version' | sed 's/.*\<\([0-9][0-9]*\.[0-9][0-9]*\(\.[0-9][0-9]*\)\?\).*/\1/g'`]
+                 AC_MSG_RESULT([$cython_version])
+                 if test -n "$cython_version" ; then
+                         # Calculate the required version number components
+From 84235e0834e57551028329723f4510e1dbe7bc11 Mon Sep 17 00:00:00 2001
+From: Martin Szulecki
+Date: Thu, 17 May 2012 13:44:31 +0000
+Subject: cython: Do not override final methods as comply to Cython >= 0.16 strict check
+
+---
+diff --git a/cython/afc.pxi b/cython/afc.pxi
+index cf72b69..0383471 100644
+--- a/cython/afc.pxi
++++ b/cython/afc.pxi
+@@ -162,7 +162,7 @@ cdef class AfcClient(BaseService):
+             err = afc_client_free(self._c_client)
+             self.handle_error(err)
+ 
+-    cdef inline BaseError _error(self, int16_t ret):
++    cdef BaseError _error(self, int16_t ret):
+         return AfcError(ret)
+ 
+     cpdef list get_device_info(self):
+diff --git a/cython/imobiledevice.pxd b/cython/imobiledevice.pxd
+index d0d1ada..3ec8dfb 100644
+--- a/cython/imobiledevice.pxd
++++ b/cython/imobiledevice.pxd
+@@ -51,8 +51,8 @@ cdef class BaseService(Base):
+ cdef class PropertyListService(BaseService):
+     cpdef send(self, plist.Node node)
+     cpdef object receive(self)
+-    cdef inline int16_t _send(self, plist.plist_t node)
+-    cdef inline int16_t _receive(self, plist.plist_t* c_node)
++    cdef int16_t _send(self, plist.plist_t node)
++    cdef int16_t _receive(self, plist.plist_t* c_node)
+ 
+ cdef extern from "libimobiledevice/lockdown.h":
+     cdef struct lockdownd_client_private:
+diff --git a/cython/imobiledevice.pyx b/cython/imobiledevice.pyx
+index ffaa3c1..9d2e13d 100644
+--- a/cython/imobiledevice.pyx
++++ b/cython/imobiledevice.pyx
+@@ -25,9 +25,8 @@ cdef class Base:
+             return 0
+         cdef BaseError err = self._error(ret)
+         raise err
+-        return -1
+ 
+-    cdef inline BaseError _error(self, int16_t ret): pass
++    cdef BaseError _error(self, int16_t ret): pass
+ 
+ cdef extern from "libimobiledevice/libimobiledevice.h":
+     ctypedef enum idevice_error_t:
+@@ -211,10 +210,10 @@ cdef class PropertyListService(BaseService):
+                 plist.plist_free(c_node)
+             raise
+ 
+-    cdef inline int16_t _send(self, plist.plist_t node):
++    cdef int16_t _send(self, plist.plist_t node):
+         raise NotImplementedError("send is not implemented")
+ 
+-    cdef inline int16_t _receive(self, plist.plist_t* c_node):
++    cdef int16_t _receive(self, plist.plist_t* c_node):
+         raise NotImplementedError("receive is not implemented")
+ 
+ cdef class DeviceLinkService(PropertyListService):
+diff --git a/cython/mobilesync.pxi b/cython/mobilesync.pxi
+index 0ec4710..e610191 100644
+--- a/cython/mobilesync.pxi
++++ b/cython/mobilesync.pxi
+@@ -149,10 +149,10 @@ cdef class MobileSyncClient(DeviceLinkService):
+                 plist.plist_free(remapping)
+             raise
+     
+-    cdef inline int16_t _send(self, plist.plist_t node):
++    cdef int16_t _send(self, plist.plist_t node):
+         return mobilesync_send(self._c_client, node)
+ 
+-    cdef inline int16_t _receive(self, plist.plist_t* node):
++    cdef int16_t _receive(self, plist.plist_t* node):
+         return mobilesync_receive(self._c_client, node)
+ 
+     cdef inline BaseError _error(self, int16_t ret):
+--
+cgit v0.9.0.2
+--- libimobiledevice-1.1.4/cython/imobiledevice.pxd.orig	2012-09-06 19:18:33.427541516 +0200
++++ libimobiledevice-1.1.4/cython/imobiledevice.pxd	2012-09-06 19:52:45.620832075 +0200
+@@ -12,7 +12,7 @@
+ 
+ cdef class Base:
+     cdef inline int handle_error(self, int16_t ret) except -1
+-    cdef inline BaseError _error(self, int16_t ret)
++    cdef BaseError _error(self, int16_t ret)
+ 
+ cdef class iDeviceError(BaseError): pass
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libimobiledevice.git/commitdiff/900a03c2c7010c86cde36f36bdc4e26bdac7e478



More information about the pld-cvs-commit mailing list