public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/proj/libressl:master commit in: app-pda/libimobiledevice/files/, app-pda/libimobiledevice/
@ 2022-10-07 21:11 Quentin Retornaz
  0 siblings, 0 replies; 3+ messages in thread
From: Quentin Retornaz @ 2022-10-07 21:11 UTC (permalink / raw
  To: gentoo-commits

commit:     fccca002cffca7886f59db8440554e986eac683d
Author:     orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Fri Oct  7 16:09:09 2022 +0000
Commit:     Quentin Retornaz <gentoo <AT> retornaz <DOT> com>
CommitDate: Fri Oct  7 21:11:14 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=fccca002

app-pda/libimobiledevice: Merge ::gentoo changes

Signed-off-by: orbea <orbea <AT> riseup.net>
Signed-off-by: Quentin Retornaz <gentoo <AT> retornaz.com>

 .../libimobiledevice-1.3.0-missing_libflags.patch  |  31 ++++++
 .../files/libimobiledevice-1.3.0-slibtool.patch    | 105 +++++++++++++++++++++
 .../libimobiledevice-1.3.0-r1.ebuild               |  25 +++--
 app-pda/libimobiledevice/metadata.xml              |  10 +-
 4 files changed, 159 insertions(+), 12 deletions(-)

diff --git a/app-pda/libimobiledevice/files/libimobiledevice-1.3.0-missing_libflags.patch b/app-pda/libimobiledevice/files/libimobiledevice-1.3.0-missing_libflags.patch
new file mode 100644
index 0000000..b52bf89
--- /dev/null
+++ b/app-pda/libimobiledevice/files/libimobiledevice-1.3.0-missing_libflags.patch
@@ -0,0 +1,31 @@
+From 4b2f17e8cce8fa078aa55f5da5f726c20eac3e2e Mon Sep 17 00:00:00 2001
+From: Nikias Bassen <nikias@gmx.li>
+Date: Tue, 13 Apr 2021 05:36:03 +0200
+Subject: [PATCH] common: Add missing *_LIBS and *_CFLAGS to fix build
+
+---
+ common/Makefile.am | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/common/Makefile.am b/common/Makefile.am
+index 4e3facba..ab01b834 100644
+--- a/common/Makefile.am
++++ b/common/Makefile.am
+@@ -8,12 +8,17 @@ AM_CFLAGS = \
+ 	$(libplist_CFLAGS) \
+ 	$(libgnutls_CFLAGS) \
+ 	$(libtasn1_CFLAGS) \
++	$(libgcrypt_CFLAGS) \
+ 	$(openssl_CFLAGS) \
+ 	$(LFS_CFLAGS)
+ 
+ AM_LDFLAGS = \
+ 	$(libusbmuxd_LIBS) \
+ 	$(libplist_LIBS) \
++	$(libgnutls_LIBS) \
++	$(libtasn1_LIBS) \
++	$(libgcrypt_LIBS) \
++	$(openssl_LIBS) \
+ 	${libpthread_LIBS}
+ 
+ noinst_LTLIBRARIES = libinternalcommon.la

diff --git a/app-pda/libimobiledevice/files/libimobiledevice-1.3.0-slibtool.patch b/app-pda/libimobiledevice/files/libimobiledevice-1.3.0-slibtool.patch
new file mode 100644
index 0000000..1e9fa6c
--- /dev/null
+++ b/app-pda/libimobiledevice/files/libimobiledevice-1.3.0-slibtool.patch
@@ -0,0 +1,105 @@
+From 735ac51e0eeaa3419e85dbad9579401ae828f631 Mon Sep 17 00:00:00 2001
+From: orbea <orbea@riseup.net>
+Date: Tue, 6 Apr 2021 13:06:35 -0700
+Subject: [PATCH] tools: Fix usage of LDFLAGS and LDADD.
+
+Signed-off-by: orbea <orbea@riseup.net>
+---
+ tools/Makefile.am | 40 ++++++++++++++++++++--------------------
+ 1 file changed, 20 insertions(+), 20 deletions(-)
+
+diff --git a/tools/Makefile.am b/tools/Makefile.am
+index 8ed8ad91..04a5faa7 100644
+--- a/tools/Makefile.am
++++ b/tools/Makefile.am
+@@ -40,8 +40,8 @@ bin_PROGRAMS = \
+ 
+ ideviceinfo_SOURCES = ideviceinfo.c
+ ideviceinfo_CFLAGS = $(AM_CFLAGS)
+-ideviceinfo_LDFLAGS = $(top_builddir)/common/libinternalcommon.la $(AM_LDFLAGS)
+-ideviceinfo_LDADD = $(top_builddir)/src/libimobiledevice-1.0.la
++ideviceinfo_LDFLAGS = $(AM_LDFLAGS)
++ideviceinfo_LDADD = $(top_builddir)/src/libimobiledevice-1.0.la $(top_builddir)/common/libinternalcommon.la
+ 
+ idevicename_SOURCES = idevicename.c
+ idevicename_CFLAGS = $(AM_CFLAGS)
+@@ -50,8 +50,8 @@ idevicename_LDADD = $(top_builddir)/src/libimobiledevice-1.0.la
+ 
+ idevicepair_SOURCES = idevicepair.c
+ idevicepair_CFLAGS = -I$(top_srcdir) $(AM_CFLAGS)
+-idevicepair_LDFLAGS = $(top_builddir)/common/libinternalcommon.la $(AM_LDFLAGS) $(libusbmuxd_LIBS)
+-idevicepair_LDADD = $(top_builddir)/src/libimobiledevice-1.0.la
++idevicepair_LDFLAGS = $(AM_LDFLAGS) $(libusbmuxd_LIBS)
++idevicepair_LDADD = $(top_builddir)/src/libimobiledevice-1.0.la $(top_builddir)/common/libinternalcommon.la
+ 
+ idevicesyslog_SOURCES = idevicesyslog.c
+ idevicesyslog_CFLAGS = $(AM_CFLAGS)
+@@ -65,18 +65,18 @@ idevice_id_LDADD = $(top_builddir)/src/libimobiledevice-1.0.la
+ 
+ idevicebackup_SOURCES = idevicebackup.c
+ idevicebackup_CFLAGS = $(AM_CFLAGS)
+-idevicebackup_LDFLAGS = $(top_builddir)/common/libinternalcommon.la $(AM_LDFLAGS)
+-idevicebackup_LDADD = $(top_builddir)/src/libimobiledevice-1.0.la
++idevicebackup_LDFLAGS = $(AM_LDFLAGS)
++idevicebackup_LDADD = $(top_builddir)/src/libimobiledevice-1.0.la $(top_builddir)/common/libinternalcommon.la
+ 
+ idevicebackup2_SOURCES = idevicebackup2.c
+ idevicebackup2_CFLAGS = $(AM_CFLAGS)
+-idevicebackup2_LDFLAGS = $(top_builddir)/common/libinternalcommon.la $(AM_LDFLAGS)
+-idevicebackup2_LDADD = $(top_builddir)/src/libimobiledevice-1.0.la
++idevicebackup2_LDFLAGS = $(AM_LDFLAGS)
++idevicebackup2_LDADD = $(top_builddir)/src/libimobiledevice-1.0.la $(top_builddir)/common/libinternalcommon.la
+ 
+ ideviceimagemounter_SOURCES = ideviceimagemounter.c
+ ideviceimagemounter_CFLAGS = $(AM_CFLAGS)
+-ideviceimagemounter_LDFLAGS = $(top_builddir)/common/libinternalcommon.la $(AM_LDFLAGS)
+-ideviceimagemounter_LDADD = $(top_builddir)/src/libimobiledevice-1.0.la
++ideviceimagemounter_LDFLAGS = $(AM_LDFLAGS)
++ideviceimagemounter_LDADD = $(top_builddir)/src/libimobiledevice-1.0.la $(top_builddir)/common/libinternalcommon.la
+ 
+ idevicescreenshot_SOURCES = idevicescreenshot.c
+ idevicescreenshot_CFLAGS = $(AM_CFLAGS)
+@@ -95,13 +95,13 @@ idevicedate_LDADD = $(top_builddir)/src/libimobiledevice-1.0.la
+ 
+ ideviceprovision_SOURCES = ideviceprovision.c
+ ideviceprovision_CFLAGS = $(AM_CFLAGS)
+-ideviceprovision_LDFLAGS = $(top_builddir)/common/libinternalcommon.la $(AM_LDFLAGS)
+-ideviceprovision_LDADD = $(top_builddir)/src/libimobiledevice-1.0.la
++ideviceprovision_LDFLAGS = $(AM_LDFLAGS)
++ideviceprovision_LDADD = $(top_builddir)/src/libimobiledevice-1.0.la $(top_builddir)/common/libinternalcommon.la
+ 
+ idevicedebugserverproxy_SOURCES = idevicedebugserverproxy.c
+ idevicedebugserverproxy_CFLAGS = -I$(top_srcdir) $(AM_CFLAGS)
+-idevicedebugserverproxy_LDFLAGS = $(top_builddir)/common/libinternalcommon.la $(AM_LDFLAGS)
+-idevicedebugserverproxy_LDADD = $(top_builddir)/src/libimobiledevice-1.0.la
++idevicedebugserverproxy_LDFLAGS = $(AM_LDFLAGS)
++idevicedebugserverproxy_LDADD = $(top_builddir)/src/libimobiledevice-1.0.la $(top_builddir)/common/libinternalcommon.la
+ 
+ idevicediagnostics_SOURCES = idevicediagnostics.c
+ idevicediagnostics_CFLAGS = $(AM_CFLAGS)
+@@ -110,8 +110,8 @@ idevicediagnostics_LDADD = $(top_builddir)/src/libimobiledevice-1.0.la
+ 
+ idevicedebug_SOURCES = idevicedebug.c
+ idevicedebug_CFLAGS = $(AM_CFLAGS)
+-idevicedebug_LDFLAGS = $(top_builddir)/common/libinternalcommon.la $(AM_LDFLAGS)
+-idevicedebug_LDADD = $(top_builddir)/src/libimobiledevice-1.0.la
++idevicedebug_LDFLAGS = $(AM_LDFLAGS)
++idevicedebug_LDADD = $(top_builddir)/src/libimobiledevice-1.0.la $(top_builddir)/common/libinternalcommon.la
+ 
+ idevicenotificationproxy_SOURCES = idevicenotificationproxy.c
+ idevicenotificationproxy_CFLAGS = $(AM_CFLAGS)
+@@ -120,10 +120,10 @@ idevicenotificationproxy_LDADD = $(top_builddir)/src/libimobiledevice-1.0.la
+ 
+ idevicecrashreport_SOURCES = idevicecrashreport.c
+ idevicecrashreport_CFLAGS = -I$(top_srcdir) $(AM_CFLAGS)
+-idevicecrashreport_LDFLAGS = $(top_builddir)/common/libinternalcommon.la $(AM_LDFLAGS)
+-idevicecrashreport_LDADD = $(top_builddir)/src/libimobiledevice-1.0.la
++idevicecrashreport_LDFLAGS = $(AM_LDFLAGS)
++idevicecrashreport_LDADD = $(top_builddir)/src/libimobiledevice-1.0.la $(top_builddir)/common/libinternalcommon.la
+ 
+ idevicesetlocation_SOURCES = idevicesetlocation.c
+ idevicesetlocation_CFLAGS = $(AM_CFLAGS)
+-idevicesetlocation_LDFLAGS = $(top_builddir)/common/libinternalcommon.la $(AM_LDFLAGS)
+-idevicesetlocation_LDADD = $(top_builddir)/src/libimobiledevice-1.0.la
++idevicesetlocation_LDFLAGS = $(AM_LDFLAGS)
++idevicesetlocation_LDADD = $(top_builddir)/src/libimobiledevice-1.0.la $(top_builddir)/common/libinternalcommon.la

diff --git a/app-pda/libimobiledevice/libimobiledevice-1.3.0-r1.ebuild b/app-pda/libimobiledevice/libimobiledevice-1.3.0-r1.ebuild
index dbbf257..b694b87 100644
--- a/app-pda/libimobiledevice/libimobiledevice-1.3.0-r1.ebuild
+++ b/app-pda/libimobiledevice/libimobiledevice-1.3.0-r1.ebuild
@@ -2,7 +2,8 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
-PYTHON_COMPAT=( python3_{7,8} )
+
+PYTHON_COMPAT=( python3_{7,8,9,10} )
 
 inherit autotools python-r1
 
@@ -12,10 +13,8 @@ SRC_URI="https://github.com/libimobiledevice/libimobiledevice/releases/download/
 
 # While COPYING* doesn't mention 'or any later version', all the headers do, hence use +
 LICENSE="GPL-2+ LGPL-2.1+"
-
 SLOT="0/1.0-6" # based on SONAME of libimobiledevice-1.0.so
-
-KEYWORDS="amd64 ~arm ~arm64 ppc ~ppc64 x86"
+KEYWORDS="amd64 ~arm ~arm64 ppc ~ppc64 ~riscv x86"
 IUSE="doc gnutls python static-libs"
 REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
 
@@ -25,17 +24,19 @@ RDEPEND="
 	gnutls? (
 		dev-libs/libgcrypt:0
 		>=dev-libs/libtasn1-1.1
-		>=net-libs/gnutls-2.2.0 )
-	!gnutls? ( dev-libs/openssl:0= )
+		>=net-libs/gnutls-2.2.0
+	)
+	!gnutls? (
+		dev-libs/openssl:0=
+	)
 	python? (
 		${PYTHON_DEPS}
-		app-pda/libplist[python(-),${PYTHON_USEDEP}] )
+		app-pda/libplist[python(-),${PYTHON_USEDEP}]
+	)
 "
