git: e0cbe081481d - main - lang/python313: fix blake2s_impl regen mismatch

From: Charlie Li <vishwin_at_FreeBSD.org>
Date: Tue, 04 Nov 2025 14:45:02 UTC
The branch main has been updated by vishwin:

URL: https://cgit.FreeBSD.org/ports/commit/?id=e0cbe081481d26c9722afdd48fa4ff2675b9e899

commit e0cbe081481d26c9722afdd48fa4ff2675b9e899
Author:     Charlie Li <vishwin@FreeBSD.org>
AuthorDate: 2025-11-04 14:43:25 +0000
Commit:     Charlie Li <vishwin@FreeBSD.org>
CommitDate: 2025-11-04 14:43:25 +0000

    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
---
 .../python313/files/patch-Modules___blake2_blake2s__impl.c | 14 ++++++++++++++
 lang/python313t/Makefile                                   |  8 --------
 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