Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 0 additions & 75 deletions graphics/Blender/01_FindEmbree_so.diff

This file was deleted.

19 changes: 15 additions & 4 deletions graphics/Blender/Blender.SlackBuild
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ cd $(dirname $0) ; CWD=$(pwd)

PRGNAM=Blender
VERSION=${VERSION:-5.0.1}
BUILD=${BUILD:-3}
LIBS_BUILD=${LIBS_BUILD:-1}
BUILD=${BUILD:-4}
LIBS_BUILD=${LIBS_BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}

Expand Down Expand Up @@ -67,6 +67,15 @@ with_cuda=""
. /etc/profile.d/cuda-12.*.sh
with_cuda="-DWITH_CYCLES_DEVICE_CUDA=ON -DWITH_CYCLES_CUDA_BINARIES=ON "
}
with_rocm=""
[ -x /etc/profile.d/rocmtoolkit_6.sh ] && {
. /etc/profile.d/rocmtoolkit_6.sh
with_rocm="-DWITH_CYCLES_DEVICE_HIP=ON -DWITH_CYCLES_HIP_BINARIES=ON -DWITH_CYCLES_DEVICE_HIPRT=ON "
}
with_optix=""
[ -d /usr/include/optix ] && {
with_optix="-DOPTIX_INCLUDE_DIR=/usr/include/optix -DWITH_CYCLES_DEVICE_OPTIX=ON "
}

set -e

Expand Down Expand Up @@ -106,15 +115,17 @@ find -L . \
mkdir -p build
cd build
cmake .. \
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS $(pkg-config --libs numa)" \
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_BUILD_TYPE=Release \
-DLIBDIR:PATH=$(pwd)/../lib/linux_x64 \
-DCMAKE_EXE_LINKER_FLAGS_RELEASE=-ldrm \
-DCMAKE_INSTALL_PREFIX=$INSTALL_PATH \
-DWITH_INSTALL_PORTABLE:BOOL=ON \
-DWITH_BUILDINFO:BOOL=ON \
$with_cuda \
$with_cuda \
$with_rocm \
$with_optix \

# From https://projects.blender.org/blender (Release: Bump to 5.0.1)
COMMIT_HASH="a3db93c5b2"
Expand Down
6 changes: 3 additions & 3 deletions graphics/Blender/Blender.info
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ HOMEPAGE="https://blender.org"
DOWNLOAD="UNSUPPORTED"
MD5SUM=""
DOWNLOAD_x86_64="https://download.blender.org/source/blender-5.0.1.tar.xz \
https://sourceforge.net/projects/slackbuildsdirectlinks/files/Blender/blender-libs-5.0.1.1.tar.lz"
https://sourceforge.net/projects/slackbuildsdirectlinks/files/Blender/blender-libs-5.0.1.2.tar.lz"
MD5SUM_x86_64="b7b865015cd203c53f8b5369899fb503 \
8c30f0f900f2f1ea0009a1ab2d6734ed"
REQUIRES=""
4a7c19c8c491a2686fb01929a0dc1c07"
REQUIRES="numactl"
MAINTAINER="Christoph Willing"
EMAIL="chris.willing@linux.com"
29 changes: 22 additions & 7 deletions graphics/Blender/README
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,34 @@ range of essential tools for the creation of 3D content, including
modeling, uv-mapping, texturing, particle and other simulation,
scripting, rendering, compositing, post-production and game creation.


This SlackBuild builds Blender from source code using prepackaged
support libraries which don't provide libraries for i*86,
therefore 32bit builds are no longer supported.

The prepackaged libraries can themselves be built from source code.
See README.libs
The prepackaged libraries can themselves be built from source code if
desired and provided sufficient resources (disk space, cpu, time) are
available. See the README.libs file.

If targeting hardware rendering with Nvidia GPU, it is necessary to
first install the cudatoolkit_12 package, in which case additional
dedicated rendering binaries will be generated during the Blender
build. In this case, it is also recommended to install the
OptiX-Headers SlackBuild; this enables optix render kernels to be
built into Blender.

For a comparison of bare CUDA and OptiX (which requires CUDA anyway)
see:
https://yelzkizi.org/optix-vs-cuda/

When targeting Nvidia GPU, it is recommended to first install the
cudatoolkit_12 package, in which case additional dedicated rendering
binaries will be generated during the Blender build.
If targeting hardware rendering with AMD GPU, it is necessary to
first install the rocmtoolkit_6 package, in which case additional
dedicated rendering binaries will be generated during the Blender
build.

After installing the built package, log out and back in again to the
initiate ability to launch from the desktop menu (at Graphics/Blender).
After installing the built package, log out and back in again to
initiate the ability to launch from the desktop menu
(at Graphics/Blender).

See also: graphics/blender (note, lowercase b), which repackages the
official Blender x86_64 release binary.
33 changes: 0 additions & 33 deletions graphics/Blender/README.Slackware

This file was deleted.

18 changes: 15 additions & 3 deletions graphics/Blender/README.libs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Since blender-5.0.1, this SlackBuild uses a set of precompiled libraries
which are required to build Blender from source code. They are
downloaded as a tarball and unpacked as required.

Initially this tarball of precompiled libraries was created by
Historically, this tarball of precompiled libraries was created by
downloading them from blender.org using the 'make update' command,
along the lines of:

Expand Down Expand Up @@ -73,13 +73,25 @@ specified with the SOURCES_CACHE environment variable when running the
script e.g.
SOURCES_CACHE=/var/cache/blender-sources bash blender-libs.sh

While not mandatory, AMD graphics hardware support depends on prior
installation of the rocmtoolkit_6 package.

