git: 9d20700b977b - main - graphics/openshadinglanguage: unbreak build with py311

From: Dima Panov <fluffy_at_FreeBSD.org>
Date: Thu, 14 Apr 2022 14:15:52 UTC
The branch main has been updated by fluffy:

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

commit 9d20700b977b05ca0e06dfa0843270947deb7864
Author:     Dima Panov <fluffy@FreeBSD.org>
AuthorDate: 2022-04-14 14:14:43 +0000
Commit:     Dima Panov <fluffy@FreeBSD.org>
CommitDate: 2022-04-14 14:15:44 +0000

    graphics/openshadinglanguage: unbreak build with py311
    
    Approved by:    maintainer (implicit)
---
 .../files/patch-src_liboslquery_py__osl.h                | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/graphics/openshadinglanguage/files/patch-src_liboslquery_py__osl.h b/graphics/openshadinglanguage/files/patch-src_liboslquery_py__osl.h
new file mode 100644
index 000000000000..be1a19d203b8
--- /dev/null
+++ b/graphics/openshadinglanguage/files/patch-src_liboslquery_py__osl.h
@@ -0,0 +1,16 @@
+--- src/liboslquery/py_osl.h.orig	2022-01-08 02:36:45 UTC
++++ src/liboslquery/py_osl.h
+@@ -31,6 +31,13 @@
+ #    include <OpenEXR/half.h>
+ #endif
+ 
++#if PY_VERSION_HEX >= 0x030b00a6
++   #ifndef Py_BUILD_CORE
++     #define Py_BUILD_CORE 1
++   #endif
++   #include "internal/pycore_frame.h"
++#endif
++
+ #include <pybind11/numpy.h>
+ #include <pybind11/operators.h>
+ #include <pybind11/pybind11.h>