public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/blender/, media-gfx/blender/files/
@ 2016-06-16 20:02 Amy Winston
  0 siblings, 0 replies; 21+ messages in thread
From: Amy Winston @ 2016-06-16 20:02 UTC (permalink / raw
  To: gentoo-commits

commit:     58ae358937ae0c36da5f1d30cbd1aec644c1b76e
Author:     dracwyrm <j.scruggs <AT> gmail <DOT> com>
AuthorDate: Thu Jun 16 16:06:25 2016 +0000
Commit:     Amy Winston <amynka <AT> gentoo <DOT> org>
CommitDate: Thu Jun 16 19:59:54 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=58ae3589

media-gfx/blender: bug fixes and update metadata.xml

Gentoo Bugs: 533514, 523928, 585730
Updated metadata.xml with new proxy maintainers
Switched to EAPI 6
Added in doc building hack for binary drivers

 media-gfx/blender/blender-2.72b-r4.ebuild          | 291 +++++++++++++++++++++
 media-gfx/blender/files/blender-2.72-T42797.diff   |   4 +-
 .../files/blender-2.72b-fix-util_simd.patch        |  10 +
 media-gfx/blender/metadata.xml                     | 112 ++++----
 4 files changed, 364 insertions(+), 53 deletions(-)

diff --git a/media-gfx/blender/blender-2.72b-r4.ebuild b/media-gfx/blender/blender-2.72b-r4.ebuild
new file mode 100644
index 0000000..c0a7e4d
--- /dev/null
+++ b/media-gfx/blender/blender-2.72b-r4.ebuild
@@ -0,0 +1,291 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+## BUNDLED-DEPS:
+# extern/cuew
+# extern/Eigen3
+# extern/xdnd
+# extern/carve
+# extern/glew
+# extern/libmv
+# extern/clew
+# extern/colamd
+# extern/lzma
+# extern/gtest
+# extern/rangetree
+# extern/libredcode
+# extern/wcwidth
+# extern/binreloc
+# extern/recastnavigation
+# extern/bullet2
+# extern/lzo
+# extern/libopenjpeg
+# extern/libmv/third_party/msinttypes
+# extern/libmv/third_party/ceres
+# extern/libmv/third_party/gflags
+# extern/libmv/third_party/glog
+
+EAPI=6
+PYTHON_COMPAT=( python3_4 )
+#PATCHSET="1"
+
+inherit multilib fdo-mime gnome2-utils cmake-utils eutils python-single-r1 versionator flag-o-matic toolchain-funcs pax-utils check-reqs
+
+DESCRIPTION="3D Creation/Animation/Publishing System"
+HOMEPAGE="http://www.blender.org"
+
+case ${PV} in
+	*_p*)
+		SRC_URI="https://dev.gentoo.org/~lu_zero/${P}.tar.gz" ;;
+	*)
+		SRC_URI="http://download.blender.org/source/${P}.tar.gz" ;;
+esac
+
+if [[ -n ${PATCHSET} ]]; then
+	SRC_URI+=" https://dev.gentoo.org/~flameeyes/${PN}/${P}-patches-${PATCHSET}.tar.xz"
+fi
+
+SLOT="0"
+LICENSE="|| ( GPL-2 BL )"
+KEYWORDS="~amd64 ~x86"
+IUSE="+boost +bullet collada colorio cycles +dds debug doc +elbeem ffmpeg fftw +game-engine jack jpeg2k libav ndof nls openal openimageio +opennl openmp +openexr player redcode sdl sndfile cpu_flags_x86_sse cpu_flags_x86_sse2 tiff"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}
+	player? ( game-engine )
+	redcode? ( jpeg2k ffmpeg )
+	cycles? ( boost openexr tiff )
+	nls? ( boost )
+	colorio? ( boost )
+	openal? ( boost )
+	game-engine? ( boost )
+	?? ( ffmpeg libav )"
+
+RDEPEND="
+	${PYTHON_DEPS}
+	dev-python/numpy[${PYTHON_USEDEP}]
+	dev-python/requests[${PYTHON_USEDEP}]
+	>=media-libs/freetype-2.0:2
+	media-libs/glew
+	media-libs/libpng:0
+	media-libs/libsamplerate
+	sci-libs/ldl
+	sys-libs/zlib
+	virtual/glu
+	virtual/jpeg:0
+	virtual/libintl
+	virtual/opengl
+	x11-libs/libX11
+	x11-libs/libXi
+	x11-libs/libXxf86vm
+	boost? ( >=dev-libs/boost-1.44[nls?,threads(+)] )
+	collada? ( >=media-libs/opencollada-1.6.18 )
+	colorio? ( >=media-libs/opencolorio-1.0.9-r2 )
+	cycles? (
+		media-libs/openimageio
+	)
+	ffmpeg? ( media-video/ffmpeg:0=[x264,mp3,encode,theora,jpeg2k?] )
+	libav? ( >=media-video/libav-11.3:0=[x264,mp3,encode,theora,jpeg2k?] )
+	fftw? ( sci-libs/fftw:3.0 )
+	jack? ( media-sound/jack-audio-connection-kit )
+	jpeg2k? ( media-libs/openjpeg:0 )
+	ndof? (
+		app-misc/spacenavd
+		dev-libs/libspnav
+	)
+	nls? ( virtual/libiconv )
+	openal? ( >=media-libs/openal-1.6.372 )
+	openimageio? ( media-libs/openimageio )
+	openexr? ( media-libs/ilmbase media-libs/openexr )
+	sdl? ( media-libs/libsdl[sound,joystick] )
+	sndfile? ( media-libs/libsndfile )
+	tiff? ( media-libs/tiff:0 )"
+DEPEND="${RDEPEND}
+	doc? (
+		app-doc/doxygen[-nodot(-),dot(+)]
+		dev-python/sphinx
+	)
+	nls? ( sys-devel/gettext )"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-2.68-doxyfile.patch
+	"${FILESDIR}"/${PN}-2.68-fix-install-rules.patch
+	"${FILESDIR}"/${PN}-2.70-sse2.patch
+	"${FILESDIR}"/${PN}-2.72-T42797.diff
+	"${FILESDIR}"/${P}-fix-util_simd.patch
+)
+
+pkg_pretend() {
+	if use openmp && ! tc-has-openmp; then
+		eerror "You are using gcc built without 'openmp' USE."
+		eerror "Switch CXX to an OpenMP capable compiler."
+		die "Need openmp"
+	fi
+
+	if use doc; then
+		CHECKREQS_DISK_BUILD="4G" check-reqs_pkg_pretend
+	fi
+}
+
+pkg_setup() {
+	python-single-r1_pkg_setup
+}
+
+src_prepare() {
+	default
+
+	# we don't want static glew, but it's scattered across
+	# thousand files
+	# !!!CHECK THIS SED ON EVERY VERSION BUMP!!!
+	sed -i \
+		-e '/-DGLEW_STATIC/d' \
+		$(find . -type f -name "CMakeLists.txt") || die
+
+	# linguas cleanup
+	local i
+	if ! use nls; then
+		rm -r "${S}"/release/datafiles/locale || die
+	else
+		if [[ -n "${LINGUAS+x}" ]] ; then
+			cd "${S}"/release/datafiles/locale/po
+			for i in *.po ; do
+				mylang=${i%.po}
+				has ${mylang} ${LINGUAS} || { rm -r ${i} || die ; }
+			done
+		fi
+	fi
+}
+
+src_configure() {
+	# FIX: forcing '-funsigned-char' fixes an anti-aliasing issue with menu
+	# shadows, see bug #276338 for reference
+	append-flags -funsigned-char
+	append-lfs-flags
+	append-ldflags $(no-as-needed)
+
+	# WITH_PYTHON_SECURITY
+	# WITH_PYTHON_SAFETY
+	local mycmakeargs=(
+		-DCMAKE_INSTALL_PREFIX=/usr
+		-DWITH_INSTALL_PORTABLE=OFF
+		-DWITH_BOOST=$(usex boost ON OFF )
+		-DWITH_CYCLES=$(usex cycles ON OFF )
+		-DWITH_OPENCOLLADA=$(usex collada ON OFF )
+		-DWITH_IMAGE_DDS=$(usex dds ON OFF )
+		-DWITH_MOD_FLUID=$(usex elbeem ON OFF )
+		-DWITH_CODEC_FFMPEG=$(usex ffmpeg ON OFF )
+		-DWITH_FFTW3=$(usex fftw ON OFF )
+		-DWITH_MOD_OCEANSIM=$(usex fftw ON OFF )
+		-DWITH_GAMEENGINE=$(usex game-engine ON OFF )
+		-DWITH_INTERNATIONAL=$(usex nls ON OFF )
+		-DWITH_JACK=$(usex jack ON OFF )
+		-DWITH_IMAGE_OPENJPEG=$(usex jpeg2k ON OFF )
+		-DWITH_OPENIMAGEIO=$(usex openimageio ON OFF )
+		-DWITH_OPENAL=$(usex openal ON OFF )
+		-DWITH_IMAGE_OPENEXR=$(usex openexr ON OFF )
+		-DWITH_OPENMP=$(usex openmp ON OFF )
+		-DWITH_OPENNL=$(usex opennl ON OFF )
+		-DWITH_PLAYER=$(usex player ON OFF )
+		-DWITH_IMAGE_REDCODE=$(usex redcode ON OFF )
+		-DWITH_SDL=$(usex sdl ON OFF )
+		-DWITH_CODEC_SNDFILE=$(usex sndfile ON OFF )
+		-DWITH_RAYOPTIMIZATION=$(usex cpu_flags_x86_sse ON OFF )
+		-DWITH_SSE2=$(usex cpu_flags_x86_sse2 ON OFF )
+		-DWITH_BULLET=$(usex bullet ON OFF )
+		-DWITH_IMAGE_TIFF=$(usex tiff ON OFF )
+		-DWITH_OPENCOLORIO=$(usex colorio ON OFF )
+		-DWITH_INPUT_NDOF=$(usex ndof ON OFF )
+		-DWITH_CXX_GUARDEDALLOC=$(usex debug ON OFF )
+		-DWITH_ASSERT_ABORT=$(usex debug ON OFF )
+		-DWITH_PYTHON_INSTALL=OFF
+		-DWITH_PYTHON_INSTALL_NUMPY=OFF
+		-DWITH_STATIC_LIBS=OFF
+		-DWITH_SYSTEM_GLEW=ON
+		-DWITH_SYSTEM_OPENJPEG=ON
+		-DWITH_SYSTEM_BULLET=OFF
+		-DPYTHON_VERSION="${EPYTHON/python/}"
+		-DPYTHON_LIBRARY="$(python_get_library_path)"
+		-DPYTHON_INCLUDE_DIR="$(python_get_includedir)"
+	)
+	cmake-utils_src_configure
+}
+
+src_compile() {
+	cmake-utils_src_compile
+
+	if use doc; then
+		# Workaround for binary drivers.
+		cards=( /dev/ati/card* /dev/nvidia* )
+		for card in "${cards[@]}"; do addpredict "${card}"; done
+
+		einfo "Generating Blender C/C++ API docs ..."
+		cd "${CMAKE_USE_DIR}"/doc/doxygen || die
+		doxygen -u Doxyfile
+		doxygen || die "doxygen failed to build API docs."
+
+		cd "${CMAKE_USE_DIR}" || die
+		einfo "Generating (BPY) Blender Python API docs ..."
+		"${BUILD_DIR}"/bin/blender --background --python doc/python_api/sphinx_doc_gen.py -noaudio || die "blender failed."
+
+		cd "${CMAKE_USE_DIR}"/doc/python_api || die
+		sphinx-build sphinx-in BPY_API || die "sphinx failed."
+	fi
+}
+
+src_test() { :; }
+
+src_install() {
+	local i
+
+	# Pax mark blender for hardened support.
+	pax-mark m "${CMAKE_BUILD_DIR}"/bin/blender
+
+	if use doc; then
+		docinto "html/API/python"
+		dodoc -r "${CMAKE_USE_DIR}"/doc/python_api/BPY_API/*
+
+		docinto "html/API/blender"
+		dodoc -r "${CMAKE_USE_DIR}"/doc/doxygen/html/*
+	fi
+
+	# fucked up cmake will relink binary for no reason
+	emake -C "${CMAKE_BUILD_DIR}" DESTDIR="${D}" install/fast
+
+	# fix doc installdir
+	docinto "html"
+	dodoc "${CMAKE_USE_DIR}"/release/text/readme.html
+	rm -rf "${ED%/}"/usr/share/doc/blender
+
+	python_fix_shebang "${ED%/}"/usr/bin/blender-thumbnailer.py
+	python_optimize "${ED%/}"/usr/share/blender/${PV}/scripts
+}
+
+pkg_preinst() {
+	gnome2_icon_savelist
+}
+
+pkg_postinst() {
+	elog
+	elog "Blender uses python integration. As such, may have some"
+	elog "inherit risks with running unknown python scripting."
+	elog
+	elog "It is recommended to change your blender temp directory"
+	elog "from /tmp to /home/user/tmp or another tmp file under your"
+	elog "home directory. This can be done by starting blender, then"
+	elog "dragging the main menu down do display all paths."
+	elog
+	ewarn
+	ewarn "This ebuild does not unbundle the massive amount of 3rd party"
+	ewarn "libraries which are shipped with blender. Note that"
+	ewarn "these have caused security issues in the past."
+	ewarn "If you are concerned about security, file a bug upstream:"
+	ewarn "  https://developer.blender.org/"
+	ewarn
+
+	gnome2_icon_cache_update
+	fdo-mime_desktop_database_update
+}
+
+pkg_postrm() {
+	gnome2_icon_cache_update
+	fdo-mime_desktop_database_update
+}

diff --git a/media-gfx/blender/files/blender-2.72-T42797.diff b/media-gfx/blender/files/blender-2.72-T42797.diff
index d1db318..cef0385 100644
--- a/media-gfx/blender/files/blender-2.72-T42797.diff
+++ b/media-gfx/blender/files/blender-2.72-T42797.diff
@@ -1,5 +1,5 @@
---- source/blender/blenfont/intern/blf_glyph.c
-+++ source/blender/blenfont/intern/blf_glyph.c
+--- a/source/blender/blenfont/intern/blf_glyph.c
++++ a/source/blender/blenfont/intern/blf_glyph.c
 @@ -262,8 +262,8 @@
  	g->xoff = -1;
  	g->yoff = -1;

diff --git a/media-gfx/blender/files/blender-2.72b-fix-util_simd.patch b/media-gfx/blender/files/blender-2.72b-fix-util_simd.patch
new file mode 100644
index 0000000..8c83ee0
--- /dev/null
+++ b/media-gfx/blender/files/blender-2.72b-fix-util_simd.patch
@@ -0,0 +1,10 @@
+--- a/intern/cycles/util/util_simd.h	2014-10-20 12:58:22.000000000 +0500
++++ b/intern/cycles/util/util_simd.h	2015-05-17 11:57:37.000000000 +0500
+@@ -19,6 +19,7 @@
+ #define __UTIL_SIMD_TYPES_H__
+ 
+ #include <limits>
++#include <x86intrin.h>
+ 
+ #include "util_debug.h"
+ #include "util_types.h"

diff --git a/media-gfx/blender/metadata.xml b/media-gfx/blender/metadata.xml
index 8279503..b994a57 100644
--- a/media-gfx/blender/metadata.xml
+++ b/media-gfx/blender/metadata.xml
@@ -1,57 +1,67 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
 <pkgmetadata>
-  <maintainer type="project">
-    <email>graphics@gentoo.org</email>
-    <name>Gentoo Graphics Project</name>
-  </maintainer>
+	<maintainer restrict="&gt;=media-gfx/blender-2.72b-r4" type="person">
+		<email>j.scruggs@gmail.com</email>
+		<name>Jonathan Scruggs</name>
+		<description>Proxy maintainer</description>
+	</maintainer>
+	<maintainer restrict="&gt;=media-gfx/blender-2.72b-r4" type="person">
+		<email>agrigo2001@yahoo.com.au</email>
+		<name>Adrian Grigo</name>
+		<description>Proxy maintainer</description>
+	</maintainer>
+	<maintainer type="project">
+		<email>graphics@gentoo.org</email>
+		<name>Gentoo Graphics Project</name>
+	</maintainer>
 
-  <longdescription>
-    Blender, the open source software for 3D modeling, animation,
-    rendering, post-production, interactive creation and playback.
-  </longdescription>
+	<longdescription>
+		Blender, the open source software for 3D modeling, animation,
+		rendering, post-production, interactive creation and playback.
+	</longdescription>
 
-  <use>
-    <flag name="game-engine" restrict="&gt;=media-gfx/blender-2.50">
-      Adds Game Engine support to Blender.
-    </flag>
-    <flag name="collada">
-      Add support for Collada interchange format through
-      <pkg>media-libs/opencollada</pkg>.
-    </flag>
-    <flag name="cycles">
-      Build cycles renderer (requires <pkg>media-libs/openimageio</pkg> and
-      <pkg>dev-libs/boost</pkg>).
-    </flag>
-    <flag name="dds">
-      Adds DDS textures support to Blender.
-    </flag>
-    <flag name="player">
-      Build the Blender Player. THis requires the Game engine.
-    </flag>
-    <flag name="elbeem">
-      Adds surface fluid simulation to Blender using El'Beem library.
-    </flag>
-    <flag name="doc">
-      Build C and Python API documentation directly from the source code.
-    </flag>
-    <flag name="redcode">
-      This flag add support for RED CODE camera digital format (5K HD
-      images *.r3d) - EXPERIMENTAL.
-    </flag>
-    <flag name="boost">
-      Enable features depending on boost.
-    </flag>
-	<flag name="bullet">
-      Enable Bullet (Physics Engine).
-	</flag>
-	<flag name="colorio">
-      Enable OpenColorIO color management.
-	</flag>
-	<flag name="ndof">
-      Enable NDOF input devices (SpaceNavigator and friends).
-  </flag>
-  <flag name="openimageio">Enable OpenImageIO Support</flag>
-  <flag name="opennl">Enable use of Open Numerical Library</flag>
-  </use>
+	<use>
+		<flag name="game-engine" restrict="&gt;=media-gfx/blender-2.50">
+			Adds Game Engine support to Blender.
+		</flag>
+		<flag name="collada">
+			Add support for Collada interchange format through
+			<pkg>media-libs/opencollada</pkg>.
+		</flag>
+		<flag name="cycles">
+			Build cycles renderer (requires <pkg>media-libs/openimageio</pkg> and
+			<pkg>dev-libs/boost</pkg>).
+		</flag>
+		<flag name="dds">
+			Adds DDS textures support to Blender.
+		</flag>
+		<flag name="player">
+			Build the Blender Player. THis requires the Game engine.
+		</flag>
+		<flag name="elbeem">
+			Adds surface fluid simulation to Blender using El'Beem library.
+		</flag>
+		<flag name="doc">
+			Build C and Python API documentation directly from the source code.
+		</flag>
+		<flag name="redcode">
+			This flag add support for RED CODE camera digital format (5K HD
+			images *.r3d) - EXPERIMENTAL.
+		</flag>
+		<flag name="boost">
+			Enable features depending on boost.
+		</flag>
+		<flag name="bullet">
+			Enable Bullet (Physics Engine).
+		</flag>
+		<flag name="colorio">
+			Enable OpenColorIO color management.
+		</flag>
+		<flag name="ndof">
+			Enable NDOF input devices (SpaceNavigator and friends).
+		</flag>
+		<flag name="openimageio">Enable OpenImageIO Support</flag>
+		<flag name="opennl">Enable use of Open Numerical Library</flag>
+	</use>
 </pkgmetadata>


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/blender/, media-gfx/blender/files/
@ 2017-01-15 13:34 David Seifert
  0 siblings, 0 replies; 21+ messages in thread
From: David Seifert @ 2017-01-15 13:34 UTC (permalink / raw
  To: gentoo-commits

commit:     b3127967bd21afb9068011688a951c91fda5f54f
Author:     Jonathan Scruggs <j.scruggs <AT> gmail <DOT> com>
AuthorDate: Sun Jan 15 12:00:01 2017 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sun Jan 15 13:25:23 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b3127967

media-gfx/blender: eigen 3.3.1 compile fix and openvdb 4 support

* Added a patch to compile against eigen 3.3.1
* Added compile fix against OpenVDB 4
* OpenVDB 4 hard enables compression, so removed USE Flags and
  hard enable it for OVB 3.2 for future compatibility

Signed-off by: Jonathan Scruggs (j.scruggs <AT> gmail.com)
Closes: https://github.com/gentoo/gentoo/pull/3474

 media-gfx/blender/blender-2.78-r1.ebuild           | 300 +++++++++++++++++++++
 media-gfx/blender/blender-2.78a-r1.ebuild          | 299 ++++++++++++++++++++
 .../blender/files/blender-2.78-eigen-3.3.1.patch   |  25 ++
 media-gfx/blender/metadata.xml                     |   4 -
 4 files changed, 624 insertions(+), 4 deletions(-)

diff --git a/media-gfx/blender/blender-2.78-r1.ebuild b/media-gfx/blender/blender-2.78-r1.ebuild
new file mode 100644
index 00000000..6ee5c38
--- /dev/null
+++ b/media-gfx/blender/blender-2.78-r1.ebuild
@@ -0,0 +1,300 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+PYTHON_COMPAT=( python3_5 )
+
+inherit check-reqs cmake-utils fdo-mime flag-o-matic gnome2-utils \
+	pax-utils python-single-r1 toolchain-funcs versionator
+
+DESCRIPTION="3D Creation/Animation/Publishing System"
+HOMEPAGE="http://www.blender.org"
+
+SRC_URI="http://download.blender.org/source/${P}.tar.gz"
+
+# Blender can have letters in the version string,
+# so strip of the letter if it exists.
+MY_PV="$(get_version_component_range 1-2)"
+
+SLOT="0"
+LICENSE="|| ( GPL-2 BL )"
+KEYWORDS="~amd64 ~x86"
+IUSE="+boost +bullet +dds +elbeem +game-engine +openexr collada colorio \
+	cuda cycles debug doc ffmpeg fftw headless jack jemalloc jpeg2k libav \
+	llvm man ndof nls openal opencl openimageio openmp opensubdiv openvdb \
+	player sdl sndfile test tiff valgrind"
+
+# OpenCL and nVidia performance is rubbish with Blender
+# If you have nVidia, use CUDA.
+REQUIRED_USE="${PYTHON_REQUIRED_USE}
+	player? ( game-engine !headless )
+	cuda? ( cycles !opencl )
+	cycles? ( boost openexr tiff openimageio )
+	colorio? ( boost )
+	openvdb? ( boost )
+	opensubdiv? ( cuda )
+	nls? ( boost )
+	openal? ( boost )
+	opencl? ( cycles )
+	game-engine? ( boost )
+	?? ( ffmpeg libav )"
+
+# Since not using OpenCL with nVidia, depend on ATI binary
+# blobs as Cycles with OpenCL does not work with any open
+# source drivers.
+RDEPEND="${PYTHON_DEPS}
+	dev-libs/lzo:2
+	>=dev-python/numpy-1.10.1[${PYTHON_USEDEP}]
+	dev-python/requests[${PYTHON_USEDEP}]
+	media-libs/freetype
+	media-libs/glew:*
+	media-libs/libpng:0=
+	media-libs/libsamplerate
+	sys-libs/zlib
+	virtual/glu
+	virtual/jpeg:0=
+	virtual/libintl
+	virtual/opengl
+	boost? ( >=dev-libs/boost-1.62:=[nls?,threads(+)] )
+	collada? ( >=media-libs/opencollada-1.6.18:= )
+	colorio? ( >=media-libs/opencolorio-1.0.9-r2 )
+	cuda? ( dev-util/nvidia-cuda-toolkit:= )
+	ffmpeg? ( media-video/ffmpeg:=[x264,mp3,encode,theora,jpeg2k?] )
+	libav? ( >=media-video/libav-11.3:=[x264,mp3,encode,theora,jpeg2k?] )
+	fftw? ( sci-libs/fftw:3.0= )
+	!headless? (
+		x11-libs/libX11
+		x11-libs/libXi
+		x11-libs/libXxf86vm
+	)
+	jack? ( media-sound/jack-audio-connection-kit )
+	jemalloc? ( dev-libs/jemalloc:= )
+	jpeg2k? ( media-libs/openjpeg:0 )
+	llvm? ( sys-devel/llvm )
+	ndof? (
+		app-misc/spacenavd
+		dev-libs/libspnav
+	)
+	nls? ( virtual/libiconv )
+	openal? ( media-libs/openal )
+	openimageio? ( >=media-libs/openimageio-1.6.9 )
+	opencl? ( x11-drivers/ati-drivers:* )
+	openexr? (
+		>=media-libs/ilmbase-2.2.0:=
+		>=media-libs/openexr-2.2.0:=
+	)
+	opensubdiv? ( media-libs/opensubdiv[cuda=,opencl=] )
+	openvdb? (
+		media-gfx/openvdb[${PYTHON_USEDEP},abi3-compat(+),openvdb-compression(+)]
+		dev-cpp/tbb
+		>=dev-libs/c-blosc-1.5.2
+	)
+	sdl? ( media-libs/libsdl2[sound,joystick] )
+	sndfile? ( media-libs/libsndfile )
+	tiff? ( media-libs/tiff:0 )
+	valgrind? ( dev-util/valgrind )"
+
+DEPEND="${RDEPEND}
+	>=dev-cpp/eigen-3.2.8:3
+	nls? ( sys-devel/gettext )
+	doc? (
+		app-doc/doxygen[-nodot(-),dot(+),latex]
+		dev-python/sphinx[latex]
+	)"
+
+PATCHES=( "${FILESDIR}"/${P}-C++11-build-fix.patch
+	  "${FILESDIR}"/${PN}-fix-install-rules.patch
+	  "${FILESDIR}"/${P}-eigen-3.3.1.patch )
+
+blender_check_requirements() {
+	[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+
+	if use doc; then
+		CHECKREQS_DISK_BUILD="4G" check-reqs_pkg_pretend
+	fi
+}
+
+pkg_pretend() {
+	blender_check_requirements
+}
+
+pkg_setup() {
+	blender_check_requirements
+	python-single-r1_pkg_setup
+}
+
+src_prepare() {
+	default
+
+	# we don't want static glew, but it's scattered across
+	# multiple files that differ from version to version
+	# !!!CHECK THIS SED ON EVERY VERSION BUMP!!!
+	local file
+	while IFS="" read -d $'\0' -r file ; do
+		sed -i -e '/-DGLEW_STATIC/d' "${file}" || die
+	done < <(find . -type f -name "CMakeLists.txt")
+
+	# 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
+}
+
+src_configure() {
+	# FIX: forcing '-funsigned-char' fixes an anti-aliasing issue with menu
+	# shadows, see bug #276338 for reference
+	append-flags -funsigned-char
+	append-lfs-flags
+	append-cppflags -DOPENVDB_3_ABI_COMPATIBLE
+
+	local mycmakeargs=(
+		-DPYTHON_VERSION="${EPYTHON/python/}"
+		-DPYTHON_LIBRARY="$(python_get_library_path)"
+		-DPYTHON_INCLUDE_DIR="$(python_get_includedir)"
+		-DWITH_INSTALL_PORTABLE=OFF
+		-DWITH_PYTHON_INSTALL=OFF
+		-DWITH_PYTHON_INSTALL_NUMPY=OFF
+		-DWITH_STATIC_LIBS=OFF
+		-DWITH_SYSTEM_GLEW=ON
+		-DWITH_SYSTEM_OPENJPEG=ON
+		-DWITH_SYSTEM_EIGEN3=ON
+		-DWITH_SYSTEM_LZO=ON
+		-DWITH_C11=ON
+		-DWITH_CXX11=ON
+		-DWITH_BOOST=$(usex boost)
+		-DWITH_BULLET=$(usex bullet)
+		-DWITH_CODEC_FFMPEG=$(usex ffmpeg)
+		-DWITH_CODEC_SNDFILE=$(usex sndfile)
+		-DWITH_CUDA=$(usex cuda)
+		-DWITH_CYCLES_DEVICE_CUDA=$(usex cuda TRUE FALSE)
+		-DWITH_CYCLES=$(usex cycles)
+		-DWITH_CYCLES_OSL=OFF
+		-DWITH_LLVM=$(usex llvm)
+		-DWITH_FFTW3=$(usex fftw)
+		-DWITH_GAMEENGINE=$(usex game-engine)
+		-DWITH_HEADLESS=$(usex headless)
+		-DWITH_X11=$(usex !headless)
+		-DWITH_IMAGE_DDS=$(usex dds)
+		-DWITH_IMAGE_OPENEXR=$(usex openexr)
+		-DWITH_IMAGE_OPENJPEG=$(usex jpeg2k)
+		-DWITH_IMAGE_TIFF=$(usex tiff)
+		-DWITH_INPUT_NDOF=$(usex ndof)
+		-DWITH_INTERNATIONAL=$(usex nls)
+		-DWITH_JACK=$(usex jack)
+		-DWITH_MOD_FLUID=$(usex elbeem)
+		-DWITH_MOD_OCEANSIM=$(usex fftw)
+		-DWITH_OPENAL=$(usex openal)
+		-DWITH_OPENCL=$(usex opencl)
+		-DWITH_CYCLES_DEVICE_OPENCL=$(usex opencl TRUE FALSE)
+		-DWITH_OPENCOLORIO=$(usex colorio)
+		-DWITH_OPENCOLLADA=$(usex collada)
+		-DWITH_OPENIMAGEIO=$(usex openimageio)
+		-DWITH_OPENMP=$(usex openmp)
+		-DWITH_OPENSUBDIV=$(usex opensubdiv)
+		-DWITH_OPENVDB=$(usex openvdb)
+		-DWITH_OPENVDB_BLOSC=$(usex openvdb)
+		-DWITH_PLAYER=$(usex player)
+		-DWITH_SDL=$(usex sdl)
+		-DWITH_CXX_GUARDEDALLOC=$(usex debug)
+		-DWITH_ASSERT_ABORT=$(usex debug)
+		-DWITH_GTESTS=$(usex test)
+		-DWITH_DOC_MANPAGE=$(usex man)
+		-DWITH_MEM_JEMALLOC=$(usex jemalloc)
+		-DWITH_MEM_VALGRIND=$(usex valgrind)
+	)
+	cmake-utils_src_configure
+}
+
+src_compile() {
+	cmake-utils_src_compile
+
+	if use doc; then
+		# Workaround for binary drivers.
+		local card
+		local cards=( /dev/ati/card* /dev/nvidia* )
+		for card in "${cards[@]}"; do addpredict "${card}"; done
+
+		einfo "Generating Blender C/C++ API docs ..."
+		cd "${CMAKE_USE_DIR}"/doc/doxygen || die
+		doxygen -u Doxyfile || die
+		doxygen || die "doxygen failed to build API docs."
+
+		cd "${CMAKE_USE_DIR}" || die
+		einfo "Generating (BPY) Blender Python API docs ..."
+		"${BUILD_DIR}"/bin/blender --background --python doc/python_api/sphinx_doc_gen.py -noaudio || die "sphinx failed."
+
+		cd "${CMAKE_USE_DIR}"/doc/python_api || die
+		sphinx-build sphinx-in BPY_API || die "sphinx failed."
+	fi
+}
+
+src_test() {
+	if use test; then
+		einfo "Running Blender Unit Tests ..."
+		cd "${BUILD_DIR}"/bin/tests || die
+		local f
+		for f in *_test; do
+			./"${f}" || die
+		done
+	fi
+}
+
+src_install() {
+	# Pax mark blender for hardened support.
+	pax-mark m "${CMAKE_BUILD_DIR}"/bin/blender
+
+	if use doc; then
+		docinto "html/API/python"
+		dodoc -r "${CMAKE_USE_DIR}"/doc/python_api/BPY_API/.
+
+		docinto "html/API/blender"
+		dodoc -r "${CMAKE_USE_DIR}"/doc/doxygen/html/.
+	fi
+
+	emake -C "${CMAKE_BUILD_DIR}" DESTDIR="${D}" install/fast
+
+	# fix doc installdir
+	docinto "html"
+	dodoc "${CMAKE_USE_DIR}"/release/text/readme.html
+	rm -r "${ED%/}"/usr/share/doc/blender || die
+
+	python_fix_shebang "${ED%/}/usr/bin/blender-thumbnailer.py"
+	python_optimize "${ED%/}/usr/share/blender/${MY_PV}/scripts"
+}
+
+pkg_preinst() {
+	gnome2_icon_savelist
+}
+
+pkg_postinst() {
+	elog
+	elog "Blender uses python integration. As such, may have some"
+	elog "inherit 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"
+	elog "home directory. This can be done by starting blender, then"
+	elog "dragging the main menu down do display all paths."
+	elog
+	ewarn
+	ewarn "This ebuild does not unbundle the massive amount of 3rd party"
+	ewarn "libraries which are shipped with blender. Note that"
+	ewarn "these have caused security issues in the past."
+	ewarn "If you are concerned about security, file a bug upstream:"
+	ewarn "  https://developer.blender.org/"
+	ewarn
+	gnome2_icon_cache_update
+	fdo-mime_desktop_database_update
+}
+
+pkg_postrm() {
+	gnome2_icon_cache_update
+	fdo-mime_desktop_database_update
+
+	ewarn ""
+	ewarn "You may want to remove the following directory."
+	ewarn "~/.config/${PN}/${MY_PV}/cache/"
+	ewarn "It may contain extra render kernels not tracked by portage"
+	ewarn ""
+}

diff --git a/media-gfx/blender/blender-2.78a-r1.ebuild b/media-gfx/blender/blender-2.78a-r1.ebuild
new file mode 100644
index 00000000..f0395fe
--- /dev/null
+++ b/media-gfx/blender/blender-2.78a-r1.ebuild
@@ -0,0 +1,299 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+PYTHON_COMPAT=( python3_5 )
+
+inherit check-reqs cmake-utils fdo-mime flag-o-matic gnome2-utils \
+	pax-utils python-single-r1 toolchain-funcs versionator
+
+DESCRIPTION="3D Creation/Animation/Publishing System"
+HOMEPAGE="http://www.blender.org"
+
+SRC_URI="http://download.blender.org/source/${P}.tar.gz"
+
+# Blender can have letters in the version string,
+# so strip of the letter if it exists.
+MY_PV="$(get_version_component_range 1-2)"
+
+SLOT="0"
+LICENSE="|| ( GPL-2 BL )"
+KEYWORDS="~amd64 ~x86"
+IUSE="+boost +bullet +dds +elbeem +game-engine +openexr collada colorio \
+	cuda cycles debug doc ffmpeg fftw headless jack jemalloc jpeg2k libav \
+	llvm man ndof nls openal opencl openimageio openmp opensubdiv openvdb \
+	player sdl sndfile test tiff valgrind"
+
+# OpenCL and nVidia performance is rubbish with Blender
+# If you have nVidia, use CUDA.
+REQUIRED_USE="${PYTHON_REQUIRED_USE}
+	player? ( game-engine !headless )
+	cuda? ( cycles !opencl )
+	cycles? ( boost openexr tiff openimageio )
+	colorio? ( boost )
+	openvdb? ( boost )
+	opensubdiv? ( cuda )
+	nls? ( boost )
+	openal? ( boost )
+	opencl? ( cycles )
+	game-engine? ( boost )
+	?? ( ffmpeg libav )"
+
+# Since not using OpenCL with nVidia, depend on ATI binary
+# blobs as Cycles with OpenCL does not work with any open
+# source drivers.
+RDEPEND="${PYTHON_DEPS}
+	dev-libs/lzo:2
+	>=dev-python/numpy-1.10.1[${PYTHON_USEDEP}]
+	dev-python/requests[${PYTHON_USEDEP}]
+	media-libs/freetype
+	media-libs/glew:*
+	media-libs/libpng:0=
+	media-libs/libsamplerate
+	sys-libs/zlib
+	virtual/glu
+	virtual/jpeg:0=
+	virtual/libintl
+	virtual/opengl
+	boost? ( >=dev-libs/boost-1.62:=[nls?,threads(+)] )
+	collada? ( >=media-libs/opencollada-1.6.18:= )
+	colorio? ( >=media-libs/opencolorio-1.0.9-r2 )
+	cuda? ( =dev-util/nvidia-cuda-toolkit-8.0*:= )
+	ffmpeg? ( media-video/ffmpeg:=[x264,mp3,encode,theora,jpeg2k?] )
+	libav? ( >=media-video/libav-11.3:=[x264,mp3,encode,theora,jpeg2k?] )
+	fftw? ( sci-libs/fftw:3.0= )
+	!headless? (
+		x11-libs/libX11
+		x11-libs/libXi
+		x11-libs/libXxf86vm
+	)
+	jack? ( media-sound/jack-audio-connection-kit )
+	jemalloc? ( dev-libs/jemalloc:= )
+	jpeg2k? ( media-libs/openjpeg:0 )
+	llvm? ( sys-devel/llvm )
+	ndof? (
+		app-misc/spacenavd
+		dev-libs/libspnav
+	)
+	nls? ( virtual/libiconv )
+	openal? ( media-libs/openal )
+	openimageio? ( >=media-libs/openimageio-1.6.9 )
+	opencl? ( x11-drivers/ati-drivers:* )
+	openexr? (
+		>=media-libs/ilmbase-2.2.0:=
+		>=media-libs/openexr-2.2.0:=
+	)
+	opensubdiv? ( media-libs/opensubdiv[cuda=,opencl=] )
+	openvdb? (
+		media-gfx/openvdb[${PYTHON_USEDEP},abi3-compat(+),openvdb-compression(+)]
+		dev-cpp/tbb
+		>=dev-libs/c-blosc-1.5.2
+	)
+	sdl? ( media-libs/libsdl2[sound,joystick] )
+	sndfile? ( media-libs/libsndfile )
+	tiff? ( media-libs/tiff:0 )
+	valgrind? ( dev-util/valgrind )"
+
+DEPEND="${RDEPEND}
+	>=dev-cpp/eigen-3.2.8:3
+	nls? ( sys-devel/gettext )
+	doc? (
+		app-doc/doxygen[-nodot(-),dot(+),latex]
+		dev-python/sphinx[latex]
+	)"
+
+PATCHES=( "${FILESDIR}"/${PN}-fix-install-rules.patch
+	  "${FILESDIR}"/${PN}-2.78-eigen-3.3.1.patch )
+
+blender_check_requirements() {
+	[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+
+	if use doc; then
+		CHECKREQS_DISK_BUILD="4G" check-reqs_pkg_pretend
+	fi
+}
+
+pkg_pretend() {
+	blender_check_requirements
+}
+
+pkg_setup() {
+	blender_check_requirements
+	python-single-r1_pkg_setup
+}
+
+src_prepare() {
+	default
+
+	# we don't want static glew, but it's scattered across
+	# multiple files that differ from version to version
+	# !!!CHECK THIS SED ON EVERY VERSION BUMP!!!
+	local file
+	while IFS="" read -d $'\0' -r file ; do
+		sed -i -e '/-DGLEW_STATIC/d' "${file}" || die
+	done < <(find . -type f -name "CMakeLists.txt")
+
+	# 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
+}
+
+src_configure() {
+	# FIX: forcing '-funsigned-char' fixes an anti-aliasing issue with menu
+	# shadows, see bug #276338 for reference
+	append-flags -funsigned-char
+	append-lfs-flags
+	append-cppflags -DOPENVDB_3_ABI_COMPATIBLE
+
+	local mycmakeargs=(
+		-DPYTHON_VERSION="${EPYTHON/python/}"
+		-DPYTHON_LIBRARY="$(python_get_library_path)"
+		-DPYTHON_INCLUDE_DIR="$(python_get_includedir)"
+		-DWITH_INSTALL_PORTABLE=OFF
+		-DWITH_PYTHON_INSTALL=OFF
+		-DWITH_PYTHON_INSTALL_NUMPY=OFF
+		-DWITH_STATIC_LIBS=OFF
+		-DWITH_SYSTEM_GLEW=ON
+		-DWITH_SYSTEM_OPENJPEG=ON
+		-DWITH_SYSTEM_EIGEN3=ON
+		-DWITH_SYSTEM_LZO=ON
+		-DWITH_C11=ON
+		-DWITH_CXX11=ON
+		-DWITH_BOOST=$(usex boost)
+		-DWITH_BULLET=$(usex bullet)
+		-DWITH_CODEC_FFMPEG=$(usex ffmpeg)
+		-DWITH_CODEC_SNDFILE=$(usex sndfile)
+		-DWITH_CUDA=$(usex cuda)
+		-DWITH_CYCLES_DEVICE_CUDA=$(usex cuda TRUE FALSE)
+		-DWITH_CYCLES=$(usex cycles)
+		-DWITH_CYCLES_OSL=OFF
+		-DWITH_LLVM=$(usex llvm)
+		-DWITH_FFTW3=$(usex fftw)
+		-DWITH_GAMEENGINE=$(usex game-engine)
+		-DWITH_HEADLESS=$(usex headless)
+		-DWITH_X11=$(usex !headless)
+		-DWITH_IMAGE_DDS=$(usex dds)
+		-DWITH_IMAGE_OPENEXR=$(usex openexr)
+		-DWITH_IMAGE_OPENJPEG=$(usex jpeg2k)
+		-DWITH_IMAGE_TIFF=$(usex tiff)
+		-DWITH_INPUT_NDOF=$(usex ndof)
+		-DWITH_INTERNATIONAL=$(usex nls)
+		-DWITH_JACK=$(usex jack)
+		-DWITH_MOD_FLUID=$(usex elbeem)
+		-DWITH_MOD_OCEANSIM=$(usex fftw)
+		-DWITH_OPENAL=$(usex openal)
+		-DWITH_OPENCL=$(usex opencl)
+		-DWITH_CYCLES_DEVICE_OPENCL=$(usex opencl TRUE FALSE)
+		-DWITH_OPENCOLORIO=$(usex colorio)
+		-DWITH_OPENCOLLADA=$(usex collada)
+		-DWITH_OPENIMAGEIO=$(usex openimageio)
+		-DWITH_OPENMP=$(usex openmp)
+		-DWITH_OPENSUBDIV=$(usex opensubdiv)
+		-DWITH_OPENVDB=$(usex openvdb)
+		-DWITH_OPENVDB_BLOSC=$(usex openvdb)
+		-DWITH_PLAYER=$(usex player)
+		-DWITH_SDL=$(usex sdl)
+		-DWITH_CXX_GUARDEDALLOC=$(usex debug)
+		-DWITH_ASSERT_ABORT=$(usex debug)
+		-DWITH_GTESTS=$(usex test)
+		-DWITH_DOC_MANPAGE=$(usex man)
+		-DWITH_MEM_JEMALLOC=$(usex jemalloc)
+		-DWITH_MEM_VALGRIND=$(usex valgrind)
+	)
+	cmake-utils_src_configure
+}
+
+src_compile() {
+	cmake-utils_src_compile
+
+	if use doc; then
+		# Workaround for binary drivers.
+		local card
+		local cards=( /dev/ati/card* /dev/nvidia* )
+		for card in "${cards[@]}"; do addpredict "${card}"; done
+
+		einfo "Generating Blender C/C++ API docs ..."
+		cd "${CMAKE_USE_DIR}"/doc/doxygen || die
+		doxygen -u Doxyfile || die
+		doxygen || die "doxygen failed to build API docs."
+
+		cd "${CMAKE_USE_DIR}" || die
+		einfo "Generating (BPY) Blender Python API docs ..."
+		"${BUILD_DIR}"/bin/blender --background --python doc/python_api/sphinx_doc_gen.py -noaudio || die "sphinx failed."
+
+		cd "${CMAKE_USE_DIR}"/doc/python_api || die
+		sphinx-build sphinx-in BPY_API || die "sphinx failed."
+	fi
+}
+
+src_test() {
+	if use test; then
+		einfo "Running Blender Unit Tests ..."
+		cd "${BUILD_DIR}"/bin/tests || die
+		local f
+		for f in *_test; do
+			./"${f}" || die
+		done
+	fi
+}
+
+src_install() {
+	# Pax mark blender for hardened support.
+	pax-mark m "${CMAKE_BUILD_DIR}"/bin/blender
+
+	if use doc; then
+		docinto "html/API/python"
+		dodoc -r "${CMAKE_USE_DIR}"/doc/python_api/BPY_API/.
+
+		docinto "html/API/blender"
+		dodoc -r "${CMAKE_USE_DIR}"/doc/doxygen/html/.
+	fi
+
+	emake -C "${CMAKE_BUILD_DIR}" DESTDIR="${D}" install/fast
+
+	# fix doc installdir
+	docinto "html"
+	dodoc "${CMAKE_USE_DIR}"/release/text/readme.html
+	rm -r "${ED%/}"/usr/share/doc/blender || die
+
+	python_fix_shebang "${ED%/}/usr/bin/blender-thumbnailer.py"
+	python_optimize "${ED%/}/usr/share/blender/${MY_PV}/scripts"
+}
+
+pkg_preinst() {
+	gnome2_icon_savelist
+}
+
+pkg_postinst() {
+	elog
+	elog "Blender uses python integration. As such, may have some"
+	elog "inherit 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"
+	elog "home directory. This can be done by starting blender, then"
+	elog "dragging the main menu down do display all paths."
+	elog
+	ewarn
+	ewarn "This ebuild does not unbundle the massive amount of 3rd party"
+	ewarn "libraries which are shipped with blender. Note that"
+	ewarn "these have caused security issues in the past."
+	ewarn "If you are concerned about security, file a bug upstream:"
+	ewarn "  https://developer.blender.org/"
+	ewarn
+	gnome2_icon_cache_update
+	fdo-mime_desktop_database_update
+}
+
+pkg_postrm() {
+	gnome2_icon_cache_update
+	fdo-mime_desktop_database_update
+
+	ewarn ""
+	ewarn "You may want to remove the following directory."
+	ewarn "~/.config/${PN}/${MY_PV}/cache/"
+	ewarn "It may contain extra render kernels not tracked by portage"
+	ewarn ""
+}

diff --git a/media-gfx/blender/files/blender-2.78-eigen-3.3.1.patch b/media-gfx/blender/files/blender-2.78-eigen-3.3.1.patch
new file mode 100644
index 00000000..540aa6b
--- /dev/null
+++ b/media-gfx/blender/files/blender-2.78-eigen-3.3.1.patch
@@ -0,0 +1,25 @@
+--- blender-2.78a-orig/extern/ceres/include/ceres/jet.h	2016-10-25 01:13:56.000000000 +1100
++++ blender-2.78a/extern/ceres/include/ceres/jet.h	2017-01-11 13:27:24.708241265 +1100
+@@ -757,6 +757,7 @@
+   typedef ceres::Jet<T, N> Real;
+   typedef ceres::Jet<T, N> NonInteger;
+   typedef ceres::Jet<T, N> Nested;
++  typedef ceres::Jet<T, N> Literal;
+ 
+   static typename ceres::Jet<T, N> dummy_precision() {
+     return ceres::Jet<T, N>(1e-12);
+@@ -777,6 +778,14 @@
+     HasFloatingPoint = 1,
+     RequireInitialization = 1
+   };
++  
++  template<bool Vectorized>
++  struct Div {
++    enum {
++      AVX = false,
++      Cost = 1
++    };
++  };
+ };
+ 
+ }  // namespace Eigen

diff --git a/media-gfx/blender/metadata.xml b/media-gfx/blender/metadata.xml
index 003d27d..24b2623 100644
--- a/media-gfx/blender/metadata.xml
+++ b/media-gfx/blender/metadata.xml
@@ -86,10 +86,6 @@
 		<flag name="openvdb" restrict="&gt;=media-gfx/blender-2.77">
 			Add GPU preview rendering. Only works with nVidia cards.
 		</flag>
-		<flag name="openvdb-compression" restrict="&gt;=media-gfx/blender-2.77">
-			Support optional compression used by OpenVDB (requires
-			<pkg>media-gfx/openvdb</pkg>).
-		</flag>
 		<flag name="player">
 			Build the Blender Player. THis requires the Game engine.
 		</flag>


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/blender/, media-gfx/blender/files/
@ 2017-12-25 16:09 David Seifert
  0 siblings, 0 replies; 21+ messages in thread
From: David Seifert @ 2017-12-25 16:09 UTC (permalink / raw
  To: gentoo-commits

commit:     11ee236d87324ee51737df4d4f2c36425cdc97e2
Author:     Jonathan Scruggs <j.scruggs <AT> gmail <DOT> com>
AuthorDate: Sun Dec 24 18:10:31 2017 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Mon Dec 25 16:09:17 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=11ee236d

media-gfx/blender: Remove old versions

 media-gfx/blender/Manifest                         |   2 -
 media-gfx/blender/blender-2.78-r1.ebuild           | 296 ---------------------
 media-gfx/blender/blender-2.78a-r1.ebuild          | 295 --------------------
 .../files/blender-2.78-C++11-build-fix.patch       |  11 -
 .../blender/files/blender-2.78-eigen-3.3.1.patch   |  25 --
 5 files changed, 629 deletions(-)

diff --git a/media-gfx/blender/Manifest b/media-gfx/blender/Manifest
index 261c9f70119..aa35aa9dcac 100644
--- a/media-gfx/blender/Manifest
+++ b/media-gfx/blender/Manifest
@@ -1,4 +1,2 @@
 DIST blender-2.72b.tar.gz 52018242 BLAKE2B fa0b8ab3feaeb35e76d833415984eb21d7b6dca47b9e5fb337cdfbdc9924165d3345caa5608ee2849bf71855c917a6fa56d79d4f375b57ff367047ef92e8e0b9 SHA512 9767797621e443ff9b6810d1713dda110f883c33626d40d7fe5dda676f549e3591516dc24b75feebd85823dd13437c34521ca752139cd31ddacf31ea6b14e124
-DIST blender-2.78.tar.gz 44489809 BLAKE2B 98377ec7db3d1c0f1df12c120688881761aba5b2b2000b3ec3738b3a2e7841cff9022f99859fcd410351534a839ae5db1a6883308984b108ee98981b7ee1e46c SHA512 9144ce28377271dafe973b59721da41b6e3954736c705e1540be8dba3124e4c32e5cce5fb3ef7158505d45401478d257720350b38fa8e8649cc35cbd28a2f978
-DIST blender-2.78a.tar.gz 44188123 BLAKE2B 2e475e4ff4d5b57c739c413d4e09de25af653d7363fe816424c44e478818fbc3a65b0606b17a9bc2a97255866644772ff95f995697334a4fbe4eecb2cf50f2c0 SHA512 57239b6ce473aaef114453f97a6e88535ec0a2f50cfecd221fa6bdcca6fe6559dcbefd48c3f20dc2235c195de13c59a1a155d5b64d777be31812d32e68be9370
 DIST blender-2.79.tar.gz 50145270 BLAKE2B 5c11b36840d4bf4a414f01d1f8efcbfb2879ce56c9e2ebe32d8bb0be3ce29fd194dec8b3aa5bca9bf664804c1be57d01394494fdfebc7a4d8257bd2c47866338 SHA512 9b81c41882f4e150476ebda5b301b78c2d35ea918394c8a01671fc031f7cb7a34b5a3d68b6a345f6d23fd9ecedd25bc0bd24f9f9b3ec771237ac4496bbde7d2f

diff --git a/media-gfx/blender/blender-2.78-r1.ebuild b/media-gfx/blender/blender-2.78-r1.ebuild
deleted file mode 100644
index 8fa57249234..00000000000
--- a/media-gfx/blender/blender-2.78-r1.ebuild
+++ /dev/null
@@ -1,296 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-PYTHON_COMPAT=( python3_5 )
-
-inherit check-reqs cmake-utils fdo-mime flag-o-matic gnome2-utils \
-	pax-utils python-single-r1 toolchain-funcs versionator
-
-DESCRIPTION="3D Creation/Animation/Publishing System"
-HOMEPAGE="http://www.blender.org"
-
-SRC_URI="http://download.blender.org/source/${P}.tar.gz"
-
-# Blender can have letters in the version string,
-# so strip of the letter if it exists.
-MY_PV="$(get_version_component_range 1-2)"
-
-SLOT="0"
-LICENSE="|| ( GPL-2 BL )"
-KEYWORDS="~amd64 ~x86"
-IUSE="+boost +bullet +dds +elbeem +game-engine +openexr collada colorio \
-	cuda cycles debug doc ffmpeg fftw headless jack jemalloc jpeg2k libav \
-	llvm man ndof nls openal openimageio openmp opensubdiv openvdb \
-	player sdl sndfile test tiff valgrind"
-
-# OpenCL and nVidia performance is rubbish with Blender
-# If you have nVidia, use CUDA.
-REQUIRED_USE="${PYTHON_REQUIRED_USE}
-	player? ( game-engine !headless )
-	cuda? ( cycles )
-	cycles? ( boost openexr tiff openimageio )
-	colorio? ( boost )
-	openvdb? ( boost )
-	opensubdiv? ( cuda )
-	nls? ( boost )
-	openal? ( boost )
-	game-engine? ( boost )
-	?? ( ffmpeg libav )"
-
-# Since not using OpenCL with nVidia, depend on ATI binary
-# blobs as Cycles with OpenCL does not work with any open
-# source drivers.
-RDEPEND="${PYTHON_DEPS}
-	dev-libs/lzo:2
-	>=dev-python/numpy-1.10.1[${PYTHON_USEDEP}]
-	dev-python/requests[${PYTHON_USEDEP}]
-	media-libs/freetype
-	media-libs/glew:*
-	media-libs/libpng:0=
-	media-libs/libsamplerate
-	sys-libs/zlib
-	virtual/glu
-	virtual/jpeg:0=
-	virtual/libintl
-	virtual/opengl
-	boost? ( >=dev-libs/boost-1.62:=[nls?,threads(+)] )
-	collada? ( >=media-libs/opencollada-1.6.18:= )
-	colorio? ( >=media-libs/opencolorio-1.0.9-r2 )
-	cuda? ( dev-util/nvidia-cuda-toolkit:= )
-	ffmpeg? ( media-video/ffmpeg:=[x264,mp3,encode,theora,jpeg2k?] )
-	libav? ( >=media-video/libav-11.3:=[x264,mp3,encode,theora,jpeg2k?] )
-	fftw? ( sci-libs/fftw:3.0= )
-	!headless? (
-		x11-libs/libX11
-		x11-libs/libXi
-		x11-libs/libXxf86vm
-	)
-	jack? ( media-sound/jack-audio-connection-kit )
-	jemalloc? ( dev-libs/jemalloc:= )
-	jpeg2k? ( media-libs/openjpeg:0 )
-	llvm? ( sys-devel/llvm )
-	ndof? (
-		app-misc/spacenavd
-		dev-libs/libspnav
-	)
-	nls? ( virtual/libiconv )
-	openal? ( media-libs/openal )
-	openimageio? ( >=media-libs/openimageio-1.6.9 )
-	openexr? (
-		>=media-libs/ilmbase-2.2.0:=
-		>=media-libs/openexr-2.2.0:=
-	)
-	opensubdiv? ( media-libs/opensubdiv[cuda=] )
-	openvdb? (
-		media-gfx/openvdb[${PYTHON_USEDEP},abi3-compat(+),openvdb-compression(+)]
-		dev-cpp/tbb
-		>=dev-libs/c-blosc-1.5.2
-	)
-	sdl? ( media-libs/libsdl2[sound,joystick] )
-	sndfile? ( media-libs/libsndfile )
-	tiff? ( media-libs/tiff:0 )
-	valgrind? ( dev-util/valgrind )"
-
-DEPEND="${RDEPEND}
-	>=dev-cpp/eigen-3.2.8:3
-	nls? ( sys-devel/gettext )
-	doc? (
-		app-doc/doxygen[-nodot(-),dot(+),latex]
-		dev-python/sphinx[latex]
-	)"
-
-PATCHES=( "${FILESDIR}"/${P}-C++11-build-fix.patch
-	  "${FILESDIR}"/${PN}-fix-install-rules.patch
-	  "${FILESDIR}"/${P}-eigen-3.3.1.patch )
-
-blender_check_requirements() {
-	[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
-
-	if use doc; then
-		CHECKREQS_DISK_BUILD="4G" check-reqs_pkg_pretend
-	fi
-}
-
-pkg_pretend() {
-	blender_check_requirements
-}
-
-pkg_setup() {
-	blender_check_requirements
-	python-single-r1_pkg_setup
-}
-
-src_prepare() {
-	default
-
-	# we don't want static glew, but it's scattered across
-	# multiple files that differ from version to version
-	# !!!CHECK THIS SED ON EVERY VERSION BUMP!!!
-	local file
-	while IFS="" read -d $'\0' -r file ; do
-		sed -i -e '/-DGLEW_STATIC/d' "${file}" || die
-	done < <(find . -type f -name "CMakeLists.txt")
-
-	# 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
-}
-
-src_configure() {
-	# FIX: forcing '-funsigned-char' fixes an anti-aliasing issue with menu
-	# shadows, see bug #276338 for reference
-	append-flags -funsigned-char
-	append-lfs-flags
-	append-cppflags -DOPENVDB_3_ABI_COMPATIBLE
-
-	local mycmakeargs=(
-		-DPYTHON_VERSION="${EPYTHON/python/}"
-		-DPYTHON_LIBRARY="$(python_get_library_path)"
-		-DPYTHON_INCLUDE_DIR="$(python_get_includedir)"
-		-DWITH_INSTALL_PORTABLE=OFF
-		-DWITH_PYTHON_INSTALL=OFF
-		-DWITH_PYTHON_INSTALL_NUMPY=OFF
-		-DWITH_STATIC_LIBS=OFF
-		-DWITH_SYSTEM_GLEW=ON
-		-DWITH_SYSTEM_OPENJPEG=ON
-		-DWITH_SYSTEM_EIGEN3=ON
-		-DWITH_SYSTEM_LZO=ON
-		-DWITH_C11=ON
-		-DWITH_CXX11=ON
-		-DWITH_BOOST=$(usex boost)
-		-DWITH_BULLET=$(usex bullet)
-		-DWITH_CODEC_FFMPEG=$(usex ffmpeg)
-		-DWITH_CODEC_SNDFILE=$(usex sndfile)
-		-DWITH_CUDA=$(usex cuda)
-		-DWITH_CYCLES_DEVICE_CUDA=$(usex cuda TRUE FALSE)
-		-DWITH_CYCLES=$(usex cycles)
-		-DWITH_CYCLES_OSL=OFF
-		-DWITH_LLVM=$(usex llvm)
-		-DWITH_FFTW3=$(usex fftw)
-		-DWITH_GAMEENGINE=$(usex game-engine)
-		-DWITH_HEADLESS=$(usex headless)
-		-DWITH_X11=$(usex !headless)
-		-DWITH_IMAGE_DDS=$(usex dds)
-		-DWITH_IMAGE_OPENEXR=$(usex openexr)
-		-DWITH_IMAGE_OPENJPEG=$(usex jpeg2k)
-		-DWITH_IMAGE_TIFF=$(usex tiff)
-		-DWITH_INPUT_NDOF=$(usex ndof)
-		-DWITH_INTERNATIONAL=$(usex nls)
-		-DWITH_JACK=$(usex jack)
-		-DWITH_MOD_FLUID=$(usex elbeem)
-		-DWITH_MOD_OCEANSIM=$(usex fftw)
-		-DWITH_OPENAL=$(usex openal)
-		-DWITH_OPENCL=OFF
-		-DWITH_CYCLES_DEVICE_OPENCL=OFF
-		-DWITH_OPENCOLORIO=$(usex colorio)
-		-DWITH_OPENCOLLADA=$(usex collada)
-		-DWITH_OPENIMAGEIO=$(usex openimageio)
-		-DWITH_OPENMP=$(usex openmp)
-		-DWITH_OPENSUBDIV=$(usex opensubdiv)
-		-DWITH_OPENVDB=$(usex openvdb)
-		-DWITH_OPENVDB_BLOSC=$(usex openvdb)
-		-DWITH_PLAYER=$(usex player)
-		-DWITH_SDL=$(usex sdl)
-		-DWITH_CXX_GUARDEDALLOC=$(usex debug)
-		-DWITH_ASSERT_ABORT=$(usex debug)
-		-DWITH_GTESTS=$(usex test)
-		-DWITH_DOC_MANPAGE=$(usex man)
-		-DWITH_MEM_JEMALLOC=$(usex jemalloc)
-		-DWITH_MEM_VALGRIND=$(usex valgrind)
-	)
-	cmake-utils_src_configure
-}
-
-src_compile() {
-	cmake-utils_src_compile
-
-	if use doc; then
-		# Workaround for binary drivers.
-		addpredict /dev/ati
-		addpredict /dev/nvidiactl
-
-		einfo "Generating Blender C/C++ API docs ..."
-		cd "${CMAKE_USE_DIR}"/doc/doxygen || die
-		doxygen -u Doxyfile || die
-		doxygen || die "doxygen failed to build API docs."
-
-		cd "${CMAKE_USE_DIR}" || die
-		einfo "Generating (BPY) Blender Python API docs ..."
-		"${BUILD_DIR}"/bin/blender --background --python doc/python_api/sphinx_doc_gen.py -noaudio || die "sphinx failed."
-
-		cd "${CMAKE_USE_DIR}"/doc/python_api || die
-		sphinx-build sphinx-in BPY_API || die "sphinx failed."
-	fi
-}
-
-src_test() {
-	if use test; then
-		einfo "Running Blender Unit Tests ..."
-		cd "${BUILD_DIR}"/bin/tests || die
-		local f
-		for f in *_test; do
-			./"${f}" || die
-		done
-	fi
-}
-
-src_install() {
-	# Pax mark blender for hardened support.
-	pax-mark m "${CMAKE_BUILD_DIR}"/bin/blender
-
-	if use doc; then
-		docinto "html/API/python"
-		dodoc -r "${CMAKE_USE_DIR}"/doc/python_api/BPY_API/.
-
-		docinto "html/API/blender"
-		dodoc -r "${CMAKE_USE_DIR}"/doc/doxygen/html/.
-	fi
-
-	cmake-utils_src_install
-
-	# fix doc installdir
-	docinto "html"
-	dodoc "${CMAKE_USE_DIR}"/release/text/readme.html
-	rm -r "${ED%/}"/usr/share/doc/blender || die
-
-	python_fix_shebang "${ED%/}/usr/bin/blender-thumbnailer.py"
-	python_optimize "${ED%/}/usr/share/blender/${MY_PV}/scripts"
-}
-
-pkg_preinst() {
-	gnome2_icon_savelist
-}
-
-pkg_postinst() {
-	elog
-	elog "Blender uses python integration. As such, may have some"
-	elog "inherit 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"
-	elog "home directory. This can be done by starting blender, then"
-	elog "dragging the main menu down do display all paths."
-	elog
-	ewarn
-	ewarn "This ebuild does not unbundle the massive amount of 3rd party"
-	ewarn "libraries which are shipped with blender. Note that"
-	ewarn "these have caused security issues in the past."
-	ewarn "If you are concerned about security, file a bug upstream:"
-	ewarn "  https://developer.blender.org/"
-	ewarn
-	gnome2_icon_cache_update
-	fdo-mime_desktop_database_update
-}
-
-pkg_postrm() {
-	gnome2_icon_cache_update
-	fdo-mime_desktop_database_update
-
-	ewarn ""
-	ewarn "You may want to remove the following directory."
-	ewarn "~/.config/${PN}/${MY_PV}/cache/"
-	ewarn "It may contain extra render kernels not tracked by portage"
-	ewarn ""
-}

diff --git a/media-gfx/blender/blender-2.78a-r1.ebuild b/media-gfx/blender/blender-2.78a-r1.ebuild
deleted file mode 100644
index f61dd89b118..00000000000
--- a/media-gfx/blender/blender-2.78a-r1.ebuild
+++ /dev/null
@@ -1,295 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-PYTHON_COMPAT=( python3_5 )
-
-inherit check-reqs cmake-utils fdo-mime flag-o-matic gnome2-utils \
-	pax-utils python-single-r1 toolchain-funcs versionator
-
-DESCRIPTION="3D Creation/Animation/Publishing System"
-HOMEPAGE="http://www.blender.org"
-
-SRC_URI="http://download.blender.org/source/${P}.tar.gz"
-
-# Blender can have letters in the version string,
-# so strip of the letter if it exists.
-MY_PV="$(get_version_component_range 1-2)"
-
-SLOT="0"
-LICENSE="|| ( GPL-2 BL )"
-KEYWORDS="~amd64 ~x86"
-IUSE="+boost +bullet +dds +elbeem +game-engine +openexr collada colorio \
-	cuda cycles debug doc ffmpeg fftw headless jack jemalloc jpeg2k libav \
-	llvm man ndof nls openal openimageio openmp opensubdiv openvdb \
-	player sdl sndfile test tiff valgrind"
-
-# OpenCL and nVidia performance is rubbish with Blender
-# If you have nVidia, use CUDA.
-REQUIRED_USE="${PYTHON_REQUIRED_USE}
-	player? ( game-engine !headless )
-	cuda? ( cycles )
-	cycles? ( boost openexr tiff openimageio )
-	colorio? ( boost )
-	openvdb? ( boost )
-	opensubdiv? ( cuda )
-	nls? ( boost )
-	openal? ( boost )
-	game-engine? ( boost )
-	?? ( ffmpeg libav )"
-
-# Since not using OpenCL with nVidia, depend on ATI binary
-# blobs as Cycles with OpenCL does not work with any open
-# source drivers.
-RDEPEND="${PYTHON_DEPS}
-	dev-libs/lzo:2
-	>=dev-python/numpy-1.10.1[${PYTHON_USEDEP}]
-	dev-python/requests[${PYTHON_USEDEP}]
-	media-libs/freetype
-	media-libs/glew:*
-	media-libs/libpng:0=
-	media-libs/libsamplerate
-	sys-libs/zlib
-	virtual/glu
-	virtual/jpeg:0=
-	virtual/libintl
-	virtual/opengl
-	boost? ( >=dev-libs/boost-1.62:=[nls?,threads(+)] )
-	collada? ( >=media-libs/opencollada-1.6.18:= )
-	colorio? ( >=media-libs/opencolorio-1.0.9-r2 )
-	cuda? ( =dev-util/nvidia-cuda-toolkit-8.0*:= )
-	ffmpeg? ( media-video/ffmpeg:=[x264,mp3,encode,theora,jpeg2k?] )
-	libav? ( >=media-video/libav-11.3:=[x264,mp3,encode,theora,jpeg2k?] )
-	fftw? ( sci-libs/fftw:3.0= )
-	!headless? (
-		x11-libs/libX11
-		x11-libs/libXi
-		x11-libs/libXxf86vm
-	)
-	jack? ( media-sound/jack-audio-connection-kit )
-	jemalloc? ( dev-libs/jemalloc:= )
-	jpeg2k? ( media-libs/openjpeg:0 )
-	llvm? ( sys-devel/llvm )
-	ndof? (
-		app-misc/spacenavd
-		dev-libs/libspnav
-	)
-	nls? ( virtual/libiconv )
-	openal? ( media-libs/openal )
-	openimageio? ( >=media-libs/openimageio-1.6.9 )
-	openexr? (
-		>=media-libs/ilmbase-2.2.0:=
-		>=media-libs/openexr-2.2.0:=
-	)
-	opensubdiv? ( media-libs/opensubdiv[cuda=] )
-	openvdb? (
-		media-gfx/openvdb[${PYTHON_USEDEP},abi3-compat(+),openvdb-compression(+)]
-		dev-cpp/tbb
-		>=dev-libs/c-blosc-1.5.2
-	)
-	sdl? ( media-libs/libsdl2[sound,joystick] )
-	sndfile? ( media-libs/libsndfile )
-	tiff? ( media-libs/tiff:0 )
-	valgrind? ( dev-util/valgrind )"
-
-DEPEND="${RDEPEND}
-	>=dev-cpp/eigen-3.2.8:3
-	nls? ( sys-devel/gettext )
-	doc? (
-		app-doc/doxygen[-nodot(-),dot(+),latex]
-		dev-python/sphinx[latex]
-	)"
-
-PATCHES=( "${FILESDIR}"/${PN}-fix-install-rules.patch
-	  "${FILESDIR}"/${PN}-2.78-eigen-3.3.1.patch )
-
-blender_check_requirements() {
-	[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
-
-	if use doc; then
-		CHECKREQS_DISK_BUILD="4G" check-reqs_pkg_pretend
-	fi
-}
-
-pkg_pretend() {
-	blender_check_requirements
-}
-
-pkg_setup() {
-	blender_check_requirements
-	python-single-r1_pkg_setup
-}
-
-src_prepare() {
-	default
-
-	# we don't want static glew, but it's scattered across
-	# multiple files that differ from version to version
-	# !!!CHECK THIS SED ON EVERY VERSION BUMP!!!
-	local file
-	while IFS="" read -d $'\0' -r file ; do
-		sed -i -e '/-DGLEW_STATIC/d' "${file}" || die
-	done < <(find . -type f -name "CMakeLists.txt")
-
-	# 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
-}
-
-src_configure() {
-	# FIX: forcing '-funsigned-char' fixes an anti-aliasing issue with menu
-	# shadows, see bug #276338 for reference
-	append-flags -funsigned-char
-	append-lfs-flags
-	append-cppflags -DOPENVDB_3_ABI_COMPATIBLE
-
-	local mycmakeargs=(
-		-DPYTHON_VERSION="${EPYTHON/python/}"
-		-DPYTHON_LIBRARY="$(python_get_library_path)"
-		-DPYTHON_INCLUDE_DIR="$(python_get_includedir)"
-		-DWITH_INSTALL_PORTABLE=OFF
-		-DWITH_PYTHON_INSTALL=OFF
-		-DWITH_PYTHON_INSTALL_NUMPY=OFF
-		-DWITH_STATIC_LIBS=OFF
-		-DWITH_SYSTEM_GLEW=ON
-		-DWITH_SYSTEM_OPENJPEG=ON
-		-DWITH_SYSTEM_EIGEN3=ON
-		-DWITH_SYSTEM_LZO=ON
-		-DWITH_C11=ON
-		-DWITH_CXX11=ON
-		-DWITH_BOOST=$(usex boost)
-		-DWITH_BULLET=$(usex bullet)
-		-DWITH_CODEC_FFMPEG=$(usex ffmpeg)
-		-DWITH_CODEC_SNDFILE=$(usex sndfile)
-		-DWITH_CUDA=$(usex cuda)
-		-DWITH_CYCLES_DEVICE_CUDA=$(usex cuda TRUE FALSE)
-		-DWITH_CYCLES=$(usex cycles)
-		-DWITH_CYCLES_OSL=OFF
-		-DWITH_LLVM=$(usex llvm)
-		-DWITH_FFTW3=$(usex fftw)
-		-DWITH_GAMEENGINE=$(usex game-engine)
-		-DWITH_HEADLESS=$(usex headless)
-		-DWITH_X11=$(usex !headless)
-		-DWITH_IMAGE_DDS=$(usex dds)
-		-DWITH_IMAGE_OPENEXR=$(usex openexr)
-		-DWITH_IMAGE_OPENJPEG=$(usex jpeg2k)
-		-DWITH_IMAGE_TIFF=$(usex tiff)
-		-DWITH_INPUT_NDOF=$(usex ndof)
-		-DWITH_INTERNATIONAL=$(usex nls)
-		-DWITH_JACK=$(usex jack)
-		-DWITH_MOD_FLUID=$(usex elbeem)
-		-DWITH_MOD_OCEANSIM=$(usex fftw)
-		-DWITH_OPENAL=$(usex openal)
-		-DWITH_OPENCL=OFF
-		-DWITH_CYCLES_DEVICE_OPENCL=OFF
-		-DWITH_OPENCOLORIO=$(usex colorio)
-		-DWITH_OPENCOLLADA=$(usex collada)
-		-DWITH_OPENIMAGEIO=$(usex openimageio)
-		-DWITH_OPENMP=$(usex openmp)
-		-DWITH_OPENSUBDIV=$(usex opensubdiv)
-		-DWITH_OPENVDB=$(usex openvdb)
-		-DWITH_OPENVDB_BLOSC=$(usex openvdb)
-		-DWITH_PLAYER=$(usex player)
-		-DWITH_SDL=$(usex sdl)
-		-DWITH_CXX_GUARDEDALLOC=$(usex debug)
-		-DWITH_ASSERT_ABORT=$(usex debug)
-		-DWITH_GTESTS=$(usex test)
-		-DWITH_DOC_MANPAGE=$(usex man)
-		-DWITH_MEM_JEMALLOC=$(usex jemalloc)
-		-DWITH_MEM_VALGRIND=$(usex valgrind)
-	)
-	cmake-utils_src_configure
-}
-
-src_compile() {
-	cmake-utils_src_compile
-
-	if use doc; then
-		# Workaround for binary drivers.
-		addpredict /dev/ati
-		addpredict /dev/nvidiactl
-
-		einfo "Generating Blender C/C++ API docs ..."
-		cd "${CMAKE_USE_DIR}"/doc/doxygen || die
-		doxygen -u Doxyfile || die
-		doxygen || die "doxygen failed to build API docs."
-
-		cd "${CMAKE_USE_DIR}" || die
-		einfo "Generating (BPY) Blender Python API docs ..."
-		"${BUILD_DIR}"/bin/blender --background --python doc/python_api/sphinx_doc_gen.py -noaudio || die "sphinx failed."
-
-		cd "${CMAKE_USE_DIR}"/doc/python_api || die
-		sphinx-build sphinx-in BPY_API || die "sphinx failed."
-	fi
-}
-
-src_test() {
-	if use test; then
-		einfo "Running Blender Unit Tests ..."
-		cd "${BUILD_DIR}"/bin/tests || die
-		local f
-		for f in *_test; do
-			./"${f}" || die
-		done
-	fi
-}
-
-src_install() {
-	# Pax mark blender for hardened support.
-	pax-mark m "${CMAKE_BUILD_DIR}"/bin/blender
-
-	if use doc; then
-		docinto "html/API/python"
-		dodoc -r "${CMAKE_USE_DIR}"/doc/python_api/BPY_API/.
-
-		docinto "html/API/blender"
-		dodoc -r "${CMAKE_USE_DIR}"/doc/doxygen/html/.
-	fi
-
-	cmake-utils_src_install
-
-	# fix doc installdir
-	docinto "html"
-	dodoc "${CMAKE_USE_DIR}"/release/text/readme.html
-	rm -r "${ED%/}"/usr/share/doc/blender || die
-
-	python_fix_shebang "${ED%/}/usr/bin/blender-thumbnailer.py"
-	python_optimize "${ED%/}/usr/share/blender/${MY_PV}/scripts"
-}
-
-pkg_preinst() {
-	gnome2_icon_savelist
-}
-
-pkg_postinst() {
-	elog
-	elog "Blender uses python integration. As such, may have some"
-	elog "inherit 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"
-	elog "home directory. This can be done by starting blender, then"
-	elog "dragging the main menu down do display all paths."
-	elog
-	ewarn
-	ewarn "This ebuild does not unbundle the massive amount of 3rd party"
-	ewarn "libraries which are shipped with blender. Note that"
-	ewarn "these have caused security issues in the past."
-	ewarn "If you are concerned about security, file a bug upstream:"
-	ewarn "  https://developer.blender.org/"
-	ewarn
-	gnome2_icon_cache_update
-	fdo-mime_desktop_database_update
-}
-
-pkg_postrm() {
-	gnome2_icon_cache_update
-	fdo-mime_desktop_database_update
-
-	ewarn ""
-	ewarn "You may want to remove the following directory."
-	ewarn "~/.config/${PN}/${MY_PV}/cache/"
-	ewarn "It may contain extra render kernels not tracked by portage"
-	ewarn ""
-}

diff --git a/media-gfx/blender/files/blender-2.78-C++11-build-fix.patch b/media-gfx/blender/files/blender-2.78-C++11-build-fix.patch
deleted file mode 100644
index ca9b5e1fa8e..00000000000
--- a/media-gfx/blender/files/blender-2.78-C++11-build-fix.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-diff -purN a/source/blender/render/intern/raytrace/rayobject_rtbuild.cpp b/source/blender/render/intern/raytrace/rayobject_rtbuild.cpp
---- a/source/blender/render/intern/raytrace/rayobject_rtbuild.cpp	2016-09-28 10:26:55.000000000 +0100
-+++ b/source/blender/render/intern/raytrace/rayobject_rtbuild.cpp	2016-10-04 11:13:46.489404123 +0100
-@@ -34,6 +34,7 @@
- #include <math.h>
- #include <stdlib.h>
- #include <algorithm>
-+#include <cmath>
- 
- #include "rayobject_rtbuild.h"
- 

diff --git a/media-gfx/blender/files/blender-2.78-eigen-3.3.1.patch b/media-gfx/blender/files/blender-2.78-eigen-3.3.1.patch
deleted file mode 100644
index 540aa6b9a51..00000000000
--- a/media-gfx/blender/files/blender-2.78-eigen-3.3.1.patch
+++ /dev/null
@@ -1,25 +0,0 @@
---- blender-2.78a-orig/extern/ceres/include/ceres/jet.h	2016-10-25 01:13:56.000000000 +1100
-+++ blender-2.78a/extern/ceres/include/ceres/jet.h	2017-01-11 13:27:24.708241265 +1100
-@@ -757,6 +757,7 @@
-   typedef ceres::Jet<T, N> Real;
-   typedef ceres::Jet<T, N> NonInteger;
-   typedef ceres::Jet<T, N> Nested;
-+  typedef ceres::Jet<T, N> Literal;
- 
-   static typename ceres::Jet<T, N> dummy_precision() {
-     return ceres::Jet<T, N>(1e-12);
-@@ -777,6 +778,14 @@
-     HasFloatingPoint = 1,
-     RequireInitialization = 1
-   };
-+  
-+  template<bool Vectorized>
-+  struct Div {
-+    enum {
-+      AVX = false,
-+      Cost = 1
-+    };
-+  };
- };
- 
- }  // namespace Eigen


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/blender/, media-gfx/blender/files/
@ 2018-01-30 18:44 Jonathan Scruggs
  0 siblings, 0 replies; 21+ messages in thread
From: Jonathan Scruggs @ 2018-01-30 18:44 UTC (permalink / raw
  To: gentoo-commits

commit:     1f42d5c611fea036935b4a59b2cfbde2863e1c12
Author:     Jonathan Scruggs <dracwyrm <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 29 14:57:36 2018 +0000
Commit:     Jonathan Scruggs <dracwyrm <AT> gentoo <DOT> org>
CommitDate: Tue Jan 30 18:42:38 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1f42d5c6

media-gfx/blender: add fix to build with osl 1.9

Package-Manager: Portage-2.3.20, Repoman-2.3.6

 media-gfx/blender/blender-2.79-r1.ebuild           | 290 +++++++++++++++++++++
 .../blender-2.79-fix-build-with-OSL-1.9.x.patch    |  26 ++
 2 files changed, 316 insertions(+)

diff --git a/media-gfx/blender/blender-2.79-r1.ebuild b/media-gfx/blender/blender-2.79-r1.ebuild
new file mode 100644
index 00000000000..108783768d0
--- /dev/null
+++ b/media-gfx/blender/blender-2.79-r1.ebuild
@@ -0,0 +1,290 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python{3_5,3_6} )
+
+inherit check-reqs cmake-utils xdg-utils flag-o-matic gnome2-utils \
+	pax-utils python-single-r1 toolchain-funcs versionator
+
+DESCRIPTION="3D Creation/Animation/Publishing System"
+HOMEPAGE="http://www.blender.org"
+
+SRC_URI="http://download.blender.org/source/${P}.tar.gz"
+
+# Blender can have letters in the version string,
+# so strip of the letter if it exists.
+MY_PV="$(get_version_component_range 1-2)"
+
+SLOT="0"
+LICENSE="|| ( GPL-2 BL )"
+KEYWORDS="~amd64 ~x86"
+IUSE="+bullet +dds +elbeem +game-engine +openexr collada colorio \
+	cuda cycles debug doc ffmpeg fftw headless jack jemalloc jpeg2k libav \
+	llvm man ndof nls openal opencl openimageio openmp opensubdiv openvdb \
+	osl player sdl sndfile test tiff valgrind"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}
+	player? ( game-engine !headless )
+	cuda? ( cycles )
+	cycles? ( openexr tiff openimageio )
+	opencl? ( cycles )
+	osl? ( cycles llvm )"
+
+RDEPEND="${PYTHON_DEPS}
+	>=dev-libs/boost-1.62:=[nls?,threads(+)]
+	dev-libs/lzo:2
+	>=dev-python/numpy-1.10.1[${PYTHON_USEDEP}]
+	dev-python/requests[${PYTHON_USEDEP}]
+	media-libs/freetype
+	media-libs/glew:*
+	media-libs/libpng:0=
+	media-libs/libsamplerate
+	sys-libs/zlib
+	virtual/glu
+	virtual/jpeg:0=
+	virtual/libintl
+	virtual/opengl
+	collada? ( >=media-libs/opencollada-1.6.18:= )
+	colorio? ( media-libs/opencolorio )
+	cuda? ( dev-util/nvidia-cuda-toolkit:= )
+	ffmpeg? ( media-video/ffmpeg:=[x264,mp3,encode,theora,jpeg2k?] )
+	libav? ( >=media-video/libav-11.3:=[x264,mp3,encode,theora,jpeg2k?] )
+	fftw? ( sci-libs/fftw:3.0= )
+	!headless? (
+		x11-libs/libX11
+		x11-libs/libXi
+		x11-libs/libXxf86vm
+	)
+	jack? ( virtual/jack )
+	jemalloc? ( dev-libs/jemalloc:= )
+	jpeg2k? ( media-libs/openjpeg:0 )
+	llvm? ( sys-devel/llvm:= )
+	ndof? (
+		app-misc/spacenavd
+		dev-libs/libspnav
+	)
+	nls? ( virtual/libiconv )
+	openal? ( media-libs/openal )
+	opencl? ( virtual/opencl )
+	openimageio? ( >=media-libs/openimageio-1.7.0 )
+	openexr? (
+		>=media-libs/ilmbase-2.2.0:=
+		>=media-libs/openexr-2.2.0:=
+	)
+	opensubdiv? ( >=media-libs/opensubdiv-3.3.0:=[cuda=,opencl=] )
+	openvdb? (
+		media-gfx/openvdb[${PYTHON_USEDEP},abi3-compat(+),openvdb-compression(+)]
+		dev-cpp/tbb
+		>=dev-libs/c-blosc-1.5.2
+	)
+	osl? ( media-libs/osl:= )
+	sdl? ( media-libs/libsdl2[sound,joystick] )
+	sndfile? ( media-libs/libsndfile )
+	tiff? ( media-libs/tiff:0 )
+	valgrind? ( dev-util/valgrind )"
+
+DEPEND="${RDEPEND}
+	virtual/pkgconfig
+	>=dev-cpp/eigen-3.2.8:3
+	nls? ( sys-devel/gettext )
+	doc? (
+		app-doc/doxygen[-nodot(-),dot(+),latex]
+		dev-python/sphinx[latex]
+	)"
+
+PATCHES=(
+	"${FILESDIR}/${PN}-fix-install-rules.patch"
+	"${FILESDIR}/${P}-fix-build-with-OSL-1.9.x.patch"
+)
+
+blender_check_requirements() {
+	[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+
+	if use doc; then
+		CHECKREQS_DISK_BUILD="4G" check-reqs_pkg_pretend
+	fi
+}
+
+pkg_pretend() {
+	blender_check_requirements
+}
+
+pkg_setup() {
+	blender_check_requirements
+	python-single-r1_pkg_setup
+}
+
+src_prepare() {
+	cmake-utils_src_prepare
+
+	# we don't want static glew, but it's scattered across
+	# multiple files that differ from version to version
+	# !!!CHECK THIS SED ON EVERY VERSION BUMP!!!
+	local file
+	while IFS="" read -d $'\0' -r file ; do
+		sed -i -e '/-DGLEW_STATIC/d' "${file}" || die
+	done < <(find . -type f -name "CMakeLists.txt")
+
+	# 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
+}
+
+src_configure() {
+	# FIX: forcing '-funsigned-char' fixes an anti-aliasing issue with menu
+	# shadows, see bug #276338 for reference
+	append-flags -funsigned-char
+	append-lfs-flags
+	append-cppflags -DOPENVDB_3_ABI_COMPATIBLE
+
+	local mycmakeargs=(
+		-DPYTHON_VERSION="${EPYTHON/python/}"
+		-DPYTHON_LIBRARY="$(python_get_library_path)"
+		-DPYTHON_INCLUDE_DIR="$(python_get_includedir)"
+		-DWITH_INSTALL_PORTABLE=OFF
+		-DWITH_PYTHON_INSTALL=OFF
+		-DWITH_PYTHON_INSTALL_NUMPY=OFF
+		-DWITH_STATIC_LIBS=OFF
+		-DWITH_SYSTEM_GLEW=ON
+		-DWITH_SYSTEM_OPENJPEG=ON
+		-DWITH_SYSTEM_EIGEN3=ON
+		-DWITH_SYSTEM_LZO=ON
+		-DWITH_C11=ON
+		-DWITH_CXX11=ON
+		-DWITH_BOOST=ON
+		-DWITH_BULLET=$(usex bullet)
+		-DWITH_CODEC_FFMPEG=$(usex ffmpeg)
+		-DWITH_CODEC_SNDFILE=$(usex sndfile)
+		-DWITH_CUDA=$(usex cuda)
+		-DWITH_CYCLES_DEVICE_CUDA=$(usex cuda TRUE FALSE)
+		-DWITH_CYCLES=$(usex cycles)
+		-DWITH_CYCLES_OSL=$(usex osl)
+		-DWITH_LLVM=$(usex llvm)
+		-DWITH_FFTW3=$(usex fftw)
+		-DWITH_GAMEENGINE=$(usex game-engine)
+		-DWITH_HEADLESS=$(usex headless)
+		-DWITH_X11=$(usex !headless)
+		-DWITH_IMAGE_DDS=$(usex dds)
+		-DWITH_IMAGE_OPENEXR=$(usex openexr)
+		-DWITH_IMAGE_OPENJPEG=$(usex jpeg2k)
+		-DWITH_IMAGE_TIFF=$(usex tiff)
+		-DWITH_INPUT_NDOF=$(usex ndof)
+		-DWITH_INTERNATIONAL=$(usex nls)
+		-DWITH_JACK=$(usex jack)
+		-DWITH_MOD_FLUID=$(usex elbeem)
+		-DWITH_MOD_OCEANSIM=$(usex fftw)
+		-DWITH_OPENAL=$(usex openal)
+		-DWITH_OPENCL=$(usex opencl)
+		-DWITH_OPENCOLORIO=$(usex colorio)
+		-DWITH_OPENCOLLADA=$(usex collada)
+		-DWITH_OPENIMAGEIO=$(usex openimageio)
+		-DWITH_OPENMP=$(usex openmp)
+		-DWITH_OPENSUBDIV=$(usex opensubdiv)
+		-DWITH_OPENVDB=$(usex openvdb)
+		-DWITH_OPENVDB_BLOSC=$(usex openvdb)
+		-DWITH_PLAYER=$(usex player)
+		-DWITH_SDL=$(usex sdl)
+		-DWITH_CXX_GUARDEDALLOC=$(usex debug)
+		-DWITH_ASSERT_ABORT=$(usex debug)
+		-DWITH_GTESTS=$(usex test)
+		-DWITH_DOC_MANPAGE=$(usex man)
+		-DWITH_MEM_JEMALLOC=$(usex jemalloc)
+		-DWITH_MEM_VALGRIND=$(usex valgrind)
+	)
+	cmake-utils_src_configure
+}
+
+src_compile() {
+	cmake-utils_src_compile
+
+	if use doc; then
+		# Workaround for binary drivers.
+		addpredict /dev/ati
+		addpredict /dev/dri
+		addpredict /dev/nvidiactl
+
+		einfo "Generating Blender C/C++ API docs ..."
+		cd "${CMAKE_USE_DIR}"/doc/doxygen || die
+		doxygen -u Doxyfile || die
+		doxygen || die "doxygen failed to build API docs."
+
+		cd "${CMAKE_USE_DIR}" || die
+		einfo "Generating (BPY) Blender Python API docs ..."
+		"${BUILD_DIR}"/bin/blender --background --python doc/python_api/sphinx_doc_gen.py -noaudio || die "sphinx failed."
+
+		cd "${CMAKE_USE_DIR}"/doc/python_api || die
+		sphinx-build sphinx-in BPY_API || die "sphinx failed."
+	fi
+}
+
+src_test() {
+	if use test; then
+		einfo "Running Blender Unit Tests ..."
+		cd "${BUILD_DIR}"/bin/tests || die
+		local f
+		for f in *_test; do
+			./"${f}" || die
+		done
+	fi
+}
+
+src_install() {
+	# Pax mark blender for hardened support.
+	pax-mark m "${CMAKE_BUILD_DIR}"/bin/blender
+
+	if use doc; then
+		docinto "html/API/python"
+		dodoc -r "${CMAKE_USE_DIR}"/doc/python_api/BPY_API/.
+
+		docinto "html/API/blender"
+		dodoc -r "${CMAKE_USE_DIR}"/doc/doxygen/html/.
+	fi
+
+	cmake-utils_src_install
+
+	# fix doc installdir
+	docinto "html"
+	dodoc "${CMAKE_USE_DIR}"/release/text/readme.html
+	rm -r "${ED%/}"/usr/share/doc/blender || die
+
+	python_fix_shebang "${ED%/}/usr/bin/blender-thumbnailer.py"
+	python_optimize "${ED%/}/usr/share/blender/${MY_PV}/scripts"
+}
+
+pkg_preinst() {
+	gnome2_icon_savelist
+}
+
+pkg_postinst() {
+	elog
+	elog "Blender uses python integration. As such, may have some"
+	elog "inherit 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"
+	elog "home directory. This can be done by starting blender, then"
+	elog "dragging the main menu down do display all paths."
+	elog
+	ewarn
+	ewarn "This ebuild does not unbundle the massive amount of 3rd party"
+	ewarn "libraries which are shipped with blender. Note that"
+	ewarn "these have caused security issues in the past."
+	ewarn "If you are concerned about security, file a bug upstream:"
+	ewarn "  https://developer.blender.org/"
+	ewarn
+	gnome2_icon_cache_update
+	xdg_mimeinfo_database_update
+}
+
+pkg_postrm() {
+	gnome2_icon_cache_update
+	xdg_mimeinfo_database_update
+
+	ewarn ""
+	ewarn "You may want to remove the following directory."
+	ewarn "~/.config/${PN}/${MY_PV}/cache/"
+	ewarn "It may contain extra render kernels not tracked by portage"
+	ewarn ""
+}

diff --git a/media-gfx/blender/files/blender-2.79-fix-build-with-OSL-1.9.x.patch b/media-gfx/blender/files/blender-2.79-fix-build-with-OSL-1.9.x.patch
new file mode 100644
index 00000000000..6b22f9335fd
--- /dev/null
+++ b/media-gfx/blender/files/blender-2.79-fix-build-with-OSL-1.9.x.patch
@@ -0,0 +1,26 @@
+From d089875c4c753f084e02849462ec1bd6f785eadf Mon Sep 17 00:00:00 2001
+From: Brecht Van Lommel <brechtvanlommel@gmail.com>
+Date: Sat, 18 Nov 2017 06:11:17 +0100
+Subject: [PATCH] Fix build with OSL 1.9.x, automatically aligns to 16 bytes
+ now.
+
+---
+ intern/cycles/kernel/osl/osl_closures.cpp | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/intern/cycles/kernel/osl/osl_closures.cpp b/intern/cycles/kernel/osl/osl_closures.cpp
+index e3e85705ebc..597d25e9f30 100644
+--- a/intern/cycles/kernel/osl/osl_closures.cpp
++++ b/intern/cycles/kernel/osl/osl_closures.cpp
+@@ -232,7 +232,11 @@ static void register_closure(OSL::ShadingSystem *ss, const char *name, int id, O
+ 	/* optimization: it's possible to not use a prepare function at all and
+ 	 * only initialize the actual class when accessing the closure component
+ 	 * data, but then we need to map the id to the class somehow */
++#if OSL_LIBRARY_VERSION_CODE >= 10900
++	ss->register_closure(name, id, params, prepare, NULL);
++#else
+ 	ss->register_closure(name, id, params, prepare, NULL, 16);
++#endif
+ }
+ 
+ void OSLShader::register_closures(OSLShadingSystem *ss_)


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/blender/, media-gfx/blender/files/
@ 2018-08-15 20:08 Jonathan Scruggs
  0 siblings, 0 replies; 21+ messages in thread
From: Jonathan Scruggs @ 2018-08-15 20:08 UTC (permalink / raw
  To: gentoo-commits

commit:     b0b0f8fb104fdd0867db97591866bc1b5af425d6
Author:     Jonathan Scruggs <j.scruggs <AT> gmail <DOT> com>
AuthorDate: Wed Aug 15 17:44:26 2018 +0000
Commit:     Jonathan Scruggs <dracwyrm <AT> gentoo <DOT> org>
CommitDate: Wed Aug 15 20:08:18 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b0b0f8fb

media-gfx/blender: bump to version 1.79b

Add patch from Mark Wright <gienah <AT> gentoo.org> for GCC 8
compatibility.

Closes: https://bugs.gentoo.org/650592
Closes: https://bugs.gentoo.org/661066

 media-gfx/blender/Manifest                        |   1 +
 media-gfx/blender/blender-2.79b.ebuild            | 290 ++++++++++++++++++++++
 media-gfx/blender/files/blender-2.79b-gcc-8.patch |  22 ++
 3 files changed, 313 insertions(+)

diff --git a/media-gfx/blender/Manifest b/media-gfx/blender/Manifest
index aa35aa9dcac..42826ca0c67 100644
--- a/media-gfx/blender/Manifest
+++ b/media-gfx/blender/Manifest
@@ -1,2 +1,3 @@
 DIST blender-2.72b.tar.gz 52018242 BLAKE2B fa0b8ab3feaeb35e76d833415984eb21d7b6dca47b9e5fb337cdfbdc9924165d3345caa5608ee2849bf71855c917a6fa56d79d4f375b57ff367047ef92e8e0b9 SHA512 9767797621e443ff9b6810d1713dda110f883c33626d40d7fe5dda676f549e3591516dc24b75feebd85823dd13437c34521ca752139cd31ddacf31ea6b14e124
 DIST blender-2.79.tar.gz 50145270 BLAKE2B 5c11b36840d4bf4a414f01d1f8efcbfb2879ce56c9e2ebe32d8bb0be3ce29fd194dec8b3aa5bca9bf664804c1be57d01394494fdfebc7a4d8257bd2c47866338 SHA512 9b81c41882f4e150476ebda5b301b78c2d35ea918394c8a01671fc031f7cb7a34b5a3d68b6a345f6d23fd9ecedd25bc0bd24f9f9b3ec771237ac4496bbde7d2f
+DIST blender-2.79b.tar.gz 50204270 BLAKE2B 78bda294df783ee9bcbcf32f9a112737b2947da5146fd4351b8b36d81c6630ed0ea302b2fb539642cfbdcc4b64df35af5c8545a3bbf50b1cf87dcf3a60eb4ac0 SHA512 2db21ace446168dd683cdb5aad9dec001f8888ae4e9603a04ddb44fb78489ded827deb07e83712b0f1118a0e7bf66f2a5d935dc4ebb3a6703d72672ff414367f

diff --git a/media-gfx/blender/blender-2.79b.ebuild b/media-gfx/blender/blender-2.79b.ebuild
new file mode 100644
index 00000000000..4dc6dd61ee6
--- /dev/null
+++ b/media-gfx/blender/blender-2.79b.ebuild
@@ -0,0 +1,290 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python{3_5,3_6} )
+
+inherit check-reqs cmake-utils xdg-utils flag-o-matic gnome2-utils \
+	pax-utils python-single-r1 toolchain-funcs eapi7-ver
+
+DESCRIPTION="3D Creation/Animation/Publishing System"
+HOMEPAGE="http://www.blender.org"
+
+SRC_URI="http://download.blender.org/source/${P}.tar.gz"
+
+# Blender can have letters in the version string,
+# so strip of the letter if it exists.
+MY_PV="$(ver_cut 1-2)"
+
+SLOT="0"
+LICENSE="|| ( GPL-2 BL )"
+KEYWORDS="~amd64 ~x86"
+IUSE="+bullet +dds +elbeem +game-engine +openexr collada colorio \
+	cuda cycles debug doc ffmpeg fftw headless jack jemalloc jpeg2k libav \
+	llvm man ndof nls openal opencl openimageio openmp opensubdiv openvdb \
+	osl player sdl sndfile test tiff valgrind"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}
+	cuda? ( cycles )
+	cycles? ( openexr tiff openimageio )
+	opencl? ( cycles )
+	osl? ( cycles llvm )
+	player? ( game-engine !headless )"
+
+RDEPEND="${PYTHON_DEPS}
+	>=dev-libs/boost-1.62:=[nls?,threads(+)]
+	dev-libs/lzo:2
+	>=dev-python/numpy-1.10.1[${PYTHON_USEDEP}]
+	dev-python/requests[${PYTHON_USEDEP}]
+	media-libs/freetype
+	media-libs/glew:*
+	media-libs/libpng:0=
+	media-libs/libsamplerate
+	sys-libs/zlib
+	virtual/glu
+	virtual/jpeg:0=
+	virtual/libintl
+	virtual/opengl
+	collada? ( >=media-libs/opencollada-1.6.18:= )
+	colorio? ( media-libs/opencolorio )
+	cuda? ( dev-util/nvidia-cuda-toolkit:= )
+	ffmpeg? ( media-video/ffmpeg:=[x264,mp3,encode,theora,jpeg2k?] )
+	libav? ( >=media-video/libav-11.3:=[x264,mp3,encode,theora,jpeg2k?] )
+	fftw? ( sci-libs/fftw:3.0= )
+	!headless? (
+		x11-libs/libX11
+		x11-libs/libXi
+		x11-libs/libXxf86vm
+	)
+	jack? ( virtual/jack )
+	jemalloc? ( dev-libs/jemalloc:= )
+	jpeg2k? ( media-libs/openjpeg:0 )
+	llvm? ( sys-devel/llvm:= )
+	ndof? (
+		app-misc/spacenavd
+		dev-libs/libspnav
+	)
+	nls? ( virtual/libiconv )
+	openal? ( media-libs/openal )
+	opencl? ( virtual/opencl )
+	openimageio? ( >=media-libs/openimageio-1.7.0 )
+	openexr? (
+		>=media-libs/ilmbase-2.2.0:=
+		>=media-libs/openexr-2.2.0:=
+	)
+	opensubdiv? ( >=media-libs/opensubdiv-3.3.0:=[cuda=,opencl=] )
+	openvdb? (
+		media-gfx/openvdb[${PYTHON_USEDEP},-abi3-compat(-)]
+		dev-cpp/tbb
+		>=dev-libs/c-blosc-1.5.2
+	)
+	osl? ( media-libs/osl:= )
+	sdl? ( media-libs/libsdl2[sound,joystick] )
+	sndfile? ( media-libs/libsndfile )
+	tiff? ( media-libs/tiff:0 )
+	valgrind? ( dev-util/valgrind )"
+
+DEPEND="${RDEPEND}
+	>=dev-cpp/eigen-3.2.8:3
+	virtual/pkgconfig
+	doc? (
+		app-doc/doxygen[-nodot(-),dot(+),latex]
+		dev-python/sphinx[latex]
+	)
+	nls? ( sys-devel/gettext )"
+
+PATCHES=(
+	"${FILESDIR}/${PN}-fix-install-rules.patch"
+	"${FILESDIR}/${P}-gcc-8.patch"
+)
+
+blender_check_requirements() {
+	[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+
+	if use doc; then
+		CHECKREQS_DISK_BUILD="4G" check-reqs_pkg_pretend
+	fi
+}
+
+pkg_pretend() {
+	blender_check_requirements
+}
+
+pkg_setup() {
+	blender_check_requirements
+	python-single-r1_pkg_setup
+}
+
+src_prepare() {
+	cmake-utils_src_prepare
+
+	# we don't want static glew, but it's scattered across
+	# multiple files that differ from version to version
+	# !!!CHECK THIS SED ON EVERY VERSION BUMP!!!
+	local file
+	while IFS="" read -d $'\0' -r file ; do
+		sed -i -e '/-DGLEW_STATIC/d' "${file}" || die
+	done < <(find . -type f -name "CMakeLists.txt")
+
+	# 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
+}
+
+src_configure() {
+	# FIX: forcing '-funsigned-char' fixes an anti-aliasing issue with menu
+	# shadows, see bug #276338 for reference
+	append-flags -funsigned-char
+	append-lfs-flags
+
+	local mycmakeargs=(
+		-DPYTHON_VERSION="${EPYTHON/python/}"
+		-DPYTHON_LIBRARY="$(python_get_library_path)"
+		-DPYTHON_INCLUDE_DIR="$(python_get_includedir)"
+		-DWITH_INSTALL_PORTABLE=OFF
+		-DWITH_PYTHON_INSTALL=OFF
+		-DWITH_PYTHON_INSTALL_NUMPY=OFF
+		-DWITH_STATIC_LIBS=OFF
+		-DWITH_SYSTEM_GLEW=ON
+		-DWITH_SYSTEM_OPENJPEG=ON
+		-DWITH_SYSTEM_EIGEN3=ON
+		-DWITH_SYSTEM_LZO=ON
+		-DWITH_C11=ON
+		-DWITH_CXX11=ON
+		-DWITH_BOOST=ON
+		-DWITH_BULLET=$(usex bullet)
+		-DWITH_CODEC_FFMPEG=$(usex ffmpeg)
+		-DWITH_CODEC_SNDFILE=$(usex sndfile)
+		-DWITH_CUDA=$(usex cuda)
+		-DWITH_CYCLES_DEVICE_CUDA=$(usex cuda TRUE FALSE)
+		-DWITH_CYCLES=$(usex cycles)
+		-DWITH_CYCLES_OSL=$(usex osl)
+		-DWITH_LLVM=$(usex llvm)
+		-DWITH_FFTW3=$(usex fftw)
+		-DWITH_GAMEENGINE=$(usex game-engine)
+		-DWITH_HEADLESS=$(usex headless)
+		-DWITH_X11=$(usex !headless)
+		-DWITH_IMAGE_DDS=$(usex dds)
+		-DWITH_IMAGE_OPENEXR=$(usex openexr)
+		-DWITH_IMAGE_OPENJPEG=$(usex jpeg2k)
+		-DWITH_IMAGE_TIFF=$(usex tiff)
+		-DWITH_INPUT_NDOF=$(usex ndof)
+		-DWITH_INTERNATIONAL=$(usex nls)
+		-DWITH_JACK=$(usex jack)
+		-DWITH_MOD_FLUID=$(usex elbeem)
+		-DWITH_MOD_OCEANSIM=$(usex fftw)
+		-DWITH_OPENAL=$(usex openal)
+		-DWITH_OPENCL=$(usex opencl)
+		-DWITH_OPENCOLORIO=$(usex colorio)
+		-DWITH_OPENCOLLADA=$(usex collada)
+		-DWITH_OPENIMAGEIO=$(usex openimageio)
+		-DWITH_OPENMP=$(usex openmp)
+		-DWITH_OPENSUBDIV=$(usex opensubdiv)
+		-DWITH_OPENVDB=$(usex openvdb)
+		-DWITH_OPENVDB_BLOSC=$(usex openvdb)
+		-DWITH_PLAYER=$(usex player)
+		-DWITH_SDL=$(usex sdl)
+		-DWITH_CXX_GUARDEDALLOC=$(usex debug)
+		-DWITH_ASSERT_ABORT=$(usex debug)
+		-DWITH_GTESTS=$(usex test)
+		-DWITH_DOC_MANPAGE=$(usex man)
+		-DWITH_MEM_JEMALLOC=$(usex jemalloc)
+		-DWITH_MEM_VALGRIND=$(usex valgrind)
+	)
+	cmake-utils_src_configure
+}
+
+src_compile() {
+	cmake-utils_src_compile
+
+	if use doc; then
+		# Workaround for binary drivers.
+		addpredict /dev/ati
+		addpredict /dev/dri
+		addpredict /dev/nvidiactl
+
+		einfo "Generating Blender C/C++ API docs ..."
+		cd "${CMAKE_USE_DIR}"/doc/doxygen || die
+		doxygen -u Doxyfile || die
+		doxygen || die "doxygen failed to build API docs."
+
+		cd "${CMAKE_USE_DIR}" || die
+		einfo "Generating (BPY) Blender Python API docs ..."
+		"${BUILD_DIR}"/bin/blender --background --python doc/python_api/sphinx_doc_gen.py -noaudio || die "sphinx failed."
+
+		cd "${CMAKE_USE_DIR}"/doc/python_api || die
+		sphinx-build sphinx-in BPY_API || die "sphinx failed."
+	fi
+}
+
+src_test() {
+	if use test; then
+		einfo "Running Blender Unit Tests ..."
+		cd "${BUILD_DIR}"/bin/tests || die
+		local f
+		for f in *_test; do
+			./"${f}" || die
+		done
+	fi
+}
+
+src_install() {
+	# Pax mark blender for hardened support.
+	pax-mark m "${CMAKE_BUILD_DIR}"/bin/blender
+
+	if use doc; then
+		docinto "html/API/python"
+		dodoc -r "${CMAKE_USE_DIR}"/doc/python_api/BPY_API/.
+
+		docinto "html/API/blender"
+		dodoc -r "${CMAKE_USE_DIR}"/doc/doxygen/html/.
+	fi
+
+	cmake-utils_src_install
+
+	# fix doc installdir
+	docinto "html"
+	dodoc "${CMAKE_USE_DIR}"/release/text/readme.html
+	rm -r "${ED%/}"/usr/share/doc/blender || die
+
+	python_fix_shebang "${ED%/}/usr/bin/blender-thumbnailer.py"
+	python_optimize "${ED%/}/usr/share/blender/${MY_PV}/scripts"
+}
+
+pkg_preinst() {
+	gnome2_icon_savelist
+}
+
+pkg_postinst() {
+	elog
+	elog "Blender uses python integration. As such, may have some"
+	elog "inherit 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"
+	elog "home directory. This can be done by starting blender, then"
+	elog "dragging the main menu down do display all paths."
+	elog
+	ewarn
+	ewarn "This ebuild does not unbundle the massive amount of 3rd party"
+	ewarn "libraries which are shipped with blender. Note that"
+	ewarn "these have caused security issues in the past."
+	ewarn "If you are concerned about security, file a bug upstream:"
+	ewarn "  https://developer.blender.org/"
+	ewarn
+	gnome2_icon_cache_update
+	xdg_mimeinfo_database_update
+}
+
+pkg_postrm() {
+	gnome2_icon_cache_update
+	xdg_mimeinfo_database_update
+
+	ewarn ""
+	ewarn "You may want to remove the following directory."
+	ewarn "~/.config/${PN}/${MY_PV}/cache/"
+	ewarn "It may contain extra render kernels not tracked by portage"
+	ewarn ""
+}

diff --git a/media-gfx/blender/files/blender-2.79b-gcc-8.patch b/media-gfx/blender/files/blender-2.79b-gcc-8.patch
new file mode 100644
index 00000000000..3a64ad2f796
--- /dev/null
+++ b/media-gfx/blender/files/blender-2.79b-gcc-8.patch
@@ -0,0 +1,22 @@
+--- blender-2.79b-orig/intern/cycles/util/util_sseb.h	2018-03-24 02:22:25.000000000 +1100
++++ blender-2.79b/intern/cycles/util/util_sseb.h	2018-05-30 20:43:33.888717930 +1000
+@@ -116,7 +116,7 @@
+ __forceinline const sseb unpackhi( const sseb& a, const sseb& b ) { return _mm_unpackhi_ps(a, b); }
+ 
+ template<size_t i0, size_t i1, size_t i2, size_t i3> __forceinline const sseb shuffle( const sseb& a ) {
+-	return _mm_shuffle_epi32(a, _MM_SHUFFLE(i3, i2, i1, i0));
++	return _mm_castsi128_ps(_mm_shuffle_epi32(a, _MM_SHUFFLE(i3, i2, i1, i0)));
+ }
+ 
+ template<> __forceinline const sseb shuffle<0, 1, 0, 1>( const sseb& a ) {
+--- blender-2.79b-orig/intern/itasc/kdl/tree.hpp	2018-03-24 02:22:25.000000000 +1100
++++ blender-2.79b/intern/itasc/kdl/tree.hpp	2018-05-30 20:33:52.045179988 +1000
+@@ -34,7 +34,7 @@
+     //Forward declaration
+     class TreeElement;
+     // Eigen allocator is needed for alignment of Eigen data types
+-    typedef std::map<std::string,TreeElement, std::less<std::string>, Eigen::aligned_allocator<std::pair<std::string, TreeElement> > > SegmentMap;
++    typedef std::map<std::string,TreeElement, std::less<std::string>, Eigen::aligned_allocator<std::pair<const std::string, TreeElement> > > SegmentMap;
+ 
+     class TreeElement
+     {


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/blender/, media-gfx/blender/files/
@ 2019-11-12 12:33 Miroslav Šulc
  0 siblings, 0 replies; 21+ messages in thread
From: Miroslav Šulc @ 2019-11-12 12:33 UTC (permalink / raw
  To: gentoo-commits

commit:     4f0c93f505f5c48ad580f6a926a0f226de215171
Author:     Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 12 12:32:55 2019 +0000
Commit:     Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
CommitDate: Tue Nov 12 12:33:15 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4f0c93f5

media-gfx/blender-2.79b: fix #685922

Closes: https://bugs.gentoo.org/685922
Package-Manager: Portage-2.3.79, Repoman-2.3.18
Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org>

 media-gfx/blender/blender-2.79b-r1.ebuild          |  2 ++
 ....79b-fix-for-gcc9-new-openmp-data-sharing.patch | 31 ++++++++++++++++++++++
 2 files changed, 33 insertions(+)

diff --git a/media-gfx/blender/blender-2.79b-r1.ebuild b/media-gfx/blender/blender-2.79b-r1.ebuild
index 147bcd56b0d..a84c696b9b1 100644
--- a/media-gfx/blender/blender-2.79b-r1.ebuild
+++ b/media-gfx/blender/blender-2.79b-r1.ebuild
@@ -24,6 +24,7 @@ IUSE="+bullet +dds +elbeem +game-engine +openexr collada color-management \
 	cuda cycles debug doc ffmpeg fftw headless jack jemalloc jpeg2k libav \
 	llvm man ndof nls openal opencl openimageio openmp opensubdiv openvdb \
 	osl player sdl sndfile test tiff valgrind"
+RESTRICT="!test? ( test )"
 
 REQUIRED_USE="${PYTHON_REQUIRED_USE}
 	cuda? ( cycles )
@@ -98,6 +99,7 @@ PATCHES=(
 	"${FILESDIR}/${PN}-fix-install-rules.patch"
 	"${FILESDIR}/${P}-gcc-8.patch"
 	"${FILESDIR}/${P}-ffmpeg-4-compat.patch"
+	"${FILESDIR}/${P}-fix-for-gcc9-new-openmp-data-sharing.patch"
 )
 
 blender_check_requirements() {

diff --git a/media-gfx/blender/files/blender-2.79b-fix-for-gcc9-new-openmp-data-sharing.patch b/media-gfx/blender/files/blender-2.79b-fix-for-gcc9-new-openmp-data-sharing.patch
new file mode 100644
index 00000000000..0ecc960d28e
--- /dev/null
+++ b/media-gfx/blender/files/blender-2.79b-fix-for-gcc9-new-openmp-data-sharing.patch
@@ -0,0 +1,31 @@
+diff --git a/intern/elbeem/intern/solver_main.cpp b/intern/elbeem/intern/solver_main.cpp
+index 68f7c04..514087b 100644
+--- a/intern/elbeem/intern/solver_main.cpp
++++ b/intern/elbeem/intern/solver_main.cpp
+@@ -381,7 +381,7 @@ LbmFsgrSolver::mainLoop(const int lev)
+ 	GRID_REGION_INIT();
+ #if PARALLEL==1
+ 	const int gDebugLevel = ::gDebugLevel;
+-#pragma omp parallel default(none) num_threads(mNumOMPThreads) \
++#pragma omp parallel num_threads(mNumOMPThreads) \
+   reduction(+: \
+ 	  calcCurrentMass,calcCurrentVolume, \
+ 		calcCellsFilled,calcCellsEmptied, \
+@@ -1126,7 +1126,7 @@ LbmFsgrSolver::preinitGrids()
+ 		GRID_REGION_INIT();
+ #if PARALLEL==1
+ 	const int gDebugLevel = ::gDebugLevel;
+-#pragma omp parallel default(none) num_threads(mNumOMPThreads) \
++#pragma omp parallel num_threads(mNumOMPThreads) \
+   reduction(+: \
+ 	  calcCurrentMass,calcCurrentVolume, \
+ 		calcCellsFilled,calcCellsEmptied, \
+@@ -1164,7 +1164,7 @@ LbmFsgrSolver::standingFluidPreinit()
+ 	GRID_REGION_INIT();
+ #if PARALLEL==1
+ 	const int gDebugLevel = ::gDebugLevel;
+-#pragma omp parallel default(none) num_threads(mNumOMPThreads) \
++#pragma omp parallel num_threads(mNumOMPThreads) \
+   reduction(+: \
+ 	  calcCurrentMass,calcCurrentVolume, \
+ 		calcCellsFilled,calcCellsEmptied, \


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/blender/, media-gfx/blender/files/
@ 2020-08-24 13:42 Sam James
  0 siblings, 0 replies; 21+ messages in thread
From: Sam James @ 2020-08-24 13:42 UTC (permalink / raw
  To: gentoo-commits

commit:     ac89d92c599585bf639ab0512237bc005ba8c2ba
Author:     Adrian Grigo <agrigo2001 <AT> yahoo <DOT> com <DOT> au>
AuthorDate: Sat Aug 22 01:00:36 2020 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Aug 24 13:41:55 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ac89d92c

media-gfx/blender: Patch for opencollada > 1.65

Opencollada 1.65 added a pure virtual function to writeAnimationClip
which prevents blender from creating an implementation of
DocumentImporter in the usual manner.

These patches are backported from blender 2.80-rc1 which add
definitions for writeAnimationClip to DoucmentImporter resolving the
issue.

Thanks to Dennis Schridde for finding them.

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

 media-gfx/blender/blender-2.79b-r2.ebuild          |   1 +
 .../files/blender-2.79b-fix-opencollada.patch      | 112 +++++++++++++++++++++
 2 files changed, 113 insertions(+)

diff --git a/media-gfx/blender/blender-2.79b-r2.ebuild b/media-gfx/blender/blender-2.79b-r2.ebuild
index 0a45c711273..1b08a01395b 100644
--- a/media-gfx/blender/blender-2.79b-r2.ebuild
+++ b/media-gfx/blender/blender-2.79b-r2.ebuild
@@ -106,6 +106,7 @@ PATCHES=(
 	"${FILESDIR}/${P}-gcc-8.patch"
 	"${FILESDIR}/${P}-ffmpeg-4-compat.patch"
 	"${FILESDIR}/${P}-fix-for-gcc9-new-openmp-data-sharing.patch"
+	"${FILESDIR}/${P}-fix-opencollada.patch"
 )
 
 blender_check_requirements() {

diff --git a/media-gfx/blender/files/blender-2.79b-fix-opencollada.patch b/media-gfx/blender/files/blender-2.79b-fix-opencollada.patch
new file mode 100644
index 00000000000..ab1704864a0
--- /dev/null
+++ b/media-gfx/blender/files/blender-2.79b-fix-opencollada.patch
@@ -0,0 +1,112 @@
+Opencollada 1.65 and later added a pure virtual function writeAnimationClip
+so the compiler is unable to create a DocumentImporter implementation.
+These patches are backported from blender 2.80-r1 which fix the issue.
+
+See https://developer.blender.org/rB10c50d7dbf7578b35b3bf19a1948f556f9eb203b
+and https://developer.blender.org/rB3552731551ef1845b493ffebf78be5a42527e9f2
+
+Thanks to Dennis Schridde for finding them.
+
+--- blender-2.79b/source/blender/collada/CMakeLists.txt.orig	2020-07-23 18:00:09.421620416 +0200
++++ blender-2.79b/source/blender/collada/CMakeLists.txt	2020-07-23 18:00:13.868584964 +0200
+@@ -25,6 +25,18 @@
+ 
+ remove_strict_flags()
+ 
++FIND_FILE(_opencollada_with_animation_clip
++      NAMES
++        COLLADAFWAnimationClip.h
++      PATHS
++        ${OPENCOLLADA_INCLUDE_DIRS}
++      NO_DEFAULT_PATH
++    )
++
++IF(_opencollada_with_animation_clip)
++   add_compile_definitions(OPENCOLLADA_WITH_ANIMATION_CLIP)
++ENDIF()
++
+ set(INC
+ 	.
+ 	../blenkernel
+--- blender-2.79b/source/blender/collada/DocumentImporter.h.orig	2018-03-23 16:10:23.000000000 +0100
++++ blender-2.79b/source/blender/collada/DocumentImporter.h	2020-07-23 18:00:13.897584733 +0200
+@@ -108,6 +108,11 @@
+ 
+ 	bool writeAnimationList(const COLLADAFW::AnimationList*);
+ 
++#if OPENCOLLADA_WITH_ANIMATION_CLIP
++	// Please enable this when building with Collada 1.6.65 or newer (also in DocumentImporter.cpp)
++	bool writeAnimationClip(const COLLADAFW::AnimationClip *AnimationClip);
++#endif
++
+ 	bool writeGeometry(const COLLADAFW::Geometry*);
+ 
+ 	bool writeMaterial(const COLLADAFW::Material*);
+--- blender-2.79b/source/blender/collada/DocumentImporter.cpp.orig	2018-03-23 16:22:25.000000000 +0100
++++ blender-2.79b/source/blender/collada/DocumentImporter.cpp	2020-07-23 18:00:13.896584741 +0200
+@@ -1349,6 +1349,19 @@
+ 
++#if OPENCOLLADA_WITH_ANIMATION_CLIP
++// Since opencollada 1.6.68
++// called on post-process stage after writeVisualScenes
++bool DocumentImporter::writeAnimationClip(const COLLADAFW::AnimationClip *AnimationClip)
++{
++	if (mImportStage != General)
++		return true;
++
++	return true;
++	//return animation_clip_importer.write_animation_clip(animationClip); // TODO: implement import of AnimationClips
++}
++#endif
++
+ // this is called on postprocess, before writeVisualScenes
+ bool DocumentImporter::writeController(const COLLADAFW::Controller *controller)
+ {
+ 	if (mImportStage != General)
+ 		return true;
+--- blender-2.79b/source/blender/collada/CMakeLists.txt.orig	2020-07-23 18:00:45.035336449 +0200
++++ blender-2.79b/source/blender/collada/CMakeLists.txt	2020-07-23 18:00:52.459277244 +0200
+@@ -24,8 +24,7 @@
+ # ***** END GPL LICENSE BLOCK *****
+ 
+ remove_strict_flags()
+-
+-FIND_FILE(_opencollada_with_animation_clip
++FIND_FILE(OPENCOLLADA_ANIMATION_CLIP
+       NAMES
+         COLLADAFWAnimationClip.h
+       PATHS
+@@ -33,8 +32,11 @@
+       NO_DEFAULT_PATH
+     )
+ 
+-IF(_opencollada_with_animation_clip)
+-   add_compile_definitions(OPENCOLLADA_WITH_ANIMATION_CLIP)
++IF(OPENCOLLADA_ANIMATION_CLIP)
++   message(STATUS "Found opencollada: ${OPENCOLLADA_ANIMATION_CLIP} ")
++   add_definitions(-DWITH_OPENCOLLADA_ANIMATION_CLIP)
++ELSE()
++   message(STATUS "opencollada: Build without animation clip support")
+ ENDIF()
+ 
+ set(INC
+--- blender-2.79b/source/blender/collada/DocumentImporter.h.orig	2020-07-23 18:00:13.897584733 +0200
++++ blender-2.79b/source/blender/collada/DocumentImporter.h	2020-07-23 18:00:52.487277021 +0200
+@@ -108,7 +108,7 @@
+ 
+ 	bool writeAnimationList(const COLLADAFW::AnimationList*);
+ 
+-#if OPENCOLLADA_WITH_ANIMATION_CLIP
++#if WITH_OPENCOLLADA_ANIMATION_CLIP
+ 	// Please enable this when building with Collada 1.6.65 or newer (also in DocumentImporter.cpp)
+ 	bool writeAnimationClip(const COLLADAFW::AnimationClip *AnimationClip);
+ #endif
+--- blender-2.79b/source/blender/collada/DocumentImporter.cpp.orig	2020-07-23 18:00:13.896584741 +0200
++++ blender-2.79b/source/blender/collada/DocumentImporter.cpp	2020-07-23 18:00:52.486277028 +0200
+@@ -1349,5 +1349,5 @@
+ 
+-#if OPENCOLLADA_WITH_ANIMATION_CLIP
++#if WITH_OPENCOLLADA_ANIMATION_CLIP
+ // Since opencollada 1.6.68
+ // called on post-process stage after writeVisualScenes
+ bool DocumentImporter::writeAnimationClip(const COLLADAFW::AnimationClip *AnimationClip)


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/blender/, media-gfx/blender/files/
@ 2020-12-03  7:32 Joonas Niilola
  0 siblings, 0 replies; 21+ messages in thread
From: Joonas Niilola @ 2020-12-03  7:32 UTC (permalink / raw
  To: gentoo-commits

commit:     406cafd8aab1d7d2a166513504800a57396d9bcd
Author:     Adrian Grigo <agrigo2001 <AT> yahoo <DOT> com <DOT> au>
AuthorDate: Fri Nov 27 03:13:08 2020 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Thu Dec  3 07:32:12 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=406cafd8

media-gfx/blender: Set Build Type for Blender

Blender requires that the build type is set to None, Debug, Release,
RelWithDebInfo or MinSizeRel. This requires it to be overridden.

If this is not done, then it is set to Gentoo by cmake.eclass, and the
scripts in CMakeLists fail to set one of DEBUG or NDEBUG.

In blender 2.91, this results in not defining
GPU_vertex_buffer._data_end, but also attempting to execute an
assert which requires it to be defined.

Setting CMAKE_BUILD_TYPE to Release resolves the issue by setting
NDEBUG to prevent compilation of the assert, and unsetting DEBUG so
that the _data_end is not compiled.

This means that the patch to prevent the compilation of the assert is
no longer required.

Older version of blender in the tree also have the same requirement
for the value of CMAKE_BUILD_TYPE, but so far compiled correctly even
when it was set to Gentoo.

Signed-off-by: Adrian Grigo <agrigo2001 <AT> yahoo.com.au>
Package-Manager: Portage-3.0.9, Repoman-3.0.2
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 media-gfx/blender/blender-2.83.4-r1.ebuild                 |  2 ++
 media-gfx/blender/blender-2.90.1-r1.ebuild                 |  2 ++
 media-gfx/blender/blender-2.91.0.ebuild                    |  4 +---
 .../blender/files/blender-2.91.0-define-data-end.patch     | 14 --------------
 4 files changed, 5 insertions(+), 17 deletions(-)

diff --git a/media-gfx/blender/blender-2.83.4-r1.ebuild b/media-gfx/blender/blender-2.83.4-r1.ebuild
index 055f713caf7..f28ba088062 100644
--- a/media-gfx/blender/blender-2.83.4-r1.ebuild
+++ b/media-gfx/blender/blender-2.83.4-r1.ebuild
@@ -114,6 +114,8 @@ BDEPEND="
 	nls? ( sys-devel/gettext )
 "
 
+CMAKE_BUILD_TYPE="Release"
+
 blender_check_requirements() {
 	[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
 

diff --git a/media-gfx/blender/blender-2.90.1-r1.ebuild b/media-gfx/blender/blender-2.90.1-r1.ebuild
index 04d9740cdfc..7c7ab67c366 100644
--- a/media-gfx/blender/blender-2.90.1-r1.ebuild
+++ b/media-gfx/blender/blender-2.90.1-r1.ebuild
@@ -114,6 +114,8 @@ BDEPEND="
 	nls? ( sys-devel/gettext )
 "
 
+CMAKE_BUILD_TYPE="Release"
+
 blender_check_requirements() {
 	[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
 

diff --git a/media-gfx/blender/blender-2.91.0.ebuild b/media-gfx/blender/blender-2.91.0.ebuild
index fbb40039d4f..495bfc89e17 100644
--- a/media-gfx/blender/blender-2.91.0.ebuild
+++ b/media-gfx/blender/blender-2.91.0.ebuild
@@ -118,9 +118,7 @@ BDEPEND="
 	nls? ( sys-devel/gettext )
 "
 
-PATCHES=(
-	"${FILESDIR}/${P}-define-data-end.patch"
-)
+CMAKE_BUILD_TYPE="Release"
 
 blender_check_requirements() {
 	[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp

diff --git a/media-gfx/blender/files/blender-2.91.0-define-data-end.patch b/media-gfx/blender/files/blender-2.91.0-define-data-end.patch
deleted file mode 100644
index 99705adae25..00000000000
--- a/media-gfx/blender/files/blender-2.91.0-define-data-end.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff -Naur a/source/blender/gpu/GPU_vertex_buffer.h b/source/blender/gpu/GPU_vertex_buffer.h
---- a/source/blender/gpu/GPU_vertex_buffer.h	2020-11-26 16:36:36.226883721 +1100
-+++ b/source/blender/gpu/GPU_vertex_buffer.h	2020-11-26 16:38:08.691212985 +1100
-@@ -118,7 +118,10 @@
- {
-   unsigned char *data = a->data;
-   a->data += a->stride;
-+#ifdef DEBUG
-+  /* Assert only compiles if _data_end exists */
-   BLI_assert(data < a->_data_end);
-+#endif
-   return (void *)data;
- }
- 


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/blender/, media-gfx/blender/files/
@ 2020-12-03  7:32 Joonas Niilola
  0 siblings, 0 replies; 21+ messages in thread
From: Joonas Niilola @ 2020-12-03  7:32 UTC (permalink / raw
  To: gentoo-commits

commit:     bfaf3fdaf0656a4c63704bd09eea20ba1547faf9
Author:     Adrian Grigo <agrigo2001 <AT> yahoo <DOT> com <DOT> au>
AuthorDate: Fri Nov 27 02:09:03 2020 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Thu Dec  3 07:32:12 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bfaf3fda

media-gfx/blender: Version bump to 2.91.0

Version bump to blender 2.91.0

This version adds four new dependencies (gmp, pugixml, potrace and
fontconfig)

A patch is added for a compilation error that occurs when DEBUG is not
set. GPUVertBufferRaw._data_end is only declared when DEBUG is set, but
an assert that the data pointer is less than _data_end occurs
regardless, resulting in a failure to compile as the symbol does not
exist.

The fix is to make the assert conditional on DEBUG, and the compilation
succeeds.

The subslot binder is used for media-libs/osl to force recompilation
when it changes. This ensures that the oso compiled files are the
correct version, and that preserved libraries are not left behind.

Signed-off-by: Adrian Grigo <agrigo2001 <AT> yahoo.com.au>
Package-Manager: Portage-3.0.9, Repoman-3.0.2
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 media-gfx/blender/Manifest                         |   1 +
 media-gfx/blender/blender-2.91.0.ebuild            | 327 +++++++++++++++++++++
 .../files/blender-2.91.0-define-data-end.patch     |  14 +
 3 files changed, 342 insertions(+)

diff --git a/media-gfx/blender/Manifest b/media-gfx/blender/Manifest
index 5f4b3e32e53..c9763933a6b 100644
--- a/media-gfx/blender/Manifest
+++ b/media-gfx/blender/Manifest
@@ -1,2 +1,3 @@
 DIST blender-2.83.4.tar.xz 38528352 BLAKE2B 54596207cbee34fcaa6b81a0d829976b42c28c793b88de81d78c1c3fdfe9dd2a0189a314be281b2a0f1829a0b7fd30d37bceaa28d35c9794dcb0f009fa71e83d SHA512 061735273159742784ed210d13fb39ad076efbbfd5f0291bab1b983699d43b20462dc7e4795e28dab0cd191c9879b43d9ad0f0545c24ef5da23c74679e5ccab5
 DIST blender-2.90.1.tar.xz 38836408 BLAKE2B 42622e742ebd397dc035c85cf26ab72ffee64f2cd46f1523de78dc8861bc19286a7d87b9e31a0d6afdf9a931da7018ccbdb9b4185b8535b4529656c6d85efc34 SHA512 e7d6f8df598f2a2a99f64716331ec4e981a5a49c76b307caf7856480c778455cfc4bbb56fbedc8b22d1e10951ebaeb6844d1ead9476847bf2824dddf5b135992
+DIST blender-2.91.0.tar.xz 41528920 BLAKE2B f28bce92b0b63e380c7ce2c9dae0ae4235792ae7c7dff52c2c9c0c5baa81b4d540f853f49d7622f6feca8c7f403b254b55f200758a64e4d95bd43709e5509c1d SHA512 a4b6cb09765d735274fb4a61ac301cbd6ee16f09ab77b19a6e283454b9b8a8c76f1b181501dc285b288130da9e283d3343b948b2855eea00bcb9e114636d55aa

diff --git a/media-gfx/blender/blender-2.91.0.ebuild b/media-gfx/blender/blender-2.91.0.ebuild
new file mode 100644
index 00000000000..fbb40039d4f
--- /dev/null
+++ b/media-gfx/blender/blender-2.91.0.ebuild
@@ -0,0 +1,327 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_7 )
+
+inherit check-reqs cmake flag-o-matic pax-utils python-single-r1 \
+	toolchain-funcs xdg-utils
+
+DESCRIPTION="3D Creation/Animation/Publishing System"
+HOMEPAGE="https://www.blender.org"
+
+SRC_URI="https://download.blender.org/source/${P}.tar.xz"
+
+# Blender can have letters in the version string,
+# so strip off the letter if it exists.
+MY_PV="$(ver_cut 1-2)"
+
+SLOT="0"
+LICENSE="|| ( GPL-2 BL )"
+KEYWORDS="~amd64 ~x86"
+IUSE="+bullet +dds +elbeem +openexr +system-python +system-numpy +tbb \
+	abi6-compat abi7-compat alembic collada color-management cuda cycles \
+	debug doc ffmpeg fftw headless jack jemalloc jpeg2k llvm \
+	man ndof nls openal opencl openimageio openmp opensubdiv \
+	openvdb osl sdl sndfile standalone test tiff valgrind"
+RESTRICT="!test? ( test )"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}
+	alembic? ( openexr )
+	cuda? ( cycles )
+	cycles? ( openexr tiff openimageio )
+	elbeem? ( tbb )
+	opencl? ( cycles )
+	openvdb? (
+		^^ ( abi6-compat abi7-compat )
+		tbb
+	)
+	osl? ( cycles llvm )
+	standalone? ( cycles )"
+
+RDEPEND="${PYTHON_DEPS}
+	dev-libs/boost:=[nls?,threads(+)]
+	dev-libs/gmp
+	dev-libs/pugixml
+	dev-libs/lzo:2=
+	$(python_gen_cond_dep '
+		dev-python/numpy[${PYTHON_USEDEP}]
+		dev-python/requests[${PYTHON_USEDEP}]
+	')
+	media-gfx/potrace
+	media-libs/fontconfig:=
+	media-libs/freetype:=
+	media-libs/glew:*
+	media-libs/libpng:=
+	media-libs/libsamplerate
+	sys-libs/zlib:=
+	virtual/glu
+	virtual/jpeg
+	virtual/libintl
+	virtual/opengl
+	alembic? ( >=media-gfx/alembic-1.7.12[boost(+),hdf(+)] )
+	collada? ( >=media-libs/opencollada-1.6.68 )
+	color-management? ( media-libs/opencolorio )
+	cuda? ( dev-util/nvidia-cuda-toolkit:= )
+	ffmpeg? ( media-video/ffmpeg:=[x264,mp3,encode,theora,jpeg2k?] )
+	fftw? ( sci-libs/fftw:3.0= )
+	!headless? (
+		x11-libs/libX11
+		x11-libs/libXi
+		x11-libs/libXxf86vm
+	)
+	jack? ( virtual/jack )
+	jemalloc? ( dev-libs/jemalloc:= )
+	jpeg2k? ( media-libs/openjpeg:2= )
+	llvm? ( sys-devel/llvm:= )
+	ndof? (
+		app-misc/spacenavd
+		dev-libs/libspnav
+	)
+	nls? ( virtual/libiconv )
+	openal? ( media-libs/openal )
+	opencl? ( virtual/opencl )
+	openimageio? ( media-libs/openimageio:= )
+	openexr? (
+		media-libs/ilmbase:=
+		media-libs/openexr:=
+	)
+	opensubdiv? ( >=media-libs/opensubdiv-3.4.0[cuda=,opencl=] )
+	openvdb? (
+		~media-gfx/openvdb-7.0.0[abi6-compat(-)?,abi7-compat(-)?]
+		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 )
+"
+
+DEPEND="${RDEPEND}
+	dev-cpp/eigen:=
+"
+
+BDEPEND="
+	virtual/pkgconfig
+	doc? (
+		app-doc/doxygen[dot]
+		dev-python/sphinx[latex]
+		dev-texlive/texlive-bibtexextra
+		dev-texlive/texlive-fontsextra
+		dev-texlive/texlive-fontutils
+		dev-texlive/texlive-latex
+		dev-texlive/texlive-latexextra
+	)
+	nls? ( sys-devel/gettext )
+"
+
+PATCHES=(
+	"${FILESDIR}/${P}-define-data-end.patch"
+)
+
+blender_check_requirements() {
+	[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+
+	if use doc; then
+		CHECKREQS_DISK_BUILD="4G" check-reqs_pkg_pretend
+	fi
+}
+
+pkg_pretend() {
+	blender_check_requirements
+}
+
+pkg_setup() {
+	blender_check_requirements
+	python-single-r1_pkg_setup
+}
+
+src_prepare() {
+	cmake_src_prepare
+
+	# we don't want static glew, but it's scattered across
+	# multiple files that differ from version to version
+	# !!!CHECK THIS SED ON EVERY VERSION BUMP!!!
+	local file
+	while IFS="" read -d $'\0' -r file ; do
+		sed -i -e '/-DGLEW_STATIC/d' "${file}" || die
+	done < <(find . -type f -name "CMakeLists.txt")
+
+	# 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
+}
+
+src_configure() {
+	# FIX: forcing '-funsigned-char' fixes an anti-aliasing issue with menu
+	# shadows, see bug #276338 for reference
+	append-flags -funsigned-char
+	append-lfs-flags
+
+	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
+
+	local mycmakeargs=(
+		-DBUILD_SHARED_LIBS=OFF
+		-DPYTHON_INCLUDE_DIR="$(python_get_includedir)"
+		-DPYTHON_LIBRARY="$(python_get_library_path)"
+		-DPYTHON_VERSION="${EPYTHON/python/}"
+		-DWITH_ALEMBIC=$(usex alembic)
+		-DWITH_ASSERT_ABORT=$(usex debug)
+		-DWITH_BOOST=ON
+		-DWITH_BULLET=$(usex bullet)
+		-DWITH_CODEC_FFMPEG=$(usex ffmpeg)
+		-DWITH_CODEC_SNDFILE=$(usex sndfile)
+		-DWITH_CXX_GUARDEDALLOC=$(usex debug)
+		-DWITH_CYCLES_DEVICE_CUDA=$(usex cuda TRUE FALSE)
+		-DWITH_CYCLES=$(usex cycles)
+		-DWITH_CYCLES_DEVICE_OPENCL=$(usex opencl)
+		-DWITH_CYCLES_EMBREE=OFF
+		-DWITH_CYCLES_STANDALONE=$(usex standalone)
+		-DWITH_CYCLES_STANDALONE_GUI=$(usex standalone)
+		-DWITH_CYCLES_OSL=$(usex osl)
+		-DWITH_DOC_MANPAGE=$(usex man)
+		-DWITH_FFTW3=$(usex fftw)
+		-DWITH_GHOST_X11=$(usex !headless)
+		-DWITH_GTESTS=$(usex test)
+		-DWITH_HEADLESS=$(usex headless)
+		-DWITH_INSTALL_PORTABLE=OFF
+		-DWITH_IMAGE_DDS=$(usex dds)
+		-DWITH_IMAGE_OPENEXR=$(usex openexr)
+		-DWITH_IMAGE_OPENJPEG=$(usex jpeg2k)
+		-DWITH_IMAGE_TIFF=$(usex tiff)
+		-DWITH_INPUT_NDOF=$(usex ndof)
+		-DWITH_INTERNATIONAL=$(usex nls)
+		-DWITH_JACK=$(usex jack)
+		-DWITH_LLVM=$(usex llvm)
+		-DWITH_MEM_JEMALLOC=$(usex jemalloc)
+		-DWITH_MEM_VALGRIND=$(usex valgrind)
+		-DWITH_MOD_FLUID=$(usex elbeem)
+		-DWITH_MOD_OCEANSIM=$(usex fftw)
+		-DWITH_OPENAL=$(usex openal)
+		-DWITH_OPENCOLLADA=$(usex collada)
+		-DWITH_OPENCOLORIO=$(usex color-management)
+		-DWITH_OPENIMAGEIO=$(usex openimageio)
+		-DWITH_OPENMP=$(usex openmp)
+		-DWITH_OPENSUBDIV=$(usex opensubdiv)
+		-DWITH_OPENVDB=$(usex openvdb)
+		-DWITH_OPENVDB_BLOSC=$(usex openvdb)
+		-DWITH_PYTHON_INSTALL=$(usex system-python OFF ON)
+		-DWITH_PYTHON_INSTALL_NUMPY=$(usex system-numpy OFF ON)
+		-DWITH_SDL=$(usex sdl)
+		-DWITH_STATIC_LIBS=OFF
+		-DWITH_SYSTEM_EIGEN3=ON
+		-DWITH_SYSTEM_GLEW=ON
+		-DWITH_SYSTEM_LZO=ON
+		-DWITH_TBB=$(usex tbb)
+	)
+	cmake_src_configure
+}
+
+src_compile() {
+	cmake_src_compile
+
+	if use doc; then
+		# Workaround for binary drivers.
+		addpredict /dev/ati
+		addpredict /dev/dri
+		addpredict /dev/nvidiactl
+
+		einfo "Generating Blender C/C++ API docs ..."
+		cd "${CMAKE_USE_DIR}"/doc/doxygen || die
+		doxygen -u Doxyfile || die
+		doxygen || die "doxygen failed to build API docs."
+
+		cd "${CMAKE_USE_DIR}" || die
+		einfo "Generating (BPY) Blender Python API docs ..."
+		"${BUILD_DIR}"/bin/blender --background --python doc/python_api/sphinx_doc_gen.py -noaudio || die "sphinx failed."
+
+		cd "${CMAKE_USE_DIR}"/doc/python_api || die
+		sphinx-build sphinx-in BPY_API || die "sphinx failed."
+	fi
+}
+
+src_test() {
+	if use test; then
+		einfo "Running Blender Unit Tests ..."
+		cd "${BUILD_DIR}"/bin/tests || die
+		local f
+		for f in *_test; do
+			./"${f}" || die
+		done
+	fi
+}
+
+src_install() {
+	# Pax mark blender for hardened support.
+	pax-mark m "${BUILD_DIR}"/bin/blender
+
+	if use standalone; then
+		dobin "${BUILD_DIR}"/bin/cycles
+	fi
+
+	if use doc; then
+		docinto "html/API/python"
+		dodoc -r "${CMAKE_USE_DIR}"/doc/python_api/BPY_API/.
+
+		docinto "html/API/blender"
+		dodoc -r "${CMAKE_USE_DIR}"/doc/doxygen/html/.
+	fi
+
+	cmake_src_install
+
+	# fix doc installdir
+	docinto "html"
+	dodoc "${CMAKE_USE_DIR}"/release/text/readme.html
+	rm -r "${ED}"/usr/share/doc/blender || die
+
+	python_fix_shebang "${ED}/usr/bin/blender-thumbnailer.py"
+	python_optimize "${ED}/usr/share/blender/${MY_PV}/scripts"
+}
+
+pkg_postinst() {
+	elog
+	elog "Blender uses python integration. As such, may have some"
+	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"
+	elog "home directory. This can be done by starting blender, then"
+	elog "dragging the main menu down do display all paths."
+	elog
+	ewarn
+	ewarn "This ebuild does not unbundle the massive amount of 3rd party"
+	ewarn "libraries which are shipped with blender. Note that"
+	ewarn "these have caused security issues in the past."
+	ewarn "If you are concerned about security, file a bug upstream:"
+	ewarn "  https://developer.blender.org/"
+	ewarn
+	xdg_icon_cache_update
+	xdg_mimeinfo_database_update
+	xdg_desktop_database_update
+}
+
+pkg_postrm() {
+	xdg_icon_cache_update
+	xdg_mimeinfo_database_update
+	xdg_desktop_database_update
+
+	ewarn ""
+	ewarn "You may want to remove the following directory."
+	ewarn "~/.config/${PN}/${MY_PV}/cache/"
+	ewarn "It may contain extra render kernels not tracked by portage"
+	ewarn ""
+}

diff --git a/media-gfx/blender/files/blender-2.91.0-define-data-end.patch b/media-gfx/blender/files/blender-2.91.0-define-data-end.patch
new file mode 100644
index 00000000000..99705adae25
--- /dev/null
+++ b/media-gfx/blender/files/blender-2.91.0-define-data-end.patch
@@ -0,0 +1,14 @@
+diff -Naur a/source/blender/gpu/GPU_vertex_buffer.h b/source/blender/gpu/GPU_vertex_buffer.h
+--- a/source/blender/gpu/GPU_vertex_buffer.h	2020-11-26 16:36:36.226883721 +1100
++++ b/source/blender/gpu/GPU_vertex_buffer.h	2020-11-26 16:38:08.691212985 +1100
+@@ -118,7 +118,10 @@
+ {
+   unsigned char *data = a->data;
+   a->data += a->stride;
++#ifdef DEBUG
++  /* Assert only compiles if _data_end exists */
+   BLI_assert(data < a->_data_end);
++#endif
+   return (void *)data;
+ }
+ 


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/blender/, media-gfx/blender/files/
@ 2021-11-08 11:25 Michał Górny
  0 siblings, 0 replies; 21+ messages in thread
From: Michał Górny @ 2021-11-08 11:25 UTC (permalink / raw
  To: gentoo-commits

commit:     4a316631991487a4e893b22db1942a296bbda87d
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Mon Nov  8 10:57:44 2021 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Nov  8 11:25:20 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4a316631

media-gfx/blender: Remove versions requiring LLVM 10

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 media-gfx/blender/Manifest                         |   4 -
 media-gfx/blender/blender-2.83.15-r1.ebuild        | 380 ---------------------
 media-gfx/blender/blender-2.83.16-r1.ebuild        | 380 ---------------------
 media-gfx/blender/blender-2.83.17-r1.ebuild        | 377 --------------------
 .../blender/files/blender-2.83.13-ffmpeg-4_4.patch |  27 --
 .../files/blender-2.83.6-constraints_test.patch    |  13 -
 .../files/blender-2.83.6-fix_opevdb_abi.patch      |  21 --
 .../blender-2.83.6-libmv_eigen_alignment.patch     | 219 ------------
 8 files changed, 1421 deletions(-)

diff --git a/media-gfx/blender/Manifest b/media-gfx/blender/Manifest
index 142447598c2..24a6d396c78 100644
--- a/media-gfx/blender/Manifest
+++ b/media-gfx/blender/Manifest
@@ -1,7 +1,3 @@
-DIST blender-2.83.1-tests.tar.bz2 266633785 BLAKE2B 8d8102c3107480de95dfd9ef9dabba1cd82893aad553af2ff5ef1afadc831dc5ccf5553c41466511ecb2a1435bc79c936ad64a78bdd4375e3e30af85b69807c6 SHA512 3ffba6fa8401bba3e2bdbccf7067761114d516371c7778a2f6604a243fd8610e26a30b88a32728c26f7e6274182d298752f32b5e76abf8216be0ec4b3ce38cd9
-DIST blender-2.83.15.tar.xz 39125740 BLAKE2B 687097b45b76b474b1c172c9b8ccf5da1bfc24539d0db894d04c7837572b16c1f552757fd1482219d58afa56c573229878fb43bbecd95e3d61314f2ab05efafa SHA512 2836533691bae0a7942197e67232b396b892cd95c0f07ab561f7de8458b354fe4045453855585484dd533ae76588ea3888f880763b042a264fb813a43933fc25
-DIST blender-2.83.16.tar.xz 39135184 BLAKE2B 2515822373f6a9343c760ad656de732094ee58a9354423e0f3d7bf1042220fc54af7e1d9f5b59a170a23e8b1b57a4b7f09867a000a57a6e4e820ff5c6cdd47b6 SHA512 ef78278387ae981972942ee4724abcb11ca19da2b88a3c8bbe1e9aafb93f28d84d4c79d01542e11218bd58bfec80fcfdbffdfd28896d146edd34181a7439dbd5
-DIST blender-2.83.17.tar.xz 39128468 BLAKE2B 3a20f6125f94e0d6de4d78e7a784c5a37faf23603e055a28ee67e48a41d09d3715222b2ac4f04ed38619dca686e7e0985ad60c983ee3a15c96042e419f152e69 SHA512 1e4c9a1f604802fb94c8e844f3878756e2ba0a6c29a6fb8863bc21ada1c8e14e775b203ab21bc4d53e85eb4e909e889204bb9f5befcff56cec3d56c2e987c2a0
 DIST blender-2.93.0-tests.tar.bz2 286918586 BLAKE2B a2c2c2e900e401a470208e8e5d0082d45e2f8db13b45213f31808d50ae5ea330360702b8e775bdb3307eb753aa7c3264803e9e470b3fb778f8bd87272cd72513 SHA512 0e5e4c67944c4f76df62cdbaf26ba284c415675074e66685c01ec9584a544c47f616bae8fb2ff2b7e03290620d54dc1033b4b0fc617acb1232a90439e96325fe
 DIST blender-2.93.0.tar.xz 42967016 BLAKE2B 1e7b54f08415de8a8908a285ae35c1e18558bf7cab42c5c135323d10ac9a73ec69aa0addd536355a4d19262438a615e03f09dc123b697cbab484e33350bb5ee3 SHA512 660962e5368c8ff52ed095aba97d63c22aa8e2fdcb2042b1299b6d6edeb7eb1f702a9ee95ee7e47824681f9f48b971d2e32ec32cc6264165a4196b5f36c4a66d
 DIST blender-2.93.1.tar.xz 42960100 BLAKE2B eda0a8c0414d1f7c89d21e34ba238b0cbe337ea755d6f10792e7c3bd5e15934184d3bd853ed636764776095ce1e3f081d63386b7c13fb7ac666580bf9eeb43c8 SHA512 b14e8cca248c53e4a93976d7fa1cd1ab92a7d18a3809b2a535881731aad2f68d8d155ad175b27aa1890714b81aa6648604a614cacc90e95b7269569661e393b1

diff --git a/media-gfx/blender/blender-2.83.15-r1.ebuild b/media-gfx/blender/blender-2.83.15-r1.ebuild
deleted file mode 100644
index 6175ce97526..00000000000
--- a/media-gfx/blender/blender-2.83.15-r1.ebuild
+++ /dev/null
@@ -1,380 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{7,8} )
-
-inherit check-reqs cmake flag-o-matic pax-utils python-single-r1 toolchain-funcs xdg-utils
-
-DESCRIPTION="3D Creation/Animation/Publishing System"
-HOMEPAGE="https://www.blender.org"
-
-if [[ ${PV} = *9999* ]] ; then
-	inherit git-r3
-	EGIT_REPO_URI="https://git.blender.org/blender.git"
-else
-	SRC_URI="https://download.blender.org/source/${P}.tar.xz"
-	TEST_TARBALL_VERSION=2.83.1
-	SRC_URI+=" test? ( https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PN}-${TEST_TARBALL_VERSION}-tests.tar.bz2 )"
-	KEYWORDS="amd64 ~x86"
-fi
-
-SLOT="${PV%.*}"
-LICENSE="|| ( GPL-3 BL )"
-IUSE="+bullet +dds +fluid +openexr +system-python +system-numpy +tbb \
-	alembic collada +color-management cuda cycles \
-	debug doc ffmpeg fftw headless jack jemalloc jpeg2k \
-	man ndof nls openal opencl openimageio openmp opensubdiv \
-	openvdb osl sdl sndfile standalone test tiff valgrind"
-RESTRICT="!test? ( test )"
-
-REQUIRED_USE="${PYTHON_REQUIRED_USE}
-	alembic? ( openexr )
-	cuda? ( cycles )
-	cycles? ( openexr tiff openimageio )
-	fluid? ( tbb )
-	opencl? ( cycles )
-	openvdb? ( tbb )
-	osl? ( cycles )
-	standalone? ( cycles )
-	test? ( color-management osl )"
-
-# Library versions for official builds can be found in the blender source directory in:
-# build_files/build_environment/install_deps.sh
-RDEPEND="${PYTHON_DEPS}
-	dev-libs/boost:=[nls?,threads(+)]
-	dev-libs/lzo:2=
-	$(python_gen_cond_dep '
-		dev-python/numpy[${PYTHON_USEDEP}]
-		dev-python/requests[${PYTHON_USEDEP}]
-	')
-	media-libs/freetype:=
-	media-libs/glew:*
-	media-libs/libpng:=
-	media-libs/libsamplerate
-	sys-libs/zlib:=
-	virtual/glu
-	virtual/jpeg
-	virtual/libintl
-	virtual/opengl
-	alembic? ( >=media-gfx/alembic-1.7.12[boost(+),hdf(+)] )
-	collada? ( >=media-libs/opencollada-1.6.68 )
-	color-management? ( <media-libs/opencolorio-2.0.0 )
-	cuda? ( dev-util/nvidia-cuda-toolkit:= )
-	ffmpeg? ( media-video/ffmpeg:=[x264,mp3,encode,theora,jpeg2k,vpx,vorbis,opus,xvid] )
-	fftw? ( sci-libs/fftw:3.0= )
-	!headless? (
-		x11-libs/libX11
-		x11-libs/libXi
-		x11-libs/libXxf86vm
-	)
-	jack? ( virtual/jack )
-	jemalloc? ( dev-libs/jemalloc:= )
-	jpeg2k? ( media-libs/openjpeg:2= )
-	ndof? (
-		app-misc/spacenavd
-		dev-libs/libspnav
-	)
-	nls? ( virtual/libiconv )
-	openal? ( media-libs/openal )
-	opencl? ( virtual/opencl )
-	openimageio? ( >=media-libs/openimageio-2.2.13.1:= )
-	openexr? (
-		media-libs/ilmbase:=
-		media-libs/openexr:=
-	)
-	opensubdiv? ( >=media-libs/opensubdiv-3.4.0[cuda=,opencl=] )
-	openvdb? (
-		>=media-gfx/openvdb-7.0.0
-		dev-libs/c-blosc:=
-	)
-	osl? ( <media-libs/osl-1.11.0 )
-	sdl? ( media-libs/libsdl2[sound,joystick] )
-	sndfile? ( media-libs/libsndfile )
-	tbb? ( <dev-cpp/tbb-2021.4.0:= )
-	tiff? ( media-libs/tiff )
-	valgrind? ( dev-util/valgrind )
-"
-
-DEPEND="${RDEPEND}
-	dev-cpp/eigen:=
-"
-
-BDEPEND="
-	virtual/pkgconfig
-	doc? (
-		app-doc/doxygen[dot]
-		dev-python/sphinx[latex]
-		dev-texlive/texlive-bibtexextra
-		dev-texlive/texlive-fontsextra
-		dev-texlive/texlive-fontutils
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-latexextra
-	)
-	nls? ( sys-devel/gettext )
-"
-
-PATCHES=(
-	"${FILESDIR}/blender-2.83.6-libmv_eigen_alignment.patch"
-	"${FILESDIR}/blender-2.83.6-constraints_test.patch"
-	"${FILESDIR}/blender-2.83.6-fix_opevdb_abi.patch"
-	"${FILESDIR}/blender-2.83.13-ffmpeg-4_4.patch"
-)
-
-blender_check_requirements() {
-	[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
-
-	if use doc; then
-		CHECKREQS_DISK_BUILD="4G" check-reqs_pkg_pretend
-	fi
-}
-
-blender_get_version() {
-	# Get blender version from blender itself.
-	BV=$(grep "BLENDER_VERSION " source/blender/blenkernel/BKE_blender_version.h | cut -d " " -f 3; assert)
-	# Add period.
-	BV=${BV:0:1}.${BV:1}
-}
-
-pkg_pretend() {
-	blender_check_requirements
-}
-
-pkg_setup() {
-	blender_check_requirements
-	python-single-r1_pkg_setup
-}
-
-src_unpack() {
-	if [[ ${PV} = *9999* ]] ; then
-		git-r3_src_unpack
-	else
-		default
-	fi
-
-	if use test; then
-		mkdir -p lib || die
-		mv "${WORKDIR}"/blender-${TEST_TARBALL_VERSION}-tests/tests lib || die
-	fi
-}
-
-src_prepare() {
-	cmake_src_prepare
-
-	blender_get_version
-
-	# 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
-
-	# Prepare icons and .desktop files for slotting.
-	sed -e "s|blender.svg|blender-${BV}.svg|" -i source/creator/CMakeLists.txt || die
-	sed -e "s|blender-symbolic.svg|blender-${BV}-symbolic.svg|" -i source/creator/CMakeLists.txt || die
-	sed -e "s|blender.desktop|blender-${BV}.desktop|" -i source/creator/CMakeLists.txt || die
-	sed -e "s|blender-thumbnailer.py|blender-${BV}-thumbnailer.py|" -i source/creator/CMakeLists.txt || die
-
-	sed -e "s|Name=Blender|Name=Blender ${PV}|" -i release/freedesktop/blender.desktop || die
-	sed -e "s|Exec=blender|Exec=blender-${BV}|" -i release/freedesktop/blender.desktop || die
-	sed -e "s|Icon=blender|Icon=blender-${BV}|" -i release/freedesktop/blender.desktop || die
-
-	mv release/freedesktop/icons/scalable/apps/blender.svg release/freedesktop/icons/scalable/apps/blender-${BV}.svg || die
-	mv 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/bin/blender-thumbnailer.py release/bin/blender-${BV}-thumbnailer.py || die
-
-	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|string(REPLACE.*|set(TEST_INSTALL_DIR ${ED}/usr/)|g" -i tests/CMakeLists.txt || die
-		sed -e "s|string(REPLACE.*|set(TEST_INSTALL_DIR ${ED}/usr/)|g" -i build_files/cmake/Modules/GTestTesting.cmake || die
-	fi
-}
-
-src_configure() {
-	# Without this the floating point math will differ when for example
-	# "-march=native" is set. This will make automated tests fail and we will
-	# not match the behaviour of some operators/modifiers with the official
-	# builds.
-	append-flags -ffp-contract=off
-	append-lfs-flags
-
-	local mycmakeargs=(
-		-DBUILD_SHARED_LIBS=OFF
-		-DPYTHON_INCLUDE_DIR="$(python_get_includedir)"
-		-DPYTHON_LIBRARY="$(python_get_library_path)"
-		-DPYTHON_VERSION="${EPYTHON/python/}"
-		-DWITH_ALEMBIC=$(usex alembic)
-		-DWITH_ASSERT_ABORT=$(usex debug)
-		-DWITH_BOOST=ON
-		-DWITH_BULLET=$(usex bullet)
-		-DWITH_CODEC_FFMPEG=$(usex ffmpeg)
-		-DWITH_CODEC_SNDFILE=$(usex sndfile)
-		-DWITH_CXX_GUARDEDALLOC=$(usex debug)
-		-DWITH_CYCLES_DEVICE_CUDA=$(usex cuda TRUE FALSE)
-		-DWITH_CYCLES=$(usex cycles)
-		-DWITH_CYCLES_DEVICE_OPENCL=$(usex opencl)
-		-DWITH_CYCLES_STANDALONE=$(usex standalone)
-		-DWITH_CYCLES_STANDALONE_GUI=$(usex standalone)
-		-DWITH_CYCLES_OSL=$(usex osl)
-		-DWITH_DOC_MANPAGE=$(usex man)
-		-DWITH_FFTW3=$(usex fftw)
-		-DWITH_GTESTS=$(usex test)
-		-DWITH_HEADLESS=$(usex headless)
-		-DWITH_INSTALL_PORTABLE=OFF
-		-DWITH_IMAGE_DDS=$(usex dds)
-		-DWITH_IMAGE_OPENEXR=$(usex openexr)
-		-DWITH_IMAGE_OPENJPEG=$(usex jpeg2k)
-		-DWITH_IMAGE_TIFF=$(usex tiff)
-		-DWITH_INPUT_NDOF=$(usex ndof)
-		-DWITH_INTERNATIONAL=$(usex nls)
-		-DWITH_JACK=$(usex jack)
-		-DWITH_MEM_JEMALLOC=$(usex jemalloc)
-		-DWITH_MEM_VALGRIND=$(usex valgrind)
-		-DWITH_MOD_FLUID=$(usex fluid)
-		-DWITH_MOD_OCEANSIM=$(usex fftw)
-		-DWITH_OPENAL=$(usex openal)
-		-DWITH_OPENCOLLADA=$(usex collada)
-		-DWITH_OPENCOLORIO=$(usex color-management)
-		-DWITH_OPENIMAGEIO=$(usex openimageio)
-		-DWITH_OPENMP=$(usex openmp)
-		-DWITH_OPENSUBDIV=$(usex opensubdiv)
-		-DWITH_OPENVDB=$(usex openvdb)
-		-DWITH_OPENVDB_BLOSC=$(usex openvdb)
-		-DWITH_PYTHON_INSTALL=$(usex system-python OFF ON)
-		-DWITH_PYTHON_INSTALL_NUMPY=$(usex system-numpy OFF ON)
-		-DWITH_SDL=$(usex sdl)
-		-DWITH_STATIC_LIBS=OFF
-		-DWITH_SYSTEM_EIGEN3=ON
-		-DWITH_SYSTEM_GLEW=ON
-		-DWITH_SYSTEM_LZO=ON
-		-DWITH_TBB=$(usex tbb)
-		-DWITH_USD=OFF
-	)
-	if ! use debug ; then
-		append-flags  -DNDEBUG
-	else
-		append-flags  -DDEBUG
-	fi
-	cmake_src_configure
-}
-
-src_compile() {
-	cmake_src_compile
-
-	if use doc; then
-		# Workaround for binary drivers.
-		addpredict /dev/ati
-		addpredict /dev/dri
-		addpredict /dev/nvidiactl
-
-		einfo "Generating Blender C/C++ API docs ..."
-		cd "${CMAKE_USE_DIR}"/doc/doxygen || die
-		doxygen -u Doxyfile || die
-		doxygen || die "doxygen failed to build API docs."
-
-		cd "${CMAKE_USE_DIR}" || die
-		einfo "Generating (BPY) Blender Python API docs ..."
-		"${BUILD_DIR}"/bin/blender --background --python doc/python_api/sphinx_doc_gen.py -noaudio || die "sphinx failed."
-
-		cd "${CMAKE_USE_DIR}"/doc/python_api || die
-		sphinx-build sphinx-in BPY_API || die "sphinx failed."
-	fi
-}
-
-src_test() {
-	# A lot of tests needs to have access to the installed data files.
-	# So install them into the image directory now.
-	cmake_src_install
-
-	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
-
-	# NOTE: The 'modifiers' test will fail if opensubdiv was compiled with -march=native
-	# This this is fixed in blender version 2.92 and up."
-	cmake_src_test
-
-	# Clean up the image directory for src_install
-	rm -fr ${ED}/* || die
-}
-
-src_install() {
-	blender_get_version
-
-	# Pax mark blender for hardened support.
-	pax-mark m "${BUILD_DIR}"/bin/blender
-
-	if use standalone; then
-		dobin "${BUILD_DIR}"/bin/cycles
-	fi
-
-	if use doc; then
-		docinto "html/API/python"
-		dodoc -r "${CMAKE_USE_DIR}"/doc/python_api/BPY_API/.
-
-		docinto "html/API/blender"
-		dodoc -r "${CMAKE_USE_DIR}"/doc/doxygen/html/.
-	fi
-
-	cmake_src_install
-
-	if use man; then
-		# Slot the man page
-		mv "${ED}/usr/share/man/man1/blender.1" "${ED}/usr/share/man/man1/blender-${BV}.1" || die
-	fi
-
-	# Fix doc installdir
-	docinto html
-	dodoc "${CMAKE_USE_DIR}"/release/text/readme.html
-	rm -r "${ED}"/usr/share/doc/blender || die
-
-	python_fix_shebang "${ED}/usr/bin/blender-${BV}-thumbnailer.py"
-	python_optimize "${ED}/usr/share/blender/${BV}/scripts"
-
-	mv "${ED}/usr/bin/blender" "${ED}/usr/bin/blender-${BV}" || die
-}
-
-pkg_postinst() {
-	elog
-	elog "Blender uses python integration. As such, may have some"
-	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"
-	elog "home directory. This can be done by starting blender, then"
-	elog "changing the 'Temporary Files' directory in Blender preferences."
-	elog
-	ewarn
-	ewarn "This ebuild does not unbundle the massive amount of 3rd party"
-	ewarn "libraries which are shipped with blender. Note that"
-	ewarn "these have caused security issues in the past."
-	ewarn "If you are concerned about security, file a bug upstream:"
-	ewarn "  https://developer.blender.org/"
-	ewarn
-
-	elog "You are building Blender with a newer python version than"
-	elog "supported by this version upstream."
-	elog "If you experience breakages with e.g. plugins, please download"
-	elog "the official Blender LTS binary release instead."
-	elog "Bug: https://bugs.gentoo.org/737388"
-	elog
-
-	xdg_icon_cache_update
-	xdg_mimeinfo_database_update
-	xdg_desktop_database_update
-}
-
-pkg_postrm() {
-	xdg_icon_cache_update
-	xdg_mimeinfo_database_update
-	xdg_desktop_database_update
-
-	ewarn ""
-	ewarn "You may want to remove the following directory."
-	ewarn "~/.config/${PN}/${SLOT}/cache/"
-	ewarn "It may contain extra render kernels not tracked by portage"
-	ewarn ""
-}

diff --git a/media-gfx/blender/blender-2.83.16-r1.ebuild b/media-gfx/blender/blender-2.83.16-r1.ebuild
deleted file mode 100644
index 6f64aaa0992..00000000000
--- a/media-gfx/blender/blender-2.83.16-r1.ebuild
+++ /dev/null
@@ -1,380 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{7,8} )
-
-inherit check-reqs cmake flag-o-matic pax-utils python-single-r1 toolchain-funcs xdg-utils
-
-DESCRIPTION="3D Creation/Animation/Publishing System"
-HOMEPAGE="https://www.blender.org"
-
-if [[ ${PV} = *9999* ]] ; then
-	inherit git-r3
-	EGIT_REPO_URI="https://git.blender.org/blender.git"
-else
-	SRC_URI="https://download.blender.org/source/${P}.tar.xz"
-	TEST_TARBALL_VERSION=2.83.1
-	SRC_URI+=" test? ( https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PN}-${TEST_TARBALL_VERSION}-tests.tar.bz2 )"
-	KEYWORDS="~amd64 ~x86"
-fi
-
-SLOT="${PV%.*}"
-LICENSE="|| ( GPL-3 BL )"
-IUSE="+bullet +dds +fluid +openexr +system-python +system-numpy +tbb \
-	alembic collada +color-management cuda cycles \
-	debug doc ffmpeg fftw headless jack jemalloc jpeg2k \
-	man ndof nls openal opencl openimageio openmp opensubdiv \
-	openvdb osl sdl sndfile standalone test tiff valgrind"
-RESTRICT="!test? ( test )"
-
-REQUIRED_USE="${PYTHON_REQUIRED_USE}
-	alembic? ( openexr )
-	cuda? ( cycles )
-	cycles? ( openexr tiff openimageio )
-	fluid? ( tbb )
-	opencl? ( cycles )
-	openvdb? ( tbb )
-	osl? ( cycles )
-	standalone? ( cycles )
-	test? ( color-management osl )"
-
-# Library versions for official builds can be found in the blender source directory in:
-# build_files/build_environment/install_deps.sh
-RDEPEND="${PYTHON_DEPS}
-	dev-libs/boost:=[nls?,threads(+)]
-	dev-libs/lzo:2=
-	$(python_gen_cond_dep '
-		dev-python/numpy[${PYTHON_USEDEP}]
-		dev-python/requests[${PYTHON_USEDEP}]
-	')
-	media-libs/freetype:=
-	media-libs/glew:*
-	media-libs/libpng:=
-	media-libs/libsamplerate
-	sys-libs/zlib:=
-	virtual/glu
-	virtual/jpeg
-	virtual/libintl
-	virtual/opengl
-	alembic? ( >=media-gfx/alembic-1.7.12[boost(+),hdf(+)] )
-	collada? ( >=media-libs/opencollada-1.6.68 )
-	color-management? ( <media-libs/opencolorio-2.0.0 )
-	cuda? ( dev-util/nvidia-cuda-toolkit:= )
-	ffmpeg? ( media-video/ffmpeg:=[x264,mp3,encode,theora,jpeg2k,vpx,vorbis,opus,xvid] )
-	fftw? ( sci-libs/fftw:3.0= )
-	!headless? (
-		x11-libs/libX11
-		x11-libs/libXi
-		x11-libs/libXxf86vm
-	)
-	jack? ( virtual/jack )
-	jemalloc? ( dev-libs/jemalloc:= )
-	jpeg2k? ( media-libs/openjpeg:2= )
-	ndof? (
-		app-misc/spacenavd
-		dev-libs/libspnav
-	)
-	nls? ( virtual/libiconv )
-	openal? ( media-libs/openal )
-	opencl? ( virtual/opencl )
-	openimageio? ( >=media-libs/openimageio-2.2.13.1:= )
-	openexr? (
-		media-libs/ilmbase:=
-		media-libs/openexr:=
-	)
-	opensubdiv? ( >=media-libs/opensubdiv-3.4.0[cuda=,opencl=] )
-	openvdb? (
-		>=media-gfx/openvdb-7.0.0
-		dev-libs/c-blosc:=
-	)
-	osl? ( <media-libs/osl-1.11.0 )
-	sdl? ( media-libs/libsdl2[sound,joystick] )
-	sndfile? ( media-libs/libsndfile )
-	tbb? ( <dev-cpp/tbb-2021.4.0:= )
-	tiff? ( media-libs/tiff )
-	valgrind? ( dev-util/valgrind )
-"
-
-DEPEND="${RDEPEND}
-	dev-cpp/eigen:=
-"
-
-BDEPEND="
-	virtual/pkgconfig
-	doc? (
-		app-doc/doxygen[dot]
-		dev-python/sphinx[latex]
-		dev-texlive/texlive-bibtexextra
-		dev-texlive/texlive-fontsextra
-		dev-texlive/texlive-fontutils
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-latexextra
-	)
-	nls? ( sys-devel/gettext )
-"
-
-PATCHES=(
-	"${FILESDIR}/blender-2.83.6-libmv_eigen_alignment.patch"
-	"${FILESDIR}/blender-2.83.6-constraints_test.patch"
-	"${FILESDIR}/blender-2.83.6-fix_opevdb_abi.patch"
-	"${FILESDIR}/blender-2.83.13-ffmpeg-4_4.patch"
-)
-
-blender_check_requirements() {
-	[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
-
-	if use doc; then
-		CHECKREQS_DISK_BUILD="4G" check-reqs_pkg_pretend
-	fi
-}
-
-blender_get_version() {
-	# Get blender version from blender itself.
-	BV=$(grep "BLENDER_VERSION " source/blender/blenkernel/BKE_blender_version.h | cut -d " " -f 3; assert)
-	# Add period.
-	BV=${BV:0:1}.${BV:1}
-}
-
-pkg_pretend() {
-	blender_check_requirements
-}
-
-pkg_setup() {
-	blender_check_requirements
-	python-single-r1_pkg_setup
-}
-
-src_unpack() {
-	if [[ ${PV} = *9999* ]] ; then
-		git-r3_src_unpack
-	else
-		default
-	fi
-
-	if use test; then
-		mkdir -p lib || die
-		mv "${WORKDIR}"/blender-${TEST_TARBALL_VERSION}-tests/tests lib || die
-	fi
-}
-
-src_prepare() {
-	cmake_src_prepare
-
-	blender_get_version
-
-	# 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
-
-	# Prepare icons and .desktop files for slotting.
-	sed -e "s|blender.svg|blender-${BV}.svg|" -i source/creator/CMakeLists.txt || die
-	sed -e "s|blender-symbolic.svg|blender-${BV}-symbolic.svg|" -i source/creator/CMakeLists.txt || die
-	sed -e "s|blender.desktop|blender-${BV}.desktop|" -i source/creator/CMakeLists.txt || die
-	sed -e "s|blender-thumbnailer.py|blender-${BV}-thumbnailer.py|" -i source/creator/CMakeLists.txt || die
-
-	sed -e "s|Name=Blender|Name=Blender ${PV}|" -i release/freedesktop/blender.desktop || die
-	sed -e "s|Exec=blender|Exec=blender-${BV}|" -i release/freedesktop/blender.desktop || die
-	sed -e "s|Icon=blender|Icon=blender-${BV}|" -i release/freedesktop/blender.desktop || die
-
-	mv release/freedesktop/icons/scalable/apps/blender.svg release/freedesktop/icons/scalable/apps/blender-${BV}.svg || die
-	mv 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/bin/blender-thumbnailer.py release/bin/blender-${BV}-thumbnailer.py || die
-
-	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|string(REPLACE.*|set(TEST_INSTALL_DIR ${ED}/usr/)|g" -i tests/CMakeLists.txt || die
-		sed -e "s|string(REPLACE.*|set(TEST_INSTALL_DIR ${ED}/usr/)|g" -i build_files/cmake/Modules/GTestTesting.cmake || die
-	fi
-}
-
-src_configure() {
-	# Without this the floating point math will differ when for example
-	# "-march=native" is set. This will make automated tests fail and we will
-	# not match the behaviour of some operators/modifiers with the official
-	# builds.
-	append-flags -ffp-contract=off
-	append-lfs-flags
-
-	local mycmakeargs=(
-		-DBUILD_SHARED_LIBS=OFF
-		-DPYTHON_INCLUDE_DIR="$(python_get_includedir)"
-		-DPYTHON_LIBRARY="$(python_get_library_path)"
-		-DPYTHON_VERSION="${EPYTHON/python/}"
-		-DWITH_ALEMBIC=$(usex alembic)
-		-DWITH_ASSERT_ABORT=$(usex debug)
-		-DWITH_BOOST=ON
-		-DWITH_BULLET=$(usex bullet)
-		-DWITH_CODEC_FFMPEG=$(usex ffmpeg)
-		-DWITH_CODEC_SNDFILE=$(usex sndfile)
-		-DWITH_CXX_GUARDEDALLOC=$(usex debug)
-		-DWITH_CYCLES_DEVICE_CUDA=$(usex cuda TRUE FALSE)
-		-DWITH_CYCLES=$(usex cycles)
-		-DWITH_CYCLES_DEVICE_OPENCL=$(usex opencl)
-		-DWITH_CYCLES_STANDALONE=$(usex standalone)
-		-DWITH_CYCLES_STANDALONE_GUI=$(usex standalone)
-		-DWITH_CYCLES_OSL=$(usex osl)
-		-DWITH_DOC_MANPAGE=$(usex man)
-		-DWITH_FFTW3=$(usex fftw)
-		-DWITH_GTESTS=$(usex test)
-		-DWITH_HEADLESS=$(usex headless)
-		-DWITH_INSTALL_PORTABLE=OFF
-		-DWITH_IMAGE_DDS=$(usex dds)
-		-DWITH_IMAGE_OPENEXR=$(usex openexr)
-		-DWITH_IMAGE_OPENJPEG=$(usex jpeg2k)
-		-DWITH_IMAGE_TIFF=$(usex tiff)
-		-DWITH_INPUT_NDOF=$(usex ndof)
-		-DWITH_INTERNATIONAL=$(usex nls)
-		-DWITH_JACK=$(usex jack)
-		-DWITH_MEM_JEMALLOC=$(usex jemalloc)
-		-DWITH_MEM_VALGRIND=$(usex valgrind)
-		-DWITH_MOD_FLUID=$(usex fluid)
-		-DWITH_MOD_OCEANSIM=$(usex fftw)
-		-DWITH_OPENAL=$(usex openal)
-		-DWITH_OPENCOLLADA=$(usex collada)
-		-DWITH_OPENCOLORIO=$(usex color-management)
-		-DWITH_OPENIMAGEIO=$(usex openimageio)
-		-DWITH_OPENMP=$(usex openmp)
-		-DWITH_OPENSUBDIV=$(usex opensubdiv)
-		-DWITH_OPENVDB=$(usex openvdb)
-		-DWITH_OPENVDB_BLOSC=$(usex openvdb)
-		-DWITH_PYTHON_INSTALL=$(usex system-python OFF ON)
-		-DWITH_PYTHON_INSTALL_NUMPY=$(usex system-numpy OFF ON)
-		-DWITH_SDL=$(usex sdl)
-		-DWITH_STATIC_LIBS=OFF
-		-DWITH_SYSTEM_EIGEN3=ON
-		-DWITH_SYSTEM_GLEW=ON
-		-DWITH_SYSTEM_LZO=ON
-		-DWITH_TBB=$(usex tbb)
-		-DWITH_USD=OFF
-	)
-	if ! use debug ; then
-		append-flags  -DNDEBUG
-	else
-		append-flags  -DDEBUG
-	fi
-	cmake_src_configure
-}
-
-src_compile() {
-	cmake_src_compile
-
-	if use doc; then
-		# Workaround for binary drivers.
-		addpredict /dev/ati
-		addpredict /dev/dri
-		addpredict /dev/nvidiactl
-
-		einfo "Generating Blender C/C++ API docs ..."
-		cd "${CMAKE_USE_DIR}"/doc/doxygen || die
-		doxygen -u Doxyfile || die
-		doxygen || die "doxygen failed to build API docs."
-
-		cd "${CMAKE_USE_DIR}" || die
-		einfo "Generating (BPY) Blender Python API docs ..."
-		"${BUILD_DIR}"/bin/blender --background --python doc/python_api/sphinx_doc_gen.py -noaudio || die "sphinx failed."
-
-		cd "${CMAKE_USE_DIR}"/doc/python_api || die
-		sphinx-build sphinx-in BPY_API || die "sphinx failed."
-	fi
-}
-
-src_test() {
-	# A lot of tests needs to have access to the installed data files.
-	# So install them into the image directory now.
-	cmake_src_install
-
-	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
-
-	# NOTE: The 'modifiers' test will fail if opensubdiv was compiled with -march=native
-	# This this is fixed in blender version 2.92 and up."
-	cmake_src_test
-
-	# Clean up the image directory for src_install
-	rm -fr ${ED}/* || die
-}
-
-src_install() {
-	blender_get_version
-
-	# Pax mark blender for hardened support.
-	pax-mark m "${BUILD_DIR}"/bin/blender
-
-	if use standalone; then
-		dobin "${BUILD_DIR}"/bin/cycles
-	fi
-
-	if use doc; then
-		docinto "html/API/python"
-		dodoc -r "${CMAKE_USE_DIR}"/doc/python_api/BPY_API/.
-
-		docinto "html/API/blender"
-		dodoc -r "${CMAKE_USE_DIR}"/doc/doxygen/html/.
-	fi
-
-	cmake_src_install
-
-	if use man; then
-		# Slot the man page
-		mv "${ED}/usr/share/man/man1/blender.1" "${ED}/usr/share/man/man1/blender-${BV}.1" || die
-	fi
-
-	# Fix doc installdir
-	docinto html
-	dodoc "${CMAKE_USE_DIR}"/release/text/readme.html
-	rm -r "${ED}"/usr/share/doc/blender || die
-
-	python_fix_shebang "${ED}/usr/bin/blender-${BV}-thumbnailer.py"
-	python_optimize "${ED}/usr/share/blender/${BV}/scripts"
-
-	mv "${ED}/usr/bin/blender" "${ED}/usr/bin/blender-${BV}" || die
-}
-
-pkg_postinst() {
-	elog
-	elog "Blender uses python integration. As such, may have some"
-	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"
-	elog "home directory. This can be done by starting blender, then"
-	elog "changing the 'Temporary Files' directory in Blender preferences."
-	elog
-	ewarn
-	ewarn "This ebuild does not unbundle the massive amount of 3rd party"
-	ewarn "libraries which are shipped with blender. Note that"
-	ewarn "these have caused security issues in the past."
-	ewarn "If you are concerned about security, file a bug upstream:"
-	ewarn "  https://developer.blender.org/"
-	ewarn
-
-	elog "You are building Blender with a newer python version than"
-	elog "supported by this version upstream."
-	elog "If you experience breakages with e.g. plugins, please download"
-	elog "the official Blender LTS binary release instead."
-	elog "Bug: https://bugs.gentoo.org/737388"
-	elog
-
-	xdg_icon_cache_update
-	xdg_mimeinfo_database_update
-	xdg_desktop_database_update
-}
-
-pkg_postrm() {
-	xdg_icon_cache_update
-	xdg_mimeinfo_database_update
-	xdg_desktop_database_update
-
-	ewarn ""
-	ewarn "You may want to remove the following directory."
-	ewarn "~/.config/${PN}/${SLOT}/cache/"
-	ewarn "It may contain extra render kernels not tracked by portage"
-	ewarn ""
-}

diff --git a/media-gfx/blender/blender-2.83.17-r1.ebuild b/media-gfx/blender/blender-2.83.17-r1.ebuild
deleted file mode 100644
index 6c6548cf0f7..00000000000
--- a/media-gfx/blender/blender-2.83.17-r1.ebuild
+++ /dev/null
@@ -1,377 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_8 )
-
-inherit check-reqs cmake flag-o-matic pax-utils python-single-r1 toolchain-funcs xdg-utils
-
-DESCRIPTION="3D Creation/Animation/Publishing System"
-HOMEPAGE="https://www.blender.org"
-
-if [[ ${PV} = *9999* ]] ; then
-	inherit git-r3
-	EGIT_REPO_URI="https://git.blender.org/blender.git"
-else
-	SRC_URI="https://download.blender.org/source/${P}.tar.xz"
-	TEST_TARBALL_VERSION=2.83.1
-	SRC_URI+=" test? ( https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PN}-${TEST_TARBALL_VERSION}-tests.tar.bz2 )"
-	KEYWORDS="~amd64 ~x86"
-fi
-
-SLOT="${PV%.*}"
-LICENSE="|| ( GPL-3 BL )"
-IUSE="+bullet +dds +fluid +openexr +system-python +system-numpy +tbb \
-	alembic collada +color-management cuda cycles \
-	debug doc ffmpeg fftw headless jack jemalloc jpeg2k \
-	man ndof nls openal opencl openimageio openmp opensubdiv \
-	openvdb osl sdl sndfile standalone test tiff valgrind"
-RESTRICT="!test? ( test )"
-
-REQUIRED_USE="${PYTHON_REQUIRED_USE}
-	alembic? ( openexr )
-	cuda? ( cycles )
-	cycles? ( openexr tiff openimageio )
-	fluid? ( tbb )
-	opencl? ( cycles )
-	openvdb? ( tbb )
-	osl? ( cycles )
-	standalone? ( cycles )
-	test? ( color-management osl )"
-
-# Library versions for official builds can be found in the blender source directory in:
-# build_files/build_environment/install_deps.sh
-RDEPEND="${PYTHON_DEPS}
-	dev-libs/boost:=[nls?,threads(+)]
-	dev-libs/lzo:2=
-	$(python_gen_cond_dep '
-		dev-python/numpy[${PYTHON_USEDEP}]
-		dev-python/requests[${PYTHON_USEDEP}]
-	')
-	media-libs/freetype:=
-	media-libs/glew:*
-	media-libs/libpng:=
-	media-libs/libsamplerate
-	sys-libs/zlib:=
-	virtual/glu
-	virtual/jpeg
-	virtual/libintl
-	virtual/opengl
-	alembic? ( >=media-gfx/alembic-1.7.12[boost(+),hdf(+)] )
-	collada? ( >=media-libs/opencollada-1.6.68 )
-	color-management? ( <media-libs/opencolorio-2.0.0 )
-	cuda? ( dev-util/nvidia-cuda-toolkit:= )
-	ffmpeg? ( media-video/ffmpeg:=[x264,mp3,encode,theora,jpeg2k,vpx,vorbis,opus,xvid] )
-	fftw? ( sci-libs/fftw:3.0= )
-	!headless? (
-		x11-libs/libX11
-		x11-libs/libXi
-		x11-libs/libXxf86vm
-	)
-	jack? ( virtual/jack )
-	jemalloc? ( dev-libs/jemalloc:= )
-	jpeg2k? ( media-libs/openjpeg:2= )
-	ndof? (
-		app-misc/spacenavd
-		dev-libs/libspnav
-	)
-	nls? ( virtual/libiconv )
-	openal? ( media-libs/openal )
-	opencl? ( virtual/opencl )
-	openimageio? ( >=media-libs/openimageio-2.2.13.1:= )
-	openexr? (
-		media-libs/ilmbase:=
-		media-libs/openexr:=
-	)
-	opensubdiv? ( >=media-libs/opensubdiv-3.4.0[cuda=,opencl=] )
-	openvdb? (
-		>=media-gfx/openvdb-7.0.0
-		dev-libs/c-blosc:=
-	)
-	osl? ( <media-libs/osl-1.11.0 )
-	sdl? ( media-libs/libsdl2[sound,joystick] )
-	sndfile? ( media-libs/libsndfile )
-	tbb? ( <dev-cpp/tbb-2021.4.0:= )
-	tiff? ( media-libs/tiff )
-	valgrind? ( dev-util/valgrind )
-"
-
-DEPEND="${RDEPEND}
-	dev-cpp/eigen:=
-"
-
-BDEPEND="
-	virtual/pkgconfig
-	doc? (
-		app-doc/doxygen[dot]
-		dev-python/sphinx[latex]
-		dev-texlive/texlive-bibtexextra
-		dev-texlive/texlive-fontsextra
-		dev-texlive/texlive-fontutils
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-latexextra
-	)
-	nls? ( sys-devel/gettext )
-"
-
-PATCHES=(
-	"${FILESDIR}/blender-2.83.6-libmv_eigen_alignment.patch"
-	"${FILESDIR}/blender-2.83.6-constraints_test.patch"
-	"${FILESDIR}/blender-2.83.6-fix_opevdb_abi.patch"
-	"${FILESDIR}/blender-2.83.13-ffmpeg-4_4.patch"
-)
-
-blender_check_requirements() {
-	[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
-
-	if use doc; then
-		CHECKREQS_DISK_BUILD="4G" check-reqs_pkg_pretend
-	fi
-}
-
-blender_get_version() {
-	# Get blender version from blender itself.
-	BV=$(grep "BLENDER_VERSION " source/blender/blenkernel/BKE_blender_version.h | cut -d " " -f 3; assert)
-	# Add period.
-	BV=${BV:0:1}.${BV:1}
-}
-
-pkg_pretend() {
-	blender_check_requirements
-}
-
-pkg_setup() {
-	blender_check_requirements
-	python-single-r1_pkg_setup
-}
-
-src_unpack() {
-	if [[ ${PV} = *9999* ]] ; then
-		git-r3_src_unpack
-	else
-		default
-	fi
-
-	if use test; then
-		mkdir -p lib || die
-		mv "${WORKDIR}"/blender-${TEST_TARBALL_VERSION}-tests/tests lib || die
-	fi
-}
-
-src_prepare() {
-	cmake_src_prepare
-
-	blender_get_version
-
-	# 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
-
-	# Prepare icons and .desktop files for slotting.
-	sed -e "s|blender.svg|blender-${BV}.svg|" -i source/creator/CMakeLists.txt || die
-	sed -e "s|blender-symbolic.svg|blender-${BV}-symbolic.svg|" -i source/creator/CMakeLists.txt || die
-	sed -e "s|blender.desktop|blender-${BV}.desktop|" -i source/creator/CMakeLists.txt || die
-	sed -e "s|blender-thumbnailer.py|blender-${BV}-thumbnailer.py|" -i source/creator/CMakeLists.txt || die
-
-	sed -e "s|Name=Blender|Name=Blender ${PV}|" -i release/freedesktop/blender.desktop || die
-	sed -e "s|Exec=blender|Exec=blender-${BV}|" -i release/freedesktop/blender.desktop || die
-	sed -e "s|Icon=blender|Icon=blender-${BV}|" -i release/freedesktop/blender.desktop || die
-
-	mv release/freedesktop/icons/scalable/apps/blender.svg release/freedesktop/icons/scalable/apps/blender-${BV}.svg || die
-	mv 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/bin/blender-thumbnailer.py release/bin/blender-${BV}-thumbnailer.py || die
-
-	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|string(REPLACE.*|set(TEST_INSTALL_DIR ${ED}/usr/)|g" -i tests/CMakeLists.txt || die
-		sed -e "s|string(REPLACE.*|set(TEST_INSTALL_DIR ${ED}/usr/)|g" -i build_files/cmake/Modules/GTestTesting.cmake || die
-	fi
-}
-
-src_configure() {
-	# Without this the floating point math will differ when for example
-	# "-march=native" is set. This will make automated tests fail and we will
-	# not match the behaviour of some operators/modifiers with the official
-	# builds.
-	append-flags -ffp-contract=off
-	append-lfs-flags
-
-	local mycmakeargs=(
-		-DBUILD_SHARED_LIBS=OFF
-		-DPYTHON_INCLUDE_DIR="$(python_get_includedir)"
-		-DPYTHON_LIBRARY="$(python_get_library_path)"
-		-DPYTHON_VERSION="${EPYTHON/python/}"
-		-DWITH_ALEMBIC=$(usex alembic)
-		-DWITH_ASSERT_ABORT=$(usex debug)
-		-DWITH_BOOST=ON
-		-DWITH_BULLET=$(usex bullet)
-		-DWITH_CODEC_FFMPEG=$(usex ffmpeg)
-		-DWITH_CODEC_SNDFILE=$(usex sndfile)
-		-DWITH_CXX_GUARDEDALLOC=$(usex debug)
-		-DWITH_CYCLES_DEVICE_CUDA=$(usex cuda TRUE FALSE)
-		-DWITH_CYCLES=$(usex cycles)
-		-DWITH_CYCLES_DEVICE_OPENCL=$(usex opencl)
-		-DWITH_CYCLES_STANDALONE=$(usex standalone)
-		-DWITH_CYCLES_STANDALONE_GUI=$(usex standalone)
-		-DWITH_CYCLES_OSL=$(usex osl)
-		-DWITH_DOC_MANPAGE=$(usex man)
-		-DWITH_FFTW3=$(usex fftw)
-		-DWITH_GTESTS=$(usex test)
-		-DWITH_HEADLESS=$(usex headless)
-		-DWITH_INSTALL_PORTABLE=OFF
-		-DWITH_IMAGE_DDS=$(usex dds)
-		-DWITH_IMAGE_OPENEXR=$(usex openexr)
-		-DWITH_IMAGE_OPENJPEG=$(usex jpeg2k)
-		-DWITH_IMAGE_TIFF=$(usex tiff)
-		-DWITH_INPUT_NDOF=$(usex ndof)
-		-DWITH_INTERNATIONAL=$(usex nls)
-		-DWITH_JACK=$(usex jack)
-		-DWITH_MEM_JEMALLOC=$(usex jemalloc)
-		-DWITH_MEM_VALGRIND=$(usex valgrind)
-		-DWITH_MOD_FLUID=$(usex fluid)
-		-DWITH_MOD_OCEANSIM=$(usex fftw)
-		-DWITH_OPENAL=$(usex openal)
-		-DWITH_OPENCOLLADA=$(usex collada)
-		-DWITH_OPENCOLORIO=$(usex color-management)
-		-DWITH_OPENIMAGEIO=$(usex openimageio)
-		-DWITH_OPENMP=$(usex openmp)
-		-DWITH_OPENSUBDIV=$(usex opensubdiv)
-		-DWITH_OPENVDB=$(usex openvdb)
-		-DWITH_OPENVDB_BLOSC=$(usex openvdb)
-		-DWITH_PYTHON_INSTALL=$(usex system-python OFF ON)
-		-DWITH_PYTHON_INSTALL_NUMPY=$(usex system-numpy OFF ON)
-		-DWITH_SDL=$(usex sdl)
-		-DWITH_STATIC_LIBS=OFF
-		-DWITH_SYSTEM_EIGEN3=ON
-		-DWITH_SYSTEM_GLEW=ON
-		-DWITH_SYSTEM_LZO=ON
-		-DWITH_TBB=$(usex tbb)
-		-DWITH_USD=OFF
-	)
-	append-flags $(usex debug '-DDEBUG' '-DNDEBUG')
-
-	cmake_src_configure
-}
-
-src_compile() {
-	cmake_src_compile
-
-	if use doc; then
-		# Workaround for binary drivers.
-		addpredict /dev/ati
-		addpredict /dev/dri
-		addpredict /dev/nvidiactl
-
-		einfo "Generating Blender C/C++ API docs ..."
-		cd "${CMAKE_USE_DIR}"/doc/doxygen || die
-		doxygen -u Doxyfile || die
-		doxygen || die "doxygen failed to build API docs."
-
-		cd "${CMAKE_USE_DIR}" || die
-		einfo "Generating (BPY) Blender Python API docs ..."
-		"${BUILD_DIR}"/bin/blender --background --python doc/python_api/sphinx_doc_gen.py -noaudio || die "sphinx failed."
-
-		cd "${CMAKE_USE_DIR}"/doc/python_api || die
-		sphinx-build sphinx-in BPY_API || die "sphinx failed."
-	fi
-}
-
-src_test() {
-	# A lot of tests needs to have access to the installed data files.
-	# So install them into the image directory now.
-	cmake_src_install
-
-	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
-
-	# NOTE: The 'modifiers' test will fail if opensubdiv was compiled with -march=native
-	# This this is fixed in blender version 2.92 and up."
-	cmake_src_test
-
-	# Clean up the image directory for src_install
-	rm -fr ${ED}/* || die
-}
-
-src_install() {
-	blender_get_version
-
-	# Pax mark blender for hardened support.
-	pax-mark m "${BUILD_DIR}"/bin/blender
-
-	if use standalone; then
-		dobin "${BUILD_DIR}"/bin/cycles
-	fi
-
-	if use doc; then
-		docinto "html/API/python"
-		dodoc -r "${CMAKE_USE_DIR}"/doc/python_api/BPY_API/.
-
-		docinto "html/API/blender"
-		dodoc -r "${CMAKE_USE_DIR}"/doc/doxygen/html/.
-	fi
-
-	cmake_src_install
-
-	if use man; then
-		# Slot the man page
-		mv "${ED}/usr/share/man/man1/blender.1" "${ED}/usr/share/man/man1/blender-${BV}.1" || die
-	fi
-
-	# Fix doc installdir
-	docinto html
-	dodoc "${CMAKE_USE_DIR}"/release/text/readme.html
-	rm -r "${ED}"/usr/share/doc/blender || die
-
-	python_fix_shebang "${ED}/usr/bin/blender-${BV}-thumbnailer.py"
-	python_optimize "${ED}/usr/share/blender/${BV}/scripts"
-
-	mv "${ED}/usr/bin/blender" "${ED}/usr/bin/blender-${BV}" || die
-}
-
-pkg_postinst() {
-	elog
-	elog "Blender uses python integration. As such, may have some"
-	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"
-	elog "home directory. This can be done by starting blender, then"
-	elog "changing the 'Temporary Files' directory in Blender preferences."
-	elog
-	ewarn
-	ewarn "This ebuild does not unbundle the massive amount of 3rd party"
-	ewarn "libraries which are shipped with blender. Note that"
-	ewarn "these have caused security issues in the past."
-	ewarn "If you are concerned about security, file a bug upstream:"
-	ewarn "  https://developer.blender.org/"
-	ewarn
-
-	elog "You are building Blender with a newer python version than"
-	elog "supported by this version upstream."
-	elog "If you experience breakages with e.g. plugins, please download"
-	elog "the official Blender LTS binary release instead."
-	elog "Bug: https://bugs.gentoo.org/737388"
-	elog
-
-	xdg_icon_cache_update
-	xdg_mimeinfo_database_update
-	xdg_desktop_database_update
-}
-
-pkg_postrm() {
-	xdg_icon_cache_update
-	xdg_mimeinfo_database_update
-	xdg_desktop_database_update
-
-	ewarn ""
-	ewarn "You may want to remove the following directory."
-	ewarn "~/.config/${PN}/${SLOT}/cache/"
-	ewarn "It may contain extra render kernels not tracked by portage"
-	ewarn ""
-}

diff --git a/media-gfx/blender/files/blender-2.83.13-ffmpeg-4_4.patch b/media-gfx/blender/files/blender-2.83.13-ffmpeg-4_4.patch
deleted file mode 100644
index bf857967588..00000000000
--- a/media-gfx/blender/files/blender-2.83.13-ffmpeg-4_4.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 9cdf11676ecd753fd86c3d8057c2375174ef0a70 Mon Sep 17 00:00:00 2001
-From: Sebastian Parborg <darkdefende@gmail.com>
-Date: Fri, 7 May 2021 16:51:28 +0200
-Subject: [PATCH] Fix: No sound is exported with ffmpeg 4.4
-
-We were not assigning the amount of sound channels to the output frames.
-Newer ffmpeg releases has sanity checks in place and doesn't fall back
-to two channels anymore.
----
- source/blender/blenkernel/intern/writeffmpeg.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c
-index 7fc9e8cc0ef..e5550cee124 100644
---- a/source/blender/blenkernel/intern/writeffmpeg.c
-+++ b/source/blender/blenkernel/intern/writeffmpeg.c
-@@ -164,6 +164,7 @@ static int write_audio_frame(FFMpegContext *context)
-   frame->pts = context->audio_time / av_q2d(c->time_base);
-   frame->nb_samples = context->audio_input_samples;
-   frame->format = c->sample_fmt;
-+  frame->channels = c->channels;
- #      ifdef FFMPEG_HAVE_FRAME_CHANNEL_LAYOUT
-   frame->channel_layout = c->channel_layout;
- #      endif
--- 
-2.26.3
-

diff --git a/media-gfx/blender/files/blender-2.83.6-constraints_test.patch b/media-gfx/blender/files/blender-2.83.6-constraints_test.patch
deleted file mode 100644
index ab1e9a6d2d4..00000000000
--- a/media-gfx/blender/files/blender-2.83.6-constraints_test.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/tests/python/bl_constraints.py b/tests/python/bl_constraints.py
-index 323dd874ac0..7cbc46d680a 100644
---- a/tests/python/bl_constraints.py
-+++ b/tests/python/bl_constraints.py
-@@ -44,7 +44,7 @@ class AbstractConstraintTests(unittest.TestCase):
-             collection = top_collection.children[self.layer_collection]
-             collection.exclude = False
- 
--    def assert_matrix(self, actual_matrix, expect_matrix, object_name: str, places=6, delta=None):
-+    def assert_matrix(self, actual_matrix, expect_matrix, object_name: str, places=None, delta=1e-6):
-         """Asserts that the matrices almost equal."""
-         self.assertEqual(len(actual_matrix), 4, 'Expected a 4x4 matrix')
- 

diff --git a/media-gfx/blender/files/blender-2.83.6-fix_opevdb_abi.patch b/media-gfx/blender/files/blender-2.83.6-fix_opevdb_abi.patch
deleted file mode 100644
index b7537f97fc0..00000000000
--- a/media-gfx/blender/files/blender-2.83.6-fix_opevdb_abi.patch
+++ /dev/null
@@ -1,21 +0,0 @@
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -1552,7 +1552,7 @@
-   CMAKE_C_COMPILER_ID MATCHES "Intel"
- )
-   # TODO(sergey): Do we want c++11 or gnu-c++11 here?
--  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
-+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
- else()
-   message(FATAL_ERROR "Unknown compiler ${CMAKE_C_COMPILER_ID}, can't enable C++11 build")
- endif()
---- a/extern/mantaflow/CMakeLists.txt
-+++ b/extern/mantaflow/CMakeLists.txt
-@@ -51,7 +51,6 @@
-
- if(WITH_OPENVDB)
-   add_definitions(-DOPENVDB=1)
--  add_definitions(-DOPENVDB_STATICLIB)
- endif()
-
- if(WIN32

diff --git a/media-gfx/blender/files/blender-2.83.6-libmv_eigen_alignment.patch b/media-gfx/blender/files/blender-2.83.6-libmv_eigen_alignment.patch
deleted file mode 100644
index 1392510a23a..00000000000
--- a/media-gfx/blender/files/blender-2.83.6-libmv_eigen_alignment.patch
+++ /dev/null
@@ -1,219 +0,0 @@
-diff --git a/intern/libmv/libmv/base/vector.h b/intern/libmv/libmv/base/vector.h
-index bdc4392155c..300291c5679 100644
---- a/intern/libmv/libmv/base/vector.h
-+++ b/intern/libmv/libmv/base/vector.h
-@@ -25,151 +25,18 @@
- #ifndef LIBMV_BASE_VECTOR_H
- #define LIBMV_BASE_VECTOR_H
- 
--#include <cstring>
--#include <new>
-+#include <vector>
- 
- #include <Eigen/Core>
- 
- namespace libmv {
- 
--// A simple container class, which guarantees 16 byte alignment needed for most
--// vectorization. Don't use this container for classes that cannot be copied
--// via memcpy.
--// FIXME: this class has some issues:
--// - doesn't support iterators.
--// - impede compatibility with code using STL.
--// - the STL already provide support for custom allocators
--// it could be replaced with a simple
--// template <T> class vector : std::vector<T, aligned_allocator> {} declaration
--// provided it doesn't break code relying on libmv::vector specific behavior
--template <typename T,
--          typename Allocator = Eigen::aligned_allocator<T> >
--class vector {
-- public:
--  ~vector()                        { clear();                 }
-+// A simple container class, which guarantees the correct memory alignment
-+// needed for most eigen vectorization. Don't use this container for classes
-+// that cannot be copied via memcpy.
- 
--  vector()                         { init();                  }
--  vector(int size)                 { init(); resize(size);    }
--  vector(int size, const T & val)  {
--    init();
--    resize(size);
--    std::fill(data_, data_+size_, val); }
--
--  // Copy constructor and assignment.
--  vector(const vector<T, Allocator> &rhs) {
--    init();
--    copy(rhs);
--  }
--  vector<T, Allocator> &operator=(const vector<T, Allocator> &rhs) {
--    if (&rhs != this) {
--      copy(rhs);
--    }
--    return *this;
--  }
--
--  /// Swaps the contents of two vectors in constant time.
--  void swap(vector<T, Allocator> &other) {
--    std::swap(allocator_, other.allocator_);
--    std::swap(size_, other.size_);
--    std::swap(capacity_, other.capacity_);
--    std::swap(data_, other.data_);
--  }
--
--        T *data()            const { return data_;            }
--  int      size()            const { return size_;            }
--  int      capacity()        const { return capacity_;        }
--  const T& back()            const { return data_[size_ - 1]; }
--        T& back()                  { return data_[size_ - 1]; }
--  const T& front()           const { return data_[0];         }
--        T& front()                 { return data_[0];         }
--  const T& operator[](int n) const { return data_[n];         }
--        T& operator[](int n)       { return data_[n];         }
--  const T& at(int n)         const { return data_[n];         }
--        T& at(int n)               { return data_[n];         }
--  const T * begin()          const { return data_;            }
--  const T * end()            const { return data_+size_;      }
--        T * begin()                { return data_;            }
--        T * end()                  { return data_+size_;      }
--
--  void resize(size_t size) {
--    reserve(size);
--    if (size > size_) {
--      construct(size_, size);
--    } else if (size < size_) {
--      destruct(size, size_);
--    }
--    size_ = size;
--  }
--
--  void push_back(const T &value) {
--    if (size_ == capacity_) {
--      reserve(size_ ? 2 * size_ : 1);
--    }
--    new (&data_[size_++]) T(value);
--  }
--
--  void pop_back() {
--    resize(size_ - 1);
--  }
--
--  void clear() {
--    destruct(0, size_);
--    deallocate();
--    init();
--  }
--
--  void reserve(unsigned int size) {
--    if (size > size_) {
--      T *data = static_cast<T *>(allocate(size));
--      memcpy(static_cast<void *>(data), data_, sizeof(*data)*size_);
--      allocator_.deallocate(data_, capacity_);
--      data_ = data;
--      capacity_ = size;
--    }
--  }
--
--  bool empty() {
--    return size_ == 0;
--  }
--
-- private:
--  void construct(int start, int end) {
--    for (int i = start; i < end; ++i) {
--      new (&data_[i]) T;
--    }
--  }
--  void destruct(int start, int end) {
--    for (int i = start; i < end; ++i) {
--      data_[i].~T();
--    }
--  }
--  void init() {
--    size_ = 0;
--    data_ = 0;
--    capacity_ = 0;
--  }
--
--  void *allocate(int size) {
--    return size ? allocator_.allocate(size) : 0;
--  }
--
--  void deallocate() {
--    allocator_.deallocate(data_, size_);
--    data_ = 0;
--  }
--
--  void copy(const vector<T, Allocator> &rhs) {
--    resize(rhs.size());
--    for (int i = 0; i < rhs.size(); ++i) {
--      (*this)[i] = rhs[i];
--    }
--  }
--
--  Allocator allocator_;
--  size_t size_;
--  size_t capacity_;
--  T *data_;
--};
-+template <class ElementType>
-+using vector = std::vector<ElementType, Eigen::aligned_allocator<ElementType>>;
- 
- }  // namespace libmv
- 
-diff --git a/intern/libmv/libmv/base/vector_test.cc b/intern/libmv/libmv/base/vector_test.cc
-index f17718c3926..44b9a152148 100644
---- a/intern/libmv/libmv/base/vector_test.cc
-+++ b/intern/libmv/libmv/base/vector_test.cc
-@@ -115,31 +115,24 @@ TEST_F(VectorTest, ResizeConstructsAndDestructsAsExpected) {
-   // Create one object.
-   v.resize(1);
-   EXPECT_EQ(1, v.size());
--  EXPECT_EQ(1, v.capacity());
-   EXPECT_EQ(1, foo_construct_calls);
--  EXPECT_EQ(0, foo_destruct_calls);
-   EXPECT_EQ(5, v[0].value);
- 
-   // Create two more.
-   v.resize(3);
-   EXPECT_EQ(3, v.size());
--  EXPECT_EQ(3, v.capacity());
-   EXPECT_EQ(3, foo_construct_calls);
--  EXPECT_EQ(0, foo_destruct_calls);
- 
-   // Delete the last one.
-   v.resize(2);
-   EXPECT_EQ(2, v.size());
-   EXPECT_EQ(3, v.capacity());
-   EXPECT_EQ(3, foo_construct_calls);
--  EXPECT_EQ(1, foo_destruct_calls);
- 
-   // Delete the remaining two.
-   v.resize(0);
-   EXPECT_EQ(0, v.size());
--  EXPECT_EQ(3, v.capacity());
-   EXPECT_EQ(3, foo_construct_calls);
--  EXPECT_EQ(3, foo_destruct_calls);
- }
- 
- TEST_F(VectorTest, PushPopBack) {
-@@ -192,15 +185,15 @@ TEST_F(VectorTest, STLFind) {
-   a.push_back(5);
-   a.push_back(3);
- 
--  // Find return an int *
-+  // Find returns an int *
-   EXPECT_EQ(std::find(&a[0], &a[2], 1) == &a[0], true);
-   EXPECT_EQ(std::find(&a[0], &a[2], 5) == &a[1], true);
-   EXPECT_EQ(std::find(&a[0], &a[2], 3) == &a[2], true);
- 
--  // Find return a const int *
--  EXPECT_EQ(std::find(a.begin(), a.end(), 1) == &a[0], true);
--  EXPECT_EQ(std::find(a.begin(), a.end(), 5) == &a[1], true);
--  EXPECT_EQ(std::find(a.begin(), a.end(), 3) == &a[2], true);
-+  // Find returns an interator
-+  EXPECT_EQ(std::find(a.begin(), a.end(), 1) == std::next(a.begin(), 0), true);
-+  EXPECT_EQ(std::find(a.begin(), a.end(), 5) == std::next(a.begin(), 1), true);
-+  EXPECT_EQ(std::find(a.begin(), a.end(), 3) == std::next(a.begin(), 2), true);
- 
-   // Search value that are not in the vector
-   EXPECT_EQ(std::find(a.begin(), a.end(), 0) == a.end(), true);


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/blender/, media-gfx/blender/files/
@ 2021-12-04  0:54 Sam James
  0 siblings, 0 replies; 21+ messages in thread
From: Sam James @ 2021-12-04  0:54 UTC (permalink / raw
  To: gentoo-commits

commit:     872bf6f1f8baed1e7f76ef593df2b87da9a0eac8
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Dec  4 00:53:59 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Dec  4 00:54:19 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=872bf6f1

media-gfx/blender: fix linking against libXxf86vm

See: https://developer.blender.org/D13464
Signed-off-by: Sam James <sam <AT> gentoo.org>

 media-gfx/blender/blender-3.0.0.ebuild             |  4 +++
 ...ntern-ghost-fix-typo-in-finding-XF86VMODE.patch | 31 ++++++++++++++++++++++
 2 files changed, 35 insertions(+)

diff --git a/media-gfx/blender/blender-3.0.0.ebuild b/media-gfx/blender/blender-3.0.0.ebuild
index ad4ed0c1d319..65bfc2f8e6d4 100644
--- a/media-gfx/blender/blender-3.0.0.ebuild
+++ b/media-gfx/blender/blender-3.0.0.ebuild
@@ -123,6 +123,10 @@ BDEPEND="
 	nls? ( sys-devel/gettext )
 "
 
+PATCHES=(
+	"${FILESDIR}"/${P}-intern-ghost-fix-typo-in-finding-XF86VMODE.patch
+)
+
 blender_check_requirements() {
 	[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
 

diff --git a/media-gfx/blender/files/blender-3.0.0-intern-ghost-fix-typo-in-finding-XF86VMODE.patch b/media-gfx/blender/files/blender-3.0.0-intern-ghost-fix-typo-in-finding-XF86VMODE.patch
new file mode 100644
index 000000000000..51d8ded23366
--- /dev/null
+++ b/media-gfx/blender/files/blender-3.0.0-intern-ghost-fix-typo-in-finding-XF86VMODE.patch
@@ -0,0 +1,31 @@
+https://developer.blender.org/D13464
+
+From 781c56f054b4c7717739752336427a811f7633eb Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Sat, 4 Dec 2021 00:38:59 +0000
+Subject: [PATCH] intern/ghost: fix typo in finding XF86VMODE
+
+---
+ intern/ghost/CMakeLists.txt | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/intern/ghost/CMakeLists.txt b/intern/ghost/CMakeLists.txt
+index 4164231..663598e 100644
+--- a/intern/ghost/CMakeLists.txt
++++ b/intern/ghost/CMakeLists.txt
+@@ -245,10 +245,10 @@ elseif(WITH_GHOST_X11 OR WITH_GHOST_WAYLAND)
+     if(WITH_X11_XF86VMODE)
+       add_definitions(-DWITH_X11_XF86VMODE)
+       list(APPEND INC_SYS
+-        ${X11_xf86vmode_INCLUDE_PATH}
++        ${X11_Xxf86vmode_INCLUDE_PATH}
+       )
+       list(APPEND LIB
+-        ${X11_Xf86vmode_LIB}
++        ${X11_Xxf86vmode_LIB}
+       )
+     endif()
+ 
+-- 
+2.34.1
+


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/blender/, media-gfx/blender/files/
@ 2022-02-12 15:01 Sam James
  0 siblings, 0 replies; 21+ messages in thread
From: Sam James @ 2022-02-12 15:01 UTC (permalink / raw
  To: gentoo-commits

commit:     065ec4efaff92d4abe6e55ecbc7c58ba1544d541
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 12 14:58:16 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Feb 12 14:58:16 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=065ec4ef

media-gfx/blender: force finding imath-3 in 2.93.8/3.0.1

We'd pick up media-libs/ilmbase even if we (probably) wouldn't
use it, so let's not do that, as we're switching to OpenEXR 3.

Bug: https://bugs.gentoo.org/832862
Closes: https://bugs.gentoo.org/833184
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../blender/{blender-2.93.8-r1.ebuild => blender-2.93.8-r2.ebuild}    | 0
 .../blender/{blender-3.0.1-r2.ebuild => blender-3.0.1-r3.ebuild}      | 0
 media-gfx/blender/files/blender-3.0.1-openexr.patch                   | 4 ++--
 3 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/media-gfx/blender/blender-2.93.8-r1.ebuild b/media-gfx/blender/blender-2.93.8-r2.ebuild
similarity index 100%
rename from media-gfx/blender/blender-2.93.8-r1.ebuild
rename to media-gfx/blender/blender-2.93.8-r2.ebuild

diff --git a/media-gfx/blender/blender-3.0.1-r2.ebuild b/media-gfx/blender/blender-3.0.1-r3.ebuild
similarity index 100%
rename from media-gfx/blender/blender-3.0.1-r2.ebuild
rename to media-gfx/blender/blender-3.0.1-r3.ebuild

diff --git a/media-gfx/blender/files/blender-3.0.1-openexr.patch b/media-gfx/blender/files/blender-3.0.1-openexr.patch
index b1ea45acc76e..3ff6b213b05f 100644
--- a/media-gfx/blender/files/blender-3.0.1-openexr.patch
+++ b/media-gfx/blender/files/blender-3.0.1-openexr.patch
@@ -12,8 +12,8 @@ index 09af546..dfe15cd 100644
  # Old versions (before 2.0?) do not have any version string, just assuming this should be fine though.
  SET(_openexr_libs_ver_init "2.0")
  
-+find_package(Imath CONFIG QUIET)
-+if(TARGET Imath::Imath)
++find_package(Imath-3 CONFIG QUIET)
++if(TARGET Imath-3::Imath)
 +SET(_openexr_FIND_COMPONENTS
 +  Imath
 +  Iex


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/blender/, media-gfx/blender/files/
@ 2022-02-15 19:51 Sam James
  0 siblings, 0 replies; 21+ messages in thread
From: Sam James @ 2022-02-15 19:51 UTC (permalink / raw
  To: gentoo-commits

commit:     22d23e6ab87569d482db5b5aad1f9e11d8c7c377
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 12 18:01:28 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Feb 15 19:49:50 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=22d23e6a

media-gfx/blender: adjust to unslotted OpenEXR

Bug: https://bugs.gentoo.org/833197
Bug: https://bugs.gentoo.org/828441
Bug: https://bugs.gentoo.org/833265
Bug: https://bugs.gentoo.org/833196
Bug: https://bugs.gentoo.org/833158
Bug: https://bugs.gentoo.org/831357
Bug: https://bugs.gentoo.org/832862
Bug: https://bugs.gentoo.org/821247
Signed-off-by: Sam James <sam <AT> gentoo.org>

 media-gfx/blender/blender-2.93.8-r2.ebuild         |   4 +-
 media-gfx/blender/blender-3.0.1-r3.ebuild          |   6 +-
 media-gfx/blender/blender-9999.ebuild              |   2 +-
 .../blender/files/blender-3.0.1-openexr.patch      | 161 +++++++++------------
 4 files changed, 75 insertions(+), 98 deletions(-)

diff --git a/media-gfx/blender/blender-2.93.8-r2.ebuild b/media-gfx/blender/blender-2.93.8-r2.ebuild
index 91f10fa0ecec..6de91d891438 100644
--- a/media-gfx/blender/blender-2.93.8-r2.ebuild
+++ b/media-gfx/blender/blender-2.93.8-r2.ebuild
@@ -43,8 +43,6 @@ REQUIRED_USE="${PYTHON_REQUIRED_USE}
 
 # Library versions for official builds can be found in the blender source directory in:
 # build_files/build_environment/install_deps.sh
-# We can use a lower version of OIO but we need a version we know we've
-# switched to OpenEXR 3.
 RDEPEND="${PYTHON_DEPS}
 	dev-libs/boost:=[nls?,threads(+)]
 	dev-libs/lzo:2=
@@ -88,7 +86,7 @@ RDEPEND="${PYTHON_DEPS}
 	openimageio? ( >=media-libs/openimageio-2.3.12.0:= )
 	openexr? (
 		dev-libs/imath:=
-		media-libs/openexr:3=
+		media-libs/openexr:=
 	)
 	opensubdiv? ( >=media-libs/opensubdiv-3.4.0[cuda=,opencl=] )
 	openvdb? (

diff --git a/media-gfx/blender/blender-3.0.1-r3.ebuild b/media-gfx/blender/blender-3.0.1-r3.ebuild
index ed6d2a645173..1d4c81b283d6 100644
--- a/media-gfx/blender/blender-3.0.1-r3.ebuild
+++ b/media-gfx/blender/blender-3.0.1-r3.ebuild
@@ -62,7 +62,7 @@ RDEPEND="${PYTHON_DEPS}
 	virtual/opengl
 	alembic? ( >=media-gfx/alembic-1.8.3-r2[boost(+),hdf(+)] )
 	collada? ( >=media-libs/opencollada-1.6.68 )
-	color-management? ( >=media-libs/opencolorio-2.1.1-r3:= )
+	color-management? ( >=media-libs/opencolorio-2.1.1-r4:= )
 	cuda? ( dev-util/nvidia-cuda-toolkit:= )
 	embree? ( >=media-libs/embree-3.10.0[raymask] )
 	ffmpeg? ( media-video/ffmpeg:=[x264,mp3,encode,theora,jpeg2k,vpx,vorbis,opus,xvid] )
@@ -83,10 +83,10 @@ RDEPEND="${PYTHON_DEPS}
 	nls? ( virtual/libiconv )
 	openal? ( media-libs/openal )
 	oidn? ( >=media-libs/oidn-1.4.1 )
-	openimageio? ( >=media-libs/openimageio-2.3.12.0:= )
+	openimageio? ( >=media-libs/openimageio-2.3.12.0-r1:= )
 	openexr? (
 		dev-libs/imath:=
-		media-libs/openexr:3=
+		media-libs/openexr:=
 	)
 	opensubdiv? ( >=media-libs/opensubdiv-3.4.0[cuda=] )
 	openvdb? (

diff --git a/media-gfx/blender/blender-9999.ebuild b/media-gfx/blender/blender-9999.ebuild
index 43041614f74c..42b0254daa05 100644
--- a/media-gfx/blender/blender-9999.ebuild
+++ b/media-gfx/blender/blender-9999.ebuild
@@ -86,7 +86,7 @@ RDEPEND="${PYTHON_DEPS}
 	openimageio? ( >=media-libs/openimageio-2.3.12.0:= )
 	openexr? (
 		dev-libs/imath:=
-		media-libs/openexr:3=
+		>=media-libs/openexr-3:=
 	)
 	opensubdiv? ( >=media-libs/opensubdiv-3.4.0[cuda=] )
 	openvdb? (

diff --git a/media-gfx/blender/files/blender-3.0.1-openexr.patch b/media-gfx/blender/files/blender-3.0.1-openexr.patch
index 3ff6b213b05f..435498cd8a3d 100644
--- a/media-gfx/blender/files/blender-3.0.1-openexr.patch
+++ b/media-gfx/blender/files/blender-3.0.1-openexr.patch
@@ -1,79 +1,13 @@
-Based on https://src.fedoraproject.org/rpms/blender/blob/rawhide/f/blender-openexr.patch
+https://src.fedoraproject.org/rpms/blender/blob/rawhide/f/blender-openexr.patch
 
-The issue is that our dependencies are fragile and want to be linked againt OpenEXR 3
-usually, and we've had to give in and go with it. The patches needed to Blender to
-make it go with this (outside of issues related to slotting and adapting to it)
-are simple, and will hopefuly bring less pain / build errors / etc than before.
-diff --git a/build_files/cmake/Modules/FindOpenEXR.cmake b/build_files/cmake/Modules/FindOpenEXR.cmake
-index 09af546..dfe15cd 100644
---- a/build_files/cmake/Modules/FindOpenEXR.cmake
-+++ b/build_files/cmake/Modules/FindOpenEXR.cmake
-@@ -33,6 +33,17 @@ ENDIF()
- # Old versions (before 2.0?) do not have any version string, just assuming this should be fine though.
- SET(_openexr_libs_ver_init "2.0")
- 
-+find_package(Imath-3 CONFIG QUIET)
-+if(TARGET Imath-3::Imath)
-+SET(_openexr_FIND_COMPONENTS
-+  Imath
-+  Iex
-+  OpenEXR
-+  IlmThread
-+)
-+
-+else()
-+
- SET(_openexr_FIND_COMPONENTS
-   Half
-   Iex
-@@ -41,6 +52,8 @@ SET(_openexr_FIND_COMPONENTS
-   Imath
- )
- 
-+endif()
-+
- SET(_openexr_SEARCH_DIRS
-   ${OPENEXR_ROOT_DIR}
-   /opt/lib/openexr
-@@ -48,7 +61,8 @@ SET(_openexr_SEARCH_DIRS
- 
- FIND_PATH(OPENEXR_INCLUDE_DIR
-   NAMES
--    OpenEXR/ImfXdr.h
-+    OpenEXR-3/ImfXdr.h
-+    OpenEXR/ImfXdr.h
-   HINTS
-     ${_openexr_SEARCH_DIRS}
-   PATH_SUFFIXES
-@@ -65,6 +79,7 @@ IF(OPENEXR_INCLUDE_DIR)
-       PATHS
-         "${OPENEXR_INCLUDE_DIR}"
-+        "${OPENEXR_INCLUDE_DIR}/OpenEXR-3"
-         "${OPENEXR_INCLUDE_DIR}/OpenEXR"
-       NO_DEFAULT_PATH
-     )
- 
-@@ -120,7 +135,10 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenEXR  DEFAULT_MSG
- IF(OPENEXR_FOUND)
-   SET(OPENEXR_LIBRARIES ${_openexr_LIBRARIES})
-   # Both include paths are needed because of dummy OSL headers mixing #include <OpenEXR/foo.h> and #include <foo.h> :(
--  SET(OPENEXR_INCLUDE_DIRS ${OPENEXR_INCLUDE_DIR} ${OPENEXR_INCLUDE_DIR}/OpenEXR)
-+  SET(OPENEXR_INCLUDE_DIRS ${OPENEXR_INCLUDE_DIR} ${OPENEXR_INCLUDE_DIR}/OpenEXR-3)
-+  if(TARGET Imath::Imath)
-+    list(APPEND OPENEXR_INCLUDE_DIRS ${OPENEXR_INCLUDE_DIR}/Imath-3)
-+  endif()
- ENDIF()
- 
- MARK_AS_ADVANCED(
-https://src.fedoraproject.org/rpms/blender/raw/rawhide/f/blender-openexr.patch
---- blender-2.93.3.orig/source/blender/imbuf/intern/openexr/openexr_api.cpp
-+++ blender-2.93.3/source/blender/imbuf/intern/openexr/openexr_api.cpp
+--- a/source/blender/imbuf/intern/openexr/openexr_api.cpp
++++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp
 @@ -32,30 +32,31 @@
  #include <stdexcept>
  #include <string>
  
 -#include <Iex.h>
-+#include <OpenEXR-3/Iex.h>
++#include <OpenEXR/Iex.h>
  #include <ImathBox.h>
 -#include <ImfArray.h>
 -#include <ImfChannelList.h>
@@ -87,19 +21,19 @@ https://src.fedoraproject.org/rpms/blender/raw/rawhide/f/blender-openexr.patch
 -#include <ImfStringAttribute.h>
 -#include <ImfVersion.h>
 -#include <half.h>
-+#include <OpenEXR-3/ImfArray.h>
-+#include <OpenEXR-3/ImfFrameBuffer.h>
-+#include <OpenEXR-3/ImfChannelList.h>
-+#include <OpenEXR-3/ImfCompression.h>
-+#include <OpenEXR-3/ImfCompressionAttribute.h>
-+#include <OpenEXR-3/ImfIO.h>
-+#include <OpenEXR-3/ImfInputFile.h>
-+#include <OpenEXR-3/ImfOutputFile.h>
-+#include <OpenEXR-3/ImfPixelType.h>
-+#include <OpenEXR-3/ImfStandardAttributes.h>
-+#include <OpenEXR-3/ImfStringAttribute.h>
-+#include <OpenEXR-3/ImfVersion.h>
-+#include <Imath-3/half.h>
++#include <OpenEXR/ImfArray.h>
++#include <OpenEXR/ImfFrameBuffer.h>
++#include <OpenEXR/ImfChannelList.h>
++#include <OpenEXR/ImfCompression.h>
++#include <OpenEXR/ImfCompressionAttribute.h>
++#include <OpenEXR/ImfIO.h>
++#include <OpenEXR/ImfInputFile.h>
++#include <OpenEXR/ImfOutputFile.h>
++#include <OpenEXR/ImfPixelType.h>
++#include <OpenEXR/ImfStandardAttributes.h>
++#include <OpenEXR/ImfStringAttribute.h>
++#include <OpenEXR/ImfVersion.h>
++#include <Imath/half.h>
  
  /* multiview/multipart */
 -#include <ImfInputPart.h>
@@ -110,14 +44,14 @@ https://src.fedoraproject.org/rpms/blender/raw/rawhide/f/blender-openexr.patch
 -#include <ImfPartHelper.h>
 -#include <ImfPartType.h>
 -#include <ImfTiledOutputPart.h>
-+#include <OpenEXR-3/ImfInputPart.h>
-+#include <OpenEXR-3/ImfMultiPartInputFile.h>
-+#include <OpenEXR-3/ImfMultiPartOutputFile.h>
-+#include <OpenEXR-3/ImfMultiView.h>
-+#include <OpenEXR-3/ImfOutputPart.h>
-+#include <OpenEXR-3/ImfPartHelper.h>
-+#include <OpenEXR-3/ImfPartType.h>
-+#include <OpenEXR-3/ImfTiledOutputPart.h>
++#include <OpenEXR/ImfInputPart.h>
++#include <OpenEXR/ImfMultiPartInputFile.h>
++#include <OpenEXR/ImfMultiPartOutputFile.h>
++#include <OpenEXR/ImfMultiView.h>
++#include <OpenEXR/ImfOutputPart.h>
++#include <OpenEXR/ImfPartHelper.h>
++#include <OpenEXR/ImfPartType.h>
++#include <OpenEXR/ImfTiledOutputPart.h>
  
  #include "DNA_scene_types.h" /* For OpenEXR compression constants */
  
@@ -209,3 +143,48 @@ https://src.fedoraproject.org/rpms/blender/raw/rawhide/f/blender-openexr.patch
    {
      ofs.seekp(pos);
      check_error();
+--- a/build_files/cmake/Modules/FindOpenEXR.cmake
++++ b/build_files/cmake/Modules/FindOpenEXR.cmake
+@@ -25,6 +25,7 @@
+ # see accompanying file BSD-3-Clause-license.txt for details.
+ #=============================================================================
+ 
++
+ # If OPENEXR_ROOT_DIR was defined in the environment, use it.
+ IF(NOT OPENEXR_ROOT_DIR AND NOT $ENV{OPENEXR_ROOT_DIR} STREQUAL "")
+   SET(OPENEXR_ROOT_DIR $ENV{OPENEXR_ROOT_DIR})
+@@ -33,6 +34,16 @@ ENDIF()
+ # Old versions (before 2.0?) do not have any version string, just assuming this should be fine though.
+ SET(_openexr_libs_ver_init "2.0")
+ 
++find_package(Imath CONFIG QUIET)
++if(TARGET Imath::Imath)
++SET(_openexr_FIND_COMPONENTS
++  Imath
++  Iex
++  OpenEXR
++  IlmThread
++)
++
++else()
+ SET(_openexr_FIND_COMPONENTS
+   Half
+   Iex
+@@ -40,6 +51,7 @@ SET(_openexr_FIND_COMPONENTS
+   IlmThread
+   Imath
+ )
++endif()
+ 
+ SET(_openexr_SEARCH_DIRS
+   ${OPENEXR_ROOT_DIR}
+@@ -121,6 +133,9 @@ IF(OPENEXR_FOUND)
+   SET(OPENEXR_LIBRARIES ${_openexr_LIBRARIES})
+   # Both include paths are needed because of dummy OSL headers mixing #include <OpenEXR/foo.h> and #include <foo.h> :(
+   SET(OPENEXR_INCLUDE_DIRS ${OPENEXR_INCLUDE_DIR} ${OPENEXR_INCLUDE_DIR}/OpenEXR)
++  if(TARGET Imath::Imath)
++	  list(APPEND OPENEXR_INCLUDE_DIRS ${OPENEXR_INCLUDE_DIR}/Imath)
++  endif()
+ ENDIF()
+ 
+ MARK_AS_ADVANCED(


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/blender/, media-gfx/blender/files/
@ 2022-03-14 18:43 Sam James
  0 siblings, 0 replies; 21+ messages in thread
From: Sam James @ 2022-03-14 18:43 UTC (permalink / raw
  To: gentoo-commits

commit:     0538d70bf6187eba8bb550253eb9cf436b6ad9bf
Author:     Sebastian Parborg <darkdefende <AT> gmail <DOT> com>
AuthorDate: Mon Mar 14 15:32:13 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Mar 14 18:43:22 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0538d70b

media-gfx/blender: Fix building with ffmpeg 5.0

Closes: https://bugs.gentoo.org/834380
Signed-off-by: Sebastian Parborg <darkdefende <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/24558
Signed-off-by: Sam James <sam <AT> gentoo.org>

 media-gfx/blender/blender-2.93.0-r1.ebuild         |    2 +-
 media-gfx/blender/blender-2.93.6.ebuild            |    2 +-
 media-gfx/blender/blender-2.93.8-r4.ebuild         |    2 +-
 ...r-2.93.8-r4.ebuild => blender-2.93.8-r5.ebuild} |    1 +
 media-gfx/blender/blender-3.0.0-r1.ebuild          |    2 +-
 media-gfx/blender/blender-3.0.1-r4.ebuild          |    2 +-
 ...der-3.0.1-r4.ebuild => blender-3.0.1-r5.ebuild} |    1 +
 .../blender/files/blender-3.0.1-ffmpeg-5.0.patch   | 1045 ++++++++++++++++++++
 8 files changed, 1052 insertions(+), 5 deletions(-)

diff --git a/media-gfx/blender/blender-2.93.0-r1.ebuild b/media-gfx/blender/blender-2.93.0-r1.ebuild
index 3ebf8b183f5f..5759d72da06c 100644
--- a/media-gfx/blender/blender-2.93.0-r1.ebuild
+++ b/media-gfx/blender/blender-2.93.0-r1.ebuild
@@ -63,7 +63,7 @@ RDEPEND="${PYTHON_DEPS}
 	color-management? ( >=media-libs/opencolorio-2.0.0 )
 	cuda? ( dev-util/nvidia-cuda-toolkit:= )
 	embree? ( >=media-libs/embree-3.10.0[raymask] )
-	ffmpeg? ( media-video/ffmpeg:=[x264,mp3,encode,theora,jpeg2k?,vpx,vorbis,opus,xvid] )
+	ffmpeg? ( <media-video/ffmpeg-5.0:=[x264,mp3,encode,theora,jpeg2k?,vpx,vorbis,opus,xvid] )
 	fftw? ( sci-libs/fftw:3.0= )
 	gmp? ( dev-libs/gmp )
 	!headless? (

diff --git a/media-gfx/blender/blender-2.93.6.ebuild b/media-gfx/blender/blender-2.93.6.ebuild
index a5faaf25c81a..712f73eaf47a 100644
--- a/media-gfx/blender/blender-2.93.6.ebuild
+++ b/media-gfx/blender/blender-2.93.6.ebuild
@@ -64,7 +64,7 @@ RDEPEND="${PYTHON_DEPS}
 	color-management? ( >=media-libs/opencolorio-2.0.0 )
 	cuda? ( dev-util/nvidia-cuda-toolkit:= )
 	embree? ( >=media-libs/embree-3.10.0[raymask] )
-	ffmpeg? ( media-video/ffmpeg:=[x264,mp3,encode,theora,jpeg2k?,vpx,vorbis,opus,xvid] )
+	ffmpeg? ( <media-video/ffmpeg-5.0:=[x264,mp3,encode,theora,jpeg2k?,vpx,vorbis,opus,xvid] )
 	fftw? ( sci-libs/fftw:3.0= )
 	gmp? ( dev-libs/gmp )
 	!headless? (

diff --git a/media-gfx/blender/blender-2.93.8-r4.ebuild b/media-gfx/blender/blender-2.93.8-r4.ebuild
index d96c6447c986..3e09ff2028a8 100644
--- a/media-gfx/blender/blender-2.93.8-r4.ebuild
+++ b/media-gfx/blender/blender-2.93.8-r4.ebuild
@@ -64,7 +64,7 @@ RDEPEND="${PYTHON_DEPS}
 	color-management? ( >=media-libs/opencolorio-2.1.1-r7:= )
 	cuda? ( dev-util/nvidia-cuda-toolkit:= )
 	embree? ( >=media-libs/embree-3.10.0[raymask] )
-	ffmpeg? ( media-video/ffmpeg:=[x264,mp3,encode,theora,jpeg2k?,vpx,vorbis,opus,xvid] )
+	ffmpeg? ( <media-video/ffmpeg-5.0:=[x264,mp3,encode,theora,jpeg2k?,vpx,vorbis,opus,xvid] )
 	fftw? ( sci-libs/fftw:3.0= )
 	gmp? ( dev-libs/gmp )
 	!headless? (

diff --git a/media-gfx/blender/blender-2.93.8-r4.ebuild b/media-gfx/blender/blender-2.93.8-r5.ebuild
similarity index 99%
copy from media-gfx/blender/blender-2.93.8-r4.ebuild
copy to media-gfx/blender/blender-2.93.8-r5.ebuild
index d96c6447c986..0c4998e2e4c2 100644
--- a/media-gfx/blender/blender-2.93.8-r4.ebuild
+++ b/media-gfx/blender/blender-2.93.8-r5.ebuild
@@ -127,6 +127,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-3.0.0-intern-ghost-fix-typo-in-finding-XF86VMODE.patch
 	"${FILESDIR}"/${PN}-3.0.1-openexr.patch
 	"${FILESDIR}"/${PN}-3.0.1-openimageio-2.3.patch
+	"${FILESDIR}"/${PN}-3.0.1-ffmpeg-5.0.patch
 )
 
 blender_check_requirements() {

diff --git a/media-gfx/blender/blender-3.0.0-r1.ebuild b/media-gfx/blender/blender-3.0.0-r1.ebuild
index 98a31ed54340..f5bf0d9e9916 100644
--- a/media-gfx/blender/blender-3.0.0-r1.ebuild
+++ b/media-gfx/blender/blender-3.0.0-r1.ebuild
@@ -65,7 +65,7 @@ RDEPEND="${PYTHON_DEPS}
 	color-management? ( >=media-libs/opencolorio-2.0.0 )
 	cuda? ( dev-util/nvidia-cuda-toolkit:= )
 	embree? ( >=media-libs/embree-3.10.0[raymask] )
-	ffmpeg? ( media-video/ffmpeg:=[x264,mp3,encode,theora,jpeg2k?,vpx,vorbis,opus,xvid] )
+	ffmpeg? ( <media-video/ffmpeg-5.0:=[x264,mp3,encode,theora,jpeg2k?,vpx,vorbis,opus,xvid] )
 	fftw? ( sci-libs/fftw:3.0= )
 	gmp? ( dev-libs/gmp )
 	!headless? (

diff --git a/media-gfx/blender/blender-3.0.1-r4.ebuild b/media-gfx/blender/blender-3.0.1-r4.ebuild
index 8b0b64a70b82..c053c88dd0f4 100644
--- a/media-gfx/blender/blender-3.0.1-r4.ebuild
+++ b/media-gfx/blender/blender-3.0.1-r4.ebuild
@@ -65,7 +65,7 @@ RDEPEND="${PYTHON_DEPS}
 	color-management? ( >=media-libs/opencolorio-2.1.1-r7:= )
 	cuda? ( dev-util/nvidia-cuda-toolkit:= )
 	embree? ( >=media-libs/embree-3.10.0[raymask] )
-	ffmpeg? ( media-video/ffmpeg:=[x264,mp3,encode,theora,jpeg2k?,vpx,vorbis,opus,xvid] )
+	ffmpeg? ( <media-video/ffmpeg-5.0:=[x264,mp3,encode,theora,jpeg2k?,vpx,vorbis,opus,xvid] )
 	fftw? ( sci-libs/fftw:3.0= )
 	gmp? ( dev-libs/gmp )
 	!headless? (

diff --git a/media-gfx/blender/blender-3.0.1-r4.ebuild b/media-gfx/blender/blender-3.0.1-r5.ebuild
similarity index 99%
copy from media-gfx/blender/blender-3.0.1-r4.ebuild
copy to media-gfx/blender/blender-3.0.1-r5.ebuild
index 8b0b64a70b82..4e86970281c1 100644
--- a/media-gfx/blender/blender-3.0.1-r4.ebuild
+++ b/media-gfx/blender/blender-3.0.1-r5.ebuild
@@ -127,6 +127,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-3.0.0-intern-ghost-fix-typo-in-finding-XF86VMODE.patch
 	"${FILESDIR}"/${PN}-3.0.1-openexr.patch
 	"${FILESDIR}"/${PN}-3.0.1-openimageio-2.3.patch
+	"${FILESDIR}"/${PN}-3.0.1-ffmpeg-5.0.patch
 )
 
 blender_check_requirements() {

diff --git a/media-gfx/blender/files/blender-3.0.1-ffmpeg-5.0.patch b/media-gfx/blender/files/blender-3.0.1-ffmpeg-5.0.patch
new file mode 100644
index 000000000000..5cd23b9e4b21
--- /dev/null
+++ b/media-gfx/blender/files/blender-3.0.1-ffmpeg-5.0.patch
@@ -0,0 +1,1045 @@
+commit af6a1b08e3f0d0070ac9423868d2d3f81057717a
+Author: Sebastian Parborg <darkdefende@gmail.com>
+Date:   Fri Feb 18 18:20:06 2022 +0100
+
+    VSE: Refactor our code to be compatible with ffmpeg 5.0
+    
+    In ffmpeg 5.0, several variables were made const to try to prevent bad API usage.
+    Removed some dead code that wasn't used anymore as well.
+    
+    Reviewed By: Richard Antalik
+    
+    Differential Revision: http://developer.blender.org/D14063
+
+diff --git a/extern/audaspace/plugins/ffmpeg/FFMPEGReader.cpp b/extern/audaspace/plugins/ffmpeg/FFMPEGReader.cpp
+index de3ca099696..69bb45119a6 100644
+--- a/extern/audaspace/plugins/ffmpeg/FFMPEGReader.cpp
++++ b/extern/audaspace/plugins/ffmpeg/FFMPEGReader.cpp
+@@ -177,7 +177,7 @@ void FFMPEGReader::init(int stream)
+ 
+ 	// get a decoder and open it
+ #ifndef FFMPEG_OLD_CODE
+-	AVCodec* aCodec = avcodec_find_decoder(m_formatCtx->streams[m_stream]->codecpar->codec_id);
++	const AVCodec* aCodec = avcodec_find_decoder(m_formatCtx->streams[m_stream]->codecpar->codec_id);
+ 
+ 	if(!aCodec)
+ 		AUD_THROW(FileException, "File couldn't be read, no decoder found with ffmpeg.");
+diff --git a/extern/audaspace/plugins/ffmpeg/FFMPEGWriter.cpp b/extern/audaspace/plugins/ffmpeg/FFMPEGWriter.cpp
+index 10517d1d596..32eb2330594 100644
+--- a/extern/audaspace/plugins/ffmpeg/FFMPEGWriter.cpp
++++ b/extern/audaspace/plugins/ffmpeg/FFMPEGWriter.cpp
+@@ -23,6 +23,7 @@
+ extern "C" {
+ #include <libavcodec/avcodec.h>
+ #include <libavformat/avio.h>
++#include <libavutil/channel_layout.h>
+ }
+ 
+ AUD_NAMESPACE_BEGIN
+@@ -171,66 +172,66 @@ FFMPEGWriter::FFMPEGWriter(std::string filename, DeviceSpecs specs, Container fo
+ 	if(avformat_alloc_output_context2(&m_formatCtx, nullptr, formats[format], filename.c_str()) < 0)
+ 		AUD_THROW(FileException, "File couldn't be written, format couldn't be found with ffmpeg.");
+ 
+-	AVOutputFormat* outputFmt = m_formatCtx->oformat;
++	const AVOutputFormat* outputFmt = m_formatCtx->oformat;
+ 
+ 	if(!outputFmt) {
+ 		avformat_free_context(m_formatCtx);
+ 		AUD_THROW(FileException, "File couldn't be written, output format couldn't be found with ffmpeg.");
+ 	}
+ 
+-	outputFmt->audio_codec = AV_CODEC_ID_NONE;
++	AVCodecID audio_codec = AV_CODEC_ID_NONE;
+ 
+ 	switch(codec)
+ 	{
+ 	case CODEC_AAC:
+-		outputFmt->audio_codec = AV_CODEC_ID_AAC;
++		audio_codec = AV_CODEC_ID_AAC;
+ 		break;
+ 	case CODEC_AC3:
+-		outputFmt->audio_codec = AV_CODEC_ID_AC3;
++		audio_codec = AV_CODEC_ID_AC3;
+ 		break;
+ 	case CODEC_FLAC:
+-		outputFmt->audio_codec = AV_CODEC_ID_FLAC;
++		audio_codec = AV_CODEC_ID_FLAC;
+ 		break;
+ 	case CODEC_MP2:
+-		outputFmt->audio_codec = AV_CODEC_ID_MP2;
++		audio_codec = AV_CODEC_ID_MP2;
+ 		break;
+ 	case CODEC_MP3:
+-		outputFmt->audio_codec = AV_CODEC_ID_MP3;
++		audio_codec = AV_CODEC_ID_MP3;
+ 		break;
+ 	case CODEC_OPUS:
+-		outputFmt->audio_codec = AV_CODEC_ID_OPUS;
++		audio_codec = AV_CODEC_ID_OPUS;
+ 		break;
+ 	case CODEC_PCM:
+ 		switch(specs.format)
+ 		{
+ 		case FORMAT_U8:
+-			outputFmt->audio_codec = AV_CODEC_ID_PCM_U8;
++			audio_codec = AV_CODEC_ID_PCM_U8;
+ 			break;
+ 		case FORMAT_S16:
+-			outputFmt->audio_codec = AV_CODEC_ID_PCM_S16LE;
++			audio_codec = AV_CODEC_ID_PCM_S16LE;
+ 			break;
+ 		case FORMAT_S24:
+-			outputFmt->audio_codec = AV_CODEC_ID_PCM_S24LE;
++			audio_codec = AV_CODEC_ID_PCM_S24LE;
+ 			break;
+ 		case FORMAT_S32:
+-			outputFmt->audio_codec = AV_CODEC_ID_PCM_S32LE;
++			audio_codec = AV_CODEC_ID_PCM_S32LE;
+ 			break;
+ 		case FORMAT_FLOAT32:
+-			outputFmt->audio_codec = AV_CODEC_ID_PCM_F32LE;
++			audio_codec = AV_CODEC_ID_PCM_F32LE;
+ 			break;
+ 		case FORMAT_FLOAT64:
+-			outputFmt->audio_codec = AV_CODEC_ID_PCM_F64LE;
++			audio_codec = AV_CODEC_ID_PCM_F64LE;
+ 			break;
+ 		default:
+-			outputFmt->audio_codec = AV_CODEC_ID_NONE;
++			audio_codec = AV_CODEC_ID_NONE;
+ 			break;
+ 		}
+ 		break;
+ 	case CODEC_VORBIS:
+-		outputFmt->audio_codec = AV_CODEC_ID_VORBIS;
++		audio_codec = AV_CODEC_ID_VORBIS;
+ 		break;
+ 	default:
+-		outputFmt->audio_codec = AV_CODEC_ID_NONE;
++		audio_codec = AV_CODEC_ID_NONE;
+ 		break;
+ 	}
+ 
+@@ -268,10 +269,10 @@ FFMPEGWriter::FFMPEGWriter(std::string filename, DeviceSpecs specs, Container fo
+ 
+ 	try
+ 	{
+-		if(outputFmt->audio_codec == AV_CODEC_ID_NONE)
++		if(audio_codec == AV_CODEC_ID_NONE)
+ 			AUD_THROW(FileException, "File couldn't be written, audio codec not found with ffmpeg.");
+ 
+-		AVCodec* codec = avcodec_find_encoder(outputFmt->audio_codec);
++		const AVCodec* codec = avcodec_find_encoder(audio_codec);
+ 		if(!codec)
+ 			AUD_THROW(FileException, "File couldn't be written, audio encoder couldn't be found with ffmpeg.");
+ 
+diff --git a/source/blender/blenkernel/BKE_writeffmpeg.h b/source/blender/blenkernel/BKE_writeffmpeg.h
+index 4c966c55e41..d959bb85c81 100644
+--- a/source/blender/blenkernel/BKE_writeffmpeg.h
++++ b/source/blender/blenkernel/BKE_writeffmpeg.h
+@@ -85,12 +85,8 @@ void BKE_ffmpeg_filepath_get(char *string,
+ 
+ void BKE_ffmpeg_preset_set(struct RenderData *rd, int preset);
+ void BKE_ffmpeg_image_type_verify(struct RenderData *rd, struct ImageFormatData *imf);
+-void BKE_ffmpeg_codec_settings_verify(struct RenderData *rd);
+ bool BKE_ffmpeg_alpha_channel_is_supported(const struct RenderData *rd);
+ 
+-int BKE_ffmpeg_property_add_string(struct RenderData *rd, const char *type, const char *str);
+-void BKE_ffmpeg_property_del(struct RenderData *rd, void *type, void *prop_);
+-
+ void *BKE_ffmpeg_context_create(void);
+ void BKE_ffmpeg_context_free(void *context_v);
+ 
+diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
+index 203676d0dd8..6d5abbd90d3 100644
+--- a/source/blender/blenkernel/intern/scene.c
++++ b/source/blender/blenkernel/intern/scene.c
+@@ -333,12 +333,6 @@ static void scene_copy_data(Main *bmain, ID *id_dst, const ID *id_src, const int
+     scene_dst->r.avicodecdata->lpParms = MEM_dupallocN(scene_dst->r.avicodecdata->lpParms);
+   }
+ 
+-  if (scene_src->r.ffcodecdata.properties) {
+-    /* intentionally check sce_dst not sce_src. */ /* XXX ??? comment outdated... */
+-    scene_dst->r.ffcodecdata.properties = IDP_CopyProperty_ex(scene_src->r.ffcodecdata.properties,
+-                                                              flag_subdata);
+-  }
+-
+   if (scene_src->display.shading.prop) {
+     scene_dst->display.shading.prop = IDP_CopyProperty(scene_src->display.shading.prop);
+   }
+@@ -409,10 +403,6 @@ static void scene_free_data(ID *id)
+     MEM_freeN(scene->r.avicodecdata);
+     scene->r.avicodecdata = NULL;
+   }
+-  if (scene->r.ffcodecdata.properties) {
+-    IDP_FreeProperty(scene->r.ffcodecdata.properties);
+-    scene->r.ffcodecdata.properties = NULL;
+-  }
+ 
+   scene_free_markers(scene, do_id_user);
+   BLI_freelistN(&scene->transform_spaces);
+@@ -1030,9 +1020,6 @@ static void scene_blend_write(BlendWriter *writer, ID *id, const void *id_addres
+       BLO_write_raw(writer, (size_t)sce->r.avicodecdata->cbParms, sce->r.avicodecdata->lpParms);
+     }
+   }
+-  if (sce->r.ffcodecdata.properties) {
+-    IDP_BlendWrite(writer, sce->r.ffcodecdata.properties);
+-  }
+ 
+   /* writing dynamic list of TimeMarkers to the blend file */
+   LISTBASE_FOREACH (TimeMarker *, marker, &sce->markers) {
+@@ -1272,11 +1259,6 @@ static void scene_blend_read_data(BlendDataReader *reader, ID *id)
+     BLO_read_data_address(reader, &sce->r.avicodecdata->lpFormat);
+     BLO_read_data_address(reader, &sce->r.avicodecdata->lpParms);
+   }
+-  if (sce->r.ffcodecdata.properties) {
+-    BLO_read_data_address(reader, &sce->r.ffcodecdata.properties);
+-    IDP_BlendDataRead(reader, &sce->r.ffcodecdata.properties);
+-  }
+-
+   BLO_read_list(reader, &(sce->markers));
+   LISTBASE_FOREACH (TimeMarker *, marker, &sce->markers) {
+     BLO_read_data_address(reader, &marker->prop);
+@@ -1889,10 +1871,6 @@ Scene *BKE_scene_duplicate(Main *bmain, Scene *sce, eSceneCopyMethod type)
+       sce_copy->r.avicodecdata->lpParms = MEM_dupallocN(sce_copy->r.avicodecdata->lpParms);
+     }
+ 
+-    if (sce->r.ffcodecdata.properties) { /* intentionally check scen not sce. */
+-      sce_copy->r.ffcodecdata.properties = IDP_CopyProperty(sce->r.ffcodecdata.properties);
+-    }
+-
+     BKE_sound_reset_scene_runtime(sce_copy);
+ 
+     /* grease pencil */
+diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c
+index 9effeb831b6..45bd977c109 100644
+--- a/source/blender/blenkernel/intern/writeffmpeg.c
++++ b/source/blender/blenkernel/intern/writeffmpeg.c
+@@ -56,6 +56,7 @@
+  * like M_SQRT1_2 leading to warnings with MSVC */
+ #  include <libavcodec/avcodec.h>
+ #  include <libavformat/avformat.h>
++#  include <libavutil/channel_layout.h>
+ #  include <libavutil/imgutils.h>
+ #  include <libavutil/opt.h>
+ #  include <libavutil/rational.h>
+@@ -115,8 +116,6 @@ typedef struct FFMpegContext {
+     printf
+ 
+ static void ffmpeg_dict_set_int(AVDictionary **dict, const char *key, int value);
+-static void ffmpeg_dict_set_float(AVDictionary **dict, const char *key, float value);
+-static void ffmpeg_set_expert_options(RenderData *rd);
+ static void ffmpeg_filepath_get(FFMpegContext *context,
+                                 char *string,
+                                 const struct RenderData *rd,
+@@ -428,99 +427,6 @@ static AVFrame *generate_video_frame(FFMpegContext *context, const uint8_t *pixe
+   return context->current_frame;
+ }
+ 
+-static void set_ffmpeg_property_option(IDProperty *prop, AVDictionary **dictionary)
+-{
+-  char name[128];
+-  char *param;
+-
+-  PRINT("FFMPEG expert option: %s: ", prop->name);
+-
+-  BLI_strncpy(name, prop->name, sizeof(name));
+-
+-  param = strchr(name, ':');
+-
+-  if (param) {
+-    *param++ = '\0';
+-  }
+-
+-  switch (prop->type) {
+-    case IDP_STRING:
+-      PRINT("%s.\n", IDP_String(prop));
+-      av_dict_set(dictionary, name, IDP_String(prop), 0);
+-      break;
+-    case IDP_FLOAT:
+-      PRINT("%g.\n", IDP_Float(prop));
+-      ffmpeg_dict_set_float(dictionary, prop->name, IDP_Float(prop));
+-      break;
+-    case IDP_INT:
+-      PRINT("%d.\n", IDP_Int(prop));
+-
+-      if (param) {
+-        if (IDP_Int(prop)) {
+-          av_dict_set(dictionary, name, param, 0);
+-        }
+-        else {
+-          return;
+-        }
+-      }
+-      else {
+-        ffmpeg_dict_set_int(dictionary, prop->name, IDP_Int(prop));
+-      }
+-      break;
+-  }
+-}
+-
+-static int ffmpeg_proprty_valid(AVCodecContext *c, const char *prop_name, IDProperty *curr)
+-{
+-  int valid = 1;
+-
+-  if (STREQ(prop_name, "video")) {
+-    if (STREQ(curr->name, "bf")) {
+-      /* flash codec doesn't support b frames */
+-      valid &= c->codec_id != AV_CODEC_ID_FLV1;
+-    }
+-  }
+-
+-  return valid;
+-}
+-
+-static void set_ffmpeg_properties(RenderData *rd,
+-                                  AVCodecContext *c,
+-                                  const char *prop_name,
+-                                  AVDictionary **dictionary)
+-{
+-  IDProperty *prop;
+-  IDProperty *curr;
+-
+-  /* TODO(sergey): This is actually rather stupid, because changing
+-   * codec settings in render panel would also set expert options.
+-   *
+-   * But we need ti here in order to get rid of deprecated settings
+-   * when opening old files in new blender.
+-   *
+-   * For as long we don't allow editing properties in the interface
+-   * it's all good. bug if we allow editing them, we'll need to
+-   * replace it with some smarter code which would port settings
+-   * from deprecated to new one.
+-   */
+-  ffmpeg_set_expert_options(rd);
+-
+-  if (!rd->ffcodecdata.properties) {
+-    return;
+-  }
+-
+-  prop = IDP_GetPropertyFromGroup(rd->ffcodecdata.properties, prop_name);
+-  if (!prop) {
+-    return;
+-  }
+-
+-  for (curr = prop->data.group.first; curr; curr = curr->next) {
+-    if (ffmpeg_proprty_valid(c, prop_name, curr)) {
+-      set_ffmpeg_property_option(curr, dictionary);
+-    }
+-  }
+-}
+-
+ static AVRational calc_time_base(uint den, double num, int codec_id)
+ {
+   /* Convert the input 'num' to an integer. Simply shift the decimal places until we get an integer
+@@ -575,7 +481,7 @@ static AVStream *alloc_video_stream(FFMpegContext *context,
+                                     int error_size)
+ {
+   AVStream *st;
+-  AVCodec *codec;
++  const AVCodec *codec;
+   AVDictionary *opts = NULL;
+ 
+   error[0] = '\0';
+@@ -588,21 +494,15 @@ static AVStream *alloc_video_stream(FFMpegContext *context,
+ 
+   /* Set up the codec context */
+ 
+-  context->video_codec = avcodec_alloc_context3(NULL);
+-  AVCodecContext *c = context->video_codec;
+-  c->codec_id = codec_id;
+-  c->codec_type = AVMEDIA_TYPE_VIDEO;
+-
+-  codec = avcodec_find_encoder(c->codec_id);
++  codec = avcodec_find_encoder(codec_id);
+   if (!codec) {
+     fprintf(stderr, "Couldn't find valid video codec\n");
+-    avcodec_free_context(&c);
+     context->video_codec = NULL;
+     return NULL;
+   }
+ 
+-  /* Load codec defaults into 'c'. */
+-  avcodec_get_context_defaults3(c, codec);
++  context->video_codec = avcodec_alloc_context3(codec);
++  AVCodecContext *c = context->video_codec;
+ 
+   /* Get some values from the current render settings */
+ 
+@@ -716,6 +616,13 @@ static AVStream *alloc_video_stream(FFMpegContext *context,
+     }
+   }
+ 
++  if (codec_id == AV_CODEC_ID_DNXHD) {
++    if (rd->ffcodecdata.flags & FFMPEG_LOSSLESS_OUTPUT) {
++      /* Set the block decision algorithm to be of the highest quality ("rd" == 2). */
++      c->mb_decision = 2;
++    }
++  }
++
+   if (codec_id == AV_CODEC_ID_FFV1) {
+     c->pix_fmt = AV_PIX_FMT_RGB32;
+   }
+@@ -752,8 +659,6 @@ static AVStream *alloc_video_stream(FFMpegContext *context,
+                                                             255);
+   st->avg_frame_rate = av_inv_q(c->time_base);
+ 
+-  set_ffmpeg_properties(rd, c, "video", &opts);
+-
+   if (codec->capabilities & AV_CODEC_CAP_AUTO_THREADS) {
+     c->thread_count = 0;
+   }
+@@ -818,8 +723,7 @@ static AVStream *alloc_audio_stream(FFMpegContext *context,
+                                     int error_size)
+ {
+   AVStream *st;
+-  AVCodec *codec;
+-  AVDictionary *opts = NULL;
++  const AVCodec *codec;
+ 
+   error[0] = '\0';
+ 
+@@ -829,24 +733,17 @@ static AVStream *alloc_audio_stream(FFMpegContext *context,
+   }
+   st->id = 1;
+ 
+-  context->audio_codec = avcodec_alloc_context3(NULL);
+-  AVCodecContext *c = context->audio_codec;
+-  c->thread_count = BLI_system_thread_count();
+-  c->thread_type = FF_THREAD_SLICE;
+-
+-  c->codec_id = codec_id;
+-  c->codec_type = AVMEDIA_TYPE_AUDIO;
+-
+-  codec = avcodec_find_encoder(c->codec_id);
++  codec = avcodec_find_encoder(codec_id);
+   if (!codec) {
+     fprintf(stderr, "Couldn't find valid audio codec\n");
+-    avcodec_free_context(&c);
+     context->audio_codec = NULL;
+     return NULL;
+   }
+ 
+-  /* Load codec defaults into 'c'. */
+-  avcodec_get_context_defaults3(c, codec);
++  context->audio_codec = avcodec_alloc_context3(codec);
++  AVCodecContext *c = context->audio_codec;
++  c->thread_count = BLI_system_thread_count();
++  c->thread_type = FF_THREAD_SLICE;
+ 
+   c->sample_rate = rd->ffcodecdata.audio_mixrate;
+   c->bit_rate = context->ffmpeg_audio_bitrate * 1000;
+@@ -914,19 +811,15 @@ static AVStream *alloc_audio_stream(FFMpegContext *context,
+     c->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
+   }
+ 
+-  set_ffmpeg_properties(rd, c, "audio", &opts);
+-
+-  int ret = avcodec_open2(c, codec, &opts);
++  int ret = avcodec_open2(c, codec, NULL);
+ 
+   if (ret < 0) {
+     fprintf(stderr, "Couldn't initialize audio codec: %s\n", av_err2str(ret));
+     BLI_strncpy(error, IMB_ffmpeg_last_error(), error_size);
+-    av_dict_free(&opts);
+     avcodec_free_context(&c);
+     context->audio_codec = NULL;
+     return NULL;
+   }
+-  av_dict_free(&opts);
+ 
+   /* need to prevent floating point exception when using vorbis audio codec,
+    * initialize this value in the same way as it's done in FFmpeg itself (sergey) */
+@@ -972,15 +865,6 @@ static void ffmpeg_dict_set_int(AVDictionary **dict, const char *key, int value)
+   av_dict_set(dict, key, buffer, 0);
+ }
+ 
+-static void ffmpeg_dict_set_float(AVDictionary **dict, const char *key, float value)
+-{
+-  char buffer[32];
+-
+-  BLI_snprintf(buffer, sizeof(buffer), "%.8f", value);
+-
+-  av_dict_set(dict, key, buffer, 0);
+-}
+-
+ static void ffmpeg_add_metadata_callback(void *data,
+                                          const char *propname,
+                                          char *propvalue,
+@@ -999,8 +883,7 @@ static int start_ffmpeg_impl(FFMpegContext *context,
+ {
+   /* Handle to the output file */
+   AVFormatContext *of;
+-  AVOutputFormat *fmt;
+-  AVDictionary *opts = NULL;
++  const AVOutputFormat *fmt;
+   char name[FILE_MAX], error[1024];
+   const char **exts;
+ 
+@@ -1037,11 +920,13 @@ static int start_ffmpeg_impl(FFMpegContext *context,
+       rectx,
+       recty);
+ 
++  /* Sanity checks for the output file extensions. */
+   exts = get_file_extensions(context->ffmpeg_type);
+   if (!exts) {
+     BKE_report(reports, RPT_ERROR, "No valid formats found");
+     return 0;
+   }
++
+   fmt = av_guess_format(NULL, exts[0], NULL);
+   if (!fmt) {
+     BKE_report(reports, RPT_ERROR, "No valid formats found");
+@@ -1050,66 +935,50 @@ static int start_ffmpeg_impl(FFMpegContext *context,
+ 
+   of = avformat_alloc_context();
+   if (!of) {
+-    BKE_report(reports, RPT_ERROR, "Error opening output file");
++    BKE_report(reports, RPT_ERROR, "Can't allocate ffmpeg format context");
+     return 0;
+   }
+ 
+-  /* Returns after this must 'goto fail;' */
+-
+-  of->oformat = fmt;
+-
+-  /* Only bother with setting packet size & mux rate when CRF is not used. */
+-  if (context->ffmpeg_crf == 0) {
+-    of->packet_size = rd->ffcodecdata.mux_packet_size;
+-    if (context->ffmpeg_audio_codec != AV_CODEC_ID_NONE) {
+-      ffmpeg_dict_set_int(&opts, "muxrate", rd->ffcodecdata.mux_rate);
+-    }
+-    else {
+-      av_dict_set(&opts, "muxrate", "0", 0);
+-    }
+-  }
+-
+-  ffmpeg_dict_set_int(&opts, "preload", (int)(0.5 * AV_TIME_BASE));
+-
+-  of->max_delay = (int)(0.7 * AV_TIME_BASE);
+-
+-  fmt->audio_codec = context->ffmpeg_audio_codec;
++  enum AVCodecID audio_codec = context->ffmpeg_audio_codec;
++  enum AVCodecID video_codec = context->ffmpeg_codec;
+ 
+   of->url = av_strdup(name);
+-  /* set the codec to the user's selection */
++  /* Check if we need to force change the codec because of file type codec restrictions */
+   switch (context->ffmpeg_type) {
+-    case FFMPEG_AVI:
+-    case FFMPEG_MOV:
+-    case FFMPEG_MKV:
+-      fmt->video_codec = context->ffmpeg_codec;
+-      break;
+     case FFMPEG_OGG:
+-      fmt->video_codec = AV_CODEC_ID_THEORA;
++      video_codec = AV_CODEC_ID_THEORA;
+       break;
+     case FFMPEG_DV:
+-      fmt->video_codec = AV_CODEC_ID_DVVIDEO;
++      video_codec = AV_CODEC_ID_DVVIDEO;
+       break;
+     case FFMPEG_MPEG1:
+-      fmt->video_codec = AV_CODEC_ID_MPEG1VIDEO;
++      video_codec = AV_CODEC_ID_MPEG1VIDEO;
+       break;
+     case FFMPEG_MPEG2:
+-      fmt->video_codec = AV_CODEC_ID_MPEG2VIDEO;
++      video_codec = AV_CODEC_ID_MPEG2VIDEO;
+       break;
+     case FFMPEG_H264:
+-      fmt->video_codec = AV_CODEC_ID_H264;
++      video_codec = AV_CODEC_ID_H264;
+       break;
+     case FFMPEG_XVID:
+-      fmt->video_codec = AV_CODEC_ID_MPEG4;
++      video_codec = AV_CODEC_ID_MPEG4;
+       break;
+     case FFMPEG_FLV:
+-      fmt->video_codec = AV_CODEC_ID_FLV1;
++      video_codec = AV_CODEC_ID_FLV1;
+       break;
+-    case FFMPEG_MPEG4:
+     default:
+-      fmt->video_codec = context->ffmpeg_codec;
++      /* These containers are not restricted to any specific codec types.
++       * Currently we expect these to be .avi, .mov, .mkv, and .mp4.
++       */
++      video_codec = context->ffmpeg_codec;
+       break;
+   }
+-  if (fmt->video_codec == AV_CODEC_ID_DVVIDEO) {
++
++  /* Returns after this must 'goto fail;' */
++
++  of->oformat = fmt;
++
++  if (video_codec == AV_CODEC_ID_DVVIDEO) {
+     if (rectx != 720) {
+       BKE_report(reports, RPT_ERROR, "Render width has to be 720 pixels for DV!");
+       goto fail;
+@@ -1125,7 +994,7 @@ static int start_ffmpeg_impl(FFMpegContext *context,
+   }
+ 
+   if (context->ffmpeg_type == FFMPEG_DV) {
+-    fmt->audio_codec = AV_CODEC_ID_PCM_S16LE;
++    audio_codec = AV_CODEC_ID_PCM_S16LE;
+     if (context->ffmpeg_audio_codec != AV_CODEC_ID_NONE &&
+         rd->ffcodecdata.audio_mixrate != 48000 && rd->ffcodecdata.audio_channels != 2) {
+       BKE_report(reports, RPT_ERROR, "FFMPEG only supports 48khz / stereo audio for DV!");
+@@ -1133,9 +1002,9 @@ static int start_ffmpeg_impl(FFMpegContext *context,
+     }
+   }
+ 
+-  if (fmt->video_codec != AV_CODEC_ID_NONE) {
++  if (video_codec != AV_CODEC_ID_NONE) {
+     context->video_stream = alloc_video_stream(
+-        context, rd, fmt->video_codec, of, rectx, recty, error, sizeof(error));
++        context, rd, video_codec, of, rectx, recty, error, sizeof(error));
+     PRINT("alloc video stream %p\n", context->video_stream);
+     if (!context->video_stream) {
+       if (error[0]) {
+@@ -1151,8 +1020,7 @@ static int start_ffmpeg_impl(FFMpegContext *context,
+   }
+ 
+   if (context->ffmpeg_audio_codec != AV_CODEC_ID_NONE) {
+-    context->audio_stream = alloc_audio_stream(
+-        context, rd, fmt->audio_codec, of, error, sizeof(error));
++    context->audio_stream = alloc_audio_stream(context, rd, audio_codec, of, error, sizeof(error));
+     if (!context->audio_stream) {
+       if (error[0]) {
+         BKE_report(reports, RPT_ERROR, error);
+@@ -1189,7 +1057,6 @@ static int start_ffmpeg_impl(FFMpegContext *context,
+ 
+   context->outfile = of;
+   av_dump_format(of, 0, name, 1);
+-  av_dict_free(&opts);
+ 
+   return 1;
+ 
+@@ -1206,7 +1073,6 @@ fail:
+     context->audio_stream = NULL;
+   }
+ 
+-  av_dict_free(&opts);
+   avformat_free_context(of);
+   return 0;
+ }
+@@ -1540,198 +1406,17 @@ void BKE_ffmpeg_end(void *context_v)
+   end_ffmpeg_impl(context, false);
+ }
+ 
+-/* properties */
+-
+-void BKE_ffmpeg_property_del(RenderData *rd, void *type, void *prop_)
+-{
+-  struct IDProperty *prop = (struct IDProperty *)prop_;
+-  IDProperty *group;
+-
+-  if (!rd->ffcodecdata.properties) {
+-    return;
+-  }
+-
+-  group = IDP_GetPropertyFromGroup(rd->ffcodecdata.properties, type);
+-  if (group && prop) {
+-    IDP_FreeFromGroup(group, prop);
+-  }
+-}
+-
+-static IDProperty *BKE_ffmpeg_property_add(RenderData *rd,
+-                                           const char *type,
+-                                           const AVOption *o,
+-                                           const AVOption *parent)
+-{
+-  AVCodecContext c;
+-  IDProperty *group;
+-  IDProperty *prop;
+-  IDPropertyTemplate val;
+-  int idp_type;
+-  char name[256];
+-
+-  val.i = 0;
+-
+-  avcodec_get_context_defaults3(&c, NULL);
+-
+-  if (!rd->ffcodecdata.properties) {
+-    rd->ffcodecdata.properties = IDP_New(IDP_GROUP, &val, "ffmpeg");
+-  }
+-
+-  group = IDP_GetPropertyFromGroup(rd->ffcodecdata.properties, type);
+-
+-  if (!group) {
+-    group = IDP_New(IDP_GROUP, &val, type);
+-    IDP_AddToGroup(rd->ffcodecdata.properties, group);
+-  }
+-
+-  if (parent) {
+-    BLI_snprintf(name, sizeof(name), "%s:%s", parent->name, o->name);
+-  }
+-  else {
+-    BLI_strncpy(name, o->name, sizeof(name));
+-  }
+-
+-  PRINT("ffmpeg_property_add: %s %s\n", type, name);
+-
+-  prop = IDP_GetPropertyFromGroup(group, name);
+-  if (prop) {
+-    return prop;
+-  }
+-
+-  switch (o->type) {
+-    case AV_OPT_TYPE_INT:
+-    case AV_OPT_TYPE_INT64:
+-      val.i = o->default_val.i64;
+-      idp_type = IDP_INT;
+-      break;
+-    case AV_OPT_TYPE_DOUBLE:
+-    case AV_OPT_TYPE_FLOAT:
+-      val.f = o->default_val.dbl;
+-      idp_type = IDP_FLOAT;
+-      break;
+-    case AV_OPT_TYPE_STRING:
+-      val.string.str =
+-          (char
+-               *)"                                                                               ";
+-      val.string.len = 80;
+-      idp_type = IDP_STRING;
+-      break;
+-    case AV_OPT_TYPE_CONST:
+-      val.i = 1;
+-      idp_type = IDP_INT;
+-      break;
+-    default:
+-      return NULL;
+-  }
+-  prop = IDP_New(idp_type, &val, name);
+-  IDP_AddToGroup(group, prop);
+-  return prop;
+-}
+-
+-/* not all versions of ffmpeg include that, so here we go ... */
+-
+-int BKE_ffmpeg_property_add_string(RenderData *rd, const char *type, const char *str)
+-{
+-  AVCodecContext c;
+-  const AVOption *o = NULL;
+-  const AVOption *p = NULL;
+-  char name_[128];
+-  char *name;
+-  char *param;
+-  IDProperty *prop = NULL;
+-
+-  avcodec_get_context_defaults3(&c, NULL);
+-
+-  BLI_strncpy(name_, str, sizeof(name_));
+-
+-  name = name_;
+-  while (*name == ' ') {
+-    name++;
+-  }
+-
+-  param = strchr(name, ':');
+-
+-  if (!param) {
+-    param = strchr(name, ' ');
+-  }
+-  if (param) {
+-    *param++ = '\0';
+-    while (*param == ' ') {
+-      param++;
+-    }
+-  }
+-
+-  o = av_opt_find(&c, name, NULL, 0, AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ);
+-  if (!o) {
+-    PRINT("Ignoring unknown expert option %s\n", str);
+-    return 0;
+-  }
+-  if (param && o->type == AV_OPT_TYPE_CONST) {
+-    return 0;
+-  }
+-  if (param && o->type != AV_OPT_TYPE_CONST && o->unit) {
+-    p = av_opt_find(&c, param, o->unit, 0, AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ);
+-    if (p) {
+-      prop = BKE_ffmpeg_property_add(rd, (char *)type, p, o);
+-    }
+-    else {
+-      PRINT("Ignoring unknown expert option %s\n", str);
+-    }
+-  }
+-  else {
+-    prop = BKE_ffmpeg_property_add(rd, (char *)type, o, NULL);
+-  }
+-
+-  if (!prop) {
+-    return 0;
+-  }
+-
+-  if (param && !p) {
+-    switch (prop->type) {
+-      case IDP_INT:
+-        IDP_Int(prop) = atoi(param);
+-        break;
+-      case IDP_FLOAT:
+-        IDP_Float(prop) = atof(param);
+-        break;
+-      case IDP_STRING:
+-        strncpy(IDP_String(prop), param, prop->len);
+-        break;
+-    }
+-  }
+-  return 1;
+-}
+-
+-static void ffmpeg_set_expert_options(RenderData *rd)
+-{
+-  int codec_id = rd->ffcodecdata.codec;
+-
+-  if (rd->ffcodecdata.properties) {
+-    IDP_FreePropertyContent(rd->ffcodecdata.properties);
+-  }
+-
+-  if (codec_id == AV_CODEC_ID_DNXHD) {
+-    if (rd->ffcodecdata.flags & FFMPEG_LOSSLESS_OUTPUT) {
+-      BKE_ffmpeg_property_add_string(rd, "video", "mbd:rd");
+-    }
+-  }
+-}
+-
+ void BKE_ffmpeg_preset_set(RenderData *rd, int preset)
+ {
+-  int isntsc = (rd->frs_sec != 25);
+-
+-  if (rd->ffcodecdata.properties) {
+-    IDP_FreePropertyContent(rd->ffcodecdata.properties);
+-  }
++  bool is_ntsc = (rd->frs_sec != 25);
+ 
+   switch (preset) {
+     case FFMPEG_PRESET_VCD:
+       rd->ffcodecdata.type = FFMPEG_MPEG1;
+       rd->ffcodecdata.video_bitrate = 1150;
+       rd->xsch = 352;
+-      rd->ysch = isntsc ? 240 : 288;
+-      rd->ffcodecdata.gop_size = isntsc ? 18 : 15;
++      rd->ysch = is_ntsc ? 240 : 288;
++      rd->ffcodecdata.gop_size = is_ntsc ? 18 : 15;
+       rd->ffcodecdata.rc_max_rate = 1150;
+       rd->ffcodecdata.rc_min_rate = 1150;
+       rd->ffcodecdata.rc_buffer_size = 40 * 8;
+@@ -1743,8 +1428,8 @@ void BKE_ffmpeg_preset_set(RenderData *rd, int preset)
+       rd->ffcodecdata.type = FFMPEG_MPEG2;
+       rd->ffcodecdata.video_bitrate = 2040;
+       rd->xsch = 480;
+-      rd->ysch = isntsc ? 480 : 576;
+-      rd->ffcodecdata.gop_size = isntsc ? 18 : 15;
++      rd->ysch = is_ntsc ? 480 : 576;
++      rd->ffcodecdata.gop_size = is_ntsc ? 18 : 15;
+       rd->ffcodecdata.rc_max_rate = 2516;
+       rd->ffcodecdata.rc_min_rate = 0;
+       rd->ffcodecdata.rc_buffer_size = 224 * 8;
+@@ -1761,7 +1446,7 @@ void BKE_ffmpeg_preset_set(RenderData *rd, int preset)
+       rd->ysch = isntsc ? 480 : 576;
+ #  endif
+ 
+-      rd->ffcodecdata.gop_size = isntsc ? 18 : 15;
++      rd->ffcodecdata.gop_size = is_ntsc ? 18 : 15;
+       rd->ffcodecdata.rc_max_rate = 9000;
+       rd->ffcodecdata.rc_min_rate = 0;
+       rd->ffcodecdata.rc_buffer_size = 224 * 8;
+@@ -1772,14 +1457,14 @@ void BKE_ffmpeg_preset_set(RenderData *rd, int preset)
+     case FFMPEG_PRESET_DV:
+       rd->ffcodecdata.type = FFMPEG_DV;
+       rd->xsch = 720;
+-      rd->ysch = isntsc ? 480 : 576;
++      rd->ysch = is_ntsc ? 480 : 576;
+       break;
+ 
+     case FFMPEG_PRESET_H264:
+       rd->ffcodecdata.type = FFMPEG_AVI;
+       rd->ffcodecdata.codec = AV_CODEC_ID_H264;
+       rd->ffcodecdata.video_bitrate = 6000;
+-      rd->ffcodecdata.gop_size = isntsc ? 18 : 15;
++      rd->ffcodecdata.gop_size = is_ntsc ? 18 : 15;
+       rd->ffcodecdata.rc_max_rate = 9000;
+       rd->ffcodecdata.rc_min_rate = 0;
+       rd->ffcodecdata.rc_buffer_size = 224 * 8;
+@@ -1800,7 +1485,7 @@ void BKE_ffmpeg_preset_set(RenderData *rd, int preset)
+       }
+ 
+       rd->ffcodecdata.video_bitrate = 6000;
+-      rd->ffcodecdata.gop_size = isntsc ? 18 : 15;
++      rd->ffcodecdata.gop_size = is_ntsc ? 18 : 15;
+       rd->ffcodecdata.rc_max_rate = 9000;
+       rd->ffcodecdata.rc_min_rate = 0;
+       rd->ffcodecdata.rc_buffer_size = 224 * 8;
+@@ -1808,8 +1493,6 @@ void BKE_ffmpeg_preset_set(RenderData *rd, int preset)
+       rd->ffcodecdata.mux_rate = 10080000;
+       break;
+   }
+-
+-  ffmpeg_set_expert_options(rd);
+ }
+ 
+ void BKE_ffmpeg_image_type_verify(RenderData *rd, ImageFormatData *imf)
+@@ -1855,11 +1538,6 @@ void BKE_ffmpeg_image_type_verify(RenderData *rd, ImageFormatData *imf)
+   }
+ }
+ 
+-void BKE_ffmpeg_codec_settings_verify(RenderData *rd)
+-{
+-  ffmpeg_set_expert_options(rd);
+-}
+-
+ bool BKE_ffmpeg_alpha_channel_is_supported(const RenderData *rd)
+ {
+   int codec = rd->ffcodecdata.codec;
+diff --git a/source/blender/imbuf/intern/IMB_anim.h b/source/blender/imbuf/intern/IMB_anim.h
+index c4e2ad9da7f..67fdb841317 100644
+--- a/source/blender/imbuf/intern/IMB_anim.h
++++ b/source/blender/imbuf/intern/IMB_anim.h
+@@ -124,7 +124,7 @@ struct anim {
+ #ifdef WITH_FFMPEG
+   AVFormatContext *pFormatCtx;
+   AVCodecContext *pCodecCtx;
+-  AVCodec *pCodec;
++  const AVCodec *pCodec;
+   AVFrame *pFrame;
+   int pFrameComplete;
+   AVFrame *pFrameRGB;
+diff --git a/source/blender/imbuf/intern/anim_movie.c b/source/blender/imbuf/intern/anim_movie.c
+index 38dbb9bfc47..0d0ac798d3a 100644
+--- a/source/blender/imbuf/intern/anim_movie.c
++++ b/source/blender/imbuf/intern/anim_movie.c
+@@ -508,7 +508,7 @@ static int startffmpeg(struct anim *anim)
+ {
+   int i, video_stream_index;
+ 
+-  AVCodec *pCodec;
++  const AVCodec *pCodec;
+   AVFormatContext *pFormatCtx = NULL;
+   AVCodecContext *pCodecCtx;
+   AVRational frame_rate;
+diff --git a/source/blender/imbuf/intern/indexer.c b/source/blender/imbuf/intern/indexer.c
+index 00e96e7840b..55f1eced70f 100644
+--- a/source/blender/imbuf/intern/indexer.c
++++ b/source/blender/imbuf/intern/indexer.c
+@@ -493,7 +493,7 @@ struct proxy_output_ctx {
+   AVFormatContext *of;
+   AVStream *st;
+   AVCodecContext *c;
+-  AVCodec *codec;
++  const AVCodec *codec;
+   struct SwsContext *sws_ctx;
+   AVFrame *frame;
+   int cfra;
+@@ -525,12 +525,9 @@ static struct proxy_output_ctx *alloc_proxy_output_ffmpeg(
+   rv->st = avformat_new_stream(rv->of, NULL);
+   rv->st->id = 0;
+ 
+-  rv->c = avcodec_alloc_context3(NULL);
+-  rv->c->codec_type = AVMEDIA_TYPE_VIDEO;
+-  rv->c->codec_id = AV_CODEC_ID_H264;
++  rv->codec = avcodec_find_encoder(AV_CODEC_ID_H264);
+ 
+-  rv->of->oformat->video_codec = rv->c->codec_id;
+-  rv->codec = avcodec_find_encoder(rv->c->codec_id);
++  rv->c = avcodec_alloc_context3(rv->codec);
+ 
+   if (!rv->codec) {
+     fprintf(stderr,
+@@ -542,8 +539,6 @@ static struct proxy_output_ctx *alloc_proxy_output_ffmpeg(
+     return NULL;
+   }
+ 
+-  avcodec_get_context_defaults3(rv->c, rv->codec);
+-
+   rv->c->width = width;
+   rv->c->height = height;
+   rv->c->gop_size = 10;
+@@ -794,7 +789,7 @@ typedef struct FFmpegIndexBuilderContext {
+ 
+   AVFormatContext *iFormatCtx;
+   AVCodecContext *iCodecCtx;
+-  AVCodec *iCodec;
++  const AVCodec *iCodec;
+   AVStream *iStream;
+   int videoStream;
+ 
+diff --git a/source/blender/imbuf/intern/util.c b/source/blender/imbuf/intern/util.c
+index 18ed4710e78..96005ed0a0d 100644
+--- a/source/blender/imbuf/intern/util.c
++++ b/source/blender/imbuf/intern/util.c
+@@ -267,7 +267,7 @@ static int isffmpeg(const char *filepath)
+   AVFormatContext *pFormatCtx = NULL;
+   unsigned int i;
+   int videoStream;
+-  AVCodec *pCodec;
++  const AVCodec *pCodec;
+ 
+   if (BLI_path_extension_check_n(filepath,
+                                  ".swf",
+diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
+index 864358e040c..45fd4895f77 100644
+--- a/source/blender/makesdna/DNA_scene_types.h
++++ b/source/blender/makesdna/DNA_scene_types.h
+@@ -157,7 +157,6 @@ typedef struct FFMpegCodecData {
+   int audio_bitrate;
+   int audio_mixrate;
+   int audio_channels;
+-  char _pad0[4];
+   float audio_volume;
+   int gop_size;
+   /** Only used if FFMPEG_USE_MAX_B_FRAMES flag is set. */
+@@ -172,9 +171,7 @@ typedef struct FFMpegCodecData {
+   int rc_buffer_size;
+   int mux_packet_size;
+   int mux_rate;
+-  char _pad1[4];
+-
+-  IDProperty *properties;
++  void *_pad1;
+ } FFMpegCodecData;
+ 
+ /* ************************************************************* */
+diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
+index 201ea5469cc..e9b9b43422c 100644
+--- a/source/blender/makesrna/intern/rna_scene.c
++++ b/source/blender/makesrna/intern/rna_scene.c
+@@ -1480,18 +1480,6 @@ static void rna_FFmpegSettings_lossless_output_set(PointerRNA *ptr, bool value)
+   else {
+     rd->ffcodecdata.flags &= ~FFMPEG_LOSSLESS_OUTPUT;
+   }
+-
+-  BKE_ffmpeg_codec_settings_verify(rd);
+-}
+-
+-static void rna_FFmpegSettings_codec_settings_update(Main *UNUSED(bmain),
+-                                                     Scene *UNUSED(scene_unused),
+-                                                     PointerRNA *ptr)
+-{
+-  Scene *scene = (Scene *)ptr->owner_id;
+-  RenderData *rd = &scene->r;
+-
+-  BKE_ffmpeg_codec_settings_verify(rd);
+ }
+ #  endif
+ 
+@@ -5715,8 +5703,6 @@ static void rna_def_scene_ffmpeg_settings(BlenderRNA *brna)
+   RNA_def_property_enum_items(prop, ffmpeg_format_items);
+   RNA_def_property_enum_default(prop, FFMPEG_MKV);
+   RNA_def_property_ui_text(prop, "Container", "Output file container");
+-  RNA_def_property_update(
+-      prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_FFmpegSettings_codec_settings_update");
+ 
+   prop = RNA_def_property(srna, "codec", PROP_ENUM, PROP_NONE);
+   RNA_def_property_enum_bitflag_sdna(prop, NULL, "codec");
+@@ -5724,8 +5710,6 @@ static void rna_def_scene_ffmpeg_settings(BlenderRNA *brna)
+   RNA_def_property_enum_items(prop, ffmpeg_codec_items);
+   RNA_def_property_enum_default(prop, AV_CODEC_ID_H264);
+   RNA_def_property_ui_text(prop, "Video Codec", "FFmpeg codec to use for video output");
+-  RNA_def_property_update(
+-      prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_FFmpegSettings_codec_settings_update");
+ 
+   prop = RNA_def_property(srna, "video_bitrate", PROP_INT, PROP_NONE);
+   RNA_def_property_int_sdna(prop, NULL, "video_bitrate");


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/blender/, media-gfx/blender/files/
@ 2022-03-14 18:52 Sam James
  0 siblings, 0 replies; 21+ messages in thread
From: Sam James @ 2022-03-14 18:52 UTC (permalink / raw
  To: gentoo-commits

commit:     b03f30e16bf9ad41c6c835a89c7ccc3f1ff81e04
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 14 18:51:51 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Mar 14 18:52:01 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b03f30e1

media-gfx/blender: fix SizeViolation

Signed-off-by: Sam James <sam <AT> gentoo.org>

 media-gfx/blender/blender-3.0.1-r5.ebuild          |    2 +-
 .../blender/files/blender-3.0.1-ffmpeg-5.0.patch   | 1045 --------------------
 2 files changed, 1 insertion(+), 1046 deletions(-)

diff --git a/media-gfx/blender/blender-3.0.1-r5.ebuild b/media-gfx/blender/blender-3.0.1-r5.ebuild
index 5f9da3900d6d..f9c141963446 100644
--- a/media-gfx/blender/blender-3.0.1-r5.ebuild
+++ b/media-gfx/blender/blender-3.0.1-r5.ebuild
@@ -16,7 +16,7 @@ if [[ ${PV} = *9999* ]] ; then
 	EGIT_REPO_URI="https://git.blender.org/blender.git"
 else
 	SRC_URI="https://download.blender.org/source/${P}.tar.xz"
-        SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PN}-3.0.1-ffmpeg-5.0.patch.bz2"
+	SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PN}-3.0.1-ffmpeg-5.0.patch.bz2"
 
 	# Update these between major releases.
 	TEST_TARBALL_VERSION="3.0.0"

diff --git a/media-gfx/blender/files/blender-3.0.1-ffmpeg-5.0.patch b/media-gfx/blender/files/blender-3.0.1-ffmpeg-5.0.patch
deleted file mode 100644
index 5cd23b9e4b21..000000000000
--- a/media-gfx/blender/files/blender-3.0.1-ffmpeg-5.0.patch
+++ /dev/null
@@ -1,1045 +0,0 @@
-commit af6a1b08e3f0d0070ac9423868d2d3f81057717a
-Author: Sebastian Parborg <darkdefende@gmail.com>
-Date:   Fri Feb 18 18:20:06 2022 +0100
-
-    VSE: Refactor our code to be compatible with ffmpeg 5.0
-    
-    In ffmpeg 5.0, several variables were made const to try to prevent bad API usage.
-    Removed some dead code that wasn't used anymore as well.
-    
-    Reviewed By: Richard Antalik
-    
-    Differential Revision: http://developer.blender.org/D14063
-
-diff --git a/extern/audaspace/plugins/ffmpeg/FFMPEGReader.cpp b/extern/audaspace/plugins/ffmpeg/FFMPEGReader.cpp
-index de3ca099696..69bb45119a6 100644
---- a/extern/audaspace/plugins/ffmpeg/FFMPEGReader.cpp
-+++ b/extern/audaspace/plugins/ffmpeg/FFMPEGReader.cpp
-@@ -177,7 +177,7 @@ void FFMPEGReader::init(int stream)
- 
- 	// get a decoder and open it
- #ifndef FFMPEG_OLD_CODE
--	AVCodec* aCodec = avcodec_find_decoder(m_formatCtx->streams[m_stream]->codecpar->codec_id);
-+	const AVCodec* aCodec = avcodec_find_decoder(m_formatCtx->streams[m_stream]->codecpar->codec_id);
- 
- 	if(!aCodec)
- 		AUD_THROW(FileException, "File couldn't be read, no decoder found with ffmpeg.");
-diff --git a/extern/audaspace/plugins/ffmpeg/FFMPEGWriter.cpp b/extern/audaspace/plugins/ffmpeg/FFMPEGWriter.cpp
-index 10517d1d596..32eb2330594 100644
---- a/extern/audaspace/plugins/ffmpeg/FFMPEGWriter.cpp
-+++ b/extern/audaspace/plugins/ffmpeg/FFMPEGWriter.cpp
-@@ -23,6 +23,7 @@
- extern "C" {
- #include <libavcodec/avcodec.h>
- #include <libavformat/avio.h>
-+#include <libavutil/channel_layout.h>
- }
- 
- AUD_NAMESPACE_BEGIN
-@@ -171,66 +172,66 @@ FFMPEGWriter::FFMPEGWriter(std::string filename, DeviceSpecs specs, Container fo
- 	if(avformat_alloc_output_context2(&m_formatCtx, nullptr, formats[format], filename.c_str()) < 0)
- 		AUD_THROW(FileException, "File couldn't be written, format couldn't be found with ffmpeg.");
- 
--	AVOutputFormat* outputFmt = m_formatCtx->oformat;
-+	const AVOutputFormat* outputFmt = m_formatCtx->oformat;
- 
- 	if(!outputFmt) {
- 		avformat_free_context(m_formatCtx);
- 		AUD_THROW(FileException, "File couldn't be written, output format couldn't be found with ffmpeg.");
- 	}
- 
--	outputFmt->audio_codec = AV_CODEC_ID_NONE;
-+	AVCodecID audio_codec = AV_CODEC_ID_NONE;
- 
- 	switch(codec)
- 	{
- 	case CODEC_AAC:
--		outputFmt->audio_codec = AV_CODEC_ID_AAC;
-+		audio_codec = AV_CODEC_ID_AAC;
- 		break;
- 	case CODEC_AC3:
--		outputFmt->audio_codec = AV_CODEC_ID_AC3;
-+		audio_codec = AV_CODEC_ID_AC3;
- 		break;
- 	case CODEC_FLAC:
--		outputFmt->audio_codec = AV_CODEC_ID_FLAC;
-+		audio_codec = AV_CODEC_ID_FLAC;
- 		break;
- 	case CODEC_MP2:
--		outputFmt->audio_codec = AV_CODEC_ID_MP2;
-+		audio_codec = AV_CODEC_ID_MP2;
- 		break;
- 	case CODEC_MP3:
--		outputFmt->audio_codec = AV_CODEC_ID_MP3;
-+		audio_codec = AV_CODEC_ID_MP3;
- 		break;
- 	case CODEC_OPUS:
--		outputFmt->audio_codec = AV_CODEC_ID_OPUS;
-+		audio_codec = AV_CODEC_ID_OPUS;
- 		break;
- 	case CODEC_PCM:
- 		switch(specs.format)
- 		{
- 		case FORMAT_U8:
--			outputFmt->audio_codec = AV_CODEC_ID_PCM_U8;
-+			audio_codec = AV_CODEC_ID_PCM_U8;
- 			break;
- 		case FORMAT_S16:
--			outputFmt->audio_codec = AV_CODEC_ID_PCM_S16LE;
-+			audio_codec = AV_CODEC_ID_PCM_S16LE;
- 			break;
- 		case FORMAT_S24:
--			outputFmt->audio_codec = AV_CODEC_ID_PCM_S24LE;
-+			audio_codec = AV_CODEC_ID_PCM_S24LE;
- 			break;
- 		case FORMAT_S32:
--			outputFmt->audio_codec = AV_CODEC_ID_PCM_S32LE;
-+			audio_codec = AV_CODEC_ID_PCM_S32LE;
- 			break;
- 		case FORMAT_FLOAT32:
--			outputFmt->audio_codec = AV_CODEC_ID_PCM_F32LE;
-+			audio_codec = AV_CODEC_ID_PCM_F32LE;
- 			break;
- 		case FORMAT_FLOAT64:
--			outputFmt->audio_codec = AV_CODEC_ID_PCM_F64LE;
-+			audio_codec = AV_CODEC_ID_PCM_F64LE;
- 			break;
- 		default:
--			outputFmt->audio_codec = AV_CODEC_ID_NONE;
-+			audio_codec = AV_CODEC_ID_NONE;
- 			break;
- 		}
- 		break;
- 	case CODEC_VORBIS:
--		outputFmt->audio_codec = AV_CODEC_ID_VORBIS;
-+		audio_codec = AV_CODEC_ID_VORBIS;
- 		break;
- 	default:
--		outputFmt->audio_codec = AV_CODEC_ID_NONE;
-+		audio_codec = AV_CODEC_ID_NONE;
- 		break;
- 	}
- 
-@@ -268,10 +269,10 @@ FFMPEGWriter::FFMPEGWriter(std::string filename, DeviceSpecs specs, Container fo
- 
- 	try
- 	{
--		if(outputFmt->audio_codec == AV_CODEC_ID_NONE)
-+		if(audio_codec == AV_CODEC_ID_NONE)
- 			AUD_THROW(FileException, "File couldn't be written, audio codec not found with ffmpeg.");
- 
--		AVCodec* codec = avcodec_find_encoder(outputFmt->audio_codec);
-+		const AVCodec* codec = avcodec_find_encoder(audio_codec);
- 		if(!codec)
- 			AUD_THROW(FileException, "File couldn't be written, audio encoder couldn't be found with ffmpeg.");
- 
-diff --git a/source/blender/blenkernel/BKE_writeffmpeg.h b/source/blender/blenkernel/BKE_writeffmpeg.h
-index 4c966c55e41..d959bb85c81 100644
---- a/source/blender/blenkernel/BKE_writeffmpeg.h
-+++ b/source/blender/blenkernel/BKE_writeffmpeg.h
-@@ -85,12 +85,8 @@ void BKE_ffmpeg_filepath_get(char *string,
- 
- void BKE_ffmpeg_preset_set(struct RenderData *rd, int preset);
- void BKE_ffmpeg_image_type_verify(struct RenderData *rd, struct ImageFormatData *imf);
--void BKE_ffmpeg_codec_settings_verify(struct RenderData *rd);
- bool BKE_ffmpeg_alpha_channel_is_supported(const struct RenderData *rd);
- 
--int BKE_ffmpeg_property_add_string(struct RenderData *rd, const char *type, const char *str);
--void BKE_ffmpeg_property_del(struct RenderData *rd, void *type, void *prop_);
--
- void *BKE_ffmpeg_context_create(void);
- void BKE_ffmpeg_context_free(void *context_v);
- 
-diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
-index 203676d0dd8..6d5abbd90d3 100644
---- a/source/blender/blenkernel/intern/scene.c
-+++ b/source/blender/blenkernel/intern/scene.c
-@@ -333,12 +333,6 @@ static void scene_copy_data(Main *bmain, ID *id_dst, const ID *id_src, const int
-     scene_dst->r.avicodecdata->lpParms = MEM_dupallocN(scene_dst->r.avicodecdata->lpParms);
-   }
- 
--  if (scene_src->r.ffcodecdata.properties) {
--    /* intentionally check sce_dst not sce_src. */ /* XXX ??? comment outdated... */
--    scene_dst->r.ffcodecdata.properties = IDP_CopyProperty_ex(scene_src->r.ffcodecdata.properties,
--                                                              flag_subdata);
--  }
--
-   if (scene_src->display.shading.prop) {
-     scene_dst->display.shading.prop = IDP_CopyProperty(scene_src->display.shading.prop);
-   }
-@@ -409,10 +403,6 @@ static void scene_free_data(ID *id)
-     MEM_freeN(scene->r.avicodecdata);
-     scene->r.avicodecdata = NULL;
-   }
--  if (scene->r.ffcodecdata.properties) {
--    IDP_FreeProperty(scene->r.ffcodecdata.properties);
--    scene->r.ffcodecdata.properties = NULL;
--  }
- 
-   scene_free_markers(scene, do_id_user);
-   BLI_freelistN(&scene->transform_spaces);
-@@ -1030,9 +1020,6 @@ static void scene_blend_write(BlendWriter *writer, ID *id, const void *id_addres
-       BLO_write_raw(writer, (size_t)sce->r.avicodecdata->cbParms, sce->r.avicodecdata->lpParms);
-     }
-   }
--  if (sce->r.ffcodecdata.properties) {
--    IDP_BlendWrite(writer, sce->r.ffcodecdata.properties);
--  }
- 
-   /* writing dynamic list of TimeMarkers to the blend file */
-   LISTBASE_FOREACH (TimeMarker *, marker, &sce->markers) {
-@@ -1272,11 +1259,6 @@ static void scene_blend_read_data(BlendDataReader *reader, ID *id)
-     BLO_read_data_address(reader, &sce->r.avicodecdata->lpFormat);
-     BLO_read_data_address(reader, &sce->r.avicodecdata->lpParms);
-   }
--  if (sce->r.ffcodecdata.properties) {
--    BLO_read_data_address(reader, &sce->r.ffcodecdata.properties);
--    IDP_BlendDataRead(reader, &sce->r.ffcodecdata.properties);
--  }
--
-   BLO_read_list(reader, &(sce->markers));
-   LISTBASE_FOREACH (TimeMarker *, marker, &sce->markers) {
-     BLO_read_data_address(reader, &marker->prop);
-@@ -1889,10 +1871,6 @@ Scene *BKE_scene_duplicate(Main *bmain, Scene *sce, eSceneCopyMethod type)
-       sce_copy->r.avicodecdata->lpParms = MEM_dupallocN(sce_copy->r.avicodecdata->lpParms);
-     }
- 
--    if (sce->r.ffcodecdata.properties) { /* intentionally check scen not sce. */
--      sce_copy->r.ffcodecdata.properties = IDP_CopyProperty(sce->r.ffcodecdata.properties);
--    }
--
-     BKE_sound_reset_scene_runtime(sce_copy);
- 
-     /* grease pencil */
-diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c
-index 9effeb831b6..45bd977c109 100644
---- a/source/blender/blenkernel/intern/writeffmpeg.c
-+++ b/source/blender/blenkernel/intern/writeffmpeg.c
-@@ -56,6 +56,7 @@
-  * like M_SQRT1_2 leading to warnings with MSVC */
- #  include <libavcodec/avcodec.h>
- #  include <libavformat/avformat.h>
-+#  include <libavutil/channel_layout.h>
- #  include <libavutil/imgutils.h>
- #  include <libavutil/opt.h>
- #  include <libavutil/rational.h>
-@@ -115,8 +116,6 @@ typedef struct FFMpegContext {
-     printf
- 
- static void ffmpeg_dict_set_int(AVDictionary **dict, const char *key, int value);
--static void ffmpeg_dict_set_float(AVDictionary **dict, const char *key, float value);
--static void ffmpeg_set_expert_options(RenderData *rd);
- static void ffmpeg_filepath_get(FFMpegContext *context,
-                                 char *string,
-                                 const struct RenderData *rd,
-@@ -428,99 +427,6 @@ static AVFrame *generate_video_frame(FFMpegContext *context, const uint8_t *pixe
-   return context->current_frame;
- }
- 
--static void set_ffmpeg_property_option(IDProperty *prop, AVDictionary **dictionary)
--{
--  char name[128];
--  char *param;
--
--  PRINT("FFMPEG expert option: %s: ", prop->name);
--
--  BLI_strncpy(name, prop->name, sizeof(name));
--
--  param = strchr(name, ':');
--
--  if (param) {
--    *param++ = '\0';
--  }
--
--  switch (prop->type) {
--    case IDP_STRING:
--      PRINT("%s.\n", IDP_String(prop));
--      av_dict_set(dictionary, name, IDP_String(prop), 0);
--      break;
--    case IDP_FLOAT:
--      PRINT("%g.\n", IDP_Float(prop));
--      ffmpeg_dict_set_float(dictionary, prop->name, IDP_Float(prop));
--      break;
--    case IDP_INT:
--      PRINT("%d.\n", IDP_Int(prop));
--
--      if (param) {
--        if (IDP_Int(prop)) {
--          av_dict_set(dictionary, name, param, 0);
--        }
--        else {
--          return;
--        }
--      }
--      else {
--        ffmpeg_dict_set_int(dictionary, prop->name, IDP_Int(prop));
--      }
--      break;
--  }
--}
--
--static int ffmpeg_proprty_valid(AVCodecContext *c, const char *prop_name, IDProperty *curr)
--{
--  int valid = 1;
--
--  if (STREQ(prop_name, "video")) {
--    if (STREQ(curr->name, "bf")) {
--      /* flash codec doesn't support b frames */
--      valid &= c->codec_id != AV_CODEC_ID_FLV1;
--    }
--  }
--
--  return valid;
--}
--
--static void set_ffmpeg_properties(RenderData *rd,
--                                  AVCodecContext *c,
--                                  const char *prop_name,
--                                  AVDictionary **dictionary)
--{
--  IDProperty *prop;
--  IDProperty *curr;
--
--  /* TODO(sergey): This is actually rather stupid, because changing
--   * codec settings in render panel would also set expert options.
--   *
--   * But we need ti here in order to get rid of deprecated settings
--   * when opening old files in new blender.
--   *
--   * For as long we don't allow editing properties in the interface
--   * it's all good. bug if we allow editing them, we'll need to
--   * replace it with some smarter code which would port settings
--   * from deprecated to new one.
--   */
--  ffmpeg_set_expert_options(rd);
--
--  if (!rd->ffcodecdata.properties) {
--    return;
--  }
--
--  prop = IDP_GetPropertyFromGroup(rd->ffcodecdata.properties, prop_name);
--  if (!prop) {
--    return;
--  }
--
--  for (curr = prop->data.group.first; curr; curr = curr->next) {
--    if (ffmpeg_proprty_valid(c, prop_name, curr)) {
--      set_ffmpeg_property_option(curr, dictionary);
--    }
--  }
--}
--
- static AVRational calc_time_base(uint den, double num, int codec_id)
- {
-   /* Convert the input 'num' to an integer. Simply shift the decimal places until we get an integer
-@@ -575,7 +481,7 @@ static AVStream *alloc_video_stream(FFMpegContext *context,
-                                     int error_size)
- {
-   AVStream *st;
--  AVCodec *codec;
-+  const AVCodec *codec;
-   AVDictionary *opts = NULL;
- 
-   error[0] = '\0';
-@@ -588,21 +494,15 @@ static AVStream *alloc_video_stream(FFMpegContext *context,
- 
-   /* Set up the codec context */
- 
--  context->video_codec = avcodec_alloc_context3(NULL);
--  AVCodecContext *c = context->video_codec;
--  c->codec_id = codec_id;
--  c->codec_type = AVMEDIA_TYPE_VIDEO;
--
--  codec = avcodec_find_encoder(c->codec_id);
-+  codec = avcodec_find_encoder(codec_id);
-   if (!codec) {
-     fprintf(stderr, "Couldn't find valid video codec\n");
--    avcodec_free_context(&c);
-     context->video_codec = NULL;
-     return NULL;
-   }
- 
--  /* Load codec defaults into 'c'. */
--  avcodec_get_context_defaults3(c, codec);
-+  context->video_codec = avcodec_alloc_context3(codec);
-+  AVCodecContext *c = context->video_codec;
- 
-   /* Get some values from the current render settings */
- 
-@@ -716,6 +616,13 @@ static AVStream *alloc_video_stream(FFMpegContext *context,
-     }
-   }
- 
-+  if (codec_id == AV_CODEC_ID_DNXHD) {
-+    if (rd->ffcodecdata.flags & FFMPEG_LOSSLESS_OUTPUT) {
-+      /* Set the block decision algorithm to be of the highest quality ("rd" == 2). */
-+      c->mb_decision = 2;
-+    }
-+  }
-+
-   if (codec_id == AV_CODEC_ID_FFV1) {
-     c->pix_fmt = AV_PIX_FMT_RGB32;
-   }
-@@ -752,8 +659,6 @@ static AVStream *alloc_video_stream(FFMpegContext *context,
-                                                             255);
-   st->avg_frame_rate = av_inv_q(c->time_base);
- 
--  set_ffmpeg_properties(rd, c, "video", &opts);
--
-   if (codec->capabilities & AV_CODEC_CAP_AUTO_THREADS) {
-     c->thread_count = 0;
-   }
-@@ -818,8 +723,7 @@ static AVStream *alloc_audio_stream(FFMpegContext *context,
-                                     int error_size)
- {
-   AVStream *st;
--  AVCodec *codec;
--  AVDictionary *opts = NULL;
-+  const AVCodec *codec;
- 
-   error[0] = '\0';
- 
-@@ -829,24 +733,17 @@ static AVStream *alloc_audio_stream(FFMpegContext *context,
-   }
-   st->id = 1;
- 
--  context->audio_codec = avcodec_alloc_context3(NULL);
--  AVCodecContext *c = context->audio_codec;
--  c->thread_count = BLI_system_thread_count();
--  c->thread_type = FF_THREAD_SLICE;
--
--  c->codec_id = codec_id;
--  c->codec_type = AVMEDIA_TYPE_AUDIO;
--
--  codec = avcodec_find_encoder(c->codec_id);
-+  codec = avcodec_find_encoder(codec_id);
-   if (!codec) {
-     fprintf(stderr, "Couldn't find valid audio codec\n");
--    avcodec_free_context(&c);
-     context->audio_codec = NULL;
-     return NULL;
-   }
- 
--  /* Load codec defaults into 'c'. */
--  avcodec_get_context_defaults3(c, codec);
-+  context->audio_codec = avcodec_alloc_context3(codec);
-+  AVCodecContext *c = context->audio_codec;
-+  c->thread_count = BLI_system_thread_count();
-+  c->thread_type = FF_THREAD_SLICE;
- 
-   c->sample_rate = rd->ffcodecdata.audio_mixrate;
-   c->bit_rate = context->ffmpeg_audio_bitrate * 1000;
-@@ -914,19 +811,15 @@ static AVStream *alloc_audio_stream(FFMpegContext *context,
-     c->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
-   }
- 
--  set_ffmpeg_properties(rd, c, "audio", &opts);
--
--  int ret = avcodec_open2(c, codec, &opts);
-+  int ret = avcodec_open2(c, codec, NULL);
- 
-   if (ret < 0) {
-     fprintf(stderr, "Couldn't initialize audio codec: %s\n", av_err2str(ret));
-     BLI_strncpy(error, IMB_ffmpeg_last_error(), error_size);
--    av_dict_free(&opts);
-     avcodec_free_context(&c);
-     context->audio_codec = NULL;
-     return NULL;
-   }
--  av_dict_free(&opts);
- 
-   /* need to prevent floating point exception when using vorbis audio codec,
-    * initialize this value in the same way as it's done in FFmpeg itself (sergey) */
-@@ -972,15 +865,6 @@ static void ffmpeg_dict_set_int(AVDictionary **dict, const char *key, int value)
-   av_dict_set(dict, key, buffer, 0);
- }
- 
--static void ffmpeg_dict_set_float(AVDictionary **dict, const char *key, float value)
--{
--  char buffer[32];
--
--  BLI_snprintf(buffer, sizeof(buffer), "%.8f", value);
--
--  av_dict_set(dict, key, buffer, 0);
--}
--
- static void ffmpeg_add_metadata_callback(void *data,
-                                          const char *propname,
-                                          char *propvalue,
-@@ -999,8 +883,7 @@ static int start_ffmpeg_impl(FFMpegContext *context,
- {
-   /* Handle to the output file */
-   AVFormatContext *of;
--  AVOutputFormat *fmt;
--  AVDictionary *opts = NULL;
-+  const AVOutputFormat *fmt;
-   char name[FILE_MAX], error[1024];
-   const char **exts;
- 
-@@ -1037,11 +920,13 @@ static int start_ffmpeg_impl(FFMpegContext *context,
-       rectx,
-       recty);
- 
-+  /* Sanity checks for the output file extensions. */
-   exts = get_file_extensions(context->ffmpeg_type);
-   if (!exts) {
-     BKE_report(reports, RPT_ERROR, "No valid formats found");
-     return 0;
-   }
-+
-   fmt = av_guess_format(NULL, exts[0], NULL);
-   if (!fmt) {
-     BKE_report(reports, RPT_ERROR, "No valid formats found");
-@@ -1050,66 +935,50 @@ static int start_ffmpeg_impl(FFMpegContext *context,
- 
-   of = avformat_alloc_context();
-   if (!of) {
--    BKE_report(reports, RPT_ERROR, "Error opening output file");
-+    BKE_report(reports, RPT_ERROR, "Can't allocate ffmpeg format context");
-     return 0;
-   }
- 
--  /* Returns after this must 'goto fail;' */
--
--  of->oformat = fmt;
--
--  /* Only bother with setting packet size & mux rate when CRF is not used. */
--  if (context->ffmpeg_crf == 0) {
--    of->packet_size = rd->ffcodecdata.mux_packet_size;
--    if (context->ffmpeg_audio_codec != AV_CODEC_ID_NONE) {
--      ffmpeg_dict_set_int(&opts, "muxrate", rd->ffcodecdata.mux_rate);
--    }
--    else {
--      av_dict_set(&opts, "muxrate", "0", 0);
--    }
--  }
--
--  ffmpeg_dict_set_int(&opts, "preload", (int)(0.5 * AV_TIME_BASE));
--
--  of->max_delay = (int)(0.7 * AV_TIME_BASE);
--
--  fmt->audio_codec = context->ffmpeg_audio_codec;
-+  enum AVCodecID audio_codec = context->ffmpeg_audio_codec;
-+  enum AVCodecID video_codec = context->ffmpeg_codec;
- 
-   of->url = av_strdup(name);
--  /* set the codec to the user's selection */
-+  /* Check if we need to force change the codec because of file type codec restrictions */
-   switch (context->ffmpeg_type) {
--    case FFMPEG_AVI:
--    case FFMPEG_MOV:
--    case FFMPEG_MKV:
--      fmt->video_codec = context->ffmpeg_codec;
--      break;
-     case FFMPEG_OGG:
--      fmt->video_codec = AV_CODEC_ID_THEORA;
-+      video_codec = AV_CODEC_ID_THEORA;
-       break;
-     case FFMPEG_DV:
--      fmt->video_codec = AV_CODEC_ID_DVVIDEO;
-+      video_codec = AV_CODEC_ID_DVVIDEO;
-       break;
-     case FFMPEG_MPEG1:
--      fmt->video_codec = AV_CODEC_ID_MPEG1VIDEO;
-+      video_codec = AV_CODEC_ID_MPEG1VIDEO;
-       break;
-     case FFMPEG_MPEG2:
--      fmt->video_codec = AV_CODEC_ID_MPEG2VIDEO;
-+      video_codec = AV_CODEC_ID_MPEG2VIDEO;
-       break;
-     case FFMPEG_H264:
--      fmt->video_codec = AV_CODEC_ID_H264;
-+      video_codec = AV_CODEC_ID_H264;
-       break;
-     case FFMPEG_XVID:
--      fmt->video_codec = AV_CODEC_ID_MPEG4;
-+      video_codec = AV_CODEC_ID_MPEG4;
-       break;
-     case FFMPEG_FLV:
--      fmt->video_codec = AV_CODEC_ID_FLV1;
-+      video_codec = AV_CODEC_ID_FLV1;
-       break;
--    case FFMPEG_MPEG4:
-     default:
--      fmt->video_codec = context->ffmpeg_codec;
-+      /* These containers are not restricted to any specific codec types.
-+       * Currently we expect these to be .avi, .mov, .mkv, and .mp4.
-+       */
-+      video_codec = context->ffmpeg_codec;
-       break;
-   }
--  if (fmt->video_codec == AV_CODEC_ID_DVVIDEO) {
-+
-+  /* Returns after this must 'goto fail;' */
-+
-+  of->oformat = fmt;
-+
-+  if (video_codec == AV_CODEC_ID_DVVIDEO) {
-     if (rectx != 720) {
-       BKE_report(reports, RPT_ERROR, "Render width has to be 720 pixels for DV!");
-       goto fail;
-@@ -1125,7 +994,7 @@ static int start_ffmpeg_impl(FFMpegContext *context,
-   }
- 
-   if (context->ffmpeg_type == FFMPEG_DV) {
--    fmt->audio_codec = AV_CODEC_ID_PCM_S16LE;
-+    audio_codec = AV_CODEC_ID_PCM_S16LE;
-     if (context->ffmpeg_audio_codec != AV_CODEC_ID_NONE &&
-         rd->ffcodecdata.audio_mixrate != 48000 && rd->ffcodecdata.audio_channels != 2) {
-       BKE_report(reports, RPT_ERROR, "FFMPEG only supports 48khz / stereo audio for DV!");
-@@ -1133,9 +1002,9 @@ static int start_ffmpeg_impl(FFMpegContext *context,
-     }
-   }
- 
--  if (fmt->video_codec != AV_CODEC_ID_NONE) {
-+  if (video_codec != AV_CODEC_ID_NONE) {
-     context->video_stream = alloc_video_stream(
--        context, rd, fmt->video_codec, of, rectx, recty, error, sizeof(error));
-+        context, rd, video_codec, of, rectx, recty, error, sizeof(error));
-     PRINT("alloc video stream %p\n", context->video_stream);
-     if (!context->video_stream) {
-       if (error[0]) {
-@@ -1151,8 +1020,7 @@ static int start_ffmpeg_impl(FFMpegContext *context,
-   }
- 
-   if (context->ffmpeg_audio_codec != AV_CODEC_ID_NONE) {
--    context->audio_stream = alloc_audio_stream(
--        context, rd, fmt->audio_codec, of, error, sizeof(error));
-+    context->audio_stream = alloc_audio_stream(context, rd, audio_codec, of, error, sizeof(error));
-     if (!context->audio_stream) {
-       if (error[0]) {
-         BKE_report(reports, RPT_ERROR, error);
-@@ -1189,7 +1057,6 @@ static int start_ffmpeg_impl(FFMpegContext *context,
- 
-   context->outfile = of;
-   av_dump_format(of, 0, name, 1);
--  av_dict_free(&opts);
- 
-   return 1;
- 
-@@ -1206,7 +1073,6 @@ fail:
-     context->audio_stream = NULL;
-   }
- 
--  av_dict_free(&opts);
-   avformat_free_context(of);
-   return 0;
- }
-@@ -1540,198 +1406,17 @@ void BKE_ffmpeg_end(void *context_v)
-   end_ffmpeg_impl(context, false);
- }
- 
--/* properties */
--
--void BKE_ffmpeg_property_del(RenderData *rd, void *type, void *prop_)
--{
--  struct IDProperty *prop = (struct IDProperty *)prop_;
--  IDProperty *group;
--
--  if (!rd->ffcodecdata.properties) {
--    return;
--  }
--
--  group = IDP_GetPropertyFromGroup(rd->ffcodecdata.properties, type);
--  if (group && prop) {
--    IDP_FreeFromGroup(group, prop);
--  }
--}
--
--static IDProperty *BKE_ffmpeg_property_add(RenderData *rd,
--                                           const char *type,
--                                           const AVOption *o,
--                                           const AVOption *parent)
--{
--  AVCodecContext c;
--  IDProperty *group;
--  IDProperty *prop;
--  IDPropertyTemplate val;
--  int idp_type;
--  char name[256];
--
--  val.i = 0;
--
--  avcodec_get_context_defaults3(&c, NULL);
--
--  if (!rd->ffcodecdata.properties) {
--    rd->ffcodecdata.properties = IDP_New(IDP_GROUP, &val, "ffmpeg");
--  }
--
--  group = IDP_GetPropertyFromGroup(rd->ffcodecdata.properties, type);
--
--  if (!group) {
--    group = IDP_New(IDP_GROUP, &val, type);
--    IDP_AddToGroup(rd->ffcodecdata.properties, group);
--  }
--
--  if (parent) {
--    BLI_snprintf(name, sizeof(name), "%s:%s", parent->name, o->name);
--  }
--  else {
--    BLI_strncpy(name, o->name, sizeof(name));
--  }
--
--  PRINT("ffmpeg_property_add: %s %s\n", type, name);
--
--  prop = IDP_GetPropertyFromGroup(group, name);
--  if (prop) {
--    return prop;
--  }
--
--  switch (o->type) {
--    case AV_OPT_TYPE_INT:
--    case AV_OPT_TYPE_INT64:
--      val.i = o->default_val.i64;
--      idp_type = IDP_INT;
--      break;
--    case AV_OPT_TYPE_DOUBLE:
--    case AV_OPT_TYPE_FLOAT:
--      val.f = o->default_val.dbl;
--      idp_type = IDP_FLOAT;
--      break;
--    case AV_OPT_TYPE_STRING:
--      val.string.str =
--          (char
--               *)"                                                                               ";
--      val.string.len = 80;
--      idp_type = IDP_STRING;
--      break;
--    case AV_OPT_TYPE_CONST:
--      val.i = 1;
--      idp_type = IDP_INT;
--      break;
--    default:
--      return NULL;
--  }
--  prop = IDP_New(idp_type, &val, name);
--  IDP_AddToGroup(group, prop);
--  return prop;
--}
--
--/* not all versions of ffmpeg include that, so here we go ... */
--
--int BKE_ffmpeg_property_add_string(RenderData *rd, const char *type, const char *str)
--{
--  AVCodecContext c;
--  const AVOption *o = NULL;
--  const AVOption *p = NULL;
--  char name_[128];
--  char *name;
--  char *param;
--  IDProperty *prop = NULL;
--
--  avcodec_get_context_defaults3(&c, NULL);
--
--  BLI_strncpy(name_, str, sizeof(name_));
--
--  name = name_;
--  while (*name == ' ') {
--    name++;
--  }
--
--  param = strchr(name, ':');
--
--  if (!param) {
--    param = strchr(name, ' ');
--  }
--  if (param) {
--    *param++ = '\0';
--    while (*param == ' ') {
--      param++;
--    }
--  }
--
--  o = av_opt_find(&c, name, NULL, 0, AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ);
--  if (!o) {
--    PRINT("Ignoring unknown expert option %s\n", str);
--    return 0;
--  }
--  if (param && o->type == AV_OPT_TYPE_CONST) {
--    return 0;
--  }
--  if (param && o->type != AV_OPT_TYPE_CONST && o->unit) {
--    p = av_opt_find(&c, param, o->unit, 0, AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ);
--    if (p) {
--      prop = BKE_ffmpeg_property_add(rd, (char *)type, p, o);
--    }
--    else {
--      PRINT("Ignoring unknown expert option %s\n", str);
--    }
--  }
--  else {
--    prop = BKE_ffmpeg_property_add(rd, (char *)type, o, NULL);
--  }
--
--  if (!prop) {
--    return 0;
--  }
--
--  if (param && !p) {
--    switch (prop->type) {
--      case IDP_INT:
--        IDP_Int(prop) = atoi(param);
--        break;
--      case IDP_FLOAT:
--        IDP_Float(prop) = atof(param);
--        break;
--      case IDP_STRING:
--        strncpy(IDP_String(prop), param, prop->len);
--        break;
--    }
--  }
--  return 1;
--}
--
--static void ffmpeg_set_expert_options(RenderData *rd)
--{
--  int codec_id = rd->ffcodecdata.codec;
--
--  if (rd->ffcodecdata.properties) {
--    IDP_FreePropertyContent(rd->ffcodecdata.properties);
--  }
--
--  if (codec_id == AV_CODEC_ID_DNXHD) {
--    if (rd->ffcodecdata.flags & FFMPEG_LOSSLESS_OUTPUT) {
--      BKE_ffmpeg_property_add_string(rd, "video", "mbd:rd");
--    }
--  }
--}
--
- void BKE_ffmpeg_preset_set(RenderData *rd, int preset)
- {
--  int isntsc = (rd->frs_sec != 25);
--
--  if (rd->ffcodecdata.properties) {
--    IDP_FreePropertyContent(rd->ffcodecdata.properties);
--  }
-+  bool is_ntsc = (rd->frs_sec != 25);
- 
-   switch (preset) {
-     case FFMPEG_PRESET_VCD:
-       rd->ffcodecdata.type = FFMPEG_MPEG1;
-       rd->ffcodecdata.video_bitrate = 1150;
-       rd->xsch = 352;
--      rd->ysch = isntsc ? 240 : 288;
--      rd->ffcodecdata.gop_size = isntsc ? 18 : 15;
-+      rd->ysch = is_ntsc ? 240 : 288;
-+      rd->ffcodecdata.gop_size = is_ntsc ? 18 : 15;
-       rd->ffcodecdata.rc_max_rate = 1150;
-       rd->ffcodecdata.rc_min_rate = 1150;
-       rd->ffcodecdata.rc_buffer_size = 40 * 8;
-@@ -1743,8 +1428,8 @@ void BKE_ffmpeg_preset_set(RenderData *rd, int preset)
-       rd->ffcodecdata.type = FFMPEG_MPEG2;
-       rd->ffcodecdata.video_bitrate = 2040;
-       rd->xsch = 480;
--      rd->ysch = isntsc ? 480 : 576;
--      rd->ffcodecdata.gop_size = isntsc ? 18 : 15;
-+      rd->ysch = is_ntsc ? 480 : 576;
-+      rd->ffcodecdata.gop_size = is_ntsc ? 18 : 15;
-       rd->ffcodecdata.rc_max_rate = 2516;
-       rd->ffcodecdata.rc_min_rate = 0;
-       rd->ffcodecdata.rc_buffer_size = 224 * 8;
-@@ -1761,7 +1446,7 @@ void BKE_ffmpeg_preset_set(RenderData *rd, int preset)
-       rd->ysch = isntsc ? 480 : 576;
- #  endif
- 
--      rd->ffcodecdata.gop_size = isntsc ? 18 : 15;
-+      rd->ffcodecdata.gop_size = is_ntsc ? 18 : 15;
-       rd->ffcodecdata.rc_max_rate = 9000;
-       rd->ffcodecdata.rc_min_rate = 0;
-       rd->ffcodecdata.rc_buffer_size = 224 * 8;
-@@ -1772,14 +1457,14 @@ void BKE_ffmpeg_preset_set(RenderData *rd, int preset)
-     case FFMPEG_PRESET_DV:
-       rd->ffcodecdata.type = FFMPEG_DV;
-       rd->xsch = 720;
--      rd->ysch = isntsc ? 480 : 576;
-+      rd->ysch = is_ntsc ? 480 : 576;
-       break;
- 
-     case FFMPEG_PRESET_H264:
-       rd->ffcodecdata.type = FFMPEG_AVI;
-       rd->ffcodecdata.codec = AV_CODEC_ID_H264;
-       rd->ffcodecdata.video_bitrate = 6000;
--      rd->ffcodecdata.gop_size = isntsc ? 18 : 15;
-+      rd->ffcodecdata.gop_size = is_ntsc ? 18 : 15;
-       rd->ffcodecdata.rc_max_rate = 9000;
-       rd->ffcodecdata.rc_min_rate = 0;
-       rd->ffcodecdata.rc_buffer_size = 224 * 8;
-@@ -1800,7 +1485,7 @@ void BKE_ffmpeg_preset_set(RenderData *rd, int preset)
-       }
- 
-       rd->ffcodecdata.video_bitrate = 6000;
--      rd->ffcodecdata.gop_size = isntsc ? 18 : 15;
-+      rd->ffcodecdata.gop_size = is_ntsc ? 18 : 15;
-       rd->ffcodecdata.rc_max_rate = 9000;
-       rd->ffcodecdata.rc_min_rate = 0;
-       rd->ffcodecdata.rc_buffer_size = 224 * 8;
-@@ -1808,8 +1493,6 @@ void BKE_ffmpeg_preset_set(RenderData *rd, int preset)
-       rd->ffcodecdata.mux_rate = 10080000;
-       break;
-   }
--
--  ffmpeg_set_expert_options(rd);
- }
- 
- void BKE_ffmpeg_image_type_verify(RenderData *rd, ImageFormatData *imf)
-@@ -1855,11 +1538,6 @@ void BKE_ffmpeg_image_type_verify(RenderData *rd, ImageFormatData *imf)
-   }
- }
- 
--void BKE_ffmpeg_codec_settings_verify(RenderData *rd)
--{
--  ffmpeg_set_expert_options(rd);
--}
--
- bool BKE_ffmpeg_alpha_channel_is_supported(const RenderData *rd)
- {
-   int codec = rd->ffcodecdata.codec;
-diff --git a/source/blender/imbuf/intern/IMB_anim.h b/source/blender/imbuf/intern/IMB_anim.h
-index c4e2ad9da7f..67fdb841317 100644
---- a/source/blender/imbuf/intern/IMB_anim.h
-+++ b/source/blender/imbuf/intern/IMB_anim.h
-@@ -124,7 +124,7 @@ struct anim {
- #ifdef WITH_FFMPEG
-   AVFormatContext *pFormatCtx;
-   AVCodecContext *pCodecCtx;
--  AVCodec *pCodec;
-+  const AVCodec *pCodec;
-   AVFrame *pFrame;
-   int pFrameComplete;
-   AVFrame *pFrameRGB;
-diff --git a/source/blender/imbuf/intern/anim_movie.c b/source/blender/imbuf/intern/anim_movie.c
-index 38dbb9bfc47..0d0ac798d3a 100644
---- a/source/blender/imbuf/intern/anim_movie.c
-+++ b/source/blender/imbuf/intern/anim_movie.c
-@@ -508,7 +508,7 @@ static int startffmpeg(struct anim *anim)
- {
-   int i, video_stream_index;
- 
--  AVCodec *pCodec;
-+  const AVCodec *pCodec;
-   AVFormatContext *pFormatCtx = NULL;
-   AVCodecContext *pCodecCtx;
-   AVRational frame_rate;
-diff --git a/source/blender/imbuf/intern/indexer.c b/source/blender/imbuf/intern/indexer.c
-index 00e96e7840b..55f1eced70f 100644
---- a/source/blender/imbuf/intern/indexer.c
-+++ b/source/blender/imbuf/intern/indexer.c
-@@ -493,7 +493,7 @@ struct proxy_output_ctx {
-   AVFormatContext *of;
-   AVStream *st;
-   AVCodecContext *c;
--  AVCodec *codec;
-+  const AVCodec *codec;
-   struct SwsContext *sws_ctx;
-   AVFrame *frame;
-   int cfra;
-@@ -525,12 +525,9 @@ static struct proxy_output_ctx *alloc_proxy_output_ffmpeg(
-   rv->st = avformat_new_stream(rv->of, NULL);
-   rv->st->id = 0;
- 
--  rv->c = avcodec_alloc_context3(NULL);
--  rv->c->codec_type = AVMEDIA_TYPE_VIDEO;
--  rv->c->codec_id = AV_CODEC_ID_H264;
-+  rv->codec = avcodec_find_encoder(AV_CODEC_ID_H264);
- 
--  rv->of->oformat->video_codec = rv->c->codec_id;
--  rv->codec = avcodec_find_encoder(rv->c->codec_id);
-+  rv->c = avcodec_alloc_context3(rv->codec);
- 
-   if (!rv->codec) {
-     fprintf(stderr,
-@@ -542,8 +539,6 @@ static struct proxy_output_ctx *alloc_proxy_output_ffmpeg(
-     return NULL;
-   }
- 
--  avcodec_get_context_defaults3(rv->c, rv->codec);
--
-   rv->c->width = width;
-   rv->c->height = height;
-   rv->c->gop_size = 10;
-@@ -794,7 +789,7 @@ typedef struct FFmpegIndexBuilderContext {
- 
-   AVFormatContext *iFormatCtx;
-   AVCodecContext *iCodecCtx;
--  AVCodec *iCodec;
-+  const AVCodec *iCodec;
-   AVStream *iStream;
-   int videoStream;
- 
-diff --git a/source/blender/imbuf/intern/util.c b/source/blender/imbuf/intern/util.c
-index 18ed4710e78..96005ed0a0d 100644
---- a/source/blender/imbuf/intern/util.c
-+++ b/source/blender/imbuf/intern/util.c
-@@ -267,7 +267,7 @@ static int isffmpeg(const char *filepath)
-   AVFormatContext *pFormatCtx = NULL;
-   unsigned int i;
-   int videoStream;
--  AVCodec *pCodec;
-+  const AVCodec *pCodec;
- 
-   if (BLI_path_extension_check_n(filepath,
-                                  ".swf",
-diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
-index 864358e040c..45fd4895f77 100644
---- a/source/blender/makesdna/DNA_scene_types.h
-+++ b/source/blender/makesdna/DNA_scene_types.h
-@@ -157,7 +157,6 @@ typedef struct FFMpegCodecData {
-   int audio_bitrate;
-   int audio_mixrate;
-   int audio_channels;
--  char _pad0[4];
-   float audio_volume;
-   int gop_size;
-   /** Only used if FFMPEG_USE_MAX_B_FRAMES flag is set. */
-@@ -172,9 +171,7 @@ typedef struct FFMpegCodecData {
-   int rc_buffer_size;
-   int mux_packet_size;
-   int mux_rate;
--  char _pad1[4];
--
--  IDProperty *properties;
-+  void *_pad1;
- } FFMpegCodecData;
- 
- /* ************************************************************* */
-diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
-index 201ea5469cc..e9b9b43422c 100644
---- a/source/blender/makesrna/intern/rna_scene.c
-+++ b/source/blender/makesrna/intern/rna_scene.c
-@@ -1480,18 +1480,6 @@ static void rna_FFmpegSettings_lossless_output_set(PointerRNA *ptr, bool value)
-   else {
-     rd->ffcodecdata.flags &= ~FFMPEG_LOSSLESS_OUTPUT;
-   }
--
--  BKE_ffmpeg_codec_settings_verify(rd);
--}
--
--static void rna_FFmpegSettings_codec_settings_update(Main *UNUSED(bmain),
--                                                     Scene *UNUSED(scene_unused),
--                                                     PointerRNA *ptr)
--{
--  Scene *scene = (Scene *)ptr->owner_id;
--  RenderData *rd = &scene->r;
--
--  BKE_ffmpeg_codec_settings_verify(rd);
- }
- #  endif
- 
-@@ -5715,8 +5703,6 @@ static void rna_def_scene_ffmpeg_settings(BlenderRNA *brna)
-   RNA_def_property_enum_items(prop, ffmpeg_format_items);
-   RNA_def_property_enum_default(prop, FFMPEG_MKV);
-   RNA_def_property_ui_text(prop, "Container", "Output file container");
--  RNA_def_property_update(
--      prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_FFmpegSettings_codec_settings_update");
- 
-   prop = RNA_def_property(srna, "codec", PROP_ENUM, PROP_NONE);
-   RNA_def_property_enum_bitflag_sdna(prop, NULL, "codec");
-@@ -5724,8 +5710,6 @@ static void rna_def_scene_ffmpeg_settings(BlenderRNA *brna)
-   RNA_def_property_enum_items(prop, ffmpeg_codec_items);
-   RNA_def_property_enum_default(prop, AV_CODEC_ID_H264);
-   RNA_def_property_ui_text(prop, "Video Codec", "FFmpeg codec to use for video output");
--  RNA_def_property_update(
--      prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_FFmpegSettings_codec_settings_update");
- 
-   prop = RNA_def_property(srna, "video_bitrate", PROP_INT, PROP_NONE);
-   RNA_def_property_int_sdna(prop, NULL, "video_bitrate");


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/blender/, media-gfx/blender/files/
@ 2022-09-25 12:29 Ionen Wolkens
  0 siblings, 0 replies; 21+ messages in thread
From: Ionen Wolkens @ 2022-09-25 12:29 UTC (permalink / raw
  To: gentoo-commits

commit:     240b8b5737d5451ad70466ccc16e49630c295863
Author:     Bernd Waibel <waebbl-gentoo <AT> posteo <DOT> net>
AuthorDate: Sat Sep 17 09:06:21 2022 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Sun Sep 25 12:22:38 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=240b8b57

media-gfx/blender: add optix support

Add compile and runtime support for the NVIDIA OptiX library.

Signed-off-by: Bernd Waibel <waebbl-gentoo <AT> posteo.net>
Closes: https://bugs.gentoo.org/741564
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 media-gfx/blender/blender-3.2.2.ebuild             |  15 ++-
 ...option-to-specify-OptiX-runtime-root-dire.patch | 108 +++++++++++++++++++++
 ...-wrong-Cycles-OptiX-runtime-compilation-i.patch |  23 +++++
 media-gfx/blender/metadata.xml                     |   3 +
 4 files changed, 148 insertions(+), 1 deletion(-)

diff --git a/media-gfx/blender/blender-3.2.2.ebuild b/media-gfx/blender/blender-3.2.2.ebuild
index b8269d9b77fb..4442e89a027e 100644
--- a/media-gfx/blender/blender-3.2.2.ebuild
+++ b/media-gfx/blender/blender-3.2.2.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 )
@@ -126,6 +129,8 @@ BDEPEND="
 PATCHES=(
 	"${FILESDIR}"/${PN}-3.2.2-support-building-with-musl-libc.patch
 	"${FILESDIR}"/${PN}-3.2.2-musl-glibc-prereq.patch
+	"${FILESDIR}"/${PN}-3.2.2-Cycles-add-option-to-specify-OptiX-runtime-root-dire.patch
+	"${FILESDIR}"/${PN}-3.2.2-Fix-T100845-wrong-Cycles-OptiX-runtime-compilation-i.patch
 )
 
 blender_check_requirements() {
@@ -222,6 +227,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
@@ -269,6 +275,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

diff --git a/media-gfx/blender/files/blender-3.2.2-Cycles-add-option-to-specify-OptiX-runtime-root-dire.patch b/media-gfx/blender/files/blender-3.2.2-Cycles-add-option-to-specify-OptiX-runtime-root-dire.patch
new file mode 100644
index 000000000000..2a7b33cf8ac4
--- /dev/null
+++ b/media-gfx/blender/files/blender-3.2.2-Cycles-add-option-to-specify-OptiX-runtime-root-dire.patch
@@ -0,0 +1,108 @@
+From https://developer.blender.org/rB74caf773619bbf6a0f95c598b66261a6bef392ee
+From: Brecht Van Lommel <brecht@blender.org>
+Date: Mon, 29 Aug 2022 19:12:15 +0200
+Subject: [PATCH 001/539] Cycles: add option to specify OptiX runtime root
+ directory
+
+This allows individual users or Linux distributions to specify a directory
+Cycles will automatically look for the OptiX include folder, to compile kernels
+at runtime.
+
+It is still possible to override this with the OPTIX_ROOT_DIR environment
+variable at runtime.
+
+Based on patch by Sebastian Parborg.
+
+Ref D15792
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -435,10 +435,16 @@ if(NOT APPLE)
+   option(WITH_CYCLES_CUBIN_COMPILER    "Build cubins with nvrtc based compiler instead of nvcc" OFF)
+   option(WITH_CYCLES_CUDA_BUILD_SERIAL "Build cubins one after another (useful on machines with limited RAM)" OFF)
+   option(WITH_CUDA_DYNLOAD             "Dynamically load CUDA libraries at runtime (for developers, makes cuda-gdb work)" ON)
++
++  set(OPTIX_ROOT_DIR                   "" CACHE PATH "Path to the OptiX SDK root directory, for building Cycles OptiX kernels.")
++  set(CYCLES_RUNTIME_OPTIX_ROOT_DIR    "" CACHE PATH "Path to the OptiX SDK root directory. When set, this path will be used at runtime to compile OptiX kernels.")
++
+   mark_as_advanced(CYCLES_CUDA_BINARIES_ARCH)
+   mark_as_advanced(WITH_CYCLES_CUBIN_COMPILER)
+   mark_as_advanced(WITH_CYCLES_CUDA_BUILD_SERIAL)
+   mark_as_advanced(WITH_CUDA_DYNLOAD)
++  mark_as_advanced(OPTIX_ROOT_DIR)
++  mark_as_advanced(CYCLES_RUNTIME_OPTIX_ROOT_DIR)
+ endif()
+ 
+ # AMD HIP
+--- a/intern/cycles/device/CMakeLists.txt
++++ b/intern/cycles/device/CMakeLists.txt
+@@ -19,6 +19,8 @@ if(WITH_CYCLES_DEVICE_OPTIX OR WITH_CYCLES_DEVICE_CUDA)
+     )
+     add_definitions(-DCYCLES_CUDA_NVCC_EXECUTABLE="${CUDA_NVCC_EXECUTABLE}")
+   endif()
++
++  add_definitions(-DCYCLES_RUNTIME_OPTIX_ROOT_DIR="${CYCLES_RUNTIME_OPTIX_ROOT_DIR}")
+ endif()
+ 
+ if(WITH_CYCLES_DEVICE_HIP AND WITH_HIP_DYNLOAD)
+--- a/intern/cycles/device/optix/device_impl.cpp
++++ b/intern/cycles/device/optix/device_impl.cpp
+@@ -342,15 +342,29 @@ BVHLayoutMask OptiXDevice::get_bvh_layout_mask() const
+   return BVH_LAYOUT_OPTIX;
+ }
+ 
++static string get_optix_include_dir()
++{
++  const char *env_dir = getenv("OPTIX_ROOT_DIR");
++  const char *default_dir = CYCLES_RUNTIME_OPTIX_ROOT_DIR;
++
++  if (env_dir && env_dir[0]) {
++    const string env_include_dir = path_join(env_dir, "include");
++    return env_include_dir;
++  }
++  else if (default_dir[0]) {
++    const string default_include_dir = path_join(default_dir, "include");
++    return default_include_dir;
++  }
++
++  return string();
++}
++
+ string OptiXDevice::compile_kernel_get_common_cflags(const uint kernel_features)
+ {
+   string common_cflags = CUDADevice::compile_kernel_get_common_cflags(kernel_features);
+ 
+   /* Add OptiX SDK include directory to include paths. */
+-  const char *optix_sdk_path = getenv("OPTIX_ROOT_DIR");
+-  if (optix_sdk_path) {
+-    common_cflags += string_printf(" -I\"%s/include\"", optix_sdk_path);
+-  }
++  common_cflags += string_printf(" -I\"%s/include\"", get_optix_include_dir().c_str());
+ 
+   /* Specialization for shader raytracing. */
+   if (kernel_features & KERNEL_FEATURE_NODE_RAYTRACE) {
+@@ -460,10 +474,19 @@ bool OptiXDevice::load_kernels(const uint kernel_features)
+                              "lib/kernel_optix_shader_raytrace.ptx" :
+                              "lib/kernel_optix.ptx");
+     if (use_adaptive_compilation() || path_file_size(ptx_filename) == -1) {
+-      if (!getenv("OPTIX_ROOT_DIR")) {
++      std::string optix_include_dir = get_optix_include_dir();
++      if (optix_include_dir.empty()) {
+         set_error(
+-            "Missing OPTIX_ROOT_DIR environment variable (which must be set with the path to "
+-            "the Optix SDK to be able to compile Optix kernels on demand).");
++            "Unable to compile OptiX kernels at runtime. Set OPTIX_ROOT_DIR environment variable "
++            "to a directory containing the OptiX SDK.");
++        return false;
++      }
++      else if (!path_is_directory(optix_include_dir)) {
++        set_error(string_printf(
++            "OptiX headers not found at %s, unable to compile OptiX kernels at runtime. Install "
++            "OptiX SDK in the specified location, or set OPTIX_ROOT_DIR environment variable to a "
++            "directory containing the OptiX SDK.",
++            optix_include_dir.c_str()));
+         return false;
+       }
+       ptx_filename = compile_kernel(
+-- 
+2.37.3
+

diff --git a/media-gfx/blender/files/blender-3.2.2-Fix-T100845-wrong-Cycles-OptiX-runtime-compilation-i.patch b/media-gfx/blender/files/blender-3.2.2-Fix-T100845-wrong-Cycles-OptiX-runtime-compilation-i.patch
new file mode 100644
index 000000000000..921b648ca388
--- /dev/null
+++ b/media-gfx/blender/files/blender-3.2.2-Fix-T100845-wrong-Cycles-OptiX-runtime-compilation-i.patch
@@ -0,0 +1,23 @@
+From https://developer.blender.org/rB74477149dddfddeca71be6770d520f870c0b5bc9
+From: Josh Whelchel <soundofjw>
+Date: Tue, 6 Sep 2022 15:39:39 +0200
+Subject: [PATCH 663/965] Fix T100845: wrong Cycles OptiX runtime compilation
+ include path
+
+Causing OptiX kernel build errors on Arch Linux.
+
+Differential Revision: https://developer.blender.org/D15891
+--- a/intern/cycles/device/optix/device_impl.cpp
++++ b/intern/cycles/device/optix/device_impl.cpp
+@@ -364,7 +364,7 @@ string OptiXDevice::compile_kernel_get_common_cflags(const uint kernel_features)
+   string common_cflags = CUDADevice::compile_kernel_get_common_cflags(kernel_features);
+ 
+   /* Add OptiX SDK include directory to include paths. */
+-  common_cflags += string_printf(" -I\"%s/include\"", get_optix_include_dir().c_str());
++  common_cflags += string_printf(" -I\"%s\"", get_optix_include_dir().c_str());
+ 
+   /* Specialization for shader raytracing. */
+   if (kernel_features & KERNEL_FEATURE_NODE_RAYTRACE) {
+-- 
+2.37.3
+

diff --git a/media-gfx/blender/metadata.xml b/media-gfx/blender/metadata.xml
index a6093fd9c1b6..41cc89220a5f 100644
--- a/media-gfx/blender/metadata.xml
+++ b/media-gfx/blender/metadata.xml
@@ -67,6 +67,9 @@
 		<flag name="openvdb">
 			Enable openvdb for volumetric processing, like the voxel remesher. Also enables volumetric GPU preview rendering for Nvidia cards.
 		</flag>
+		<flag name="optix">
+			Add support for NVIDIA's OptiX Raytracing Engine.
+		</flag>
 		<flag name="osl">
 			Add support for OpenShadingLanguage scripting.
 		</flag>


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/blender/, media-gfx/blender/files/
@ 2023-10-03 16:23 Sam James
  0 siblings, 0 replies; 21+ messages in thread
From: Sam James @ 2023-10-03 16:23 UTC (permalink / raw
  To: gentoo-commits

commit:     580ee060c186678d960994df4f6d21133ac4b393
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Oct  3 16:22:20 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Oct  3 16:22:20 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=580ee060

media-gfx/blender: fix build w/ gcc 13

Closes: https://bugs.gentoo.org/914740
Signed-off-by: Sam James <sam <AT> gentoo.org>

 media-gfx/blender/blender-3.3.6-r1.ebuild                |  1 +
 media-gfx/blender/blender-3.3.8.ebuild                   |  1 +
 media-gfx/blender/blender-3.4.1-r3.ebuild                |  1 +
 media-gfx/blender/files/blender-3.3.6-cycles-gcc13.patch | 12 ++++++++++++
 4 files changed, 15 insertions(+)

diff --git a/media-gfx/blender/blender-3.3.6-r1.ebuild b/media-gfx/blender/blender-3.3.6-r1.ebuild
index 5680b3b6a336..8452075832d4 100644
--- a/media-gfx/blender/blender-3.3.6-r1.ebuild
+++ b/media-gfx/blender/blender-3.3.6-r1.ebuild
@@ -133,6 +133,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-3.2.2-Cycles-add-option-to-specify-OptiX-runtime-root-dire.patch
 	"${FILESDIR}"/${PN}-3.2.2-Fix-T100845-wrong-Cycles-OptiX-runtime-compilation-i.patch
 	"${FILESDIR}"/${PN}-3.3.0-fix-build-with-boost-1.81.patch
+	"${FILESDIR}"/${PN}-3.3.6-cycles-gcc13.patch
 )
 
 blender_check_requirements() {

diff --git a/media-gfx/blender/blender-3.3.8.ebuild b/media-gfx/blender/blender-3.3.8.ebuild
index fac6a83ed7f7..920d4210ff7c 100644
--- a/media-gfx/blender/blender-3.3.8.ebuild
+++ b/media-gfx/blender/blender-3.3.8.ebuild
@@ -133,6 +133,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-3.2.2-Cycles-add-option-to-specify-OptiX-runtime-root-dire.patch
 	"${FILESDIR}"/${PN}-3.2.2-Fix-T100845-wrong-Cycles-OptiX-runtime-compilation-i.patch
 	"${FILESDIR}"/${PN}-3.3.0-fix-build-with-boost-1.81.patch
+	"${FILESDIR}"/${PN}-3.3.6-cycles-gcc13.patch
 )
 
 blender_check_requirements() {

diff --git a/media-gfx/blender/blender-3.4.1-r3.ebuild b/media-gfx/blender/blender-3.4.1-r3.ebuild
index 7a0b020b28fc..801a0d0bf0db 100644
--- a/media-gfx/blender/blender-3.4.1-r3.ebuild
+++ b/media-gfx/blender/blender-3.4.1-r3.ebuild
@@ -140,6 +140,7 @@ BDEPEND="
 
 PATCHES=(
 	"${FILESDIR}"/${PN}-3.3.0-fix-build-with-boost-1.81.patch
+	"${FILESDIR}"/${PN}-3.3.6-cycles-gcc13.patch
 )
 
 blender_check_requirements() {

diff --git a/media-gfx/blender/files/blender-3.3.6-cycles-gcc13.patch b/media-gfx/blender/files/blender-3.3.6-cycles-gcc13.patch
new file mode 100644
index 000000000000..955be2424e19
--- /dev/null
+++ b/media-gfx/blender/files/blender-3.3.6-cycles-gcc13.patch
@@ -0,0 +1,12 @@
+https://bugs.gentoo.org/914740
+--- a/intern/cycles/util/thread.cpp
++++ b/intern/cycles/util/thread.cpp
+@@ -6,6 +6,8 @@
+ #include "util/system.h"
+ #include "util/windows.h"
+ 
++#include <system_error>
++
+ CCL_NAMESPACE_BEGIN
+ 
+ thread::thread(function<void()> run_cb) : run_cb_(run_cb), joined_(false)


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/blender/, media-gfx/blender/files/
@ 2023-10-27  2:34 Sam James
  0 siblings, 0 replies; 21+ messages in thread
From: Sam James @ 2023-10-27  2:34 UTC (permalink / raw
  To: gentoo-commits

commit:     824eb57e50e0f5039d42f39e0caa5461d8d73468
Author:     Paul Zander <negril.nx+gentoo <AT> gmail <DOT> com>
AuthorDate: Wed Oct 11 21:23:32 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Oct 27 02:31:52 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=824eb57e

media-gfx/blender: add 3.6.5, update 9999

* add 3.6.5 LTS

* upstream fixed
https://projects.blender.org/blender/blender/pulls/113163 in
https://projects.blender.org/blender/blender/issues/112917
* add it to 3.6.5
* drop blockers for 3.6.5 and 9999

Signed-off-by: Paul Zander <negril.nx+gentoo <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 media-gfx/blender/Manifest                         |   1 +
 .../{blender-9999.ebuild => blender-3.6.5.ebuild}  |  12 ++-
 media-gfx/blender/blender-9999.ebuild              |   4 +-
 .../blender/files/blender-4.0.0-ocio-2.3.0.patch   | 110 +++++++++++++++++++++
 4 files changed, 119 insertions(+), 8 deletions(-)

diff --git a/media-gfx/blender/Manifest b/media-gfx/blender/Manifest
index b3c42c94fb98..7c56592c6b76 100644
--- a/media-gfx/blender/Manifest
+++ b/media-gfx/blender/Manifest
@@ -3,3 +3,4 @@ DIST blender-3.3.8.tar.xz 41915180 BLAKE2B 7fb24afe2151bba53d8c25160bd697145aced
 DIST blender-3.4.1.tar.xz 53666296 BLAKE2B ec5b2771c1b55ecdf3c2c86a413ae5599545800fc072eff45cf212b32c74af60fc3d650ad931fff221c1073adb2b447df3287a965f884a4760a5d972c9877aee SHA512 d6de3ec9cd1a1e4d4e4a838af0cfc113c91c3c1b66703027e0ed61bd818dafc4e4304fd041738ddea32fc76b1ad9b7737cbdcf74d56a0406a87c457375d907ab
 DIST blender-3.5.1.tar.xz 69780800 BLAKE2B 6961280b9d5fb606a35137ce355bf07b4dc16908d5d52cfd3a914907721da16108b8780b1894413a69ab69d455f5d1575697079a24c2bdcecb17174cf7a7c7c7 SHA512 7c9c03de8532884f8ab39fecf1450f8be4bc937a018bd14240ace81a89e422625aba9c4865f6efbb8371f5f01e930932fa5cf03c9d14d44c5312db33e3c56131
 DIST blender-3.6.0.tar.xz 70428872 BLAKE2B a43f2c0a2db6fa624b1bd96264462312d31f2e3983c463da9d17b0c793d0d344dfbbc13acfb8bab53cc37f5b5b3479d60b8046475aa6c977074ef35414640eaf SHA512 5fbb7a48d1f18e5cc6430bdefb4d7d9e8a52d387cf92a319c7fbc8836a3f5a6f90fab13f152be49c3558a8f70ed9f0d1f7aeddb264a938496a2f93254bb569cb
+DIST blender-3.6.5.tar.xz 70447868 BLAKE2B efa366b8aff5c8870c9ed060063eba1115a9ae50b0345c56fbaaab228976afad6f4c6b9c374f22d146fe88db6e0e7aab3d61b1797e71f30f6adfc594599ea2be SHA512 d07e53c708a1e6df18853eb5f0dc032459c74ef43f9559880720170f98ac8729064edb143835f8cec411ab6de42619bed3f0ef1143b288f2a2eb6f05fdfc32ae

diff --git a/media-gfx/blender/blender-9999.ebuild b/media-gfx/blender/blender-3.6.5.ebuild
similarity index 97%
copy from media-gfx/blender/blender-9999.ebuild
copy to media-gfx/blender/blender-3.6.5.ebuild
index a637534483c4..1f87c0fac6ef 100644
--- a/media-gfx/blender/blender-9999.ebuild
+++ b/media-gfx/blender/blender-3.6.5.ebuild
@@ -19,7 +19,7 @@ else
 	SRC_URI="https://download.blender.org/source/${P}.tar.xz"
 	# Update these between major releases.
 	TEST_TARBALL_VERSION="$(ver_cut 1-2).0"
-	SRC_URI+=" test? ( https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PN}-${TEST_TARBALL_VERSION}-tests.tar.xz )"
+	# SRC_URI+=" test? ( https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PN}-${TEST_TARBALL_VERSION}-tests.tar.xz )"
 	KEYWORDS="~amd64 ~arm ~arm64"
 fi
 
@@ -45,8 +45,6 @@ REQUIRED_USE="${PYTHON_REQUIRED_USE}
 
 # Library versions for official builds can be found in the blender source directory in:
 # build_files/build_environment/install_deps.sh
-#
-# <OpenColorIO-2.3.0 for https://projects.blender.org/blender/blender/issues/112917.
 RDEPEND="${PYTHON_DEPS}
 	dev-libs/boost:=[nls?]
 	dev-libs/lzo:2=
@@ -68,7 +66,7 @@ RDEPEND="${PYTHON_DEPS}
 	virtual/opengl
 	alembic? ( >=media-gfx/alembic-1.8.3-r2[boost(+),hdf(+)] )
 	collada? ( >=media-libs/opencollada-1.6.68 )
-	color-management? ( <media-libs/OpenColorIO-2.3.0:= )
+	color-management? ( media-libs/OpenColorIO:= )
 	cuda? ( dev-util/nvidia-cuda-toolkit:= )
 	embree? ( >=media-libs/embree-3.10.0[raymask] )
 	ffmpeg? ( media-video/ffmpeg:=[x264,mp3,encode,theora,jpeg2k?,vpx,vorbis,opus,xvid] )
@@ -140,6 +138,10 @@ BDEPEND="
 	)
 "
 
+PATCHES=(
+	"${FILESDIR}/${PN}-4.0.0-ocio-2.3.0.patch"
+)
+
 blender_check_requirements() {
 	[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
 
@@ -174,7 +176,7 @@ src_unpack() {
 		git-r3_src_unpack
 
 		git-r3_fetch "${ADDONS_EGIT_REPO_URI}"
-		git-r3_checkout "${ADDONS_EGIT_REPO_URI} ${S}/scripts/addons"
+		git-r3_checkout "${ADDONS_EGIT_REPO_URI}" "${S}/scripts/addons"
 
 		if use test; then
 			TESTS_SVN_URL=https://svn.blender.org/svnroot/bf-blender/trunk/lib/tests

diff --git a/media-gfx/blender/blender-9999.ebuild b/media-gfx/blender/blender-9999.ebuild
index a637534483c4..d32731e15fef 100644
--- a/media-gfx/blender/blender-9999.ebuild
+++ b/media-gfx/blender/blender-9999.ebuild
@@ -45,8 +45,6 @@ REQUIRED_USE="${PYTHON_REQUIRED_USE}
 
 # Library versions for official builds can be found in the blender source directory in:
 # build_files/build_environment/install_deps.sh
-#
-# <OpenColorIO-2.3.0 for https://projects.blender.org/blender/blender/issues/112917.
 RDEPEND="${PYTHON_DEPS}
 	dev-libs/boost:=[nls?]
 	dev-libs/lzo:2=
@@ -68,7 +66,7 @@ RDEPEND="${PYTHON_DEPS}
 	virtual/opengl
 	alembic? ( >=media-gfx/alembic-1.8.3-r2[boost(+),hdf(+)] )
 	collada? ( >=media-libs/opencollada-1.6.68 )
-	color-management? ( <media-libs/OpenColorIO-2.3.0:= )
+	color-management? ( media-libs/OpenColorIO:= )
 	cuda? ( dev-util/nvidia-cuda-toolkit:= )
 	embree? ( >=media-libs/embree-3.10.0[raymask] )
 	ffmpeg? ( media-video/ffmpeg:=[x264,mp3,encode,theora,jpeg2k?,vpx,vorbis,opus,xvid] )

diff --git a/media-gfx/blender/files/blender-4.0.0-ocio-2.3.0.patch b/media-gfx/blender/files/blender-4.0.0-ocio-2.3.0.patch
new file mode 100644
index 000000000000..e6cc4a6fa026
--- /dev/null
+++ b/media-gfx/blender/files/blender-4.0.0-ocio-2.3.0.patch
@@ -0,0 +1,110 @@
+From 458917773afb4cdf8e1189c0bf5aff7feda6a664 Mon Sep 17 00:00:00 2001
+From: Brecht Van Lommel <brecht@blender.org>
+Date: Mon, 2 Oct 2023 17:31:08 +0200
+Subject: [PATCH] Build: changes to build with OpenColorIO 2.3
+
+Ref #113157
+---
+ intern/opencolorio/ocio_impl_glsl.cc          | 12 +++++++++-
+ .../ocio_color_space_conversion_shader.cc     | 24 +++++++++++++++++++
+ 2 files changed, 35 insertions(+), 1 deletion(-)
+
+diff --git a/intern/opencolorio/ocio_impl_glsl.cc b/intern/opencolorio/ocio_impl_glsl.cc
+index 8d46a2f0773..35e4d0b7a90 100644
+--- a/intern/opencolorio/ocio_impl_glsl.cc
++++ b/intern/opencolorio/ocio_impl_glsl.cc
+@@ -343,8 +343,15 @@ static bool addGPULut1D2D(OCIO_GPUTextures &textures,
+   unsigned int height = 0;
+   GpuShaderCreator::TextureType channel = GpuShaderCreator::TEXTURE_RGB_CHANNEL;
+   Interpolation interpolation = INTERP_LINEAR;
++#if OCIO_VERSION_HEX >= 0x02030000
++  /* Always use 2D textures in OpenColorIO 2.3, simpler and same performance. */
++  GpuShaderDesc::TextureDimensions dimensions = GpuShaderDesc::TEXTURE_2D;
++  shader_desc->getTexture(
++      index, texture_name, sampler_name, width, height, channel, dimensions, interpolation);
++#else
+   shader_desc->getTexture(
+       index, texture_name, sampler_name, width, height, channel, interpolation);
++#endif
+ 
+   const float *values;
+   shader_desc->getTextureValues(index, values);
+@@ -358,6 +365,7 @@ static bool addGPULut1D2D(OCIO_GPUTextures &textures,
+                                                                                   GPU_R16F;
+ 
+   OCIO_GPULutTexture lut;
++#if OCIO_VERSION_HEX < 0x02030000
+   /* There does not appear to be an explicit way to check if a texture is 1D or 2D.
+    * It depends on more than height. So check instead by looking at the source. */
+   std::string sampler1D_name = std::string("sampler1D ") + sampler_name;
+@@ -365,7 +373,9 @@ static bool addGPULut1D2D(OCIO_GPUTextures &textures,
+     lut.texture = GPU_texture_create_1d(
+         texture_name, width, 1, format, GPU_TEXTURE_USAGE_SHADER_READ, values);
+   }
+-  else {
++  else
++#endif
++  {
+     lut.texture = GPU_texture_create_2d(
+         texture_name, width, height, 1, format, GPU_TEXTURE_USAGE_SHADER_READ, values);
+   }
+diff --git a/source/blender/compositor/realtime_compositor/cached_resources/intern/ocio_color_space_conversion_shader.cc b/source/blender/compositor/realtime_compositor/cached_resources/intern/ocio_color_space_conversion_shader.cc
+index 4cdbb52a6ba..52492754c0f 100644
+--- a/source/blender/compositor/realtime_compositor/cached_resources/intern/ocio_color_space_conversion_shader.cc
++++ b/source/blender/compositor/realtime_compositor/cached_resources/intern/ocio_color_space_conversion_shader.cc
+@@ -95,6 +95,18 @@ class GPUShaderCreator : public OCIO::GpuShaderCreator {
+     return GPU_max_texture_size();
+   }
+ 
++#  if OCIO_VERSION_HEX >= 0x02030000
++  void setAllowTexture1D(bool allowed) override
++  {
++    allow_texture_1D_ = allowed;
++  }
++
++  bool getAllowTexture1D() const override
++  {
++    return allow_texture_1D_;
++  }
++#  endif
++
+   bool addUniform(const char *name, const DoubleGetter &get_double) override
+   {
+     /* Check if a resource exists with the same name and assert if it is the case, returning false
+@@ -201,6 +213,9 @@ class GPUShaderCreator : public OCIO::GpuShaderCreator {
+                   uint width,
+                   uint height,
+                   TextureType channel,
++#  if OCIO_VERSION_HEX >= 0x02030000
++                  OCIO::GpuShaderDesc::TextureDimensions dimensions,
++#  endif
+                   OCIO::Interpolation interpolation,
+                   const float *values) override
+   {
+@@ -216,7 +231,11 @@ class GPUShaderCreator : public OCIO::GpuShaderCreator {
+     GPUTexture *texture;
+     eGPUTextureFormat texture_format = (channel == TEXTURE_RGB_CHANNEL) ? GPU_RGB16F : GPU_R16F;
+     /* A height of 1 indicates a 1D texture according to the OCIO API. */
++#  if OCIO_VERSION_HEX >= 0x02030000
++    if (dimensions == OCIO::GpuShaderDesc::TEXTURE_1D) {
++#  else
+     if (height == 1) {
++#  endif
+       texture = GPU_texture_create_1d(
+           texture_name, width, 1, texture_format, GPU_TEXTURE_USAGE_SHADER_READ, values);
+       shader_create_info_.sampler(textures_.size() + 1, ImageType::FLOAT_1D, resource_name);
+@@ -398,6 +417,11 @@ class GPUShaderCreator : public OCIO::GpuShaderCreator {
+   /* A vectors that stores the created uniform buffers when bind_shader_and_resources() is called,
+    * so that they can be properly unbound and freed in the unbind_shader_and_resources() method. */
+   Vector<GPUUniformBuf *> uniform_buffers_;
++
++#  if OCIO_VERSION_HEX >= 0x02030000
++  /* Allow creating 1D textures, or only use 2D textures. */
++  bool allow_texture_1D_ = true;
++#  endif
+ };
+ 
+ #else
+-- 
+2.30.2
+


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/blender/, media-gfx/blender/files/
@ 2023-10-27  3:20 Sam James
  0 siblings, 0 replies; 21+ messages in thread
From: Sam James @ 2023-10-27  3:20 UTC (permalink / raw
  To: gentoo-commits

commit:     2fd9968e3b41730859eb6eca2ac6e71a8fb871a6
Author:     Paul Zander <negril.nx+gentoo <AT> gmail <DOT> com>
AuthorDate: Wed Oct 11 21:23:32 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Oct 27 03:15:27 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2fd9968e

media-gfx/blender: add 3.6.5, update 9999

* add 3.6.5 LTS

* upstream fixed
https://projects.blender.org/blender/blender/pulls/113163 in
https://projects.blender.org/blender/blender/issues/112917
* add it to 3.6.5
* drop blockers for 3.6.5 and 9999

Signed-off-by: Paul Zander <negril.nx+gentoo <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 media-gfx/blender/Manifest                         |   1 +
 .../{blender-9999.ebuild => blender-3.6.5.ebuild}  |  12 ++-
 media-gfx/blender/blender-9999.ebuild              |   4 +-
 .../blender/files/blender-4.0.0-ocio-2.3.0.patch   | 110 +++++++++++++++++++++
 4 files changed, 119 insertions(+), 8 deletions(-)

diff --git a/media-gfx/blender/Manifest b/media-gfx/blender/Manifest
index b3c42c94fb98..7c56592c6b76 100644
--- a/media-gfx/blender/Manifest
+++ b/media-gfx/blender/Manifest
@@ -3,3 +3,4 @@ DIST blender-3.3.8.tar.xz 41915180 BLAKE2B 7fb24afe2151bba53d8c25160bd697145aced
 DIST blender-3.4.1.tar.xz 53666296 BLAKE2B ec5b2771c1b55ecdf3c2c86a413ae5599545800fc072eff45cf212b32c74af60fc3d650ad931fff221c1073adb2b447df3287a965f884a4760a5d972c9877aee SHA512 d6de3ec9cd1a1e4d4e4a838af0cfc113c91c3c1b66703027e0ed61bd818dafc4e4304fd041738ddea32fc76b1ad9b7737cbdcf74d56a0406a87c457375d907ab
 DIST blender-3.5.1.tar.xz 69780800 BLAKE2B 6961280b9d5fb606a35137ce355bf07b4dc16908d5d52cfd3a914907721da16108b8780b1894413a69ab69d455f5d1575697079a24c2bdcecb17174cf7a7c7c7 SHA512 7c9c03de8532884f8ab39fecf1450f8be4bc937a018bd14240ace81a89e422625aba9c4865f6efbb8371f5f01e930932fa5cf03c9d14d44c5312db33e3c56131
 DIST blender-3.6.0.tar.xz 70428872 BLAKE2B a43f2c0a2db6fa624b1bd96264462312d31f2e3983c463da9d17b0c793d0d344dfbbc13acfb8bab53cc37f5b5b3479d60b8046475aa6c977074ef35414640eaf SHA512 5fbb7a48d1f18e5cc6430bdefb4d7d9e8a52d387cf92a319c7fbc8836a3f5a6f90fab13f152be49c3558a8f70ed9f0d1f7aeddb264a938496a2f93254bb569cb
+DIST blender-3.6.5.tar.xz 70447868 BLAKE2B efa366b8aff5c8870c9ed060063eba1115a9ae50b0345c56fbaaab228976afad6f4c6b9c374f22d146fe88db6e0e7aab3d61b1797e71f30f6adfc594599ea2be SHA512 d07e53c708a1e6df18853eb5f0dc032459c74ef43f9559880720170f98ac8729064edb143835f8cec411ab6de42619bed3f0ef1143b288f2a2eb6f05fdfc32ae

diff --git a/media-gfx/blender/blender-9999.ebuild b/media-gfx/blender/blender-3.6.5.ebuild
similarity index 97%
copy from media-gfx/blender/blender-9999.ebuild
copy to media-gfx/blender/blender-3.6.5.ebuild
index 38dad31c44af..666044f4f4ae 100644
--- a/media-gfx/blender/blender-9999.ebuild
+++ b/media-gfx/blender/blender-3.6.5.ebuild
@@ -19,7 +19,7 @@ else
 	SRC_URI="https://download.blender.org/source/${P}.tar.xz"
 	# Update these between major releases.
 	TEST_TARBALL_VERSION="$(ver_cut 1-2).0"
-	SRC_URI+=" test? ( https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PN}-${TEST_TARBALL_VERSION}-tests.tar.xz )"
+	# SRC_URI+=" test? ( https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PN}-${TEST_TARBALL_VERSION}-tests.tar.xz )"
 	KEYWORDS="~amd64 ~arm ~arm64"
 fi
 
@@ -45,8 +45,6 @@ REQUIRED_USE="${PYTHON_REQUIRED_USE}
 
 # Library versions for official builds can be found in the blender source directory in:
 # build_files/build_environment/install_deps.sh
-#
-# <opencolorio-2.3.0 for https://projects.blender.org/blender/blender/issues/112917.
 RDEPEND="${PYTHON_DEPS}
 	dev-libs/boost:=[nls?]
 	dev-libs/lzo:2=
@@ -68,7 +66,7 @@ RDEPEND="${PYTHON_DEPS}
 	virtual/opengl
 	alembic? ( >=media-gfx/alembic-1.8.3-r2[boost(+),hdf(+)] )
 	collada? ( >=media-libs/opencollada-1.6.68 )
-	color-management? ( <media-libs/opencolorio-2.3.0:= )
+	color-management? ( media-libs/opencolorio:= )
 	cuda? ( dev-util/nvidia-cuda-toolkit:= )
 	embree? ( >=media-libs/embree-3.10.0[raymask] )
 	ffmpeg? ( media-video/ffmpeg:=[x264,mp3,encode,theora,jpeg2k?,vpx,vorbis,opus,xvid] )
@@ -140,6 +138,10 @@ BDEPEND="
 	)
 "
 
+PATCHES=(
+	"${FILESDIR}/${PN}-4.0.0-ocio-2.3.0.patch"
+)
+
 blender_check_requirements() {
 	[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
 
@@ -174,7 +176,7 @@ src_unpack() {
 		git-r3_src_unpack
 
 		git-r3_fetch "${ADDONS_EGIT_REPO_URI}"
-		git-r3_checkout "${ADDONS_EGIT_REPO_URI} ${S}/scripts/addons"
+		git-r3_checkout "${ADDONS_EGIT_REPO_URI}" "${S}/scripts/addons"
 
 		if use test; then
 			TESTS_SVN_URL=https://svn.blender.org/svnroot/bf-blender/trunk/lib/tests

diff --git a/media-gfx/blender/blender-9999.ebuild b/media-gfx/blender/blender-9999.ebuild
index 38dad31c44af..d4e734739dd6 100644
--- a/media-gfx/blender/blender-9999.ebuild
+++ b/media-gfx/blender/blender-9999.ebuild
@@ -45,8 +45,6 @@ REQUIRED_USE="${PYTHON_REQUIRED_USE}
 
 # Library versions for official builds can be found in the blender source directory in:
 # build_files/build_environment/install_deps.sh
-#
-# <opencolorio-2.3.0 for https://projects.blender.org/blender/blender/issues/112917.
 RDEPEND="${PYTHON_DEPS}
 	dev-libs/boost:=[nls?]
 	dev-libs/lzo:2=
@@ -68,7 +66,7 @@ RDEPEND="${PYTHON_DEPS}
 	virtual/opengl
 	alembic? ( >=media-gfx/alembic-1.8.3-r2[boost(+),hdf(+)] )
 	collada? ( >=media-libs/opencollada-1.6.68 )
-	color-management? ( <media-libs/opencolorio-2.3.0:= )
+	color-management? ( media-libs/opencolorio:= )
 	cuda? ( dev-util/nvidia-cuda-toolkit:= )
 	embree? ( >=media-libs/embree-3.10.0[raymask] )
 	ffmpeg? ( media-video/ffmpeg:=[x264,mp3,encode,theora,jpeg2k?,vpx,vorbis,opus,xvid] )

diff --git a/media-gfx/blender/files/blender-4.0.0-ocio-2.3.0.patch b/media-gfx/blender/files/blender-4.0.0-ocio-2.3.0.patch
new file mode 100644
index 000000000000..e6cc4a6fa026
--- /dev/null
+++ b/media-gfx/blender/files/blender-4.0.0-ocio-2.3.0.patch
@@ -0,0 +1,110 @@
+From 458917773afb4cdf8e1189c0bf5aff7feda6a664 Mon Sep 17 00:00:00 2001
+From: Brecht Van Lommel <brecht@blender.org>
+Date: Mon, 2 Oct 2023 17:31:08 +0200
+Subject: [PATCH] Build: changes to build with OpenColorIO 2.3
+
+Ref #113157
+---
+ intern/opencolorio/ocio_impl_glsl.cc          | 12 +++++++++-
+ .../ocio_color_space_conversion_shader.cc     | 24 +++++++++++++++++++
+ 2 files changed, 35 insertions(+), 1 deletion(-)
+
+diff --git a/intern/opencolorio/ocio_impl_glsl.cc b/intern/opencolorio/ocio_impl_glsl.cc
+index 8d46a2f0773..35e4d0b7a90 100644
+--- a/intern/opencolorio/ocio_impl_glsl.cc
++++ b/intern/opencolorio/ocio_impl_glsl.cc
+@@ -343,8 +343,15 @@ static bool addGPULut1D2D(OCIO_GPUTextures &textures,
+   unsigned int height = 0;
+   GpuShaderCreator::TextureType channel = GpuShaderCreator::TEXTURE_RGB_CHANNEL;
+   Interpolation interpolation = INTERP_LINEAR;
++#if OCIO_VERSION_HEX >= 0x02030000
++  /* Always use 2D textures in OpenColorIO 2.3, simpler and same performance. */
++  GpuShaderDesc::TextureDimensions dimensions = GpuShaderDesc::TEXTURE_2D;
++  shader_desc->getTexture(
++      index, texture_name, sampler_name, width, height, channel, dimensions, interpolation);
++#else
+   shader_desc->getTexture(
+       index, texture_name, sampler_name, width, height, channel, interpolation);
++#endif
+ 
+   const float *values;
+   shader_desc->getTextureValues(index, values);
+@@ -358,6 +365,7 @@ static bool addGPULut1D2D(OCIO_GPUTextures &textures,
+                                                                                   GPU_R16F;
+ 
+   OCIO_GPULutTexture lut;
++#if OCIO_VERSION_HEX < 0x02030000
+   /* There does not appear to be an explicit way to check if a texture is 1D or 2D.
+    * It depends on more than height. So check instead by looking at the source. */
+   std::string sampler1D_name = std::string("sampler1D ") + sampler_name;
+@@ -365,7 +373,9 @@ static bool addGPULut1D2D(OCIO_GPUTextures &textures,
+     lut.texture = GPU_texture_create_1d(
+         texture_name, width, 1, format, GPU_TEXTURE_USAGE_SHADER_READ, values);
+   }
+-  else {
++  else
++#endif
++  {
+     lut.texture = GPU_texture_create_2d(
+         texture_name, width, height, 1, format, GPU_TEXTURE_USAGE_SHADER_READ, values);
+   }
+diff --git a/source/blender/compositor/realtime_compositor/cached_resources/intern/ocio_color_space_conversion_shader.cc b/source/blender/compositor/realtime_compositor/cached_resources/intern/ocio_color_space_conversion_shader.cc
+index 4cdbb52a6ba..52492754c0f 100644
+--- a/source/blender/compositor/realtime_compositor/cached_resources/intern/ocio_color_space_conversion_shader.cc
++++ b/source/blender/compositor/realtime_compositor/cached_resources/intern/ocio_color_space_conversion_shader.cc
+@@ -95,6 +95,18 @@ class GPUShaderCreator : public OCIO::GpuShaderCreator {
+     return GPU_max_texture_size();
+   }
+ 
++#  if OCIO_VERSION_HEX >= 0x02030000
++  void setAllowTexture1D(bool allowed) override
++  {
++    allow_texture_1D_ = allowed;
++  }
++
++  bool getAllowTexture1D() const override
++  {
++    return allow_texture_1D_;
++  }
++#  endif
++
+   bool addUniform(const char *name, const DoubleGetter &get_double) override
+   {
+     /* Check if a resource exists with the same name and assert if it is the case, returning false
+@@ -201,6 +213,9 @@ class GPUShaderCreator : public OCIO::GpuShaderCreator {
+                   uint width,
+                   uint height,
+                   TextureType channel,
++#  if OCIO_VERSION_HEX >= 0x02030000
++                  OCIO::GpuShaderDesc::TextureDimensions dimensions,
++#  endif
+                   OCIO::Interpolation interpolation,
+                   const float *values) override
+   {
+@@ -216,7 +231,11 @@ class GPUShaderCreator : public OCIO::GpuShaderCreator {
+     GPUTexture *texture;
+     eGPUTextureFormat texture_format = (channel == TEXTURE_RGB_CHANNEL) ? GPU_RGB16F : GPU_R16F;
+     /* A height of 1 indicates a 1D texture according to the OCIO API. */
++#  if OCIO_VERSION_HEX >= 0x02030000
++    if (dimensions == OCIO::GpuShaderDesc::TEXTURE_1D) {
++#  else
+     if (height == 1) {
++#  endif
+       texture = GPU_texture_create_1d(
+           texture_name, width, 1, texture_format, GPU_TEXTURE_USAGE_SHADER_READ, values);
+       shader_create_info_.sampler(textures_.size() + 1, ImageType::FLOAT_1D, resource_name);
+@@ -398,6 +417,11 @@ class GPUShaderCreator : public OCIO::GpuShaderCreator {
+   /* A vectors that stores the created uniform buffers when bind_shader_and_resources() is called,
+    * so that they can be properly unbound and freed in the unbind_shader_and_resources() method. */
+   Vector<GPUUniformBuf *> uniform_buffers_;
++
++#  if OCIO_VERSION_HEX >= 0x02030000
++  /* Allow creating 1D textures, or only use 2D textures. */
++  bool allow_texture_1D_ = true;
++#  endif
+ };
+ 
+ #else
+-- 
+2.30.2
+


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/blender/, media-gfx/blender/files/
@ 2024-01-21 11:21 Sam James
  0 siblings, 0 replies; 21+ messages in thread
From: Sam James @ 2024-01-21 11:21 UTC (permalink / raw
  To: gentoo-commits

commit:     32822cad445a3b80067723488e8d9fa487dfc03d
Author:     Sv. Lockal <lockalsash <AT> gmail <DOT> com>
AuthorDate: Sun Jan 21 09:47:07 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Jan 21 11:20:41 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=32822cad

media-gfx/blender: fix error "string sub-command REGEX, mode REPLACE needs at least 6 arguments"

See also: https://github.com/blender/blender/commit/ecd307041e4181f721bf5d2248c02ffe980edcba
Closes: https://bugs.gentoo.org/922324

Signed-off-by: Sv. Lockal <lockalsash <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 media-gfx/blender/blender-4.0.1.ebuild             |  4 +++
 .../files/blender-4.0.1-fix-cflags-cleaner.patch   | 39 ++++++++++++++++++++++
 2 files changed, 43 insertions(+)

diff --git a/media-gfx/blender/blender-4.0.1.ebuild b/media-gfx/blender/blender-4.0.1.ebuild
index 389d34b7495b..f25d645c6efb 100644
--- a/media-gfx/blender/blender-4.0.1.ebuild
+++ b/media-gfx/blender/blender-4.0.1.ebuild
@@ -141,6 +141,10 @@ BDEPEND="
 	)
 "
 
+PATCHES=(
+	"${FILESDIR}/${PN}-4.0.1-fix-cflags-cleaner.patch"  # to be dropped for releases after Dec 8, 2023
+)
+
 blender_check_requirements() {
 	[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
 

diff --git a/media-gfx/blender/files/blender-4.0.1-fix-cflags-cleaner.patch b/media-gfx/blender/files/blender-4.0.1-fix-cflags-cleaner.patch
new file mode 100644
index 000000000000..d28db84d8c36
--- /dev/null
+++ b/media-gfx/blender/files/blender-4.0.1-fix-cflags-cleaner.patch
@@ -0,0 +1,39 @@
+Fix CMake Error: string sub-command REGEX, mode REPLACE needs at least 6 arguments total to command.
+https://bugs.gentoo.org/922324
+https://github.com/blender/blender/commit/ecd307041e4181f721bf5d2248c02ffe980edcba
+--- a/build_files/cmake/macros.cmake
++++ b/build_files/cmake/macros.cmake
+@@ -750,11 +750,11 @@ macro(remove_c_flag
+   _flag)
+ 
+   foreach(f ${ARGV})
+-    string(REGEX REPLACE ${f} "" CMAKE_C_FLAGS ${CMAKE_C_FLAGS})
+-    string(REGEX REPLACE ${f} "" CMAKE_C_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG})
+-    string(REGEX REPLACE ${f} "" CMAKE_C_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE})
+-    string(REGEX REPLACE ${f} "" CMAKE_C_FLAGS_MINSIZEREL ${CMAKE_C_FLAGS_MINSIZEREL})
+-    string(REGEX REPLACE ${f} "" CMAKE_C_FLAGS_RELWITHDEBINFO ${CMAKE_C_FLAGS_RELWITHDEBINFO})
++    string(REGEX REPLACE ${f} "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
++    string(REGEX REPLACE ${f} "" CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}")
++    string(REGEX REPLACE ${f} "" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}")
++    string(REGEX REPLACE ${f} "" CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL}")
++    string(REGEX REPLACE ${f} "" CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}")
+   endforeach()
+   unset(f)
+ endmacro()
+@@ -763,11 +763,11 @@ macro(remove_cxx_flag
+   _flag)
+ 
+   foreach(f ${ARGV})
+-    string(REGEX REPLACE ${f} "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
+-    string(REGEX REPLACE ${f} "" CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG})
+-    string(REGEX REPLACE ${f} "" CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE})
+-    string(REGEX REPLACE ${f} "" CMAKE_CXX_FLAGS_MINSIZEREL ${CMAKE_CXX_FLAGS_MINSIZEREL})
+-    string(REGEX REPLACE ${f} "" CMAKE_CXX_FLAGS_RELWITHDEBINFO ${CMAKE_CXX_FLAGS_RELWITHDEBINFO})
++    string(REGEX REPLACE ${f} "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
++    string(REGEX REPLACE ${f} "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
++    string(REGEX REPLACE ${f} "" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")
++    string(REGEX REPLACE ${f} "" CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL}")
++    string(REGEX REPLACE ${f} "" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
+   endforeach()
+   unset(f)
+ endmacro()
\ No newline at end of file


^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-gfx/blender/, media-gfx/blender/files/
@ 2024-09-05  2:12 Sam James
  0 siblings, 0 replies; 21+ messages in thread
From: Sam James @ 2024-09-05  2:12 UTC (permalink / raw
  To: gentoo-commits

commit:     0b0d73823934852a8e57dfc3642b4e1951cac631
Author:     Paul Zander <negril.nx+gentoo <AT> gmail <DOT> com>
AuthorDate: Wed Sep  4 10:43:27 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Sep  5 02:11:30 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0b0d7382

media-gfx/blender: fix 935403, 936104, 936603

Closes: https://bugs.gentoo.org/935403
Closes: https://bugs.gentoo.org/936104
Closes: https://bugs.gentoo.org/936603
Signed-off-by: Paul Zander <negril.nx+gentoo <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/38426
Signed-off-by: Sam James <sam <AT> gentoo.org>

 media-gfx/blender/blender-4.1.1-r2.ebuild          | 23 ++++++++++---
 media-gfx/blender/blender-4.2.1.ebuild             | 23 ++++++++++---
 media-gfx/blender/blender-9999.ebuild              | 23 ++++++++++---
 .../blender/files/blender-4.1.1-FindLLVM.patch     | 38 ++++++++++++++++++++++
 media-gfx/blender/files/blender-4.1.1-numpy.patch  | 26 +++++++++++++++
 5 files changed, 121 insertions(+), 12 deletions(-)

diff --git a/media-gfx/blender/blender-4.1.1-r2.ebuild b/media-gfx/blender/blender-4.1.1-r2.ebuild
index 949e78360f96..b39222330cbf 100644
--- a/media-gfx/blender/blender-4.1.1-r2.ebuild
+++ b/media-gfx/blender/blender-4.1.1-r2.ebuild
@@ -4,8 +4,9 @@
 EAPI=8
 
 PYTHON_COMPAT=( python3_{11..12} )
-# matches media-libs/osl
+# NOTE must match media-libs/osl
 LLVM_COMPAT=( {15..18} )
+LLVM_OPTIONAL=1
 
 inherit check-reqs cmake cuda flag-o-matic llvm-r1 pax-utils python-single-r1 toolchain-funcs xdg-utils
 
@@ -102,7 +103,7 @@ RDEPEND="${PYTHON_DEPS}
 	)
 	nls? ( virtual/libiconv )
 	openal? ( media-libs/openal )
-	oidn? ( >=media-libs/oidn-2.1.0 )
+	oidn? ( >=media-libs/oidn-2.1.0[${LLVM_USEDEP}] )
 	oneapi? ( dev-libs/intel-compute-runtime[l0] )
 	openexr? (
 		>=dev-libs/imath-3.1.7:=
@@ -186,6 +187,8 @@ BDEPEND="
 PATCHES=(
 	"${FILESDIR}/${PN}-4.0.2-FindClang.patch"
 	"${FILESDIR}/${PN}-4.0.2-CUDA_NVCC_FLAGS.patch"
+	"${FILESDIR}/${PN}-4.1.1-FindLLVM.patch"
+	"${FILESDIR}/${PN}-4.1.1-numpy.patch"
 )
 
 blender_check_requirements() {
@@ -343,9 +346,7 @@ src_configure() {
 		-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_LIBDECOR="$(usex gnome)"
 		-DWITH_GHOST_X11=$(usex X)
 		-DWITH_GMP=$(usex gmp)
 		-DWITH_GTESTS=$(usex test)
@@ -393,6 +394,13 @@ src_configure() {
 		-DWITH_XR_OPENXR=no
 	)
 
+	if has_version ">=dev-python/numpy-2"; then
+		mycmakeargs+=(
+			-DPYTHON_NUMPY_INCLUDE_DIRS="$(python_get_sitedir)/numpy/_core/include"
+			-DPYTHON_NUMPY_PATH="$(python_get_sitedir)/numpy/_core/include"
+		)
+	fi
+
 	# requires dev-vcs/git
 	if [[ ${PV} = *9999* ]] ; then
 		mycmakeargs+=( -DWITH_BUILDINFO="yes" )
@@ -420,6 +428,13 @@ src_configure() {
 		)
 	fi
 
+	if use wayland; then
+		mycmakeargs+=(
+			-DWITH_GHOST_WAYLAND_APP_ID="blender-${BV}"
+			-DWITH_GHOST_WAYLAND_LIBDECOR="$(usex gnome)"
+		)
+	fi
+
 	# This is currently needed on arm64 to get the NEON SIMD wrapper to compile the code successfully
 	use arm64 && append-flags -flax-vector-conversions
 

diff --git a/media-gfx/blender/blender-4.2.1.ebuild b/media-gfx/blender/blender-4.2.1.ebuild
index 59269e65e9da..88bb85849015 100644
--- a/media-gfx/blender/blender-4.2.1.ebuild
+++ b/media-gfx/blender/blender-4.2.1.ebuild
@@ -4,8 +4,9 @@
 EAPI=8
 
 PYTHON_COMPAT=( python3_{11..12} )
-# matches media-libs/osl
+# NOTE must match media-libs/osl
 LLVM_COMPAT=( {15..18} )
+LLVM_OPTIONAL=1
 
 inherit check-reqs cmake cuda flag-o-matic llvm-r1 pax-utils python-single-r1 toolchain-funcs xdg-utils
 
@@ -101,7 +102,7 @@ RDEPEND="${PYTHON_DEPS}
 	)
 	nls? ( virtual/libiconv )
 	openal? ( media-libs/openal )
-	oidn? ( >=media-libs/oidn-2.1.0 )
+	oidn? ( >=media-libs/oidn-2.1.0[${LLVM_USEDEP}] )
 	oneapi? ( dev-libs/intel-compute-runtime[l0] )
 	openexr? (
 		>=dev-libs/imath-3.1.7:=
@@ -185,6 +186,8 @@ BDEPEND="
 PATCHES=(
 	"${FILESDIR}/${PN}-4.0.2-FindClang.patch"
 	"${FILESDIR}/${PN}-4.0.2-CUDA_NVCC_FLAGS.patch"
+	"${FILESDIR}/${PN}-4.1.1-FindLLVM.patch"
+	"${FILESDIR}/${PN}-4.1.1-numpy.patch"
 )
 
 blender_check_requirements() {
@@ -340,9 +343,7 @@ src_configure() {
 		-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_LIBDECOR="$(usex gnome)"
 		-DWITH_GHOST_X11=$(usex X)
 		-DWITH_GMP=$(usex gmp)
 		-DWITH_GTESTS=$(usex test)
@@ -390,6 +391,13 @@ src_configure() {
 		-DWITH_XR_OPENXR=no
 	)
 
+	if has_version ">=dev-python/numpy-2"; then
+		mycmakeargs+=(
+			-DPYTHON_NUMPY_INCLUDE_DIRS="$(python_get_sitedir)/numpy/_core/include"
+			-DPYTHON_NUMPY_PATH="$(python_get_sitedir)/numpy/_core/include"
+		)
+	fi
+
 	# requires dev-vcs/git
 	if [[ ${PV} = *9999* ]] ; then
 		mycmakeargs+=( -DWITH_BUILDINFO="yes" )
@@ -417,6 +425,13 @@ src_configure() {
 		)
 	fi
 
+	if use wayland; then
+		mycmakeargs+=(
+			-DWITH_GHOST_WAYLAND_APP_ID="blender-${BV}"
+			-DWITH_GHOST_WAYLAND_LIBDECOR="$(usex gnome)"
+		)
+	fi
+
 	# This is currently needed on arm64 to get the NEON SIMD wrapper to compile the code successfully
 	use arm64 && append-flags -flax-vector-conversions
 

diff --git a/media-gfx/blender/blender-9999.ebuild b/media-gfx/blender/blender-9999.ebuild
index 59269e65e9da..88bb85849015 100644
--- a/media-gfx/blender/blender-9999.ebuild
+++ b/media-gfx/blender/blender-9999.ebuild
@@ -4,8 +4,9 @@
 EAPI=8
 
 PYTHON_COMPAT=( python3_{11..12} )
-# matches media-libs/osl
+# NOTE must match media-libs/osl
 LLVM_COMPAT=( {15..18} )
+LLVM_OPTIONAL=1
 
 inherit check-reqs cmake cuda flag-o-matic llvm-r1 pax-utils python-single-r1 toolchain-funcs xdg-utils
 
@@ -101,7 +102,7 @@ RDEPEND="${PYTHON_DEPS}
 	)
 	nls? ( virtual/libiconv )
 	openal? ( media-libs/openal )
-	oidn? ( >=media-libs/oidn-2.1.0 )
+	oidn? ( >=media-libs/oidn-2.1.0[${LLVM_USEDEP}] )
 	oneapi? ( dev-libs/intel-compute-runtime[l0] )
 	openexr? (
 		>=dev-libs/imath-3.1.7:=
@@ -185,6 +186,8 @@ BDEPEND="
 PATCHES=(
 	"${FILESDIR}/${PN}-4.0.2-FindClang.patch"
 	"${FILESDIR}/${PN}-4.0.2-CUDA_NVCC_FLAGS.patch"
+	"${FILESDIR}/${PN}-4.1.1-FindLLVM.patch"
+	"${FILESDIR}/${PN}-4.1.1-numpy.patch"
 )
 
 blender_check_requirements() {
@@ -340,9 +343,7 @@ src_configure() {
 		-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_LIBDECOR="$(usex gnome)"
 		-DWITH_GHOST_X11=$(usex X)
 		-DWITH_GMP=$(usex gmp)
 		-DWITH_GTESTS=$(usex test)
@@ -390,6 +391,13 @@ src_configure() {
 		-DWITH_XR_OPENXR=no
 	)
 
+	if has_version ">=dev-python/numpy-2"; then
+		mycmakeargs+=(
+			-DPYTHON_NUMPY_INCLUDE_DIRS="$(python_get_sitedir)/numpy/_core/include"
+			-DPYTHON_NUMPY_PATH="$(python_get_sitedir)/numpy/_core/include"
+		)
+	fi
+
 	# requires dev-vcs/git
 	if [[ ${PV} = *9999* ]] ; then
 		mycmakeargs+=( -DWITH_BUILDINFO="yes" )
@@ -417,6 +425,13 @@ src_configure() {
 		)
 	fi
 
+	if use wayland; then
+		mycmakeargs+=(
+			-DWITH_GHOST_WAYLAND_APP_ID="blender-${BV}"
+			-DWITH_GHOST_WAYLAND_LIBDECOR="$(usex gnome)"
+		)
+	fi
+
 	# This is currently needed on arm64 to get the NEON SIMD wrapper to compile the code successfully
 	use arm64 && append-flags -flax-vector-conversions
 

diff --git a/media-gfx/blender/files/blender-4.1.1-FindLLVM.patch b/media-gfx/blender/files/blender-4.1.1-FindLLVM.patch
new file mode 100644
index 000000000000..e8e1c349b956
--- /dev/null
+++ b/media-gfx/blender/files/blender-4.1.1-FindLLVM.patch
@@ -0,0 +1,38 @@
+From: =?UTF-8?q?Jannik=20Gl=C3=BCckert?= <jannik.glueckert@gmail.com>
+Date: Fri, 23 Aug 2024 13:17:34 +0200
+Subject: [PATCH] fix FindLLVM lookup
+
+find out our installed libnames and use that in the lookup
+
+Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
+
+diff --git build_files/cmake/Modules/FindLLVM.cmake build_files/cmake/Modules/FindLLVM.cmake
+index 4c7cc5f..21c760e 100644
+--- a/build_files/cmake/Modules/FindLLVM.cmake
++++ b/build_files/cmake/Modules/FindLLVM.cmake
+@@ -54,16 +54,21 @@ if(NOT LLVM_LIBPATH)
+   set(LLVM_LIBPATH ${LLVM_LIBPATH} CACHE PATH "Path to the LLVM library path")
+   mark_as_advanced(LLVM_LIBPATH)
+ endif()
++if(NOT LLVM_LIBNAMES)
++  execute_process(COMMAND ${LLVM_CONFIG} --libnames
++	  OUTPUT_VARIABLE LLVM_LIBNAMES
++          OUTPUT_STRIP_TRAILING_WHITESPACE)
++  set(LLVM_LIBNAMES ${LLVM_LIBNAMES} CACHE PATH "Name of the LLVM libraries")
++  mark_as_advanced(LLVM_LIBNAMES)
++endif()
+ 
+ if(LLVM_STATIC)
+   find_library(LLVM_LIBRARY
+-               NAMES LLVMAnalysis # first of a whole bunch of libs to get
++               NAMES ${LLVM_LIBNAMES}
+                PATHS ${LLVM_LIBPATH})
+ else()
+   find_library(LLVM_LIBRARY
+-               NAMES
+-                 LLVM-${LLVM_VERSION}
+-                 LLVMAnalysis  # check for the static library as a fall-back
++               NAMES ${LLVM_LIBNAMES}
+                PATHS ${LLVM_LIBPATH})
+ endif()
+ 

diff --git a/media-gfx/blender/files/blender-4.1.1-numpy.patch b/media-gfx/blender/files/blender-4.1.1-numpy.patch
new file mode 100644
index 000000000000..bd76da8b5959
--- /dev/null
+++ b/media-gfx/blender/files/blender-4.1.1-numpy.patch
@@ -0,0 +1,26 @@
+From: Paul Zander <negril.nx+gentoo@gmail.com>
+Date: Fri, 23 Aug 2024 13:19:21 +0200
+Subject: [PATCH] fix numpy lookup
+
+use cmake config for find_package()
+
+Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
+
+--- a/build_files/cmake/platform/platform_unix.cmake
++++ b/build_files/cmake/platform/platform_unix.cmake
+@@ -463,13 +463,13 @@ if(WITH_BOOST)
+     endif()
+     list(APPEND __boost_packages system)
+     set(Boost_NO_WARN_NEW_VERSIONS ON)
+-    find_package(Boost 1.48 COMPONENTS ${__boost_packages})
++    find_package(Boost 1.48 CONFIG COMPONENTS ${__boost_packages})
+     if(NOT Boost_FOUND)
+       # try to find non-multithreaded if -mt not found, this flag
+       # doesn't matter for us, it has nothing to do with thread
+       # safety, but keep it to not disturb build setups
+       set(Boost_USE_MULTITHREADED OFF)
+-      find_package(Boost 1.48 COMPONENTS ${__boost_packages})
++      find_package(Boost 1.48 CONFIG COMPONENTS ${__boost_packages})
+     endif()
+     unset(__boost_packages)
+     if(Boost_USE_STATIC_LIBS AND WITH_BOOST_ICU)


^ permalink raw reply related	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2024-09-05  2:12 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-03 16:23 [gentoo-commits] repo/gentoo:master commit in: media-gfx/blender/, media-gfx/blender/files/ Sam James
  -- strict thread matches above, loose matches on Subject: below --
2024-09-05  2:12 Sam James
2024-01-21 11:21 Sam James
2023-10-27  3:20 Sam James
2023-10-27  2:34 Sam James
2022-09-25 12:29 Ionen Wolkens
2022-03-14 18:52 Sam James
2022-03-14 18:43 Sam James
2022-02-15 19:51 Sam James
2022-02-12 15:01 Sam James
2021-12-04  0:54 Sam James
2021-11-08 11:25 Michał Górny
2020-12-03  7:32 Joonas Niilola
2020-12-03  7:32 Joonas Niilola
2020-08-24 13:42 Sam James
2019-11-12 12:33 Miroslav Šulc
2018-08-15 20:08 Jonathan Scruggs
2018-01-30 18:44 Jonathan Scruggs
2017-12-25 16:09 David Seifert
2017-01-15 13:34 David Seifert
2016-06-16 20:02 Amy Winston

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox