]> git.pld-linux.org Git - packages/blender.git/commitdiff
- updated deps auto/th/blender-2.80-3
authorJan Rękorajski <baggins@pld-linux.org>
Sat, 2 Nov 2019 14:20:56 +0000 (15:20 +0100)
committerJan Rękorajski <baggins@pld-linux.org>
Sat, 2 Nov 2019 14:20:56 +0000 (15:20 +0100)
- fix build with python 3.8
- rel 3

blender.spec
python-3.8.patch [new file with mode: 0644]

index cb20f8251977c62917ed9489e817efbd6e3c0928..33ee41488ffb7e92b35bdd022e10040d9ed4694a 100644 (file)
@@ -5,13 +5,14 @@ Summary:      3D modeling, rendering, animation and game creation package
 Summary(pl.UTF-8):     Pakiet do tworzenia animacji 3D oraz gier
 Name:          blender
 Version:       2.80
 Summary(pl.UTF-8):     Pakiet do tworzenia animacji 3D oraz gier
 Name:          blender
 Version:       2.80
-Release:       2
+Release:       3
 License:       GPL
 Group:         X11/Applications/Graphics
 Source0:       http://download.blender.org/source/%{name}-%{version}.tar.gz
 # Source0-md5: 30dedaf688741d0d5d6fa1e3c331610c
 Patch0:                %{name}-2.76-droid.patch
 Patch1:                format-security.patch
 License:       GPL
 Group:         X11/Applications/Graphics
 Source0:       http://download.blender.org/source/%{name}-%{version}.tar.gz
 # Source0-md5: 30dedaf688741d0d5d6fa1e3c331610c
 Patch0:                %{name}-2.76-droid.patch
 Patch1:                format-security.patch
+Patch2:                python-3.8.patch
 URL:           http://www.blender.org/
 BuildRequires: OpenAL-devel
 BuildRequires: OpenColorIO-devel
 URL:           http://www.blender.org/
 BuildRequires: OpenAL-devel
 BuildRequires: OpenColorIO-devel
@@ -42,6 +43,7 @@ BuildRequires:        libtool
 BuildRequires: libvorbis-devel
 BuildRequires: openjpeg2-devel
 BuildRequires: openssl-devel >= 0.9.7d
 BuildRequires: libvorbis-devel
 BuildRequires: openjpeg2-devel
 BuildRequires: openssl-devel >= 0.9.7d
+BuildRequires: pugixml-devel
 BuildRequires: python3
 BuildRequires: python3-devel
 BuildRequires: python3-numpy-devel
 BuildRequires: python3
 BuildRequires: python3-devel
 BuildRequires: python3-numpy-devel
@@ -71,6 +73,7 @@ Blender to darmowy i w pełni funkcjonalny pakiet do tworzenia animacji
 %setup -q
 %patch0 -p1
 %patch1 -p1
 %setup -q
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 %build
 install -d build
 
 %build
 install -d build
diff --git a/python-3.8.patch b/python-3.8.patch
new file mode 100644 (file)
index 0000000..c26934e
--- /dev/null
@@ -0,0 +1,49 @@
+Index: blender-2.80_patched/source/blender/python/generic/py_capi_utils.c
+===================================================================
+--- blender-2.80_patched/source/blender/python/generic/py_capi_utils.c
++++ blender-2.80_patched/source/blender/python/generic/py_capi_utils.c
+@@ -717,9 +717,11 @@
+  ****************************************************************************/
+ PyObject *PyC_DefaultNameSpace(const char *filename)
+ {
+-  PyInterpreterState *interp = PyThreadState_GET()->interp;
++  PyObject *modules = PyImport_GetModuleDict();
++  PyObject *builtins = PyDict_GetItemString(modules, "builtins");
++
+   PyObject *mod_main = PyModule_New("__main__");
+-  PyDict_SetItemString(interp->modules, "__main__", mod_main);
++  PyDict_SetItemString(modules, "__main__", mod_main);
+   Py_DECREF(mod_main); /* sys.modules owns now */
+   PyModule_AddStringConstant(mod_main, "__name__", "__main__");
+   if (filename) {
+@@ -727,8 +729,8 @@
+      * note: this wont map to a real file when executing text-blocks and buttons. */
+     PyModule_AddObject(mod_main, "__file__", PyC_UnicodeFromByte(filename));
+   }
+-  PyModule_AddObject(mod_main, "__builtins__", interp->builtins);
+-  Py_INCREF(interp->builtins); /* AddObject steals a reference */
++  PyModule_AddObject(mod_main, "__builtins__", builtins);
++  Py_INCREF(builtins); /* AddObject steals a reference */
+   return PyModule_GetDict(mod_main);
+ }
+@@ -755,15 +757,15 @@
+ /* restore MUST be called after this */
+ void PyC_MainModule_Backup(PyObject **main_mod)
+ {
+-  PyInterpreterState *interp = PyThreadState_GET()->interp;
+-  *main_mod = PyDict_GetItemString(interp->modules, "__main__");
++  PyObject *modules = PyImport_GetModuleDict();
++  *main_mod = PyDict_GetItemString(modules, "__main__");
+   Py_XINCREF(*main_mod); /* don't free */
+ }
+ void PyC_MainModule_Restore(PyObject *main_mod)
+ {
+-  PyInterpreterState *interp = PyThreadState_GET()->interp;
+-  PyDict_SetItemString(interp->modules, "__main__", main_mod);
++  PyObject *modules = PyImport_GetModuleDict();
++  PyDict_SetItemString(modules, "__main__", main_mod);
+   Py_XDECREF(main_mod);
+ }
This page took 0.169372 seconds and 4 git commands to generate.