summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Zander <negril.nx+gentoo@gmail.com>2024-04-23 17:27:28 +0200
committerSam James <sam@gentoo.org>2024-04-23 22:00:03 +0100
commit6cd4df04768cadea66b4a027ca7ed83aa4138ef7 (patch)
treeeda820cc703d18e6b6640d7412ed7d8b2ce67294 /media-gfx
parentsys-apps/pv: add 1.8.9 (diff)
downloadgentoo-6cd4df04768cadea66b4a027ca7ed83aa4138ef7.tar.gz
gentoo-6cd4df04768cadea66b4a027ca7ed83aa4138ef7.tar.bz2
gentoo-6cd4df04768cadea66b4a027ca7ed83aa4138ef7.zip
media-gfx/blender: 4.0.2-r1 bugfixes; add initial oneapi support
Drop python3.12 support. Will reappear in 4.1.1. Use wayland_dynload to avoid problems with libdecor-plugin.h. Bump openvdb required version to 11 from 10. oneAPI support might be broken. But we got to start somewhere... Bug: https://bugs.gentoo.org/882645 Closes: https://bugs.gentoo.org/930397 Closes: https://bugs.gentoo.org/930412 Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-gfx')
-rw-r--r--media-gfx/blender/blender-4.0.2-r1.ebuild89
-rw-r--r--media-gfx/blender/metadata.xml10
2 files changed, 76 insertions, 23 deletions
diff --git a/media-gfx/blender/blender-4.0.2-r1.ebuild b/media-gfx/blender/blender-4.0.2-r1.ebuild
index 57571d34615d..29465c4df628 100644
--- a/media-gfx/blender/blender-4.0.2-r1.ebuild
+++ b/media-gfx/blender/blender-4.0.2-r1.ebuild
@@ -3,7 +3,7 @@
EAPI=8
-PYTHON_COMPAT=( python3_{10..12} )
+PYTHON_COMPAT=( python3_{10..11} )
# matches media-libs/osl
LLVM_COMPAT=( {15..17} )
@@ -33,12 +33,13 @@ fi
LICENSE="|| ( GPL-3 BL )"
SLOT="${PV%.*}"
-IUSE="+bullet +fluid +openexr +tbb
- alembic collada +color-management cuda +cycles cycles-bin-kernels
- debug doc +embree +ffmpeg +fftw +gmp gnome hip jack jemalloc jpeg2k
- man +nanovdb ndof nls openal +oidn +openmp +openpgl +opensubdiv
- +openvdb optix osl +pdf +potrace +pugixml pulseaudio sdl
- +sndfile test +tiff valgrind wayland +webp X"
+IUSE="
+ alembic +bullet collada +color-management cuda +cycles +cycles-bin-kernels
+ debug doc +embree experimental +ffmpeg +fftw +fluid +gmp gnome hip jack
+ jemalloc jpeg2k man +nanovdb ndof nls +oidn oneapi openal +openexr +openmp openpgl
+ +opensubdiv +openvdb optix osl +pdf +potrace +pugixml pulseaudio
+ renderdoc sdl +sndfile +tbb test +tiff valgrind vulkan wayland +webp X
+"
REQUIRED_USE="${PYTHON_REQUIRED_USE}
alembic? ( openexr )
@@ -95,6 +96,7 @@ RDEPEND="${PYTHON_DEPS}
nls? ( virtual/libiconv )
openal? ( media-libs/openal )
oidn? ( >=media-libs/oidn-2.1.0 )
+ oneapi? ( dev-libs/intel-compute-runtime[l0] )
openexr? (
>=dev-libs/imath-3.1.4-r2:=
>=media-libs/openexr-3:0=
@@ -102,7 +104,7 @@ RDEPEND="${PYTHON_DEPS}
openpgl? ( media-libs/openpgl:0/0.5 )
opensubdiv? ( >=media-libs/opensubdiv-3.5.0 )
openvdb? (
- >=media-gfx/openvdb-10.0.0:=[nanovdb?]
+ >=media-gfx/openvdb-11.0.0:=[nanovdb?]
dev-libs/c-blosc:=
)
optix? ( dev-libs/optix )
@@ -130,6 +132,15 @@ RDEPEND="${PYTHON_DEPS}
media-libs/mesa[wayland]
sys-apps/dbus
)
+ vulkan? (
+ media-libs/shaderc
+ dev-util/spirv-tools
+ dev-util/glslang
+ media-libs/vulkan-loader
+ )
+ renderdoc? (
+ media-gfx/renderdoc
+ )
X? (
x11-libs/libX11
x11-libs/libXi
@@ -139,6 +150,10 @@ RDEPEND="${PYTHON_DEPS}
DEPEND="${RDEPEND}
dev-cpp/eigen:=
+ vulkan? (
+ dev-util/spirv-headers
+ dev-util/vulkan-headers
+ )
"
BDEPEND="
@@ -238,10 +253,11 @@ src_prepare() {
-e "s|blender.svg|blender-${BV}.svg|" \
-e "s|blender-symbolic.svg|blender-${BV}-symbolic.svg|" \
-e "s|blender.desktop|blender-${BV}.desktop|" \
+ -e "s|org.blender.Blender.metainfo.xml|blender-${BV}.metainfo.xml|" \
-i source/creator/CMakeLists.txt || die
sed \
- -e "s|Name=Blender|Name=Blender ${PV}|" \
+ -e "s|Name=Blender|Name=Blender ${BV}|" \
-e "s|Exec=blender|Exec=blender-${BV}|" \
-e "s|Icon=blender|Icon=blender-${BV}|" \
-i release/freedesktop/blender.desktop || die
@@ -255,12 +271,18 @@ src_prepare() {
release/freedesktop/icons/symbolic/apps/blender-symbolic.svg \
"release/freedesktop/icons/symbolic/apps/blender-${BV}-symbolic.svg" || die
mv release/freedesktop/blender.desktop "release/freedesktop/blender-${BV}.desktop" || die
+ mv release/freedesktop/org.blender.Blender.metainfo.xml "release/freedesktop/blender-${BV}.metainfo.xml"
+ mv release/freedesktop/org.blender.Blender.appdata.xml "release/freedesktop/blender-${BV}.appdata.xml"
if use test; then
# Without this the tests will try to use /usr/bin/blender and /usr/share/blender/ to run the tests.
sed -e "s|set(TEST_INSTALL_DIR.*|set(TEST_INSTALL_DIR ${T}/usr)|g" -i tests/CMakeLists.txt || die
sed -e "s|string(REPLACE.*|set(TEST_INSTALL_DIR ${T}/usr)|g" -i build_files/cmake/testing.cmake || die
fi
+
+ if use vulkan; then
+ sed -e "s/extern_vulkan_memory_allocator/extern_vulkan_memory_allocator\nSPIRV-Tools-opt\nSPIRV-Tools\nSPIRV-Tools-link\nglslang\nSPIRV\nSPVRemapper/" -i source/blender/gpu/CMakeLists.txt || die
+ fi
}
src_configure() {
@@ -286,39 +308,49 @@ src_configure() {
-DWITH_BULLET=$(usex bullet)
-DWITH_CODEC_FFMPEG=$(usex ffmpeg)
-DWITH_CODEC_SNDFILE=$(usex sndfile)
+
-DWITH_CYCLES=$(usex cycles)
- -DWITH_CYCLES_CUDA_BINARIES=$(usex cuda $(usex cycles-bin-kernels))
- -DWITH_CYCLES_DEVICE_ONEAPI=no
+
-DWITH_CYCLES_DEVICE_CUDA=$(usex cuda)
- -DWITH_CYCLES_DEVICE_HIP=$(usex hip)
+ -DWITH_CYCLES_CUDA_BINARIES="$(usex cuda $(usex cycles-bin-kernels))"
-DWITH_CYCLES_DEVICE_OPTIX=$(usex optix)
- -DWITH_CYCLES_EMBREE=$(usex embree)
+
+ -DWITH_CYCLES_DEVICE_HIP="$(usex hip)"
-DWITH_CYCLES_HIP_BINARIES=$(usex hip $(usex cycles-bin-kernels))
- -DWITH_CYCLES_ONEAPI_BINARIES=no
+
+ -DWITH_CYCLES_DEVICE_ONEAPI="$(usex oneapi)"
+ -DWITH_CYCLES_ONEAPI_BINARIES="$(usex oneapi $(usex cycles-bin-kernels))"
+
+ -DWITH_CYCLES_HYDRA_RENDER_DELEGATE="no" # TODO: package Hydra
+ -DWITH_CYCLES_EMBREE="$(usex embree)"
-DWITH_CYCLES_OSL=$(usex osl)
-DWITH_CYCLES_PATH_GUIDING=$(usex openpgl)
-DWITH_CYCLES_STANDALONE=no
-DWITH_CYCLES_STANDALONE_GUI=no
+
-DWITH_DOC_MANPAGE=$(usex man)
+ -DWITH_DRACO="no" # TODO: Package Draco
+ -DWITH_EXPERIMENTAL_FEATURES="$(usex experimental)"
-DWITH_FFTW3=$(usex fftw)
-DWITH_GHOST_WAYLAND=$(usex wayland)
-DWITH_GHOST_WAYLAND_APP_ID="blender-${BV}"
-DWITH_GHOST_WAYLAND_DBUS=$(usex wayland)
- -DWITH_GHOST_WAYLAND_DYNLOAD=no
+ -DWITH_GHOST_WAYLAND_DYNLOAD="$(usex gnome)" # https://bugs.gentoo.org/930412 fixed in 4.1 # no
-DWITH_GHOST_WAYLAND_LIBDECOR="$(usex gnome)"
-DWITH_GHOST_X11=$(usex X)
-DWITH_GMP=$(usex gmp)
-DWITH_GTESTS=$(usex test)
-DWITH_HARU=$(usex pdf)
-DWITH_HEADLESS=$($(use X || use wayland) && echo OFF || echo ON)
- -DWITH_INSTALL_PORTABLE=no
+ -DWITH_HYDRA="no" # TODO: Package Hydra
-DWITH_IMAGE_OPENEXR=$(usex openexr)
-DWITH_IMAGE_OPENJPEG=$(usex jpeg2k)
-DWITH_IMAGE_WEBP=$(usex webp)
-DWITH_INPUT_NDOF=$(usex ndof)
+ -DWITH_INSTALL_PORTABLE="no"
-DWITH_INTERNATIONAL=$(usex nls)
-DWITH_JACK=$(usex jack)
- -DWITH_MATERIALX=no
+ -DWITH_MATERIALX="no" # TODO: Package MaterialX
-DWITH_MEM_JEMALLOC=$(usex jemalloc)
-DWITH_MEM_VALGRIND=$(usex valgrind)
-DWITH_MOD_FLUID=$(usex fluid)
@@ -336,9 +368,9 @@ src_configure() {
-DWITH_PUGIXML=$(usex pugixml)
-DWITH_PULSEAUDIO=$(usex pulseaudio)
-DWITH_PYTHON_INSTALL=no
- -DWITH_DRACO=no
-DWITH_PYTHON_INSTALL_NUMPY=no
-DWITH_PYTHON_INSTALL_ZSTANDARD=no
+ -DWITH_RENDERDOC="$(usex renderdoc)"
-DWITH_SDL=$(usex sdl)
-DWITH_STATIC_LIBS=no
-DWITH_STRICT_BUILD_OPTIONS=yes
@@ -346,19 +378,30 @@ src_configure() {
-DWITH_SYSTEM_FREETYPE=yes
-DWITH_SYSTEM_LZO=yes
-DWITH_TBB=$(usex tbb)
-
- -DWITH_USD=no
- -DWITH_HYDRA=no
-
+ -DWITH_USD="no" # TODO: Package USD
+ -DWITH_VULKAN_BACKEND="$(usex vulkan)"
-DWITH_XR_OPENXR=no
)
+ # requires dev-vcs/git
+ if [[ ${PV} = *9999* ]] ; then
+ mycmakeargs+=( -DWITH_BUILDINFO="yes" )
+ else
+ mycmakeargs+=( -DWITH_BUILDINFO="no" )
+ fi
+
if use cuda; then
mycmakeargs+=(
-DCUDA_NVCC_FLAGS="--compiler-bindir;$(cuda_gccdir)"
)
fi
+ if use hip; then
+ mycmakeargs+=(
+ -DHIP_HIPCC_FLAGS="-fcf-protection=none"
+ )
+ fi
+
if use optix; then
mycmakeargs+=(
-DCYCLES_RUNTIME_OPTIX_ROOT_DIR="${EPREFIX}"/opt/optix
@@ -537,7 +580,7 @@ pkg_postrm() {
ewarn ""
ewarn "You may want to remove the following directory."
- ewarn "~/.config/${PN}/${SLOT}/cache/"
+ ewarn "~/.config/${PN}/${BV}/cache/"
ewarn "It may contain extra render kernels not tracked by portage"
ewarn ""
}
diff --git a/media-gfx/blender/metadata.xml b/media-gfx/blender/metadata.xml
index b062bde863c4..e9c0f2846ae7 100644
--- a/media-gfx/blender/metadata.xml
+++ b/media-gfx/blender/metadata.xml
@@ -51,6 +51,9 @@
<flag name="embree">
Use embree to accelerate certain areas of the Cycles render engine.
</flag>
+ <flag name="experimental">
+ Build Experimental Blender Modules
+ </flag>
<flag name="fluid">
Adds fluid simulation support via the built-in Mantaflow library.
</flag>
@@ -64,6 +67,7 @@
Enable NDOF input devices (SpaceNavigator and friends).
</flag>
<flag name="oidn">Enable OpenImageDenoiser Support</flag>
+ <flag name="oneapi">Build OIDN with Intel oneAPI SyCL support</flag>
<flag name="openimageio">Enable OpenImageIO Support</flag>
<flag name="openpgl">Enable path guiding support in Cycles</flag>
<flag name="opensubdiv">
@@ -85,8 +89,14 @@
<flag name="pugixml">
Enable PugiXML support (Used for OpenImageIO, Grease Pencil SVG export)
</flag>
+ <flag name="renderdoc">
+ Build Blender with renderdoc support
+ </flag>
<flag name="tbb">
Use threading building blocks library from <pkg>dev-cpp/tbb</pkg>.
</flag>
+ <flag name="vulkan">
+ Add support for the experimental Vulkan viewport backend
+ </flag>
</use>
</pkgmetadata>