-
 DEPEND="
 	${RDEPEND}
 "
-
 BDEPEND="
 	virtual/pkgconfig
 	doc? ( app-doc/doxygen )
@@ -44,7 +45,11 @@ BDEPEND="
 
 BUILD_DIR="${S}_build"
 
-PATCHES=( "${FILESDIR}"/${P}-libressl.patch )
+PATCHES=(
+	"${FILESDIR}/${P}-slibtool.patch"
+	"${FILESDIR}/${P}-missing_libflags.patch" #787962
+	"${FILESDIR}"/${P}-libressl.patch
+)
 
 src_prepare() {
 	default

diff --git a/app-pda/libimobiledevice/metadata.xml b/app-pda/libimobiledevice/metadata.xml
index 6f49eba..3553c5b 100644
--- a/app-pda/libimobiledevice/metadata.xml
+++ b/app-pda/libimobiledevice/metadata.xml
@@ -1,5 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
 <pkgmetadata>
-<!-- maintainer-needed -->
+	<maintainer type="person">
+		<email>matthew@gentoo.org</email>
+		<name>Matthew Smith</name>
+	</maintainer>
+	<upstream>
+		<remote-id type="github">libimobiledevice/libimobiledevice</remote-id>
+	</upstream>
 </pkgmetadata>


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/proj/libressl:master commit in: app-pda/libimobiledevice/files/, app-pda/libimobiledevice/
@ 2023-05-10 21:14 orbea
  0 siblings, 0 replies; 3+ messages in thread
From: orbea @ 2023-05-10 21:14 UTC (permalink / raw
  To: gentoo-commits

commit:     9e5cc2fc993de7f467cefb4bb4b4dd0e628989a7
Author:     orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Wed May 10 19:05:10 2023 +0000
Commit:     orbea <orbea <AT> riseup <DOT> net>
CommitDate: Wed May 10 19:05:10 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=9e5cc2fc

app-pda/libimobiledevice: add 1.3.0-r2

Signed-off-by: orbea <orbea <AT> riseup.net>

 .../files/libimobiledevice-1.3.0-python.patch      | 223 +++++++++++++++++++++
 .../libimobiledevice-1.3.0-r2.ebuild               | 115 +++++++++++
 2 files changed, 338 insertions(+)

diff --git a/app-pda/libimobiledevice/files/libimobiledevice-1.3.0-python.patch b/app-pda/libimobiledevice/files/libimobiledevice-1.3.0-python.patch
new file mode 100644
index 0000000..28ca6da
--- /dev/null
+++ b/app-pda/libimobiledevice/files/libimobiledevice-1.3.0-python.patch
@@ -0,0 +1,223 @@
+https://github.com/libimobiledevice/libimobiledevice/pull/685
+
+From fb337f26c8e58ed0ce0750f7899ccbd5da203dee Mon Sep 17 00:00:00 2001
+From: wendyisgr33n <wendyisgr33n@gmail.com>
+Date: Mon, 30 Jul 2018 10:43:57 -0700
+Subject: [PATCH 1/5] Fixed AFC afc.pxi definitions for Python2/3
+ compatibility. Added missing public method 'remove_path_and_contents'
+
+--- a/cython/afc.pxi
++++ b/cython/afc.pxi
+@@ -52,6 +52,7 @@ cdef extern from "libimobiledevice/afc.h":
+     afc_error_t afc_read_directory(afc_client_t client, char *dir, char ***list)
+     afc_error_t afc_get_file_info(afc_client_t client, char *filename, char ***infolist)
+     afc_error_t afc_remove_path(afc_client_t client, char *path)
++    afc_error_t afc_remove_path_and_contents(afc_client_t client, char *path)
+     afc_error_t afc_rename_path(afc_client_t client, char *f, char *to)
+     afc_error_t afc_make_directory(afc_client_t client, char *dir)
+     afc_error_t afc_truncate(afc_client_t client, char *path, uint64_t newsize)
+@@ -235,17 +236,17 @@ cdef class AfcClient(BaseService):
+             afc_file_mode_t c_mode
+             uint64_t handle
+             AfcFile f
+-        if mode == <bytes>'r':
++        if mode == b'r':
+             c_mode = AFC_FOPEN_RDONLY
+-        elif mode == <bytes>'r+':
++        elif mode == b'r+':
+             c_mode = AFC_FOPEN_RW
+-        elif mode == <bytes>'w':
++        elif mode == b'w':
+             c_mode = AFC_FOPEN_WRONLY
+-        elif mode == <bytes>'w+':
++        elif mode == b'w+':
+             c_mode = AFC_FOPEN_WR
+-        elif mode == <bytes>'a':
++        elif mode == b'a':
+             c_mode = AFC_FOPEN_APPEND
+-        elif mode == <bytes>'a+':
++        elif mode == b'a+':
+             c_mode = AFC_FOPEN_RDAPPEND
+         else:
+             raise ValueError("mode string must be 'r', 'r+', 'w', 'w+', 'a', or 'a+'")
+@@ -282,6 +283,9 @@ cdef class AfcClient(BaseService):
+     cpdef remove_path(self, bytes path):
+         self.handle_error(afc_remove_path(self._c_client, path))
+ 
++    cpdef remove_path_and_contents(self, bytes path):
++        self.handle_error(afc_remove_path_and_contents(self._c_client, path))
++
+     cpdef rename_path(self, bytes f, bytes t):
+         self.handle_error(afc_rename_path(self._c_client, f, t))
+ 
+@@ -308,17 +312,17 @@ cdef class Afc2Client(AfcClient):
+             afc_file_mode_t c_mode
+             uint64_t handle
+             AfcFile f
+-        if mode == <bytes>'r':
++        if mode == b'r':
+             c_mode = AFC_FOPEN_RDONLY
+-        elif mode == <bytes>'r+':
++        elif mode == b'r+':
+             c_mode = AFC_FOPEN_RW
+-        elif mode == <bytes>'w':
++        elif mode == b'w':
+             c_mode = AFC_FOPEN_WRONLY
+-        elif mode == <bytes>'w+':
++        elif mode == b'w+':
+             c_mode = AFC_FOPEN_WR
+-        elif mode == <bytes>'a':
++        elif mode == b'a':
+             c_mode = AFC_FOPEN_APPEND
+-        elif mode == <bytes>'a+':
++        elif mode == b'a+':
+             c_mode = AFC_FOPEN_RDAPPEND
+         else:
+             raise ValueError("mode string must be 'r', 'r+', 'w', 'w+', 'a', or 'a+'")
+
+From b71e8935949a1d6f419a3f783d804809fb4c309b Mon Sep 17 00:00:00 2001
+From: wendyisgr33n <wendyisgr33n@gmail.com>
+Date: Mon, 30 Jul 2018 10:44:40 -0700
+Subject: [PATCH 2/5] Fixed debugserver.pxi PyString_AsString compatibility
+ with Python3
+
+--- a/cython/debugserver.pxi
++++ b/cython/debugserver.pxi
+@@ -44,7 +44,12 @@ cdef class DebugServerError(BaseError):
+ 
+ 
+ # from http://stackoverflow.com/a/17511714
+-from cpython.string cimport PyString_AsString
++# 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
+ cdef char ** to_cstring_array(list_str):
+     if not list_str:
+         return NULL
+
+From 44f54cdc0ebb052e4a642023bbf96504e6139ec9 Mon Sep 17 00:00:00 2001
+From: wendyisgr33n <wendyisgr33n@gmail.com>
+Date: Mon, 30 Jul 2018 10:45:22 -0700
+Subject: [PATCH 3/5] Fixed bytes/strings check in imobiledevice.pyx for
+ compatibility with Python2/3
+
+--- a/cython/imobiledevice.pyx
++++ b/cython/imobiledevice.pyx
+@@ -171,7 +171,7 @@ from libc.stdlib cimport *
+ cdef class iDevice(Base):
+     def __cinit__(self, object udid=None, *args, **kwargs):
+         cdef char* c_udid = NULL
+-        if isinstance(udid, basestring):
++        if isinstance(udid, (str, bytes)):
+             c_udid = <bytes>udid
+         elif udid is not None:
+             raise TypeError("iDevice's constructor takes a string or None as the udid argument")
+
+From 8908619973e751b778d3fb73dc309cd5cb7f4122 Mon Sep 17 00:00:00 2001
+From: wendyisgr33n <wendyisgr33n@gmail.com>
+Date: Mon, 30 Jul 2018 10:45:55 -0700
+Subject: [PATCH 4/5] Fixed bytes/strings checks in lockdown.pxi for
+ compatibility with Python2/3
+
+--- a/cython/lockdown.pxi
++++ b/cython/lockdown.pxi
+@@ -230,9 +230,9 @@ cdef class LockdownClient(PropertyListService):
+ 
+         if issubclass(service, BaseService) and \
+             service.__service_name__ is not None \
+-            and isinstance(service.__service_name__, basestring):
++            and isinstance(service.__service_name__, (str, bytes)):
+             c_service_name = <bytes>service.__service_name__
+-        elif isinstance(service, basestring):
++        elif isinstance(service, (str, bytes)):
+             c_service_name = <bytes>service
+         else:
+             raise TypeError("LockdownClient.start_service() takes a BaseService or string as its first argument")
+@@ -253,7 +253,7 @@ cdef class LockdownClient(PropertyListService):
+ 
+         if not hasattr(service_class, '__service_name__') and \
+             not service_class.__service_name__ is not None \
+-            and not isinstance(service_class.__service_name__, basestring):
++            and not isinstance(service_class.__service_name__, (str, bytes)):
+             raise TypeError("LockdownClient.get_service_client() takes a BaseService as its first argument")
+ 
+         descriptor = self.start_service(service_class)
+
+From e59cbdbf4e7dba98ef57a54e314a89edfea0a3dc Mon Sep 17 00:00:00 2001
+From: wendyisgr33n <wendyisgr33n@gmail.com>
+Date: Mon, 30 Jul 2018 10:47:48 -0700
+Subject: [PATCH 5/5] Fixed method visibility in mobilebackup2.pxi API
+
+--- a/cython/mobilebackup2.pxi
++++ b/cython/mobilebackup2.pxi
+@@ -54,10 +54,10 @@ cdef class MobileBackup2Client(PropertyListService):
+     cdef inline BaseError _error(self, int16_t ret):
+         return MobileBackup2Error(ret)
+ 
+-    cdef send_message(self, bytes message, plist.Node options):
++    cpdef send_message(self, bytes message, plist.Node options):
+         self.handle_error(mobilebackup2_send_message(self._c_client, message, options._c_node))
+ 
+-    cdef tuple receive_message(self):
++    cpdef tuple receive_message(self):
+         cdef:
+             char* dlmessage = NULL
+             plist.plist_t c_node = NULL
+@@ -73,29 +73,34 @@ cdef class MobileBackup2Client(PropertyListService):
+                 free(dlmessage)
+             raise
+ 
+-    cdef int send_raw(self, bytes data, int length):
++    cpdef int send_raw(self, bytes data, int length):
+         cdef:
+-            uint32_t bytes = 0
++            uint32_t bytes_recvd = 0
+             mobilebackup2_error_t err
+-        err = mobilebackup2_send_raw(self._c_client, data, length, &bytes)
++        err = mobilebackup2_send_raw(self._c_client, data, length, &bytes_recvd)
+         try:
+             self.handle_error(err)
+-            return <bint>bytes
++            return <bint>bytes_recvd
+         except BaseError, e:
+             raise
+ 
+-    cdef int receive_raw(self, bytes data, int length):
++    cpdef int receive_raw(self, bytearray data, int length):
+         cdef:
+-            uint32_t bytes = 0
++            uint32_t bytes_recvd = 0
+             mobilebackup2_error_t err
+-        err = mobilebackup2_receive_raw(self._c_client, data, length, &bytes)
++        err = mobilebackup2_receive_raw(self._c_client, data, length, &bytes_recvd)
++
++        # Throwing an exception when we test if theres more data to read is excessive
++        if err == -1 and bytes_recvd == 0:
++            return 0
++
+         try:
+             self.handle_error(err)
+-            return <bint>bytes
++            return <bint>bytes_recvd
+         except BaseError, e:
+             raise
+ 
+-    cdef float version_exchange(self, double[::1] local_versions):
++    cpdef float version_exchange(self, double[::1] local_versions):
+         cdef:
+             double[::1] temp = None
+             double remote_version = 0.0
+@@ -107,8 +112,8 @@ cdef class MobileBackup2Client(PropertyListService):
+         except BaseError, e:
+             raise
+ 
+-    cdef send_request(self, bytes request, bytes target_identifier, bytes source_identifier, plist.Node options):
++    cpdef send_request(self, bytes request, bytes target_identifier, bytes source_identifier, plist.Node options):
+         self.handle_error(mobilebackup2_send_request(self._c_client, request, target_identifier, source_identifier, options._c_node))
+ 
+-    cdef send_status_response(self, int status_code, bytes status1, plist.Node status2):
++    cpdef send_status_response(self, int status_code, bytes status1, plist.Node status2):
+         self.handle_error(mobilebackup2_send_status_response(self._c_client, status_code, status1, status2._c_node))

diff --git a/app-pda/libimobiledevice/libimobiledevice-1.3.0-r2.ebuild b/app-pda/libimobiledevice/libimobiledevice-1.3.0-r2.ebuild
new file mode 100644
index 0000000..397932c
--- /dev/null
+++ b/app-pda/libimobiledevice/libimobiledevice-1.3.0-r2.ebuild
@@ -0,0 +1,115 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{9..11} )
+
+inherit autotools python-r1
+
+DESCRIPTION="Support library to communicate with Apple iPhone/iPod Touch devices"
+HOMEPAGE="https://www.libimobiledevice.org/"
+SRC_URI="https://github.com/libimobiledevice/libimobiledevice/releases/download/${PV}/${P}.tar.bz2"
+
+# While COPYING* doesn't mention 'or any later version', all the headers do, hence use +
+LICENSE="GPL-2+ LGPL-2.1+"
+SLOT="0/1.0-6" # based on SONAME of libimobiledevice-1.0.so
+KEYWORDS="amd64 ~arm ~arm64 ~loong ppc ~ppc64 ~riscv x86"
+IUSE="doc gnutls python static-libs"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+RDEPEND="
+	>=app-pda/libplist-2.2.0:=
+	>=app-pda/libusbmuxd-2.0.2:=
+	gnutls? (
+		dev-libs/libgcrypt:0
+		>=dev-libs/libtasn1-1.1
+		>=net-libs/gnutls-2.2.0
+	)
+	!gnutls? (
+		dev-libs/openssl:0=
+	)
+	python? (
+		${PYTHON_DEPS}
+		app-pda/libplist[python(-),${PYTHON_USEDEP}]
+	)
+"
+DEPEND="
+	${RDEPEND}
+"
+BDEPEND="
+	virtual/pkgconfig
+	doc? ( app-doc/doxygen )
+	python? ( >=dev-python/cython-0.17[${PYTHON_USEDEP}] )
+"
+
+BUILD_DIR="${S}_build"
+
+PATCHES=(
+	"${FILESDIR}/${P}-slibtool.patch"
+	"${FILESDIR}/${P}-missing_libflags.patch" #787962
+	"${FILESDIR}/${P}-libressl.patch"
+	"${FILESDIR}/${P}-python.patch"
+)
+
+src_prepare() {
+	default
+	eautoreconf
+}
+
+src_configure() {
+	local ECONF_SOURCE=${S}
+
+	local myeconfargs=( $(use_enable static-libs static) )
+	use gnutls && myeconfargs+=( --disable-openssl )
+
+	do_configure() {
+		mkdir -p "${BUILD_DIR}" || die
+		pushd "${BUILD_DIR}" >/dev/null || die
+		econf "${myeconfargs[@]}" "${@}"
+		popd >/dev/null || die
+	}
+
+	do_configure_python() {
+		# Bug 567916
+		local -x PYTHON_LDFLAGS="$(python_get_LIBS)"
+		do_configure "$@"
+	}
+
+	do_configure --without-cython
+	use python && python_foreach_impl do_configure_python
+}
+
+src_compile() {
+	python_compile() {
+		emake -C "${BUILD_DIR}"/cython \
+			VPATH="${S}/cython:$1/cython" \
+			imobiledevice_la_LIBADD="$1/src/libimobiledevice-1.0.la"
+	}
+
+	emake -C "${BUILD_DIR}"
+	use python && python_foreach_impl python_compile "${BUILD_DIR}"
+
+	if use doc; then
+		doxygen "${BUILD_DIR}"/doxygen.cfg || die
+	fi
+}
+
+src_install() {
+	python_install() {
+		emake -C "${BUILD_DIR}/cython" install \
+			DESTDIR="${D}" \
+			VPATH="${S}/cython:$1/cython"
+	}
+
+	emake -C "${BUILD_DIR}" install DESTDIR="${D}"
+	use python && python_foreach_impl python_install "${BUILD_DIR}"
+	use doc && dodoc docs/html/*
+
+	if use python; then
+		insinto /usr/include/${PN}/cython
+		doins cython/imobiledevice.pxd
+	fi
+
+	find "${D}" -name '*.la' -delete || die
+}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/proj/libressl:master commit in: app-pda/libimobiledevice/files/, app-pda/libimobiledevice/
@ 2024-04-23 14:18 orbea
  0 siblings, 0 replies; 3+ messages in thread
From: orbea @ 2024-04-23 14:18 UTC (permalink / raw
  To: gentoo-commits

commit:     d96e8a93b096a8671c5a7940f2f2bb1b08d37e7d
Author:     orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Tue Apr 23 14:17:27 2024 +0000
Commit:     orbea <orbea <AT> riseup <DOT> net>
CommitDate: Tue Apr 23 14:17:27 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/libressl.git/commit/?id=d96e8a93

app-pda/libimobiledevice: add 1.3.0-r4, 1.3.0_p20240201, drop 1.3.0-r3

Signed-off-by: orbea <orbea <AT> riseup.net>

 app-pda/libimobiledevice/Manifest                  |  1 +
 .../files/libimobiledevice-1.3.0-cython3.patch     | 48 ++++++++++++++
 .../files/libimobiledevice-1.3.0-libressl.patch    | 31 +++------
 ...libimobiledevice-1.3.0_p20240201-libressl.patch | 23 +++++++
 .../libimobiledevice-1.3.0_p20240201_time_h.patch  | 10 +++
 ...-r3.ebuild => libimobiledevice-1.3.0-r4.ebuild} |  8 +--
 .../libimobiledevice-1.3.0_p20240201.ebuild        | 77 ++++++++++++++++++++++
 7 files changed, 172 insertions(+), 26 deletions(-)

diff --git a/app-pda/libimobiledevice/Manifest b/app-pda/libimobiledevice/Manifest
index 1a1995a..c02e6d5 100644
--- a/app-pda/libimobiledevice/Manifest
+++ b/app-pda/libimobiledevice/Manifest
@@ -1 +1,2 @@
 DIST libimobiledevice-1.3.0.tar.bz2 733949 BLAKE2B 40717280bb3424c7431aa93d06d10de817e6761acf2b19948d80b691cfb4dd4ef0e31b81c8458eed29a43c8c8aa256da7baa3648fb785cfbdb7316daaba119a3 SHA512 7b22040552a6561729c79c0846f571b0e608abb7c297567d2ecfdd1718ce86df08a5e34ba51f209bdee96a1917da15e7ba3aaef1d289a951d1d3470b1f89e6a8
+DIST libimobiledevice-1.3.0_p20240201.tar.gz 405723 BLAKE2B 5f3672e6b3c180440c215d9411eb2f21fe9451d822707e5b11ffff6693dccabfb5d184ef35f36bce2af508cbdebb656923927558ef39669825679a8ebf3cc8ee SHA512 d3746b7e0803840489593c9a3d8c8b16f6d4be5e2cd5c947d05be31e49c095c6503ef9150c886a87c68f4694bc6c1bfba96c4578789adc8f165a6391d0e4918f

diff --git a/app-pda/libimobiledevice/files/libimobiledevice-1.3.0-cython3.patch b/app-pda/libimobiledevice/files/libimobiledevice-1.3.0-cython3.patch
new file mode 100644
index 0000000..c7b8cf0
--- /dev/null
+++ b/app-pda/libimobiledevice/files/libimobiledevice-1.3.0-cython3.patch
@@ -0,0 +1,48 @@
+https://bugs.gentoo.org/898666
+https://github.com/libimobiledevice/libimobiledevice/pull/1521
+
+--- a/cython/installation_proxy.pxi
++++ b/cython/installation_proxy.pxi
+@@ -27,7 +27,7 @@ cdef extern from "libimobiledevice/installation_proxy.h":
+     instproxy_error_t instproxy_restore(instproxy_client_t client, char *appid, plist.plist_t client_options, instproxy_status_cb_t status_cb, void *user_data)
+     instproxy_error_t instproxy_remove_archive(instproxy_client_t client, char *appid, plist.plist_t client_options, instproxy_status_cb_t status_cb, void *user_data)
+ 
+-cdef void instproxy_notify_cb(plist.plist_t command, plist.plist_t status, void *py_callback) with gil:
++cdef void instproxy_notify_cb(plist.plist_t command, plist.plist_t status, void *py_callback) noexcept:
+     (<object>py_callback)(plist.plist_t_to_node(command, False), plist.plist_t_to_node(status, False))
+ 
+ cdef class InstallationProxyError(BaseError):
+
+From deba42ba94c13517ebdbe7a4d8177ab47a9589a5 Mon Sep 17 00:00:00 2001
+From: IridiumXOR <oliveriandrea@gmail.com>
+Date: Thu, 11 Jan 2024 22:00:39 +0100
+Subject: [PATCH 2/3] Fix np_notify_cb for Cython 3 noexcept error
+
+--- a/cython/notification_proxy.pxi
++++ b/cython/notification_proxy.pxi
+@@ -70,7 +70,7 @@ NP_ITDBPREP_DID_END = C_NP_ITDBPREP_DID_END
+ NP_LANGUAGE_CHANGED = C_NP_LANGUAGE_CHANGED
+ NP_ADDRESS_BOOK_PREF_CHANGED = C_NP_ADDRESS_BOOK_PREF_CHANGED
+ 
+-cdef void np_notify_cb(const_char_ptr notification, void *py_callback):
++cdef void np_notify_cb(const_char_ptr notification, void *py_callback) noexcept:
+     (<object>py_callback)(notification)
+ 
+ cdef class NotificationProxyError(BaseError):
+
+From 7739a4bf61a0fa549646d6062978f126a1ff06fa Mon Sep 17 00:00:00 2001
+From: IridiumXOR <oliveriandrea@gmail.com>
+Date: Thu, 11 Jan 2024 22:03:07 +0100
+Subject: [PATCH 3/3] Fix idevice_event_cb for Cython 3 noexcept error
+
+--- a/cython/imobiledevice.pyx
++++ b/cython/imobiledevice.pyx
+@@ -94,7 +94,7 @@ cdef class iDeviceEvent:
+         def __get__(self):
+             return self._c_event.conn_type
+ 
+-cdef void idevice_event_cb(const_idevice_event_t c_event, void *user_data) with gil:
++cdef void idevice_event_cb(const_idevice_event_t c_event, void *user_data) noexcept:
+     cdef iDeviceEvent event = iDeviceEvent.__new__(iDeviceEvent)
+     event._c_event = c_event
+     (<object>user_data)(event)

diff --git a/app-pda/libimobiledevice/files/libimobiledevice-1.3.0-libressl.patch b/app-pda/libimobiledevice/files/libimobiledevice-1.3.0-libressl.patch
index 0957c91..9f13402 100644
--- a/app-pda/libimobiledevice/files/libimobiledevice-1.3.0-libressl.patch
+++ b/app-pda/libimobiledevice/files/libimobiledevice-1.3.0-libressl.patch
@@ -1,25 +1,12 @@
-From 170e1c445e8c930f4ee9dddfb9f1bcf24c089962 Mon Sep 17 00:00:00 2001
-From: Nikias Bassen <nikias@gmx.li>
-Date: Thu, 6 Aug 2020 20:43:08 +0200
-Subject: [PATCH] idevice: Fix build with LibreSSL
-
-Upstream-Status: Accepted
-[https://github.com/libimobiledevice/libimobiledevice/commit/170e1c445e8c930f4ee9dddfb9f1bcf24c089962]
-Signed-off-by: Stefan Strogin <steils@gentoo.org>
----
- src/idevice.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/idevice.c b/src/idevice.c
-index fea1e03f..47c9ab4d 100644
---- a/src/idevice.c
-+++ b/src/idevice.c
-@@ -1015,7 +1015,7 @@ LIBIMOBILEDEVICE_API idevice_error_t idevice_connection_enable_ssl(idevice_conne
- 		return ret;
+--- a/common/userpref.c
++++ b/common/userpref.c
+@@ -627,7 +627,9 @@ userpref_error_t pair_record_generate_keys_and_certs(plist_t pair_record, key_da
+ 		}
  	}
  
--#if OPENSSL_VERSION_NUMBER >= 0x10100000L
-+#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
- 	SSL_CTX_set_security_level(ssl_ctx, 0);
- #endif
++#ifndef LIBRESSL_VERSION_NUMBER
+ 	X509V3_EXT_cleanup();
++#endif
+ 	X509_free(dev_cert);
  
+ 	EVP_PKEY_free(pubkey);

diff --git a/app-pda/libimobiledevice/files/libimobiledevice-1.3.0_p20240201-libressl.patch b/app-pda/libimobiledevice/files/libimobiledevice-1.3.0_p20240201-libressl.patch
new file mode 100644
index 0000000..6b1ad26
--- /dev/null
+++ b/app-pda/libimobiledevice/files/libimobiledevice-1.3.0_p20240201-libressl.patch
@@ -0,0 +1,23 @@
+--- a/3rd_party/libsrp6a-sha512/t_math.c
++++ b/3rd_party/libsrp6a-sha512/t_math.c
+@@ -720,7 +720,7 @@ BigIntegerModExp(BigInteger r, BigInteger b, BigInteger e, BigInteger m, BigInte
+   else if(a == NULL) {
+     BN_mod_exp(r, b, e, m, c);
+   }
+-#if OPENSSL_VERSION_NUMBER >= 0x00906000
++#if OPENSSL_VERSION_NUMBER >= 0x00906000 && !defined(LIBRESSL_VERSION_NUMBER)
+   else if(B > 0 && B < ULONG_MAX) {  /* 0.9.6 and above has mont_word optimization */
+     BN_mod_exp_mont_word(r, B, e, m, c, a);
+   }
+--- a/common/userpref.c
++++ b/common/userpref.c
+@@ -627,7 +627,9 @@ userpref_error_t pair_record_generate_keys_and_certs(plist_t pair_record, key_da
+ 		}
+ 	}
+ 
++#ifndef LIBRESSL_VERSION_NUMBER
+ 	X509V3_EXT_cleanup();
++#endif
+ 	X509_free(dev_cert);
+ 
+ 	EVP_PKEY_free(pubkey);

