summaryrefslogtreecommitdiffstats
path: root/graphics/Blender
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/Blender')
-rw-r--r--graphics/Blender/01_FindEmbree_so.diff75
-rw-r--r--graphics/Blender/Blender.SlackBuild26
-rw-r--r--graphics/Blender/Blender.info8
-rw-r--r--graphics/Blender/README11
4 files changed, 111 insertions, 9 deletions
diff --git a/graphics/Blender/01_FindEmbree_so.diff b/graphics/Blender/01_FindEmbree_so.diff
new file mode 100644
index 0000000000..6739f6852a
--- /dev/null
+++ b/graphics/Blender/01_FindEmbree_so.diff
@@ -0,0 +1,75 @@
+--- build_files/cmake/Modules/FindEmbree.cmake.orig 2020-10-21 18:59:19.000000000 +1000
++++ build_files/cmake/Modules/FindEmbree.cmake 2021-01-16 01:26:51.000000000 +1000
+@@ -7,19 +7,12 @@
+ # EMBREE_ROOT_DIR, The base directory to search for Embree.
+ # This can also be an environment variable.
+ # EMBREEFOUND, If false, do not try to use Embree.
+-#
+-# also defined, but not for general use are
+-# EMBREE_LIBRARY, where to find the Embree library.
+
+ #=============================================================================
+ # Copyright 2018 Blender Foundation.
+ #
+-# Distributed under the OSI-approved BSD License (the "License");
+-# see accompanying file Copyright.txt for details.
+-#
+-# This software is distributed WITHOUT ANY WARRANTY; without even the
+-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+-# See the License for more information.
++# Distributed under the OSI-approved BSD 3-Clause License,
++# see accompanying file BSD-3-Clause-license.txt for details.
+ #=============================================================================
+
+ # If EMBREE_ROOT_DIR was defined in the environment, use it.
+@@ -44,9 +37,9 @@
+
+ SET(_embree_FIND_COMPONENTS
+ embree3
++ embree_sse42
+ embree_avx
+ embree_avx2
+- embree_sse42
+ lexers
+ math
+ simd
+@@ -66,29 +59,28 @@
+ PATH_SUFFIXES
+ lib64 lib
+ )
++ IF (NOT EMBREE_${UPPERCOMPONENT}_LIBRARY)
++ IF (EMBREE_EMBREE3_LIBRARY)
++ # If we can't find all the static libraries, try to fall back to the shared library if found.
++ # This allows building with a shared embree library
++ SET(_embree_LIBRARIES ${EMBREE_EMBREE3_LIBRARY})
++ BREAK()
++ ENDIF ()
++ ENDIF ()
+ LIST(APPEND _embree_LIBRARIES "${EMBREE_${UPPERCOMPONENT}_LIBRARY}")
+ ENDFOREACH()
+
+
+-FIND_LIBRARY(EMBREE_LIBRARY
+- NAMES
+- libembree3
+- HINTS
+- ${_embree_SEARCH_DIRS}
+- PATH_SUFFIXES
+- lib64 lib
+-)
+-
+ # handle the QUIETLY and REQUIRED arguments and set EMBREE_FOUND to TRUE if
+ # all listed variables are TRUE
+ INCLUDE(FindPackageHandleStandardArgs)
+-FIND_PACKAGE_HANDLE_STANDARD_ARGS(EMBREE DEFAULT_MSG
++FIND_PACKAGE_HANDLE_STANDARD_ARGS(Embree DEFAULT_MSG
+ _embree_LIBRARIES EMBREE_INCLUDE_DIR)
+
+ IF(EMBREE_FOUND)
+ SET(EMBREE_LIBRARIES ${_embree_LIBRARIES})
+ SET(EMBREE_INCLUDE_DIRS ${EMBREE_INCLUDE_DIR})
+-ENDIF(EMBREE_FOUND)
++ENDIF()
+
+ MARK_AS_ADVANCED(
+ EMBREE_INCLUDE_DIR
diff --git a/graphics/Blender/Blender.SlackBuild b/graphics/Blender/Blender.SlackBuild
index fbd9230c50..a8c4ca8b9d 100644
--- a/graphics/Blender/Blender.SlackBuild
+++ b/graphics/Blender/Blender.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for Blender
-# Copyright 2015-2020 Christoph Willing, Brisbane Australia
+# Copyright 2015-2021 Christoph Willing, Brisbane Australia
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,8 +23,8 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=Blender
-VERSION=${VERSION:-2.83.1}
-BUILD=${BUILD:-1}
+VERSION=${VERSION:-2.83.8}
+BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
SRCNAM=blender
@@ -69,6 +69,16 @@ if [ -d /usr/include/cuda ]; then
fi
fi
+embree=""
+if [ -d /usr/include/embree3 ]; then
+ # If embree is installed, assume we want to use it
+ embree="-DWITH_CYCLES_EMBREE=ON"
+ # However disable embree if requested by e.g. EMBREE=no
+ if [ ${EMBREE:-yes} != "yes" ]; then
+ embree="-DWITH_CYCLES_EMBREE=OFF"
+ fi
+fi
+
set -e
rm -rf $PKG
@@ -77,6 +87,12 @@ cd $TMP
rm -rf $SRCNAM-$VERSION
tar xvf $CWD/$SRCNAM-$VERSION.tar.xz
cd $SRCNAM-$VERSION
+patch -p0 < $CWD/01_FindEmbree_so.diff
+if [ ${FORCE_FFMPEG4:-no} = "yes" ]; then
+ echo "Force use of ffmpeg4"
+ SLKCFLAGS="$SLKCFLAGS -I/usr/include/ffmpeg4 -L/usr/lib${LIBDIRSUFFIX}/ffmpeg4"
+ sed -i -e "s|\"exitcode=0\"|&,\"LD_LIBRARY_PATH\":\"/usr/lib$LIBDIRSUFFIX/ffmpeg4\"|g" doc/manpage/blender.1.py
+fi
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -115,6 +131,7 @@ cd build
-DWITH_SDL_DYNLOAD:BOOL=ON \
-DCMAKE_BUILD_TYPE=Release \
$cuda \
+ $embree \
make
make install DESTDIR=$PKG
@@ -128,8 +145,7 @@ for bin in $BLENDERBINS ; do
mv $PKG/usr/bin/$bin $PKG/usr/bin/$bin.bin
cat <<EOF >$PKG/usr/bin/$bin
#!/bin/sh
-#export PYTHONPATH=/usr/share/$SRCNAM/$BASE_VERSION/python/lib$LIBDIRSUFFIX/python$PYTHON_VERSION
-export LD_LIBRARY_PATH=/usr/lib$LIBDIRSUFFIX/opencollada
+export LD_LIBRARY_PATH=/usr/lib$LIBDIRSUFFIX/opencollada:/usr/lib$LIBDIRSUFFIX/ffmpeg4
exec $bin.bin "\$@"
EOF
chmod 0755 $PKG/usr/bin/$bin
diff --git a/graphics/Blender/Blender.info b/graphics/Blender/Blender.info
index e3330e80ac..26038a5885 100644
--- a/graphics/Blender/Blender.info
+++ b/graphics/Blender/Blender.info
@@ -1,10 +1,10 @@
PRGNAM="Blender"
-VERSION="2.83.1"
+VERSION="2.83.8"
HOMEPAGE="https://blender.org"
-DOWNLOAD="https://download.blender.org/source/blender-2.83.1.tar.xz"
-MD5SUM="17a4f13253abbc8018ec4964e5db4dc3"
+DOWNLOAD="https://download.blender.org/source/blender-2.83.8.tar.xz"
+MD5SUM="1a920506a3a695d629d5f312b9b45c01"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="ffmpeg jack opencollada opus python-requests valgrind numpy3 SDL2 openimageio freealut tbb"
+REQUIRES="ffmpeg jack opencollada opus python-requests valgrind numpy3 SDL2 openimageio freealut tbb embree"
MAINTAINER="Christoph Willing"
EMAIL="chris.willing@linux.com"
diff --git a/graphics/Blender/README b/graphics/Blender/README
index c89c1f1c39..e6fe94d6e9 100644
--- a/graphics/Blender/README
+++ b/graphics/Blender/README
@@ -17,3 +17,14 @@ successful build. The CUDA handling above remains for cases which may:
- use a newer CUDA version toolkit
- require the existing cudatoolkit for other purposes
(so need CUDA=no for Blender)
+
+Support for embree may be disabled by passing EMBREE=no when building e.g.
+ EMBREE=no sh ./Blender.SlackBuild
+
+Support in 14.2 for using SBo's ffmpeg4 SlackBuild may be enabled by
+passing FORCE_FFMPEG4=yes when building e.g.
+ FORCE_FFMPEG4=yes sh ./Blender.SlackBuild
+
+Version 2.83.8 is the last SBo supported version of Blender for building
+from source code in Slackware64-14.2. A more recent compiler (gcc-9.3.1)
+is required for 2.90.x and later blender versions.