diff options
Diffstat (limited to 'media-gfx/blender/blender-9999.ebuild')
-rw-r--r-- | media-gfx/blender/blender-9999.ebuild | 95 |
1 files changed, 72 insertions, 23 deletions
diff --git a/media-gfx/blender/blender-9999.ebuild b/media-gfx/blender/blender-9999.ebuild index aab785d58255..94e2599fa018 100644 --- a/media-gfx/blender/blender-9999.ebuild +++ b/media-gfx/blender/blender-9999.ebuild @@ -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 +otf +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.7:= >=media-libs/openexr-3.2.1:0= @@ -102,7 +104,7 @@ RDEPEND="${PYTHON_DEPS} openpgl? ( media-libs/openpgl:= ) opensubdiv? ( >=media-libs/opensubdiv-3.5.0 ) openvdb? ( - >=media-gfx/openvdb-11:=[nanovdb?] + >=media-gfx/openvdb-11.0.0:=[nanovdb?] dev-libs/c-blosc:= ) optix? ( dev-libs/optix ) @@ -130,6 +132,18 @@ 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 + ) + otf? ( + media-libs/harfbuzz + ) + renderdoc? ( + media-gfx/renderdoc + ) X? ( x11-libs/libX11 x11-libs/libXi @@ -139,6 +153,10 @@ RDEPEND="${PYTHON_DEPS} DEPEND="${RDEPEND} dev-cpp/eigen:= + vulkan? ( + dev-util/spirv-headers + dev-util/vulkan-headers + ) " BDEPEND=" @@ -188,6 +206,8 @@ blender_get_version() { pkg_pretend() { blender_check_requirements + + use oneapi && einfo "The Intel oneAPI support is rudimentary. Please report any bugs you find to https://bugs.gentoo.org/" } pkg_setup() { @@ -235,10 +255,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 @@ -252,12 +273,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() { @@ -283,39 +310,49 @@ src_configure() { -DWITH_BULLET=$(usex bullet) -DWITH_CODEC_FFMPEG=$(usex ffmpeg) -DWITH_CODEC_SNDFILE=$(usex sndfile) - -DWITH_CPU_CHECK=no + -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_DYNLOAD=no + -DWITH_GHOST_WAYLAND_DYNLOAD="no" -DWITH_GHOST_WAYLAND_LIBDECOR="$(usex gnome)" -DWITH_GHOST_X11=$(usex X) -DWITH_GMP=$(usex gmp) -DWITH_GTESTS=$(usex test) + -DWITH_HARFBUZZ="$(usex otf)" -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) @@ -333,9 +370,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 @@ -343,19 +380,31 @@ 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+=( + -DROCM_PATH="$(hipconfig -R)" + -DHIP_HIPCC_FLAGS="-fcf-protection=none" + ) + fi + if use optix; then mycmakeargs+=( -DCYCLES_RUNTIME_OPTIX_ROOT_DIR="${EPREFIX}"/opt/optix @@ -531,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 "" } |