[arch-commits] Commit in blender/trunk (PKGBUILD gltf-import-fix.patch)

Sven-Hendrik Haase svenstaro at archlinux.org
Mon Dec 21 09:08:02 UTC 2020


    Date: Monday, December 21, 2020 @ 09:08:02
  Author: svenstaro
Revision: 780867

upgpkg: blender 17:2.91.0-8: Fix GLTF import (FS#68994)

Added:
  blender/trunk/gltf-import-fix.patch
Modified:
  blender/trunk/PKGBUILD

-----------------------+
 PKGBUILD              |   17 ++++++++++++-----
 gltf-import-fix.patch |   11 +++++++++++
 2 files changed, 23 insertions(+), 5 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-12-21 08:51:49 UTC (rev 780866)
+++ PKGBUILD	2020-12-21 09:08:02 UTC (rev 780867)
@@ -8,7 +8,7 @@
 
 pkgname=blender
 pkgver=2.91.0
-pkgrel=7
+pkgrel=8
 epoch=17
 pkgdesc="A fully integrated 3D graphics creation suite"
 arch=('x86_64')
@@ -27,6 +27,7 @@
         "git://git.blender.org/blender-addons-contrib.git"
         "git://git.blender.org/blender-translations.git"
         "git://git.blender.org/blender-dev-tools.git"
+        gltf-import-fix.patch
         https://developer.download.nvidia.com/redist/optix/v7.0/OptiX-7.0.0-include.zip)
 sha512sums=('SKIP'
             'SKIP'
@@ -33,6 +34,7 @@
             'SKIP'
             'SKIP'
             'SKIP'
+            'f9b8faef22ee808d123e54049c803f2f7891019e4a96e7f7ef4206c723761ee91b4d803ae3e1905f132d2c0229eefdb77c93f6d9a256268199d80db407e3786f'
             'b2cff73def3757d4259f4b4d318a8ccfe166bf7c215cbb2124f1c81bd6e742f96207285b24eb4d99b527b7b97dc6d5e8fdf2f16d78d5d1e2684c26d681328491')
 
 prepare() {
@@ -45,11 +47,16 @@
   git config submodule."source/tools".url "${srcdir}/blender-dev-tools"
   git submodule update
   git submodule foreach git checkout v${pkgver}
+
+  # FS#68994
+  patch -Np2 -d release/scripts/addons -i "${srcdir}"/gltf-import-fix.patch
 }
 
 build() {
   cd "$pkgname"
 
+  local PYTHON_VER=3.9
+
   cmake . \
     -Bbuild \
     -GNinja \
@@ -60,11 +67,11 @@
     -DCMAKE_BUILD_TYPE=Release \
     -DWITH_INSTALL_PORTABLE=OFF \
     -DWITH_PYTHON_INSTALL=OFF \
-    -DPYTHON_VERSION=3.9 \
+    -DPYTHON_VERSION=$PYTHON_VER \
     -DPYTHON_LIBPATH=/usr/lib \
-    -DPYTHON_LIBRARY=python3.9 \
-    -DPYTHON_INCLUDE_DIRS=/usr/include/python3.9 \
-    -DCMAKE_CXX_FLAGS="-I /usr/include/python3.9"
+    -DPYTHON_LIBRARY=python$PYTHON_VER \
+    -DPYTHON_INCLUDE_DIRS=/usr/include/python$PYTHON_VER \
+    -DCMAKE_CXX_FLAGS="-I /usr/include/python$PYTHON_VER"
   ninja -C build
 }
 

Added: gltf-import-fix.patch
===================================================================
--- gltf-import-fix.patch	                        (rev 0)
+++ gltf-import-fix.patch	2020-12-21 09:08:02 UTC (rev 780867)
@@ -0,0 +1,11 @@
+--- a/blender-addons/io_scene_gltf2/io/imp/gltf2_io_gltf.py	2020-12-20 16:36:07.512946749 -0800
++++ b/blender-addons/io_scene_gltf2/io/imp/gltf2_io_gltf.py	2020-12-20 16:40:12.173781840 -0800
+@@ -61,7 +61,7 @@
+         def bad_constant(val):
+             raise ImportError('Bad glTF: json contained %s' % val)
+         try:
+-            return json.loads(bytes(content), encoding='utf-8', parse_constant=bad_constant)
++            return json.loads(bytes(content), parse_constant=bad_constant)
+         except ValueError as e:
+             raise ImportError('Bad glTF: json error: %s' % e.args[0])
+ 



More information about the arch-commits mailing list