summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernd Waibel <waebbl-gentoo@posteo.net>2022-09-17 11:10:14 +0200
committerIonen Wolkens <ionen@gentoo.org>2022-09-25 08:22:52 -0400
commita5711585ca1e99533578410e543a2b3ad30ffb69 (patch)
tree04c8711deccca4be5c889602fb819a87e1da8c26 /media-gfx/blender
parentmedia-gfx/blender: add optix support (diff)
downloadgentoo-a5711585ca1e99533578410e543a2b3ad30ffb69.tar.gz
gentoo-a5711585ca1e99533578410e543a2b3ad30ffb69.tar.bz2
gentoo-a5711585ca1e99533578410e543a2b3ad30ffb69.zip
media-gfx/blender: add optix support to live ebuild
Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net> Closes: https://github.com/gentoo/gentoo/pull/27303 Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'media-gfx/blender')
-rw-r--r--media-gfx/blender/blender-9999.ebuild17
1 files changed, 14 insertions, 3 deletions
diff --git a/media-gfx/blender/blender-9999.ebuild b/media-gfx/blender/blender-9999.ebuild
index 48a7c50cf696..0426748b3a70 100644
--- a/media-gfx/blender/blender-9999.ebuild
+++ b/media-gfx/blender/blender-9999.ebuild
@@ -28,7 +28,8 @@ IUSE="+bullet +dds +fluid +openexr +tbb \
alembic collada +color-management cuda +cycles \
debug doc +embree +ffmpeg +fftw +gmp headless jack jemalloc jpeg2k \
man +nanovdb ndof nls openal +oidn +openimageio +openmp +opensubdiv \
- +openvdb +osl +pdf +potrace +pugixml pulseaudio sdl +sndfile test +tiff valgrind"
+ +openvdb optix +osl +pdf +potrace +pugixml pulseaudio sdl +sndfile \
+ test +tiff valgrind"
RESTRICT="!test? ( test )"
REQUIRED_USE="${PYTHON_REQUIRED_USE}
@@ -37,6 +38,7 @@ REQUIRED_USE="${PYTHON_REQUIRED_USE}
cycles? ( openexr tiff openimageio )
fluid? ( tbb )
openvdb? ( tbb )
+ optix? ( cuda )
osl? ( cycles )
test? ( color-management )"
@@ -93,6 +95,7 @@ RDEPEND="${PYTHON_DEPS}
>=media-gfx/openvdb-9.0.0:=[nanovdb?]
dev-libs/c-blosc:=
)
+ optix? ( <dev-libs/optix-7.5.0 )
osl? ( >=media-libs/osl-1.11.16.0-r3:= )
pdf? ( media-libs/libharu )
potrace? ( media-gfx/potrace )
@@ -217,6 +220,7 @@ src_configure() {
-DWITH_CXX_GUARDEDALLOC=$(usex debug)
-DWITH_CYCLES=$(usex cycles)
-DWITH_CYCLES_DEVICE_CUDA=$(usex cuda TRUE FALSE)
+ -DWITH_CYCLES_DEVICE_OPTIX=$(usex optix)
-DWITH_CYCLES_EMBREE=$(usex embree)
-DWITH_CYCLES_OSL=$(usex osl)
-DWITH_CYCLES_STANDALONE=OFF
@@ -264,6 +268,13 @@ src_configure() {
-DWITH_XR_OPENXR=OFF
)
+ if use optix; then
+ mycmakeargs+=(
+ -DCYCLES_RUNTIME_OPTIX_ROOT_DIR="${EPREFIX}"/opt/optix
+ -DOPTIX_ROOT_DIR="${EPREFIX}"/opt/optix
+ )
+ fi
+
append-flags $(usex debug '-DDEBUG' '-DNDEBUG')
if tc-is-gcc ; then
@@ -286,8 +297,8 @@ src_test() {
blender_get_version
# Define custom blender data/script file paths not be able to find them otherwise during testing.
# (Because the data is in the image directory and it will default to look in /usr/share)
- export BLENDER_SYSTEM_SCRIPTS=${ED}/usr/share/blender/${BV}/scripts
- export BLENDER_SYSTEM_DATAFILES=${ED}/usr/share/blender/${BV}/datafiles
+ export BLENDER_SYSTEM_SCRIPTS="${ED}"/usr/share/blender/${BV}/scripts
+ export BLENDER_SYSTEM_DATAFILES="${ED}"/usr/share/blender/${BV}/datafiles
# Sanity check that the script and datafile path is valid.
# If they are not vaild, blender will fallback to the default path which is not what we want.