commit:     c06ea09b242febcc3da2d96bd9ef287ff5c8bb45
Author:     Adrian Grigo <agrigo2001 <AT> yahoo <DOT> com <DOT> au>
AuthorDate: Sun Aug 23 14:36:35 2020 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Aug 24 13:41:56 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c06ea09b

media-gfx/blender: Only require abiX-compat when openvdb is enabled

Blender only needs to check which abi version is set when openvdb is
enabled. Wrap the version checks and die in an if statement.

Signed-off-by: Adrian Grigo <agrigo2001 <AT> yahoo.com.au>
Package-Manager: Portage-2.3.103, Repoman-2.3.23
Closes: https://github.com/gentoo/gentoo/pull/17154
Signed-off-by: Sam James <sam <AT> gentoo.org>

 media-gfx/blender/blender-2.83.4.ebuild | 24 +++++++++++++-----------
 1 file changed, 13 insertions(+), 11 deletions(-)

diff --git a/media-gfx/blender/blender-2.83.4.ebuild 
b/media-gfx/blender/blender-2.83.4.ebuild
index b6e7cb00c60..190185272e9 100644
--- a/media-gfx/blender/blender-2.83.4.ebuild
+++ b/media-gfx/blender/blender-2.83.4.ebuild
@@ -86,12 +86,12 @@ RDEPEND="${PYTHON_DEPS}
        opensubdiv? ( >=media-libs/opensubdiv-3.4.0[cuda=,opencl=] )
        openvdb? (
                ~media-gfx/openvdb-7.0.0[abi6-compat(-)?,abi7-compat(-)?]
-               dev-cpp/tbb
                dev-libs/c-blosc:=
        )
        osl? ( media-libs/osl )
        sdl? ( media-libs/libsdl2[sound,joystick] )
        sndfile? ( media-libs/libsndfile )
+       tbb? ( dev-cpp/tbb )
        tiff? ( media-libs/tiff )
        valgrind? ( dev-util/valgrind )
 "
@@ -145,7 +145,7 @@ src_prepare() {
        # Disable MS Windows help generation. The variable doesn't do what it
        # it sounds like.
        sed -e "s|GENERATE_HTMLHELP      = YES|GENERATE_HTMLHELP      = NO|" \
-           -i doc/doxygen/Doxyfile || die
+               -i doc/doxygen/Doxyfile || die
 }
 
 src_configure() {
@@ -154,15 +154,17 @@ src_configure() {
        append-flags -funsigned-char
        append-lfs-flags
 
-       local version
-       if use abi6-compat; then
-               version=6;
-       elif use abi7-compat; then
-               version=7;
-       else
-               die "Openvdb abi version not compatible"
+       if use openvdb; then
+               local version
+               if use abi6-compat; then
+                       version=6;
+               elif use abi7-compat; then
+                       version=7;
+               else
+                       die "Openvdb abi version not compatible"
+               fi
+               append-cppflags -DOPENVDB_ABI_VERSION_NUMBER=${version}
        fi
-       append-cppflags -DOPENVDB_ABI_VERSION_NUMBER=${version}
 
        local mycmakeargs=(
                -DBUILD_SHARED_LIBS=OFF
@@ -284,7 +286,7 @@ src_install() {
 pkg_postinst() {
        elog
        elog "Blender uses python integration. As such, may have some"
-       elog "inherit risks with running unknown python scripts."
+       elog "inherent risks with running unknown python scripts."
        elog
        elog "It is recommended to change your blender temp directory"
        elog "from /tmp to /home/user/tmp or another tmp file under your"

Reply via email to