summary refs log tree commit diff
path: root/pkgs/applications/science/misc/root/root5-python311-fix.patch
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/science/misc/root/root5-python311-fix.patch')
-rw-r--r--pkgs/applications/science/misc/root/root5-python311-fix.patch17
1 files changed, 17 insertions, 0 deletions
diff --git a/pkgs/applications/science/misc/root/root5-python311-fix.patch b/pkgs/applications/science/misc/root/root5-python311-fix.patch
new file mode 100644
index 00000000000..3005b3a73f9
--- /dev/null
+++ b/pkgs/applications/science/misc/root/root5-python311-fix.patch
@@ -0,0 +1,17 @@
+diff --git a/bindings/pyroot/src/MethodProxy.cxx b/bindings/pyroot/src/MethodProxy.cxx
+--- a/bindings/pyroot/src/MethodProxy.cxx
++++ b/bindings/pyroot/src/MethodProxy.cxx
+@@ -4,10 +4,10 @@
+ // Bindings
+ #include "PyROOT.h"
+ #include "structmember.h"    // from Python
+-#if PY_VERSION_HEX >= 0x02050000
+-#include "code.h"            // from Python
+-#else
++#if PY_VERSION_HEX < 0x02050000
+ #include "compile.h"         // from Python
++#elif PY_VERSION_HEX < 0x030b0000
++#include "code.h"            // from Python
+ #endif
+ #ifndef CO_NOFREE
+ // python2.2 does not have CO_NOFREE defined