Gentoo Archives: gentoo-commits

From: Ionen Wolkens <ionen@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-gfx/blender/
Date: Sun, 25 Sep 2022 12:29:43
Message-Id: 1664108572.a5711585ca1e99533578410e543a2b3ad30ffb69.ionen@gentoo
1 commit: a5711585ca1e99533578410e543a2b3ad30ffb69
2 Author: Bernd Waibel <waebbl-gentoo <AT> posteo <DOT> net>
3 AuthorDate: Sat Sep 17 09:10:14 2022 +0000
4 Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
5 CommitDate: Sun Sep 25 12:22:52 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a5711585
7
8 media-gfx/blender: add optix support to live ebuild
9
10 Signed-off-by: Bernd Waibel <waebbl-gentoo <AT> posteo.net>
11 Closes: https://github.com/gentoo/gentoo/pull/27303
12 Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>
13
14 media-gfx/blender/blender-9999.ebuild | 17 ++++++++++++++---
15 1 file changed, 14 insertions(+), 3 deletions(-)
16
17 diff --git a/media-gfx/blender/blender-9999.ebuild b/media-gfx/blender/blender-9999.ebuild
18 index 48a7c50cf696..0426748b3a70 100644
19 --- a/media-gfx/blender/blender-9999.ebuild
20 +++ b/media-gfx/blender/blender-9999.ebuild
21 @@ -28,7 +28,8 @@ IUSE="+bullet +dds +fluid +openexr +tbb \
22 alembic collada +color-management cuda +cycles \
23 debug doc +embree +ffmpeg +fftw +gmp headless jack jemalloc jpeg2k \
24 man +nanovdb ndof nls openal +oidn +openimageio +openmp +opensubdiv \
25 - +openvdb +osl +pdf +potrace +pugixml pulseaudio sdl +sndfile test +tiff valgrind"
26 + +openvdb optix +osl +pdf +potrace +pugixml pulseaudio sdl +sndfile \
27 + test +tiff valgrind"
28 RESTRICT="!test? ( test )"
29
30 REQUIRED_USE="${PYTHON_REQUIRED_USE}
31 @@ -37,6 +38,7 @@ REQUIRED_USE="${PYTHON_REQUIRED_USE}
32 cycles? ( openexr tiff openimageio )
33 fluid? ( tbb )
34 openvdb? ( tbb )
35 + optix? ( cuda )
36 osl? ( cycles )
37 test? ( color-management )"
38
39 @@ -93,6 +95,7 @@ RDEPEND="${PYTHON_DEPS}
40 >=media-gfx/openvdb-9.0.0:=[nanovdb?]
41 dev-libs/c-blosc:=
42 )
43 + optix? ( <dev-libs/optix-7.5.0 )
44 osl? ( >=media-libs/osl-1.11.16.0-r3:= )
45 pdf? ( media-libs/libharu )
46 potrace? ( media-gfx/potrace )
47 @@ -217,6 +220,7 @@ src_configure() {
48 -DWITH_CXX_GUARDEDALLOC=$(usex debug)
49 -DWITH_CYCLES=$(usex cycles)
50 -DWITH_CYCLES_DEVICE_CUDA=$(usex cuda TRUE FALSE)
51 + -DWITH_CYCLES_DEVICE_OPTIX=$(usex optix)
52 -DWITH_CYCLES_EMBREE=$(usex embree)
53 -DWITH_CYCLES_OSL=$(usex osl)
54 -DWITH_CYCLES_STANDALONE=OFF
55 @@ -264,6 +268,13 @@ src_configure() {
56 -DWITH_XR_OPENXR=OFF
57 )
58
59 + if use optix; then
60 + mycmakeargs+=(
61 + -DCYCLES_RUNTIME_OPTIX_ROOT_DIR="${EPREFIX}"/opt/optix
62 + -DOPTIX_ROOT_DIR="${EPREFIX}"/opt/optix
63 + )
64 + fi
65 +
66 append-flags $(usex debug '-DDEBUG' '-DNDEBUG')
67
68 if tc-is-gcc ; then
69 @@ -286,8 +297,8 @@ src_test() {
70 blender_get_version
71 # Define custom blender data/script file paths not be able to find them otherwise during testing.
72 # (Because the data is in the image directory and it will default to look in /usr/share)
73 - export BLENDER_SYSTEM_SCRIPTS=${ED}/usr/share/blender/${BV}/scripts
74 - export BLENDER_SYSTEM_DATAFILES=${ED}/usr/share/blender/${BV}/datafiles
75 + export BLENDER_SYSTEM_SCRIPTS="${ED}"/usr/share/blender/${BV}/scripts
76 + export BLENDER_SYSTEM_DATAFILES="${ED}"/usr/share/blender/${BV}/datafiles
77
78 # Sanity check that the script and datafile path is valid.
79 # If they are not vaild, blender will fallback to the default path which is not what we want.