From 17da732aae0c9ed736dced35358d11442fe85305 Mon Sep 17 00:00:00 2001 From: Kevin Mihelich Date: Mon, 21 Dec 2020 15:28:16 +0000 Subject: [PATCH] community/blender to 2.91.0-8 --- community/blender/PKGBUILD | 17 ++++++++++++----- community/blender/gltf-import-fix.patch | 11 +++++++++++ 2 files changed, 23 insertions(+), 5 deletions(-) create mode 100644 community/blender/gltf-import-fix.patch diff --git a/community/blender/PKGBUILD b/community/blender/PKGBUILD index c311fa6d3..e9c4acb39 100644 --- a/community/blender/PKGBUILD +++ b/community/blender/PKGBUILD @@ -15,7 +15,7 @@ buildarch=8 pkgname=blender pkgver=2.91.0 -pkgrel=7 +pkgrel=8 epoch=17 pkgdesc="A fully integrated 3D graphics creation suite" arch=('x86_64') @@ -33,12 +33,14 @@ source=("git://git.blender.org/blender.git#tag=v$pkgver" "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' 'SKIP' 'SKIP' 'SKIP' + 'f9b8faef22ee808d123e54049c803f2f7891019e4a96e7f7ef4206c723761ee91b4d803ae3e1905f132d2c0229eefdb77c93f6d9a256268199d80db407e3786f' 'b2cff73def3757d4259f4b4d318a8ccfe166bf7c215cbb2124f1c81bd6e742f96207285b24eb4d99b527b7b97dc6d5e8fdf2f16d78d5d1e2684c26d681328491') prepare() { @@ -51,11 +53,16 @@ prepare() { 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 \ @@ -66,11 +73,11 @@ build() { -DWITH_INSTALL_PORTABLE=OFF \ -DWITH_PYTHON_INSTALL=OFF \ -DWITH_CYCLES_EMBREE=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 } diff --git a/community/blender/gltf-import-fix.patch b/community/blender/gltf-import-fix.patch new file mode 100644 index 000000000..ff3767772 --- /dev/null +++ b/community/blender/gltf-import-fix.patch @@ -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]) +