diff --git a/app-pda/libimobiledevice/files/libimobiledevice-1.3.0_p20240201_time_h.patch b/app-pda/libimobiledevice/files/libimobiledevice-1.3.0_p20240201_time_h.patch
new file mode 100644
index 0000000..b158c97
--- /dev/null
+++ b/app-pda/libimobiledevice/files/libimobiledevice-1.3.0_p20240201_time_h.patch
@@ -0,0 +1,10 @@
+--- a/tools/afcclient.c
++++ b/tools/afcclient.c
+@@ -36,6 +36,7 @@
+ #include <signal.h>
+ #include <ctype.h>
+ #include <unistd.h>
++#include <time.h>
+ 
+ #ifdef WIN32
+ #include <windows.h>

diff --git a/app-pda/libimobiledevice/libimobiledevice-1.3.0-r3.ebuild b/app-pda/libimobiledevice/libimobiledevice-1.3.0-r4.ebuild
similarity index 96%
rename from app-pda/libimobiledevice/libimobiledevice-1.3.0-r3.ebuild
rename to app-pda/libimobiledevice/libimobiledevice-1.3.0-r4.ebuild
index f994417..32e70f4 100644
--- a/app-pda/libimobiledevice/libimobiledevice-1.3.0-r3.ebuild
+++ b/app-pda/libimobiledevice/libimobiledevice-1.3.0-r4.ebuild
@@ -1,7 +1,7 @@
 # Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=7
