mirror of
https://github.com/void-linux/void-packages.git
synced 2025-04-23 09:37:02 +02:00
libimobiledevice: port to python3
This commit is contained in:
parent
3aafcd96ef
commit
8606b156f9
2 changed files with 35 additions and 7 deletions
30
srcpkgs/libimobiledevice/patches/python3.patch
Normal file
30
srcpkgs/libimobiledevice/patches/python3.patch
Normal file
|
@ -0,0 +1,30 @@
|
|||
From 6198152e8708a36782d48bc9d3a5835b19be3330 Mon Sep 17 00:00:00 2001
|
||||
From: Andrew Udvare <audvare@gmail.com>
|
||||
Date: Tue, 22 May 2018 17:02:38 -0400
|
||||
Subject: [PATCH] Fix for Python 3
|
||||
|
||||
---
|
||||
cython/debugserver.pxi | 7 +++----
|
||||
1 file changed, 3 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git cython/debugserver.pxi cython/debugserver.pxi
|
||||
index ddbe0667..42430113 100644
|
||||
--- cython/debugserver.pxi
|
||||
+++ cython/debugserver.pxi
|
||||
@@ -43,14 +43,13 @@ cdef class DebugServerError(BaseError):
|
||||
BaseError.__init__(self, *args, **kwargs)
|
||||
|
||||
|
||||
-# from http://stackoverflow.com/a/17511714
|
||||
-from cpython.string cimport PyString_AsString
|
||||
+from cpython.bytes cimport PyBytes_AS_STRING
|
||||
cdef char ** to_cstring_array(list_str):
|
||||
if not list_str:
|
||||
return NULL
|
||||
cdef char **ret = <char **>malloc(len(list_str) * sizeof(char *))
|
||||
for i in xrange(len(list_str)):
|
||||
- ret[i] = PyString_AsString(list_str[i])
|
||||
+ ret[i] = PyBytes_AS_STRING(list_str[i])
|
||||
return ret
|
||||
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
# Template file for 'libimobiledevice'
|
||||
pkgname=libimobiledevice
|
||||
version=1.2.0
|
||||
revision=14
|
||||
revision=15
|
||||
build_style=gnu-configure
|
||||
hostmakedepends="automake libtool pkgconf python-Cython"
|
||||
makedepends="python-devel libglib-devel libressl-devel libusb-devel
|
||||
hostmakedepends="automake libtool pkgconf python3-Cython"
|
||||
makedepends="python3-devel libglib-devel libressl-devel libusb-devel
|
||||
libplist-devel libusbmuxd-devel"
|
||||
short_desc="Library to communicate with Apple devices"
|
||||
maintainer="Orphaned <orphan@voidlinux.org>"
|
||||
|
@ -13,8 +13,6 @@ homepage="https://github.com/libimobiledevice/libimobiledevice"
|
|||
distfiles="https://github.com/libimobiledevice/libimobiledevice/archive/${version}.tar.gz"
|
||||
checksum=8ba1ea817691b3548b83371f8ec22d73d1e37f8fda7c899ac9c7121d924ca830
|
||||
|
||||
CFLAGS="-I/usr/include/python3.6"
|
||||
|
||||
if [ "$CROSS_BUILD" ]; then
|
||||
configure_args="ac_cv_sys_file_offset_bits=yes ac_cv_sys_large_file=yes"
|
||||
fi
|
||||
|
@ -22,8 +20,8 @@ fi
|
|||
pre_configure() {
|
||||
sed -i 's,SSLv3_,SSLv23_,g' src/idevice.c
|
||||
sed -i 's,-L$(libdir),,g' cython/Makefile.am
|
||||
export PYTHON_CPPFLAGS="-I${XBPS_CROSS_BASE}/usr/include/python2.7"
|
||||
export PYTHON_LDFLAGS="-L${XBPS_CROSS_BASE}/usr/lib -lpython2.7"
|
||||
export PYTHON_CPPFLAGS="-I${XBPS_CROSS_BASE}/usr/include/python${py3_ver}"
|
||||
export PYTHON_LDFLAGS="-L${XBPS_CROSS_BASE}/usr/lib -lpython${py3_ver}"
|
||||
autoreconf -fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue