diff options
author | Christoph Willing <chris.willing@linux.com> | 2019-04-23 21:05:45 +1000 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2019-04-27 08:28:06 +0700 |
commit | dae55242c07b7907fe37ff38346a7ea4affd01a3 (patch) | |
tree | 06c7bdf856f41d656a5f418c77d801de563e0bf7 /graphics/Blender | |
parent | bfdfacdd742124d30fd8315c7a0a54f6e5d09efa (diff) |
graphics/Blender: Add CUDA support
Signed-off-by: Christoph Willing <chris.willing@linux.com>
Diffstat (limited to 'graphics/Blender')
-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 7852440f497d..972e3faaf2fe 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 7eed585509e6..669253f6c768 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 |