git: 2c5f553246da - main - devel/py-qt5-sip: Fix build with py311 (+)

From: Dima Panov <fluffy_at_FreeBSD.org>
Date: Sun, 13 Mar 2022 15:54:25 UTC
The branch main has been updated by fluffy:

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

commit 2c5f553246da9e7143ac05f3411c9f61ac1e0440
Author:     Dima Panov <fluffy@FreeBSD.org>
AuthorDate: 2022-03-13 15:51:46 +0000
Commit:     Dima Panov <fluffy@FreeBSD.org>
CommitDate: 2022-03-13 15:51:46 +0000

    devel/py-qt5-sip: Fix build with py311 (+)
    
    The `_frame` struct was moved to an internal header, however the public API is
    primarily read-only, and py-sip needs to build PyFrameObjects so still import
    the internal headers.
    
    Also sets the Py_BUILD_CORE define for py311a6, trying to restrict it to the frame header.
    
    Inspired by:    cython repo
    With hat:       kde
    Sponsored by:   Netzkommune GmbH
---
 devel/py-qt5-sip/files/patch-siplib.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/devel/py-qt5-sip/files/patch-siplib.c b/devel/py-qt5-sip/files/patch-siplib.c
new file mode 100644
index 000000000000..ba4f09878a2d
--- /dev/null
+++ b/devel/py-qt5-sip/files/patch-siplib.c
@@ -0,0 +1,15 @@
+--- siplib.c.orig	2022-02-01 13:29:23 UTC
++++ siplib.c
+@@ -20,6 +20,12 @@
+ #include <Python.h>
+ #include <datetime.h>
+ #include <frameobject.h>
++#if PY_VERSION_HEX >= 0x030b00a6
++   #ifndef Py_BUILD_CORE
++     #define Py_BUILD_CORE 1
++   #endif
++   #include "internal/pycore_frame.h"
++#endif
+ 
+ #include <assert.h>
+ #include <stdio.h>