summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2024-05-26 14:15:33 +0200
committerMichał Górny <mgorny@gentoo.org>2024-05-26 14:41:50 +0200
commit7d942cabf868796005cd14dbab4838f3759d94e5 (patch)
treed40e333ad1f8fe2b68c83b070ba7c784380affb9
parentdev-lang/python: Bump to 3.13.0_beta1_p3 (diff)
downloadgentoo-7d942cabf868796005cd14dbab4838f3759d94e5.tar.gz
gentoo-7d942cabf868796005cd14dbab4838f3759d94e5.tar.bz2
gentoo-7d942cabf868796005cd14dbab4838f3759d94e5.zip
dev-python/pyzmq: Backport a GCC 14 build fix
Closes: https://bugs.gentoo.org/918999 Signed-off-by: Michał Górny <mgorny@gentoo.org>
-rw-r--r--dev-python/pyzmq/files/pyzmq-26.0.3-gcc14.patch53
-rw-r--r--dev-python/pyzmq/pyzmq-26.0.3.ebuild5
2 files changed, 58 insertions, 0 deletions
diff --git a/dev-python/pyzmq/files/pyzmq-26.0.3-gcc14.patch b/dev-python/pyzmq/files/pyzmq-26.0.3-gcc14.patch
new file mode 100644
index 000000000000..8d87af8b7289
--- /dev/null
+++ b/dev-python/pyzmq/files/pyzmq-26.0.3-gcc14.patch
@@ -0,0 +1,53 @@
+From bc5e214e957eb96c7e23b2c46a075e3850805ff1 Mon Sep 17 00:00:00 2001
+From: Min RK <benjaminrk@gmail.com>
+Date: Thu, 16 May 2024 08:34:51 +0200
+Subject: [PATCH 1/2] cffi: fix type of hint mutex pointer
+
+---
+ zmq/backend/cffi/_cdefs.h | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/zmq/backend/cffi/_cdefs.h b/zmq/backend/cffi/_cdefs.h
+index 6c9a06558..cf27f5b4e 100644
+--- a/zmq/backend/cffi/_cdefs.h
++++ b/zmq/backend/cffi/_cdefs.h
+@@ -75,13 +75,14 @@ void * malloc(size_t sz);
+ void free(void *p);
+ int get_ipc_path_max_len(void);
+
++typedef ... mutex_t;
++
+ typedef struct _zhint {
+ void *sock;
+- void *mutex;
++ mutex_t *mutex;
+ size_t id;
+ } zhint;
+
+-typedef ... mutex_t;
+ mutex_t* mutex_allocate();
+
+ int zmq_wrap_msg_init_data(zmq_msg_t *msg,
+
+From b180ebc07fc04b0576fef50c3969fd48fa58694d Mon Sep 17 00:00:00 2001
+From: Min RK <benjaminrk@gmail.com>
+Date: Sun, 26 May 2024 00:29:06 +0200
+Subject: [PATCH 2/2] maybe it needs to specify struct
+
+---
+ zmq/backend/cffi/_cdefs.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/zmq/backend/cffi/_cdefs.h b/zmq/backend/cffi/_cdefs.h
+index cf27f5b4e..7833b9b26 100644
+--- a/zmq/backend/cffi/_cdefs.h
++++ b/zmq/backend/cffi/_cdefs.h
+@@ -75,7 +75,7 @@ void * malloc(size_t sz);
+ void free(void *p);
+ int get_ipc_path_max_len(void);
+
+-typedef ... mutex_t;
++typedef struct { ...; } mutex_t;
+
+ typedef struct _zhint {
+ void *sock;
diff --git a/dev-python/pyzmq/pyzmq-26.0.3.ebuild b/dev-python/pyzmq/pyzmq-26.0.3.ebuild
index 15cac8e4fcbe..bb7ea1838d2b 100644
--- a/dev-python/pyzmq/pyzmq-26.0.3.ebuild
+++ b/dev-python/pyzmq/pyzmq-26.0.3.ebuild
@@ -53,6 +53,11 @@ distutils_enable_tests pytest
# dev-python/sphinx-rtd-theme \
# dev-python/myst-parser
+PATCHES=(
+ # https://github.com/zeromq/pyzmq/pull/1990
+ "${FILESDIR}/${P}-gcc14.patch"
+)
+
src_configure() {
DISTUTILS_ARGS=(
-DZMQ_DRAFT_API="$(usex drafts)"