## NOTE ##
Even if not targeting the Nvidia GPU, the cudatoolkit_12 package is
still mandatory.


##################################################
Resources for source build of precompiled libraries
##################################################

- library source tarballs: 2 GB
- time to download source tarballs: depends on internet connection (downloading 2GB)
- time to download source tarballs: depends on internet connection
(downloading 2GB)
- time to build & install cudatoolkit_12 and rocmtoolkit_6
(both very large)
- time to build library tarball: 2 hours
- disk space to build: 46 GB
- disk space to build: 70 GB (over and above full
Slackware installation)


1 change: 1 addition & 0 deletions graphics/Blender/blender-libs.defs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ DOWNLOAD_x86_64="https://download.blender.org/source/blender-5.0.1.tar.xz \
http://downloads.xiph.org/releases/ogg/libogg-1.3.5.tar.gz \
http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.7.tar.gz \
http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.bz2 \
http://downloads.xiph.org/releases/flac/flac-1.4.2.tar.xz \
https://github.com/webmproject/libvpx/archive/v1.15.2/libvpx-v1.15.2.tar.gz \
https://archive.mozilla.org/pub/opus/opus-1.3.1.tar.gz \
https://code.videolan.org/videolan/x264/-/archive/35fe20d1ba49918ec739a5b068c208ca82f977f7/x264-35fe20d1ba49918ec739a5b068c208ca82f977f7.tar.gz \
Expand Down
41 changes: 30 additions & 11 deletions graphics/Blender/blender-libs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,16 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

# BUILD = 1: Enable building of openimagedenoise
# by disabling OIDN_DEVICE_HIP in its CMakeLists.txt
# BUILD = 2: rocm-6.4.4 available (like cudatoolkit for AMD)

cd $(dirname $0) ; CWD=$(pwd)

PRGNAM=blender-libs
SRCNAM=blender
VERSION=${VERSION:-5.0.1}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}

Expand All @@ -47,6 +51,22 @@ fi
TMP=${TMP:-/tmp/SBo}
OUTPUT=${OUTPUT:-/tmp}

CUDAToolkit_ROOT=${CUDAToolkit_ROOT:-/opt/cuda-12.9}
ROCM_PATH=${ROCM_PATH:-/opt/rocm-6.4.4}

# cudatoolkit is mandatory, rocmtoolkit is optional (although recommended)
[ -d "$CUDAToolkit_ROOT" -a -x "$CUDAToolkit_ROOT"/bin/nvcc ] || {
echo "Can't proceed without cudatoolkit being installed."
echo "Please install the cudatoolkit_12 SlackBuild from SBo."
exit 1
}

export CUDAToolkit_ROOT
export ROCM_PATH
echo "CUDAToolkit_ROOT set to $CUDAToolkit_ROOT, ROCM_PATH set to $ROCM_PATH"
export PATH=${CUDAToolkit_ROOT}/bin:${ROCM_PATH}/bin:${PATH}
echo "PATH = $PATH"

# Ensure updated versions of some system packages are installed
# Slackware 15.0 stock cmake version is 3.21.4 (NOT usable)
# Slackware 15.0 also has version 3.31.8 in testing (usable)
Expand All @@ -59,13 +79,14 @@ REQUIRED_CMAKE_VERSION=3.30.5
[ -x /opt/cmake-opt/bin/cmake ] && \
export PATH="/opt/cmake-opt/bin:${PATH}"


installed_cmake_version=$(cmake --version | head -1 |cut -d' ' -f3)
if [ ! "$REQUIRED_CMAKE_VERSION" = "$installed_cmake_version" ]; then
echo "Wrong cmake version ($installed_cmake_version) detected."
exit 1
echo "For Slackware 15.0, install the cmake-opt SlackBuild from SBo."
exit 2
fi


# Obtain sources
# The user should set SOURCES_CACHE in the environment
# or change the definition here
Expand All @@ -76,6 +97,7 @@ for f in $DOWNLOAD_x86_64 ; do
echo "Source file: $(basename $f)"
cp -u $SOURCES_CACHE/$(basename $f) . || \
wget $f
# md5sum $(basename $f) |cut -f1 -d' '
done

# rename some source files (those listed in .defs file):
Expand All @@ -98,12 +120,6 @@ cp 3cf6c1e53037eb9e198860365712e1bafb22f7c6.tar.gz x265-3cf6c1e53037eb9e1988603

set -e

CUDAToolkit_ROOT=${CUDAToolkit_ROOT:-/opt/cuda-12.9}
export CUDAToolkit_ROOT
echo "CUDAToolkit_ROOT set to $CUDAToolkit_ROOT"
export PATH=${PATH}:${CUDAToolkit_ROOT}/bin
echo "PATH = $PATH"

mkdir -p $TMP $OUTPUT
cd $TMP
rm -rf $SRCNAM-$VERSION
Expand All @@ -118,9 +134,12 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;

# For now, don't try building openimagedenoise for HIP device (not avaiable)
# Disable building openimagedenoise if hipcc not available
#
sed -i -e 's/DOIDN_DEVICE_HIP=ON/DOIDN_DEVICE_HIP=OFF/' build_files/build_environment/cmake/openimagedenoise.cmake
[ -x "$ROCM_PATH"/bin/hipcc ] || \
sed -i -e 's/DOIDN_DEVICE_HIP=ON/DOIDN_DEVICE_HIP=OFF/' \
build_files/build_environment/cmake/openimagedenoise.cmake


# Copy source files to where blender expects them
# (where make deps would download them to)
Expand Down