summaryrefslogtreecommitdiff
path: root/libre/blender
diff options
context:
space:
mode:
authorbill-auger <mr.j.spam.me@gmail.com>2020-11-29 23:48:37 -0500
committerbill-auger <mr.j.spam.me@gmail.com>2020-12-09 09:24:01 -0500
commit30ed8b676db37bdd44ca3c5a41137d4af430ba55 (patch)
treea7c36e5a714dc2908d92e2a7a18f813aef0ed491 /libre/blender
parent157fdbf98b4ff82ff376b42ac98e24c6eaf63534 (diff)
downloadabslibre-30ed8b676db37bdd44ca3c5a41137d4af430ba55.tar.gz
abslibre-30ed8b676db37bdd44ca3c5a41137d4af430ba55.tar.bz2
abslibre-30ed8b676db37bdd44ca3c5a41137d4af430ba55.zip
[blender]: upgrade to v2.91.0
Diffstat (limited to 'libre/blender')
-rw-r--r--libre/blender/PKGBUILD138
-rw-r--r--libre/blender/arm-align-structs.patch22
-rw-r--r--libre/blender/arm-no-sse2.patch15
-rw-r--r--libre/blender/embree.patch43
4 files changed, 76 insertions, 142 deletions
diff --git a/libre/blender/PKGBUILD b/libre/blender/PKGBUILD
index 356e66270..252dd20be 100644
--- a/libre/blender/PKGBUILD
+++ b/libre/blender/PKGBUILD
@@ -5,67 +5,80 @@
# Contributor: Márcio Silva <coadde@hyperbola.info>
# Contributor: bill-auger <bill-auger@programmer.net>
-# parabola changes and rationale:
-# - removed support for non-free CUDA
-# - removed support for non-free optix
-# Sometimes blender.org takes some time to release patch releases and because Arch users
-# are impatient, we sometimes need to build from git directly.
-# Update because I get so many queries on this:
-# Due to our other rolling deps, it's sometimes not possible to build Blender stable releases.
-# More often than not, a new openshadinglanguage breaks it and I could either backport fixes
-# or simply roll with a new version. I usually choose the latter when the former seems
-# unreasonable.
+# parabola changes and rationale:
+# - removed support for non-free CUDA and optix
+# - set OS type string to GNU/Linux-libre
+# - pin to tightly-coupled dependency versions
-_gittag=v2.82a
-# _gitcommit=054dbb833e15275e0e991e2c15e754a3e7583716
pkgname=blender
-pkgver=2.82.a
-[[ -n $_gitcommit ]] && pkgver=${pkgver}.git1.${_gitcommit:0:8}
-pkgrel=3
+pkgver=2.91.0
+pkgrel=4
pkgrel+=.parabola1
epoch=17
+_pythonver_x86_64=3.9
+_pythonvver_i686=3.8
+_pythonvver_armv7h=3.9
+eval "_python_ver=\$_pythonvver_${CARCH}"
pkgdesc="A fully integrated 3D graphics creation suite"
-pkgdesc+=", without nonfree CUDA support"
+pkgdesc+=", without non-free CUDA or optix support"
arch=('x86_64')
arch+=('i686' 'armv7h')
license=('GPL')
url="http://www.blender.org"
-depends=('libpng' 'libtiff' 'openexr' 'python' 'desktop-file-utils' 'python-requests'
+depends=('libpng' 'libtiff' 'openexr' 'python' 'desktop-file-utils' 'python-requests' 'potrace'
'shared-mime-info' 'hicolor-icon-theme' 'xdg-utils' 'glew' 'openjpeg2' 'python-numpy'
- 'freetype2' 'openal' 'ffmpeg' 'fftw' 'boost-libs' 'opencollada' 'alembic'
+ 'freetype2' 'openal' 'ffmpeg' 'fftw' 'boost-libs' 'opencollada' 'alembic' 'openxr'
'openimageio' 'libsndfile' 'jack' 'opencolorio' 'openshadinglanguage'
'jemalloc' 'libspnav' 'ptex' 'opensubdiv' 'openvdb' 'log4cplus' 'sdl2')
depends_x86_64=('embree' 'openimagedenoise')
depends_i686=('embree')
+[[ "${CARCH}" == 'i686' ]] && depends[21]='openimageio=2.1.16.0' # FIXME: special case dep - presently, 'openxr' is only in community-testing;
+ # but 'community-testing/openimageio' is incompatible with 'openshadinglanguage'
makedepends=('cmake' 'boost' 'mesa' 'git' 'llvm' 'ninja')
options=(!strip)
-source=("git://git.blender.org/blender-addons.git"
+source=("git://git.blender.org/blender.git#tag=v$pkgver"
+ "git://git.blender.org/blender-addons.git"
"git://git.blender.org/blender-addons-contrib.git"
"git://git.blender.org/blender-translations.git"
- "git://git.blender.org/blender-dev-tools.git"
- arm-no-sse2.patch
- arm-align-structs.patch)
-source_x86_64=(embree.patch)
-source_i686=(embree.patch)
-if [[ -n $_gittag ]]; then
- source+=("${pkgname}-${pkgver}::git://git.blender.org/blender.git#tag=${_gittag}")
-elif [[ -n $_gitcommit ]]; then
- source+=("${pkgname}-${pkgver}::git://git.blender.org/blender.git#commit=${_gitcommit}")
-fi
+ "git://git.blender.org/blender-dev-tools.git")
sha512sums=('SKIP'
'SKIP'
'SKIP'
'SKIP'
- '13890f9cd11ca20bcb6f12206c990e25c0d08699feab0fca37607d847d2aebd2d2f423023986e120eaaeb0beca9a440a4d42007dcac2054fe6cdaf745de43402'
- '9c708578f3efb9faca444ca69efad1343c09697601ded97a05b7227e55f0347efc69bafa52452e06b73480b5041fad966b6aa64cbdcd2458cf734281acf68f78'
'SKIP')
-sha512sums_x86_64=('6de779ad8649a034ee65c45a36d7838ac0b8b32c3336b4d476186265c060f56276e3e0a2860ec4bff42bef7d5582ee82238013845f6a697672767a05a455aaca')
-sha512sums_i686=('6de779ad8649a034ee65c45a36d7838ac0b8b32c3336b4d476186265c060f56276e3e0a2860ec4bff42bef7d5582ee82238013845f6a697672767a05a455aaca')
+
+
+_version_constraint() # (dep_pkgname [precision])
+{
+ local dep_pkgname=$1
+ local full_version=$(pacman -S --print-format='%v' ${dep_pkgname} | tail -n 1)
+ local n_dots=$(tmp=${full_version%-*} ; tmp=${tmp//[^\.]} ; echo "${#tmp}" ;)
+ local def_precision=$(( n_dots + 1 ))
+ local precision=$( [[ "$2" =~ ^[1-${def_precision}]$ ]] && echo $2 || echo ${def_precision} )
+ local pkgver_rx='[^-\.\ ]+'
+ local subver_rx='\.'${pkgver_rx}
+ local pkgrel_rx='[^-\ ]+'
+ local capture_rx=${pkgver_rx}
+ for (( n_dots=1 ; n_dots < precision ; n_dots++ )) ; do capture_rx+=${subver_rx} ; done ;
+
+ if [[ "${full_version}" =~ ^(${capture_rx})(${subver_rx})*-${pkgrel_rx}$ ]]
+ then local version=${BASH_REMATCH[1]}
+ local subver_inc=$(( ${version##*.} + 1 ))
+ local version_inc=$( [[ "${version}" =~ \. ]] && echo ${version%.*}.${subver_inc} || \
+ echo ${subver_inc} )
+ local constraint_string="${dep_pkgname}>=${version} ${dep_pkgname}<${version_inc}"
+
+ echo "applied version constraint: ${constraint_string}" >&2
+ echo -n "${constraint_string}"
+ else echo "ERROR: _version_constraint() error parsing: dep_pkgname='${dep_pkgname}' full_version='${full_version}'" >&2
+ exit 1
+ fi
+}
prepare() {
- cd "$srcdir/$pkgname-$pkgver"
+ cd "$pkgname"
git submodule init
git config submodule."release/scripts/addons".url "${srcdir}/blender-addons"
@@ -73,49 +86,50 @@ prepare() {
git config submodule."release/datafiles/locale".url "${srcdir}/blender-translations"
git config submodule."source/tools".url "${srcdir}/blender-dev-tools"
git submodule update
+ git submodule foreach git checkout v${pkgver}
- patch -Np1 -i "$srcdir"/embree.patch
-
- # fix OS Name (pedantic, I know)
+ # set OS type string
sed -i 's|BUILD_PLATFORM;|"GNU/Linux-libre";|' 'source/creator/buildinfo.c'
-
- patch -Np1 -i "$srcdir"/arm-no-sse2.patch
-
- # error: static assertion failed: "DNA struct size verify"
- # https://devtalk.blender.org/t/raspbian-blender-as-a-python-module-build-errors/10473/8
- patch -Np1 -i "$srcdir"/arm-align-structs.patch
-
- mkdir build
}
build() {
- cd "$srcdir/$pkgname-$pkgver"/build
+ cd "$pkgname"
- cmake \
+ cmake . \
+ -Bbuild \
-GNinja \
- -C../build_files/cmake/config/blender_release.cmake .. \
+ -Cbuild_files/cmake/config/blender_release.cmake \
+ -DWITH_CYCLES_DEVICE_OPTIX=OFF \
+ -DWITH_CYCLES_CUDA_BINARIES='OFF' \
+ -DWITH_CYCLES_DEVICE_CUDA='OFF' \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release \
-DWITH_INSTALL_PORTABLE=OFF \
-DWITH_PYTHON_INSTALL=OFF \
- -DWITH_CYCLES_CUDA_BINARIES='OFF' \
- -DWITH_CYCLES_DEVICE_CUDA='OFF' \
- -DWITH_CYCLES_DEVICE_OPTIX=OFF \
- -DPYTHON_VERSION=3.8 \
+ -DPYTHON_VERSION=${_python_ver} \
-DPYTHON_LIBPATH=/usr/lib \
- -DPYTHON_LIBRARY=python3.8 \
- -DPYTHON_INCLUDE_DIRS=/usr/include/python3.8
- ninja
+ -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
}
package() {
- cd "$srcdir/$pkgname-$pkgver/build"
-
- local _openexr_ver=$(pacman -S --print-format='%v' openexr)
- depends+=("openexr>=${_openexr_ver}" "openexr<$((${_openexr_ver%%.*} + 1))")
-
- DESTDIR="${pkgdir}" ninja install
- install -Dm755 ../release/bin/blender-softwaregl "${pkgdir}/usr/bin/blender-softwaregl"
+ cd "$pkgname"
+
+ # pin to tightly-coupled dependency versions
+ depends+=( libboost_locale.so
+ $(_version_constraint openexr 2) # eg: libHalf.so.12
+ $(_version_constraint openimageio 2) # eg: libOpenImageIO.so.2.0
+ $(_version_constraint openshadinglanguage 2) # eg: liboslcomp.so.1.10
+ $(_version_constraint opensubdiv 3) # eg: libosdGPU.so.3.3.3
+ $(_version_constraint openvdb 2) # eg: libopenvdb.so.6.2
+ $(_version_constraint python 2) ) # eg: libpython3.6.so.1.0
+
+ DESTDIR="${pkgdir}" ninja -C build install
+ install -Dm755 release/bin/blender-softwaregl "${pkgdir}/usr/bin/blender-softwaregl"
python -m compileall "${pkgdir}/usr/share/blender"
python -O -m compileall "${pkgdir}/usr/share/blender"
+
+ install -Dm644 release/freedesktop/org.blender.Blender.appdata.xml "${pkgdir}/usr/share/metainfo/org.blender.Blender.appdata.xml"
}
diff --git a/libre/blender/arm-align-structs.patch b/libre/blender/arm-align-structs.patch
deleted file mode 100644
index c7b030ecc..000000000
--- a/libre/blender/arm-align-structs.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-diff --git a/source/blender/makesdna/DNA_gpencil_types.h b/source/blender/makesdna/DNA_gpencil_types.h
-index 33dfe66a151..5cf86164920 100644
---- a/source/blender/makesdna/DNA_gpencil_types.h
-+++ b/source/blender/makesdna/DNA_gpencil_types.h
-@@ -226,6 +226,7 @@ typedef struct bGPDstroke {
- void *_pad3;
-
- bGPDstroke_Runtime runtime;
-+ void *_pad4;
- } bGPDstroke;
-
- /* bGPDstroke->flag */
-diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
-index 7cfd19b4bd9..4b989e52f81 100644
---- a/source/blender/makesdna/DNA_scene_types.h
-+++ b/source/blender/makesdna/DNA_scene_types.h
-@@ -1796,6 +1796,7 @@ typedef struct Scene {
-
- struct SceneDisplay display;
- struct SceneEEVEE eevee;
-+ void *_pad9;
- } Scene;
diff --git a/libre/blender/arm-no-sse2.patch b/libre/blender/arm-no-sse2.patch
deleted file mode 100644
index 722c70e93..000000000
--- a/libre/blender/arm-no-sse2.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff --git a/intern/cycles/bvh/bvh_embree.cpp b/intern/cycles/bvh/bvh_embree.cpp
-index d12a0c1..1df2de3 100644
---- a/intern/cycles/bvh/bvh_embree.cpp
-+++ b/intern/cycles/bvh/bvh_embree.cpp
-@@ -299,8 +299,10 @@ BVHEmbree::BVHEmbree(const BVHParams &params_,
- use_ribbons(params.curve_flags & CURVE_KN_RIBBONS),
- dynamic_scene(true)
- {
-+#if defined(__x86_64__) || defined(_M_X64)
- _MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON);
- _MM_SET_DENORMALS_ZERO_MODE(_MM_DENORMALS_ZERO_ON);
-+#endif
- thread_scoped_lock lock(rtc_shared_mutex);
- if (rtc_shared_users == 0) {
- rtc_shared_device = rtcNewDevice("verbose=0");
diff --git a/libre/blender/embree.patch b/libre/blender/embree.patch
deleted file mode 100644
index bed0b39e7..000000000
--- a/libre/blender/embree.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-diff --git a/intern/cycles/blender/CMakeLists.txt b/intern/cycles/blender/CMakeLists.txt
-index d9a2ebf8571..f3b7d156024 100644
---- a/intern/cycles/blender/CMakeLists.txt
-+++ b/intern/cycles/blender/CMakeLists.txt
-@@ -66,6 +66,12 @@ if(WITH_CYCLES_LOGGING)
- )
- endif()
-
-+if(WITH_CYCLES_EMBREE)
-+ list(APPEND LIB
-+ ${EMBREE_LIBRARIES}
-+ )
-+endif()
-+
- set(ADDON_FILES
- addon/__init__.py
- addon/engine.py
-diff --git a/build_files/cmake/Modules/FindEmbree.cmake b/build_files/cmake/Modules/FindEmbree.cmake
-index d9d525d4586..03b509a28f3 100644
---- a/build_files/cmake/Modules/FindEmbree.cmake
-+++ b/build_files/cmake/Modules/FindEmbree.cmake
-@@ -72,7 +72,7 @@ ENDFOREACH()
-
- FIND_LIBRARY(EMBREE_LIBRARY
- NAMES
-- libembree3
-+ embree3
- HINTS
- ${_embree_SEARCH_DIRS}
- PATH_SUFFIXES
-@@ -83,10 +83,10 @@ FIND_LIBRARY(EMBREE_LIBRARY
- # all listed variables are TRUE
- INCLUDE(FindPackageHandleStandardArgs)
- FIND_PACKAGE_HANDLE_STANDARD_ARGS(EMBREE DEFAULT_MSG
-- _embree_LIBRARIES EMBREE_INCLUDE_DIR)
-+ EMBREE_LIBRARY EMBREE_INCLUDE_DIR)
-
- IF(EMBREE_FOUND)
-- SET(EMBREE_LIBRARIES ${_embree_LIBRARIES})
-+ SET(EMBREE_LIBRARIES ${EMBREE_LIBRARY})
- SET(EMBREE_INCLUDE_DIRS ${EMBREE_INCLUDE_DIR})
- ENDIF(EMBREE_FOUND)
-