diff options
-rw-r--r-- | graphics/Blender/Blender.SlackBuild | 13 | ||||
-rw-r--r-- | graphics/Blender/README.Slackware | 8 |
2 files changed, 20 insertions, 1 deletions
diff --git a/graphics/Blender/Blender.SlackBuild b/graphics/Blender/Blender.SlackBuild index 7852440f49..972e3faaf2 100644 --- a/graphics/Blender/Blender.SlackBuild +++ b/graphics/Blender/Blender.SlackBuild @@ -26,7 +26,7 @@ SRCNAM=blender PKGNAM=Blender VERSION=${VERSION:-2.79b} BASE_VERSION=${BASE_VERSION:-$( echo $VERSION | sed -e 's/[^0-9.]*//g')} -BUILD=${BUILD:-2} +BUILD=${BUILD:-3} TAG=${TAG:-_SBo} PYTHON_VERSION=$(python3 -c "import sys; print(sys.version[:3])") @@ -57,6 +57,16 @@ else LIBDIRSUFFIX="" fi +cuda="" +if [ -d /usr/include/cuda ]; then + # If cudatoolkit is installed, assume we want to use it + cuda="-DWITH_CYCLES_CUDA_BINARIES=ON" + # However disable cuda if requested by e.g. CUDA=no + if [ ${CUDA:-yes} != "yes" ]; then + cuda="-DWITH_CYCLES_CUDA_BINARIES=OFF" + fi +fi + set -e rm -rf $PKG @@ -108,6 +118,7 @@ cd build -DWITH_SDL:BOOL=ON \ -DWITH_SDL_DYNLOAD:BOOL=ON \ -DCMAKE_BUILD_TYPE=Release \ + $cuda \ make make install DESTDIR=$PKG diff --git a/graphics/Blender/README.Slackware b/graphics/Blender/README.Slackware index 7eed585509..669253f6c7 100644 --- a/graphics/Blender/README.Slackware +++ b/graphics/Blender/README.Slackware @@ -58,6 +58,14 @@ If resources allow, the very large cudatoolkit package is another possible package which may be preinstalled and be utilised by the opencv build process. +Blender itself can also use cudatoolkit to provide GPU rendering in +systems with NVidia GPU cards. In this case, the SlackBuild will +enable CUDA support if a cudatoolkit installation is detected at +build time. In the unlikely CUDA support is not wanted despite cudatoolkit +being available at build time, set the CUDA environment variable to "no" +when running the SlackBuild e.g. + CUDA=no sh ./Blender.SlackBuild + 2. the ffmpeg package could/should first be built with additional features by preinstalling some other packages e.g. REQUIRES="lame x264 |