summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2024-06-13 21:16:21 +0200
committerMichał Górny <mgorny@gentoo.org>2024-06-13 21:18:24 +0200
commitc7844e99dc3decc0251d49e06ffde66c24004612 (patch)
tree5c5570553c5dd4f775a015a1aa4c49e8cb8c6fc9 /dev-python/blake3
parentdev-python/csscompressor: Enable py3.13 (diff)
downloadgentoo-c7844e99dc3decc0251d49e06ffde66c24004612.tar.gz
gentoo-c7844e99dc3decc0251d49e06ffde66c24004612.tar.bz2
gentoo-c7844e99dc3decc0251d49e06ffde66c24004612.zip
dev-python/blake3: Fix USE=-rust with GCC 14
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/blake3')
-rw-r--r--dev-python/blake3/blake3-0.4.1.ebuild5
-rw-r--r--dev-python/blake3/files/blake3-0.4.1-gcc14.patch37
2 files changed, 42 insertions, 0 deletions
diff --git a/dev-python/blake3/blake3-0.4.1.ebuild b/dev-python/blake3/blake3-0.4.1.ebuild
index b2772f15cb9e..87f3352c3eee 100644
--- a/dev-python/blake3/blake3-0.4.1.ebuild
+++ b/dev-python/blake3/blake3-0.4.1.ebuild
@@ -113,6 +113,11 @@ src_unpack() {
}
src_prepare() {
+ local PATCHES=(
+ # https://github.com/oconnor663/blake3-py/pull/44
+ "${FILESDIR}/${P}-gcc14.patch"
+ )
+
# sed the package name and version to improve compatibility
sed -e 's:blake3_experimental_c:blake3:' \
-e "s:0[.]0[.]1:${PV}:" \
diff --git a/dev-python/blake3/files/blake3-0.4.1-gcc14.patch b/dev-python/blake3/files/blake3-0.4.1-gcc14.patch
new file mode 100644
index 000000000000..367d5c94e1b1
--- /dev/null
+++ b/dev-python/blake3/files/blake3-0.4.1-gcc14.patch
@@ -0,0 +1,37 @@
+diff --git a/c_impl/blake3module.c b/c_impl/blake3module.c
+index 4448445..842421a 100644
+--- a/c_impl/blake3module.c
++++ b/c_impl/blake3module.c
+@@ -217,7 +217,7 @@ static PyObject *Blake3_update(Blake3Object *self, PyObject *args) {
+ // Success. We need to increment the refcount on self to return it, see:
+ // https://docs.python.org/3/extending/extending.html#ownership-rules.
+ Py_INCREF(self);
+- ret = self;
++ ret = (PyObject *)self;
+
+ exit:
+ release_buf_if_acquired(&data);
+@@ -272,7 +272,7 @@ static PyObject *Blake3_update_mmap(Blake3Object *self, PyObject *args,
+ // Success. We need to increment the refcount on self to return it, see:
+ // https://docs.python.org/3/extending/extending.html#ownership-rules.
+ Py_INCREF(self);
+- ret = self;
++ ret = (PyObject *)self;
+
+ exit:
+ if (file) {
+@@ -347,11 +347,11 @@ static PyObject *Blake3_reset(Blake3Object *self, PyObject *args) {
+
+ static PyMethodDef Blake3_methods[] = {
+ {"update", (PyCFunction)Blake3_update, METH_VARARGS, "add input bytes"},
+- {"update_mmap", (PyCFunctionWithKeywords)Blake3_update_mmap,
++ {"update_mmap", (PyCFunction)Blake3_update_mmap,
+ METH_VARARGS | METH_KEYWORDS, "add input bytes from a filepath"},
+- {"digest", (PyCFunctionWithKeywords)Blake3_digest,
++ {"digest", (PyCFunction)Blake3_digest,
+ METH_VARARGS | METH_KEYWORDS, "finalize the hash"},
+- {"hexdigest", (PyCFunctionWithKeywords)Blake3_hexdigest,
++ {"hexdigest", (PyCFunction)Blake3_hexdigest,
+ METH_VARARGS | METH_KEYWORDS,
+ "finalize the hash and encode the result as hex"},
+ {"copy", (PyCFunction)Blake3_copy, METH_VARARGS,