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,45 +1,45 @@ -PORTREVISION= 0 +PORTREVISION= 1 CATEGORIES= comms python PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} MAINTAINER= jhale@FreeBSD.org COMMENT= Python bindings for libimobiledevice LIB_DEPENDS= libimobiledevice-1.0.so:${MASTER_PORT} \ libplist-2.0.so:devel/libplist BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}libplist>=2.2.0:devel/py-libplist@${PY_FLAVOR} RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}libplist>=2.2.0:devel/py-libplist@${PY_FLAVOR} USES+= python USE_PYTHON= cython3 flavors CONFIGURE_ENV= PYTHON_LDFLAGS="`pkg-config --libs python-${PYTHON_VER}`" BINARY_ALIAS= cython=cython-${PYTHON_VER} MASTERDIR= ${.CURDIR:H:H}/comms/libimobiledevice PORTSCOUT= ignore:1 BUILD_WRKSRC= ${WRKSRC}/cython INSTALL_WRKSRC= ${BUILD_WRKSRC} PLIST= ${.CURDIR}/pkg-plist PLIST_FILES= include/imobiledevice/cython/imobiledevice.pxd \ ${PYTHONPREFIX_SITELIBDIR:S|^${PREFIX}/||}/imobiledevice.a \ ${PYTHONPREFIX_SITELIBDIR:S|^${PREFIX}/||}/imobiledevice.so _USES_configure+= 471:post-autoreconf SLAVE_PORT= yes post-autoreconf: @${REINPLACE_CMD} \ -e 's|$$(top_builddir)/src/libimobiledevice-1.0.la|-limobiledevice-1.0|' \ -e 's|$$(imobiledevice_la_DEPENDENCIES)||' \ ${BUILD_WRKSRC}/Makefile.in post-install: @${MKDIR} ${STAGEDIR}${PREFIX}/include/imobiledevice/cython ${INSTALL_DATA} ${INSTALL_WRKSRC}/imobiledevice.pxd \ ${STAGEDIR}${PREFIX}/include/imobiledevice/cython .include "${MASTERDIR}/Makefile"