summaryrefslogtreecommitdiffstats
path: root/graphics/Blender/Blender.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/Blender/Blender.SlackBuild')
-rw-r--r--graphics/Blender/Blender.SlackBuild28
1 files changed, 23 insertions, 5 deletions
diff --git a/graphics/Blender/Blender.SlackBuild b/graphics/Blender/Blender.SlackBuild
index d4bbe1fa95..a8c4ca8b9d 100644
--- a/graphics/Blender/Blender.SlackBuild
+++ b/graphics/Blender/Blender.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for Blender
-# Copyright 2015-2019 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.81a}
-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 \
@@ -105,6 +121,8 @@ cd build
-DWITH_CODEC_SNDFILE:BOOL=ON \
-DWITH_FFTW3:BOOL=ON \
-DWITH_IMAGE_OPENJPEG:BOOL=ON \
+ -DWITH_SYSTEM_EIGEN3:BOOL=OFF \
+ -DWITH_SYSTEM_GLEW:BOOL=OFF \
-DWITH_SYSTEM_LZO:BOOL=ON \
-DWITH_MEM_JEMALLOC:BOOL=ON \
-DWITH_MEM_VALGRIND:BOOL=ON \
@@ -113,6 +131,7 @@ cd build
-DWITH_SDL_DYNLOAD:BOOL=ON \
-DCMAKE_BUILD_TYPE=Release \
$cuda \
+ $embree \
make
make install DESTDIR=$PKG
@@ -126,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