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.SlackBuild71
-rw-r--r--graphics/Blender/Blender.info8
-rw-r--r--graphics/Blender/README52
-rw-r--r--graphics/Blender/README.Slackware91
5 files changed, 187 insertions, 110 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 2d1df98b82..90999a35a7 100644
--- a/graphics/Blender/Blender.SlackBuild
+++ b/graphics/Blender/Blender.SlackBuild
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for Blender
-# Copyright 2015-2019 Christoph Willing, Brisbane Australia
+# Copyright 2015-2024 Christoph Willing, Sydney Australia
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,13 +22,23 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20220322 bkw: Modified by SlackBuilds.org, BUILD=2:
+# - make embree optional (makes it possible to build Blender on 32-bit,
+# since embree is 64-bit-only).
+# - add patch to fix 32-bit compilation. (no longer needed)
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=Blender
+VERSION=${VERSION:-3.3.10}
+BUILD=${BUILD:-3}
+TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
SRCNAM=blender
-PKGNAM=Blender
-VERSION=${VERSION:-2.81}
+
BASE_VERSION=${BASE_VERSION:-$( echo $VERSION | sed -e 's/[^0-9.]*//g')}
-BUILD=${BUILD:-1}
-TAG=${TAG:-_SBo}
-PYTHON_VERSION=$(python3 -c "import sys; print(sys.version[:3])")
+PYTHON_VERSION=$(python3 -c 'import sys; print("{}.{}".format(sys.version_info.major, sys.version_info.minor))')
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -38,9 +48,13 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
-PKG=$TMP/package-$SRCNAM
+PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i586" ]; then
@@ -67,6 +81,12 @@ if [ -d /usr/include/cuda ]; then
fi
fi
+embree="-DWITH_CYCLES_EMBREE=OFF"
+# If embree is installed, use it unless user says EMBREE=no.
+if [ -d /usr/include/embree3 -a "${EMBREE:-yes}" = "yes" ]; then
+ embree="-DWITH_CYCLES_EMBREE=ON"
+fi
+
set -e
rm -rf $PKG
@@ -78,9 +98,13 @@ cd $SRCNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
- -o -perm 511 \) -exec chmod 755 {} \; -o \
+ -o -perm 511 \) -exec chmod 755 {} \+ -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+
+
+sed -i -e '/#include <stdio.h>/a #include <iostream>' intern/locale/boost_locale_wrapper.cpp
+sed -i -e '/#include "util\/windows.h"/a #include <system_error>' intern/cycles/util/thread.cpp
+sed -i -e '/#include <fstream>/a #include <cstdint>' extern/quadriflow/src/loader.cpp
mkdir -p build
cd build
@@ -103,15 +127,18 @@ 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 \
-DWITH_MOD_OCEANSIM:BOOL=ON \
-DWITH_SDL:BOOL=ON \
-DWITH_SDL_DYNLOAD:BOOL=ON \
- -DWITH_TBB:BOOL=OFF \
-DCMAKE_BUILD_TYPE=Release \
$cuda \
+ $embree \
+ -DCMAKE_EXE_LINKER_FLAGS:STRING="-lboost_locale"
make
make install DESTDIR=$PKG
@@ -125,26 +152,28 @@ 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
exec $bin.bin "\$@"
EOF
chmod 0755 $PKG/usr/bin/$bin
done
-mkdir -p $PKG/usr/man/man1
-./doc/manpage/blender.1.py build/bin/blender $PKG/usr/man/man1/blender.1
-find $PKG/usr/man -type f -exec gzip -9 {} \;
-for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+# Recent OSL breaks manpage generation
+if [ ! -e "/usr/lib$LIBDIRSUFFIX/liboslcomp.so" ]; then
+ mkdir -p $PKG/usr/man/man1
+ ./doc/manpage/blender.1.py --blender build/bin/blender --output $PKG/usr/man/man1/blender.1
+ find $PKG/usr/man -type f -exec gzip -9 {} \;
+ for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+fi
-mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
-mv $PKG/usr/share/doc/$SRCNAM/* $PKG/usr/doc/$PKGNAM-$VERSION/
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+mv $PKG/usr/share/doc/$SRCNAM/* $PKG/usr/doc/$PRGNAM-$VERSION/
rm -rf $PKG/usr/share/doc
-cat $CWD/$PKGNAM.SlackBuild > $PKG/usr/doc/$PKGNAM-$VERSION/$PKGNAM.SlackBuild
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PKGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/graphics/Blender/Blender.info b/graphics/Blender/Blender.info
index 3cf4ff3590..967d92ba92 100644
--- a/graphics/Blender/Blender.info
+++ b/graphics/Blender/Blender.info
@@ -1,10 +1,10 @@
PRGNAM="Blender"
-VERSION="2.81"
+VERSION="3.3.10"
HOMEPAGE="https://blender.org"
-DOWNLOAD="https://download.blender.org/source/blender-2.81.tar.xz"
-MD5SUM="bbb3c2ad7253ef3c6a6047b2f64074f3"
+DOWNLOAD="https://download.blender.org/source/blender-3.3.10.tar.xz"
+MD5SUM="a190dbfc5dfd490d737ee64ba68ce79c"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="ffmpeg jack-audio-connection-kit opencollada python-requests valgrind numpy3 SDL2 openimageio freealut"
+REQUIRES="potrace OpenSubdiv pugixml jack opencollada valgrind python3-numpy openimageio freealut tbb"
MAINTAINER="Christoph Willing"
EMAIL="chris.willing@linux.com"
diff --git a/graphics/Blender/README b/graphics/Blender/README
index 0cc2e3dec5..8fd9285fea 100644
--- a/graphics/Blender/README
+++ b/graphics/Blender/README
@@ -1,14 +1,44 @@
Blender is an integrated suite of free and open source tools enabling
the creation of a broad range of 3D content with the singular
-benefits of cross- platform interoperability. It can be used to
-create 3D visualizations, stills as well as broadcast and cinema
-quality video. It features fully integrated creation suite, offering
-a broad 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.
-
-CUDA support is included if a CUDA installation is detected at build time.
-It may be disable by passing CUDA=no when building e.g.
- CUDA=no sh ./Blender.SlackBuild
+benefits of cross-platform interoperability. It can be used to create
+3D visualizations, stills as well as broadcast and cinema quality
+video. It features fully integrated creation suite, offering a broad
+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.
+CUDA support is included if cudatoolkit is installed.
+It may be disabled by passing CUDA=no when building:
+ CUDA=no bash ./Blender.SlackBuild
+
+CUDA support hasn't been thorougly tested, and may break the build. If
+so, build with CUDA=no and report a bug to the maintainer of this
+script.
+
+Optional dependency: embree. If installed, Blender will be built with
+support for it. It may be disabled by passing EMBREE=no when building:
+ EMBREE=no bash ./Blender.SlackBuild
+
+Note for 32-bit users: embree is 64-bit only, and can't be built on
+32-bit Slackware.
+
+Optional dependency: alembic-framework. If already installed, it will
+be automatically detected and incorporated when Blender is built.
+
+To enable support for OptiX Ray Tracing Engine, the OptiX SDK must be
+available in the build environment. Use the OPTIX_ROOT_DIR environment
+variable to identify the SDK location e.g.
+ OPTIX_ROOT_DIR=/home/chris/NVIDIA-OptiX-SDK-7.6.0-linux64-x86_64 bash ./Blender.SlackBuild
+
+Optional dependency: OpenShadingLanguage (OSL). If already installed,
+it will be automatically detected and incorporated when Blender is built.
+Due to an unresolved issue with the current OSL version, generation of
+the blender manpage is suppressed when OSL is detected.
+
+
+This SlackBuild builds Blender from source code. For Slackware 15.0,
+due to its Python 3 version of 3.9.17, the Blender version to be built
+is restricted to version 3.3.10.
+
+See also: graphics/blender (note, lowercase B), which repackages the
+official Blender x86_64 release binary.
diff --git a/graphics/Blender/README.Slackware b/graphics/Blender/README.Slackware
index 669253f6c7..36aca39941 100644
--- a/graphics/Blender/README.Slackware
+++ b/graphics/Blender/README.Slackware
@@ -3,77 +3,20 @@ an existing binary version. The process is therefore more complex and
time consuming but allows finer tuning of capabilities of the resulting
package. Working through the prerequisite packages from the REQUIRES field
of Blender.info results in the following basic build order:
- multimedia/ffmpeg
- audio/jack-audio-connection-kit
- libraries/opencv
- graphics/opencollada
- libraries/OpenAL
- python/python3
- python/python-requests
- development/valgrind
- libraries/libwebp
- development/numpy3
- development/SDL2
- graphics/opencolorio
- graphics/openimageio
- libraries/freealut
- graphics/Blender
-
-When generating a new build order, python3 should first be added to the
-REQUIRES field of python-requests.info.
-
-To facilitate the greatest utility for Blender, its is strongly
-suggested that a number of standard SBo packages be built with
-a more complete set of features than provided by the default scripts:
- 1. the opencv package could/should first be built with additional
-features by preinstalling some other packages e.g.
-REQUIRES="
-opencl-headers libjpeg-turbo ffmpeg Sphinx libdc1394
-numpy3 gtkglext tbb jdk
-"
-The cmake configuration in opencv.SlackBuild can be replaced with:
- cmake \
- -DCMAKE_C_FLAGS="$SLKCFLAGS" \
- -DCMAKE_CXX_FLAGS="$SLKCFLAGS" \
- -DCMAKE_BUILD_TYPE="Release" \
- -DCMAKE_INSTALL_PREFIX=/usr \
- -DBUILD_SHARED_LIBS=ON \
- -DENABLE_PRECOMPILED_HEADERS=OFF \
- -DLIB_SUFFIX=$LIBDIRSUFFIX \
- -DWITH_TBB=ON \
- -DWITH_OPENCL=ON \
- -DWITH_OPENGL=ON \
- -DWITH_QT=ON \
- -DWITH_XINE=ON \
- -DBUILD_EXAMPLES=ON \
- -DINSTALL_C_EXAMPLES=ON \
- -DINSTALL_PYTHON_EXAMPLES=ON \
- -DBUILD_NEW_PYTHON_SUPPORT=ON \
- -DWITH_FFMPEG=ON \
- -DCMAKE_SKIP_RPATH=ON \
- -DWITH_1394:BOOL=ON \
- ..
-
-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
-speex libbluray xvidcore OpenAL libmodplug frei0r libdc1394 libavc1394
-libiec61883 ladspa_sdk gsm rtmpdump libva twolame celt faac dirac schroedinger"
-
- 3. the numpy SlackBuild at SBo does not build the python3 modules
-which are needed to be useful for any numpy-related python scripting in
-blender. It is therefore numpy3 which is the prerequisite for this build
-of blender.
-
+ libraries/libaec
+ development/python3-numpy
+ graphics/OpenSubdiv
+ graphics/opencollada
+ libraries/freealut
+ libraries/tbb
+ audio/jack
+ libraries/robin-map
+ libraries/hdf5
+ python/pybind11
+ graphics/opencolorio
+ development/valgrind
+ libraries/pugixml
+ graphics/potrace
+ libraries/dcmtk
+ graphics/openimageio
+ graphics/Blender