git: 690254a5dc64 - main - comms/py-libimobiledevice: Allow build with cython 3.1.0+

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Thu, 26 Jun 2025 11:34:21 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=690254a5dc64a7e5c9e3178aee6e8b755068b04d

commit 690254a5dc64a7e5c9e3178aee6e8b755068b04d
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2025-06-26 10:04:09 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2025-06-26 11:30:16 +0000

    comms/py-libimobiledevice: Allow build with cython 3.1.0+
    
    - Bump PORTREVISION for package change
    
    Obtained from:  https://github.com/libimobiledevice/libimobiledevice/commit/0bf0f9e941c85d06ce4b5909d7a61b3a4f2a6a05
---
 comms/libimobiledevice/files/patch-cython | 19 +++++++++++++++++++
 comms/py-libimobiledevice/Makefile        |  2 +-
 2 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/comms/libimobiledevice/files/patch-cython b/comms/libimobiledevice/files/patch-cython
new file mode 100644
index 000000000000..e4a19f7e4d8f
--- /dev/null
+++ b/comms/libimobiledevice/files/patch-cython
@@ -0,0 +1,19 @@
+Obtained from:	https://github.com/libimobiledevice/libimobiledevice/commit/0bf0f9e941c85d06ce4b5909d7a61b3a4f2a6a05
+
+--- cython/debugserver.pxi.orig	2024-07-01 16:27:27 UTC
++++ cython/debugserver.pxi
+@@ -43,13 +43,7 @@ cdef class DebugServerError(BaseError):
+         BaseError.__init__(self, *args, **kwargs)
+ 
+ 
+-# from http://stackoverflow.com/a/17511714
+-# https://github.com/libimobiledevice/libimobiledevice/pull/198
+-from cpython cimport PY_MAJOR_VERSION
+-if PY_MAJOR_VERSION <= 2:
+-    from cpython.string cimport PyString_AsString
+-else:
+-    from cpython.bytes cimport PyBytes_AsString as PyString_AsString
++from cpython.bytes cimport PyBytes_AsString as PyString_AsString
+ cdef char ** to_cstring_array(list_str):
+     if not list_str:
+         return NULL
diff --git a/comms/py-libimobiledevice/Makefile b/comms/py-libimobiledevice/Makefile
index 35fc77e525c1..4b2a98ec349a 100644
--- a/comms/py-libimobiledevice/Makefile
+++ b/comms/py-libimobiledevice/Makefile
@@ -1,4 +1,4 @@
-PORTREVISION=	0
+PORTREVISION=	1
 CATEGORIES=	comms python
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}