From 0089fe641a47fb0f3599e3a676a7d9e0ed55873e Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Sat, 19 Oct 2019 16:32:34 +0200 Subject: [PATCH] freecad: fix and rebuild for Python 3.8. --- srcpkgs/freecad/patches/090-py38.patch | 22 ++++++++++++++++++++++ srcpkgs/freecad/template | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/freecad/patches/090-py38.patch diff --git a/srcpkgs/freecad/patches/090-py38.patch b/srcpkgs/freecad/patches/090-py38.patch new file mode 100644 index 00000000000..92566df9df3 --- /dev/null +++ b/srcpkgs/freecad/patches/090-py38.patch @@ -0,0 +1,22 @@ +From 174011749d836f3b6c6ae2630f53b2f4c1f9d3fc Mon Sep 17 00:00:00 2001 +From: Richard +Date: Thu, 17 Oct 2019 11:20:10 -0500 +Subject: [PATCH] Update swigpyrun.in for Python 3.8 + +In Python 3.8 some functions related to thread state were intentionally made private. + +This fix (specific to FreeCAD) was suggested here: + +https://bugs.python.org/issue35886 + +--- src/Base/swigpyrun.inl ++++ src/Base/swigpyrun.inl +@@ -72,7 +72,7 @@ void cleanupSWIG_T(const char* TypeName) + + PyObject *module, *dict; + PyInterpreterState *interp = PyThreadState_GET()->interp; +- PyObject *modules = interp->modules; ++ PyObject *modules = PyImport_GetModuleDict(); + module = PyDict_GetItemString(modules, "__builtin__"); + if (module != NULL && PyModule_Check(module)) { + dict = PyModule_GetDict(module); diff --git a/srcpkgs/freecad/template b/srcpkgs/freecad/template index 70caa0f5793..54759a77399 100644 --- a/srcpkgs/freecad/template +++ b/srcpkgs/freecad/template @@ -1,7 +1,7 @@ # Template file for 'freecad' pkgname=freecad version=0.18.4 -revision=1 +revision=2 wrksrc="FreeCAD-${version}" build_style=cmake