+EAPI=8
 
 PYTHON_COMPAT=( python3_{9..11} )
 
@@ -37,20 +37,20 @@ RDEPEND="
 DEPEND="
 	${RDEPEND}
 "
-# <cython-3 for bug #898666
 BDEPEND="
 	virtual/pkgconfig
 	doc? ( app-text/doxygen )
-	python? ( <dev-python/cython-3[${PYTHON_USEDEP}] )
+	python? ( dev-python/cython[${PYTHON_USEDEP}] )
 "
 
 BUILD_DIR="${S}_build"
 
 PATCHES=(
+	"${FILESDIR}/${P}-libressl.patch"
 	"${FILESDIR}/${P}-slibtool.patch"
 	"${FILESDIR}/${P}-missing_libflags.patch" #787962
-	"${FILESDIR}/${P}-libressl.patch"
 	"${FILESDIR}/${P}-python.patch"
+	"${FILESDIR}"/${P}-cython3.patch # Bug #898666
 )
 
 src_prepare() {

diff --git a/app-pda/libimobiledevice/libimobiledevice-1.3.0_p20240201.ebuild b/app-pda/libimobiledevice/libimobiledevice-1.3.0_p20240201.ebuild
new file mode 100644
index 0000000..944188f
--- /dev/null
+++ b/app-pda/libimobiledevice/libimobiledevice-1.3.0_p20240201.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools
+
+MY_COMMIT=73b6fd183872096f20e6d1007429546a317a7cb1
+
+DESCRIPTION="Support library to communicate with Apple iPhone/iPod Touch devices"
+HOMEPAGE="https://www.libimobiledevice.org/"
+SRC_URI="https://github.com/libimobiledevice/libimobiledevice/archive/${MY_COMMIT}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}"/${PN}-${MY_COMMIT}
+
+# While COPYING* doesn't mention 'or any later version', all the headers do, hence use +
+LICENSE="GPL-2+ LGPL-2.1+"
+SLOT="0/1.0-6" # based on SONAME of libimobiledevice-1.0.so
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~x86"
+IUSE="doc gnutls readline static-libs"
+
+RDEPEND="
+	app-pda/libimobiledevice-glue:=
+	>=app-pda/libplist-2.3:=
+	>=app-pda/libusbmuxd-2.0.2:=
+	gnutls? (
+		dev-libs/libgcrypt:0
+		>=dev-libs/libtasn1-1.1
+		>=net-libs/gnutls-2.2.0
+	)
+	!gnutls? (
+		dev-libs/openssl:0=
+	)
+	readline? ( sys-libs/readline:= )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+	virtual/pkgconfig
+	doc? ( app-text/doxygen )
+"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-1.3.0_p20240201-libressl.patch
+	"${FILESDIR}"/${PN}-1.3.0_p20240201_time_h.patch
+)
+
+src_prepare() {
+	default
+	echo ${PV}-${MY_COMMIT} > .tarball-version
+	eautoreconf
+}
+
+src_configure() {
+	local myeconfargs=(
+		--without-cython
+		$(use_enable static-libs static)
+	)
+	use gnutls && myeconfargs+=( --disable-openssl )
+	# --with-readline also causes readline to not be used
+	use readline || myeconfargs+=( --without-readline )
+	econf "${myeconfargs[@]}"
+}
+
+src_compile() {
+	emake
+
+	if use doc; then
+		doxygen doxygen.cfg || die
+	fi
+}
+
+src_install() {
+	emake install DESTDIR="${D}"
+
+	use doc && dodoc docs/html/*
+
+	find "${D}" -name '*.la' -delete || die
+}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-04-23 14:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-10 21:14 [gentoo-commits] repo/proj/libressl:master commit in: app-pda/libimobiledevice/files/, app-pda/libimobiledevice/ orbea
  -- strict thread matches above, loose matches on Subject: below --
2024-04-23 14:18 orbea
2022-10-07 21:11 Quentin Retornaz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox