aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharlie Li <vishwin@FreeBSD.org>2025-11-04 14:43:25 +0000
committerCharlie Li <vishwin@FreeBSD.org>2025-11-04 14:43:25 +0000
commite0cbe081481d26c9722afdd48fa4ff2675b9e899 (patch)
tree83c43a8431a4e7fadc876eca0945b2a3ec62b073
parent1202fd6e3b449f4b34355e7c59fadad7322c1251 (diff)
lang/python313: fix blake2s_impl regen mismatch
The only difference between "stock" and regenerated blake2s_impl.c is where a variable is declared in py_blake2s_new_impl(). Patch the stock file to the regenerated version so the regeneration script does not get called. Reported by: fluffy, jan[at]glaubitz[dot]org PR: 274671
-rw-r--r--lang/python313/files/patch-Modules___blake2_blake2s__impl.c14
-rw-r--r--lang/python313t/Makefile8
2 files changed, 14 insertions, 8 deletions
diff --git a/lang/python313/files/patch-Modules___blake2_blake2s__impl.c b/lang/python313/files/patch-Modules___blake2_blake2s__impl.c
new file mode 100644
index 000000000000..101877f1ae87
--- /dev/null
+++ b/lang/python313/files/patch-Modules___blake2_blake2s__impl.c
@@ -0,0 +1,14 @@
+--- Modules/_blake2/blake2s_impl.c.orig 2025-10-14 13:52:31 UTC
++++ Modules/_blake2/blake2s_impl.c
+@@ -103,10 +103,10 @@ py_blake2s_new_impl(PyTypeObject *type, PyObject *data
+ {
+ BLAKE2sObject *self = NULL;
+ PyObject *data;
++ Py_buffer buf;
+ if (_Py_hashlib_data_argument(&data, data_obj, string) < 0) {
+ return NULL;
+ }
+- Py_buffer buf;
+
+ self = new_BLAKE2sObject(type);
+ if (self == NULL) {
diff --git a/lang/python313t/Makefile b/lang/python313t/Makefile
index a16ecd23a074..9a16a021860d 100644
--- a/lang/python313t/Makefile
+++ b/lang/python313t/Makefile
@@ -6,11 +6,3 @@ MASTERDIR= ${.CURDIR}/../python313
CONFLICTS_INSTALL= python313
.include "${MASTERDIR}/Makefile"
-
-# blake2s_impl is regenerated
-# regen requires at least 3.10, but JIT requires at least 3.11
-.if ${PYTHON_DEFAULT:S/t$//} == 3.13 || ${PYTHON_DEFAULT:S/t$//} < 3.11
-BUILD_DEPENDS+= python3.12:lang/python312
-.else
-BUILD_DEPENDS+= python${PYTHON_DEFAULT}:lang/python${PYTHON_DEFAULT:S/.//g}
-.endif