* [gentoo-commits] repo/gentoo:master commit in: media-gfx/blender/files/, media-gfx/blender/
@ 2019-06-06 21:22 Andreas Sturmlechner
0 siblings, 0 replies; 18+ messages in thread
From: Andreas Sturmlechner @ 2019-06-06 21:22 UTC (permalink / raw
To: gentoo-commits
commit: fce2bae92fc72196e82a236c2ae3d290910c23b6
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Thu Jun 6 21:20:33 2019 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Thu Jun 6 21:21:44 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fce2bae9
media-gfx/blender: Drop 2.79 and 2.79-r1
No one explained why keep it, so drop it.
Closes: https://bugs.gentoo.org/606406
Closes: https://bugs.gentoo.org/659498
Package-Manager: Portage-2.3.67, Repoman-2.3.14
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
media-gfx/blender/Manifest | 1 -
media-gfx/blender/blender-2.79-r1.ebuild | 290 ---------------------
media-gfx/blender/blender-2.79.ebuild | 287 --------------------
.../blender-2.79-fix-build-with-OSL-1.9.x.patch | 26 --
4 files changed, 604 deletions(-)
diff --git a/media-gfx/blender/Manifest b/media-gfx/blender/Manifest
index 1255e093b89..2a585f30d14 100644
--- a/media-gfx/blender/Manifest
+++ b/media-gfx/blender/Manifest
@@ -1,2 +1 @@
-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.79-r1.ebuild b/media-gfx/blender/blender-2.79-r1.ebuild
deleted file mode 100644
index 2db487bd238..00000000000
--- a/media-gfx/blender/blender-2.79-r1.ebuild
+++ /dev/null
@@ -1,290 +0,0 @@
-# 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="https://www.blender.org"
-
-SRC_URI="https://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-4.0:=[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-5.0.0:=[${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}
- 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/blender-2.79.ebuild b/media-gfx/blender/blender-2.79.ebuild
deleted file mode 100644
index 7a99f994dd2..00000000000
--- a/media-gfx/blender/blender-2.79.ebuild
+++ /dev/null
@@ -1,287 +0,0 @@
-# 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="https://www.blender.org"
-
-SRC_URI="https://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-4.0:=[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-5.0.0:=[${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}
- 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" )
-
-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
deleted file mode 100644
index 6b22f9335fd..00000000000
--- a/media-gfx/blender/files/blender-2.79-fix-build-with-OSL-1.9.x.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-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] 18+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/blender/files/, media-gfx/blender/
@ 2025-04-22 0:41 Sam James
0 siblings, 0 replies; 18+ messages in thread
From: Sam James @ 2025-04-22 0:41 UTC (permalink / raw
To: gentoo-commits
commit: bbddf592412443f8f5cf43a2231ee36d9aae4f5e
Author: Paul Zander <negril.nx+gentoo <AT> gmail <DOT> com>
AuthorDate: Mon Apr 21 18:06:05 2025 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Apr 22 00:37:49 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bbddf592
media-gfx/blender: update 4.3.2
Backport changes from 9999 to 4.3.2
package missing assets
add opengl use flag to select backend
unbundle bullet/glog/gflags
rename USE otf to truetype
fix compilation with openvdb-12
fix compilation with optix-8.1.0
refactor cuda configuration
refactor hip configuration
refactor optix configuration
implement optional expensive tests and need configuration
Closes: https://bugs.gentoo.org/947591
Closes: https://bugs.gentoo.org/947515
Signed-off-by: Paul Zander <negril.nx+gentoo <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>
media-gfx/blender/blender-3.6.18-r1.ebuild | 12 +-
media-gfx/blender/blender-4.1.1-r5.ebuild | 16 +-
media-gfx/blender/blender-4.2.4-r2.ebuild | 16 +-
media-gfx/blender/blender-4.3.2-r2.ebuild | 443 +++++++++++++++------
.../blender/files/blender-4.3.2-openvdb-12.patch | 76 ++++
.../blender/files/blender-4.3.2-optix-8.1.0.patch | 34 ++
media-gfx/blender/metadata.xml | 2 +-
7 files changed, 464 insertions(+), 135 deletions(-)
diff --git a/media-gfx/blender/blender-3.6.18-r1.ebuild b/media-gfx/blender/blender-3.6.18-r1.ebuild
index 1d012d0577cc..bd3462a8b278 100644
--- a/media-gfx/blender/blender-3.6.18-r1.ebuild
+++ b/media-gfx/blender/blender-3.6.18-r1.ebuild
@@ -182,11 +182,13 @@ src_unpack() {
subversion_fetch ${ASSETS_SVN_URL} ../lib/assets
else
default
- if use test; then
- #The tests are downloaded from: https://svn.blender.org/svnroot/bf-blender/tags/blender-${SLOT}-release/lib/tests
- mkdir -p lib || die
- mv "${WORKDIR}/blender-${TEST_TARBALL_VERSION}-tests/tests" lib || die
- fi
+
+ # BUG upstream returns LFS references instead of files
+ # if use test; then
+ # #The tests are downloaded from: https://svn.blender.org/svnroot/bf-blender/tags/blender-${SLOT}-release/lib/tests
+ # mkdir -p lib || die
+ # mv "${WORKDIR}/blender-${TEST_TARBALL_VERSION}-tests/tests" lib || die
+ # fi
fi
}
diff --git a/media-gfx/blender/blender-4.1.1-r5.ebuild b/media-gfx/blender/blender-4.1.1-r5.ebuild
index aac5acc037a0..cbe668c639ba 100644
--- a/media-gfx/blender/blender-4.1.1-r5.ebuild
+++ b/media-gfx/blender/blender-4.1.1-r5.ebuild
@@ -235,10 +235,11 @@ src_unpack() {
else
default
- if use test; then
- mkdir -p "${S}/tests/data/" || die
- mv blender-test-data/* "${S}/tests/data/" || die
- fi
+ # BUG upstream returns LFS references instead of files
+ # if use test; then
+ # mkdir -p "${S}/tests/data/" || die
+ # mv blender-test-data/* "${S}/tests/data/" || die
+ # fi
fi
}
@@ -510,6 +511,13 @@ src_install() {
cmake_src_install
+ # X-KDE-RunOnDiscreteGpu is obsolete, so trim it
+ sed \
+ -e "s/=blender/=${P}/" \
+ -e "s/Name=Blender/Name=Blender Bin ${PV}/" \
+ -e "/X-KDE-RunOnDiscreteGpu.*/d" \
+ -i "${ED}/usr/share/applications/blender-${BV}.desktop" || die
+
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
diff --git a/media-gfx/blender/blender-4.2.4-r2.ebuild b/media-gfx/blender/blender-4.2.4-r2.ebuild
index ac5f6e417696..00a3d3ca405f 100644
--- a/media-gfx/blender/blender-4.2.4-r2.ebuild
+++ b/media-gfx/blender/blender-4.2.4-r2.ebuild
@@ -224,10 +224,11 @@ src_unpack() {
else
default
- if use test; then
- mkdir -p "${S}/tests/data/" || die
- mv blender-test-data/* "${S}/tests/data/" || die
- fi
+ # BUG upstream returns LFS references instead of files
+ # if use test; then
+ # mkdir -p "${S}/tests/data/" || die
+ # mv blender-test-data/* "${S}/tests/data/" || die
+ # fi
fi
}
@@ -499,6 +500,13 @@ src_install() {
cmake_src_install
+ # X-KDE-RunOnDiscreteGpu is obsolete, so trim it
+ sed \
+ -e "s/=blender/=${P}/" \
+ -e "s/Name=Blender/Name=Blender Bin ${PV}/" \
+ -e "/X-KDE-RunOnDiscreteGpu.*/d" \
+ -i "${ED}/usr/share/applications/blender-${BV}.desktop" || die
+
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
diff --git a/media-gfx/blender/blender-4.3.2-r2.ebuild b/media-gfx/blender/blender-4.3.2-r2.ebuild
index 11a7fe03aad6..6e5459ec540a 100644
--- a/media-gfx/blender/blender-4.3.2-r2.ebuild
+++ b/media-gfx/blender/blender-4.3.2-r2.ebuild
@@ -1,47 +1,89 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
+# shellcheck disable=SC2207
+
+# TODO
+# - Package Hydra
+# https://github.com/Ray-Tracing-Systems/HydraCore
+# https://github.com/Ray-Tracing-Systems/HydraAPI
+# - Package USD
+# https://github.com/PixarAnimationStudios/OpenUSD
+# - Package MaterialX
+# https://github.com/AcademySoftwareFoundation/MaterialX
+# - Package Draco
+# https://github.com/google/draco
+# - Package Audaspace
+# https://github.com/neXyon/audaspace
+
EAPI=8
-PYTHON_COMPAT=( python3_{11..12} )
+PYTHON_COMPAT=( python3_{11..13} )
# NOTE must match media-libs/osl
-LLVM_COMPAT=( {15..18} )
+LLVM_COMPAT=( {15..19} )
LLVM_OPTIONAL=1
-inherit check-reqs cmake cuda flag-o-matic llvm-r1 pax-utils python-single-r1 toolchain-funcs xdg-utils
+ROCM_SKIP_GLOBALS=1
+
+inherit cuda rocm llvm-r1
+inherit eapi9-pipestatus check-reqs flag-o-matic pax-utils python-single-r1 toolchain-funcs virtualx
+inherit cmake xdg-utils
DESCRIPTION="3D Creation/Animation/Publishing System"
HOMEPAGE="https://www.blender.org"
-if [[ ${PV} = *9999* ]] ; then
+# NOTE BLENDER_VERSION
+# https://projects.blender.org/blender/blender/src/branch/main/source/blender/blenkernel/BKE_blender_version.h
+BLENDER_BRANCH="$(ver_cut 1-2)"
+
+if [[ "${PV}" == *9999* ]]; then
EGIT_LFS="yes"
inherit git-r3
EGIT_REPO_URI="https://projects.blender.org/blender/blender.git"
EGIT_SUBMODULES=( '*' '-lib/*' )
+
+ if [[ "${PV}" == 9999* ]]; then
+ EGIT_BRANCH="main"
+ else
+ EGIT_BRANCH="blender-v${BLENDER_BRANCH}-release"
+ fi
+
RESTRICT="!test? ( test )"
else
SRC_URI="
https://download.blender.org/source/${P}.tar.xz
+ https://github.com/negril/gentoo-overlay-vendored/raw/refs/heads/blobs/blender-assets-${PV}.tar.xz
"
+ # BUG upstream returns LFS references instead of files
+ # SRC_URI+="
# test? (
- # https://projects.blender.org/blender/blender-test-data/archive/blender-v$(ver_cut 1-2)-release.tar.gz
+ # https://projects.blender.org/blender/blender-test-data/archive/blender-v${BLENDER_BRANCH}-release.tar.gz
# )
# "
KEYWORDS="~amd64 ~arm ~arm64"
- RESTRICT="test" # the test archive returns LFS references.
+ RESTRICT="test" # the test archive contains LFS references
fi
-LICENSE="GPL-3+ cycles? ( Apache-2.0 )"
-SLOT="${PV%.*}"
+# assets is CC0-1.0
+LICENSE="GPL-3+ cycles? ( Apache-2.0 ) CC0-1.0"
+SLOT="${BLENDER_BRANCH}"
+
+# NOTE +openpgl breaks on very old amd64 hardware
+# potentially mirror cpu_flags_x86 + REQUIRED_USE
IUSE="
alembic +bullet collada +color-management cuda +cycles +cycles-bin-kernels
debug doc +embree +ffmpeg +fftw +fluid +gmp gnome hip jack
- +opensubdiv +openvdb optix osl +otf +pdf +potrace +pugixml pulseaudio
- renderdoc sdl +sndfile +tbb test +tiff valgrind vulkan wayland +webp X
- jemalloc jpeg2k man +nanovdb ndof nls +oidn openal +openexr +openmp +openpgl
+ jemalloc jpeg2k man +nanovdb ndof nls +oidn openal +openexr +opengl +openmp +openpgl
+ +opensubdiv +openvdb optix osl +pdf +potrace +pugixml pulseaudio
+ renderdoc sdl +sndfile +tbb test +tiff +truetype valgrind vulkan wayland +webp X
"
+if [[ "${PV}" == *9999* ]]; then
+ IUSE+="experimental"
+fi
+
REQUIRED_USE="${PYTHON_REQUIRED_USE}
+ || ( opengl vulkan )
alembic? ( openexr )
cuda? ( cycles )
cycles? ( openexr tiff tbb )
@@ -52,12 +94,18 @@ REQUIRED_USE="${PYTHON_REQUIRED_USE}
openvdb? ( tbb openexr )
optix? ( cuda )
osl? ( cycles pugixml )
- test? ( color-management )"
+ test? (
+ color-management
+ jpeg2k
+ )
+"
# Library versions for official builds can be found in the blender source directory in:
# build_files/build_environment/cmake/versions.cmake
RDEPEND="${PYTHON_DEPS}
app-arch/zstd
+ dev-cpp/gflags:=
+ dev-cpp/glog:=
dev-libs/boost:=[nls?]
dev-libs/lzo:2=
$(python_gen_cond_dep '
@@ -75,17 +123,20 @@ RDEPEND="${PYTHON_DEPS}
sys-libs/zlib:=
virtual/glu
virtual/libintl
- virtual/opengl
+ virtual/opengl[X?]
alembic? ( >=media-gfx/alembic-1.8.3-r2[boost(+),hdf(+)] )
+ bullet? ( sci-physics/bullet:=[double-precision] )
collada? ( >=media-libs/opencollada-1.6.68 )
color-management? ( media-libs/opencolorio:= )
cuda? ( dev-util/nvidia-cuda-toolkit:= )
embree? ( media-libs/embree:=[raymask] )
ffmpeg? ( media-video/ffmpeg:=[encode(+),lame(-),jpeg2k?,opus,theora,vorbis,vpx,x264,xvid] )
- fftw? ( sci-libs/fftw:3.0= )
+ fftw? ( sci-libs/fftw:3.0=[threads] )
gmp? ( dev-libs/gmp[cxx] )
gnome? ( gui-libs/libdecor )
- hip? ( >=dev-util/hip-5.7 )
+ hip? (
+ >=dev-util/hip-5.7:=
+ )
jack? ( virtual/jack )
jemalloc? ( dev-libs/jemalloc:= )
jpeg2k? ( media-libs/openjpeg:2= )
@@ -101,7 +152,7 @@ RDEPEND="${PYTHON_DEPS}
>=media-libs/openexr-3.2.1:0=
)
openpgl? ( media-libs/openpgl:= )
- opensubdiv? ( >=media-libs/opensubdiv-3.5.0 )
+ opensubdiv? ( >=media-libs/opensubdiv-3.6.0-r2[opengl,cuda?,openmp?,tbb?] )
openvdb? (
>=media-gfx/openvdb-11.0.0:=[nanovdb?]
dev-libs/c-blosc:=
@@ -134,7 +185,7 @@ RDEPEND="${PYTHON_DEPS}
dev-util/glslang
media-libs/vulkan-loader
)
- otf? (
+ truetype? (
media-libs/harfbuzz
)
renderdoc? (
@@ -149,11 +200,19 @@ RDEPEND="${PYTHON_DEPS}
DEPEND="${RDEPEND}
dev-cpp/eigen:=
- vulkan? (
- dev-util/spirv-headers
- dev-util/vulkan-headers
+"
+
+if [[ "${PV}" == *9999* ]]; then
+DEPEND+="
+ test? (
+ experimental? (
+ wayland? (
+ dev-libs/weston
+ )
+ )
)
"
+fi
BDEPEND="
virtual/pkgconfig
@@ -166,6 +225,10 @@ BDEPEND="
dev-texlive/texlive-latex
dev-texlive/texlive-latexextra
)
+ vulkan? (
+ dev-util/spirv-headers
+ dev-util/vulkan-headers
+ )
nls? ( sys-devel/gettext )
wayland? (
dev-util/wayland-scanner
@@ -177,10 +240,13 @@ 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"
"${FILESDIR}/${PN}-4.3.2-ffmpeg7.patch"
+ "${FILESDIR}/${PN}-4.3.2-openvdb-12.patch"
+ "${FILESDIR}/${PN}-4.3.2-optix-8.1.0.patch"
+ "${FILESDIR}/${PN}-4.3.2-system-gtest.patch"
+ "${FILESDIR}/${PN}-4.4.0-optix-compile-flags.patch"
)
blender_check_requirements() {
@@ -192,38 +258,43 @@ blender_check_requirements() {
}
blender_get_version() {
+ if [[ -n "${BV}" && -n "${BVC}" ]]; then
+ return
+ fi
+
+ local status
# Get blender version from blender itself.
- BV=$(grep "BLENDER_VERSION " source/blender/blenkernel/BKE_blender_version.h | cut -d " " -f 3; assert)
- if ((${BV:0:1} < 3)) ; then
- # Add period (290 -> 2.90).
- BV=${BV:0:1}.${BV:1}
- else
- # Add period and skip the middle number (301 -> 3.1)
- BV=${BV:0:1}.${BV:2}
+ # mirrors build_files/cmake/macros.cmake function(get_blender_version)
+ # NOTE maps x0y to x.y
+ # TODO this can potentially break for x > 9 and y > 9
+ BV="$(grep "define BLENDER_VERSION " source/blender/blenkernel/BKE_blender_version.h | cut -d ' ' -f 3)"
+ status="$(pipestatus -v)" || die "fails to detect BLENDER_VERSION, (PIPESTATUS: ${status})"
+ BV="$(printf "%d.%d" "${BV:0: -2}" "${BV: -2}")"
+
+ if [[ "${PV}" != 9999* && "${BLENDER_BRANCH}" != "${BV}" ]]; then
+ eerror "ebuild (${BLENDER_BRANCH}) and code (${BV}) version mismatch"
+ die "blender_get_version"
fi
+
+ BVC="$(grep "define BLENDER_VERSION_CYCLE " source/blender/blenkernel/BKE_blender_version.h | cut -d ' ' -f 3)"
+ status="$(pipestatus -v)" || die "fails to detect BLENDER_VERSION_CYCLE, (PIPESTATUS: ${status})"
}
pkg_pretend() {
blender_check_requirements
-
- if use oneapi; then
- einfo "The Intel oneAPI support is rudimentary."
- einfo ""
- einfo "Please report any bugs you find to https://bugs.gentoo.org/"
- fi
}
pkg_setup() {
+ blender_check_requirements
+ python-single-r1_pkg_setup
+
if use osl; then
llvm-r1_pkg_setup
fi
-
- blender_check_requirements
- python-single-r1_pkg_setup
}
src_unpack() {
- if [[ ${PV} = *9999* ]] ; then
+ if [[ "${PV}" == *9999* ]]; then
if ! use test; then
EGIT_SUBMODULES+=( '-tests/*' )
fi
@@ -231,10 +302,11 @@ src_unpack() {
else
default
- if use test; then
- mkdir -p "${S}/tests/data/" || die
- mv blender-test-data/* "${S}/tests/data/" || die
- fi
+ # BUG upstream returns LFS references instead of files
+ # if use test; then
+ # mkdir -p "${S}/tests/data/" || die
+ # mv blender-test-data/* "${S}/tests/data/" || die
+ # fi
fi
}
@@ -245,11 +317,6 @@ 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|" \
@@ -264,22 +331,62 @@ src_prepare() {
-e "s|Icon=blender|Icon=blender-${BV}|" \
-i release/freedesktop/blender.desktop || die
- sed -e "s|\${CMAKE_INSTALL_PREFIX}/\${BLENDER_BIN}|${T}/usr/\${BLENDER_BIN}|g" -i source/creator/CMakeLists.txt || die
+ sed \
+ -e "/CMAKE_INSTALL_PREFIX_WITH_CONFIG/{s|\${CMAKE_INSTALL_PREFIX}|${T}\${CMAKE_INSTALL_PREFIX}|g}" \
+ -i CMakeLists.txt \
+ || die CMAKE_INSTALL_PREFIX_WITH_CONFIG
mv \
- release/freedesktop/icons/scalable/apps/blender.svg \
- "release/freedesktop/icons/scalable/apps/blender-${BV}.svg" || die
+ "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/freedesktop/icons/symbolic/apps/blender-symbolic.svg \
- "release/freedesktop/icons/symbolic/apps/blender-${BV}-symbolic.svg" || die
- mv release/freedesktop/blender.desktop "release/freedesktop/blender-${BV}.desktop" || die
- mv release/freedesktop/org.blender.Blender.metainfo.xml "release/freedesktop/blender-${BV}.metainfo.xml"
- mv release/freedesktop/org.blender.Blender.appdata.xml "release/freedesktop/blender-${BV}.appdata.xml"
+ "release/freedesktop/org.blender.Blender.metainfo.xml" \
+ "release/freedesktop/blender-${BV}.metainfo.xml" \
+ || die
+
+ sed \
+ -e "s#\(set(cycles_kernel_runtime_lib_target_path \)\${cycles_kernel_runtime_lib_target_path}\(/lib)\)#\1\${CYCLES_INSTALL_PATH}\2#" \
+ -i intern/cycles/kernel/CMakeLists.txt \
+ || die
+
+ if use hip; then
+ # fix hardcoded path
+ sed \
+ -e "s#opt/rocm/hip/bin#$(hipconfig -p)/bin#g" \
+ -i extern/hipew/src/hipew.c \
+ || die
+ fi
if use test; then
# Without this the tests will try to use /usr/bin/blender and /usr/share/blender/ to run the tests.
- sed -e "s|set(TEST_INSTALL_DIR.*|set(TEST_INSTALL_DIR ${T}/usr)|g" -i tests/CMakeLists.txt || die
- sed -e "s|string(REPLACE.*|set(TEST_INSTALL_DIR ${T}/usr)|g" -i build_files/cmake/testing.cmake || die
+ sed \
+ -e "/string(REPLACE.*TEST_INSTALL_DIR/{s|\${CMAKE_INSTALL_PREFIX}|${T}\${CMAKE_INSTALL_PREFIX}|g}" \
+ -i "build_files/cmake/testing.cmake" \
+ || die "REPLACE.*TEST_INSTALL_DIR"
+
+ # assertEquals was deprecated in Python-3.2 use assertEqual instead
+ sed \
+ -e 's/assertEquals/assertEqual/g' \
+ -i tests/python/bl_animation_action.py \
+ || die
+
+ sed -e '1i #include <cstdint>' -i extern/gtest/src/gtest-death-test.cc || die
+ else
+ cmake_comment_add_subdirectory tests
+ fi
+
+ if [[ "${PV}" != *9999* ]]; then
+ rm "${WORKDIR}/blender-assets/publish/LICENSE" || die
fi
if use vulkan; then
@@ -294,14 +401,23 @@ src_configure() {
filter-lto
# Workaround for bug #922600
- append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
+ append-ldflags "$(test-flags-CCLD -Wl,--undefined-version)"
append-lfs-flags
blender_get_version
local mycmakeargs=(
- -DWITH_LIBS_PRECOMPILED=no
- -DBUILD_SHARED_LIBS=no
+ -DCMAKE_POLICY_DEFAULT_CMP0177="OLD"
+
+ # we build a host-specific binary
+ -DWITH_INSTALL_PORTABLE="no"
+ -DWITH_CPU_CHECK="no"
+
+ -DWITH_STRICT_BUILD_OPTIONS="yes"
+ -DWITH_LIBS_PRECOMPILED="no"
+ -DBUILD_SHARED_LIBS="no" # quadriflow only?
+ -DWITH_STATIC_LIBS=OFF
+
-DPYTHON_INCLUDE_DIR="$(python_get_includedir)"
-DPYTHON_LIBRARY="$(python_get_library_path)"
-DPYTHON_VERSION="${EPYTHON/python/}"
@@ -310,7 +426,6 @@ src_configure() {
-DWITH_BULLET=$(usex bullet)
-DWITH_CODEC_FFMPEG=$(usex ffmpeg)
-DWITH_CODEC_SNDFILE=$(usex sndfile)
- -DWITH_CPU_CHECK=no
-DWITH_CYCLES=$(usex cycles)
@@ -336,15 +451,14 @@ src_configure() {
-DWITH_GHOST_X11=$(usex X)
-DWITH_GMP=$(usex gmp)
-DWITH_GTESTS=$(usex test)
- -DWITH_HARFBUZZ="$(usex otf)"
+ -DWITH_HARFBUZZ="$(usex truetype)"
-DWITH_HARU=$(usex pdf)
- -DWITH_HEADLESS=$($(use X || use wayland) && echo OFF || echo ON)
+ -DWITH_HEADLESS="$(usex !X "$(use !wayland)")"
-DWITH_HYDRA="no" # TODO: Package Hydra
-DWITH_IMAGE_OPENEXR=$(usex openexr)
-DWITH_IMAGE_OPENJPEG=$(usex jpeg2k)
-DWITH_IMAGE_WEBP=$(usex webp)
-DWITH_INPUT_NDOF=$(usex ndof)
- -DWITH_INSTALL_PORTABLE="no"
-DWITH_INTERNATIONAL=$(usex nls)
-DWITH_JACK=$(usex jack)
-DWITH_MATERIALX="no" # TODO: Package MaterialX
@@ -356,6 +470,7 @@ src_configure() {
-DWITH_OPENAL=$(usex openal)
-DWITH_OPENCOLLADA=$(usex collada)
-DWITH_OPENCOLORIO=$(usex color-management)
+ -DWITH_OPENGL_BACKEND=$(usex opengl)
-DWITH_OPENIMAGEDENOISE=$(usex oidn)
-DWITH_OPENMP=$(usex openmp)
-DWITH_OPENSUBDIV=$(usex opensubdiv)
@@ -369,15 +484,16 @@ src_configure() {
-DWITH_PYTHON_INSTALL_ZSTANDARD=no
-DWITH_RENDERDOC="$(usex renderdoc)"
-DWITH_SDL=$(usex sdl)
- -DWITH_STATIC_LIBS=no
- -DWITH_STRICT_BUILD_OPTIONS=yes
+ -DWITH_SYSTEM_BULLET="yes"
-DWITH_SYSTEM_EIGEN3=yes
-DWITH_SYSTEM_FREETYPE=yes
+ -DWITH_SYSTEM_GFLAGS="yes"
+ -DWITH_SYSTEM_GLOG="yes"
-DWITH_SYSTEM_LZO=yes
-DWITH_TBB=$(usex tbb)
-DWITH_USD="no" # TODO: Package USD
- -DWITH_VULKAN_BACKEND="$(usex vulkan)"
-DWITH_XR_OPENXR=no
+ -DWITH_UNITY_BUILD="no"
)
if has_version ">=dev-python/numpy-2"; then
@@ -388,29 +504,44 @@ src_configure() {
fi
# requires dev-vcs/git
- if [[ ${PV} = *9999* ]] ; then
- mycmakeargs+=( -DWITH_BUILDINFO="yes" )
+ if [[ "${PV}" == *9999* && "${BVC}" == "alpha" ]]; then
+ mycmakeargs+=(
+ # -DWITH_BUILDINFO="no"
+ -DWITH_EXPERIMENTAL_FEATURES="$(usex experimental)"
+ )
else
- mycmakeargs+=( -DWITH_BUILDINFO="no" )
+ mycmakeargs+=(
+ -DWITH_EXPERIMENTAL_FEATURES="no"
+ )
fi
if use cuda; then
- mycmakeargs+=(
- -DCUDA_NVCC_FLAGS="--compiler-bindir;$(cuda_gccdir)"
- )
+ # Ease compiling with required gcc similar to cuda_sanitize but for cmake
+ if use cycles-bin-kernels; then
+ local -x CUDAHOSTCXX="$(cuda_gccdir)"
+ local -x CUDAHOSTLD="$(tc-getCXX)"
+
+ if [[ -n "${CUDAARCHS}" ]]; then
+ mycmakeargs+=(
+ -DCYCLES_CUDA_BINARIES_ARCH="$(echo "${CUDAARCHS}" | sed -e 's/^/sm_/g' -e 's/;/;sm_/g')"
+ )
+ fi
+ fi
fi
if use hip; then
mycmakeargs+=(
- -DROCM_PATH="$(hipconfig -R)"
+ -DHIP_ROOT_DIR="$(hipconfig -p)"
-DHIP_HIPCC_FLAGS="-fcf-protection=none"
+ -DCMAKE_HIP_LINK_EXECUTABLE="$(get_llvm_prefix)/bin/clang++"
+ -DCYCLES_HIP_BINARIES_ARCH="$(get_amdgpu_flags)"
)
fi
if use optix; then
mycmakeargs+=(
- -DCYCLES_RUNTIME_OPTIX_ROOT_DIR="${EPREFIX}"/opt/optix
- -DOPTIX_ROOT_DIR="${EPREFIX}"/opt/optix
+ -DCYCLES_RUNTIME_OPTIX_ROOT_DIR="${ESYSROOT}/opt/optix"
+ -DOPTIX_ROOT_DIR="${ESYSROOT}/opt/optix"
)
fi
@@ -425,17 +556,13 @@ src_configure() {
use arm64 && append-flags -flax-vector-conversions
append-cflags "$(usex debug '-DDEBUG' '-DNDEBUG')"
- append-cppflags "$(usex debug '-DDEBUG' '-DNDEBUG')"
+ append-cxxflags "$(usex debug '-DDEBUG' '-DNDEBUG')"
- if tc-is-gcc ; then
- # These options only exist when GCC is detected.
+ if tc-is-gcc; then
# We disable these to respect the user's choice of linker.
mycmakeargs+=(
-DWITH_LINKER_GOLD=no
- -DWITH_LINKER_LLD=no
)
- # Ease compiling with required gcc similar to cuda_sanitize but for cmake
- use cuda && use cycles-bin-kernels && mycmakeargs+=( -DCUDA_HOST_COMPILER="$(cuda_gccdir)" )
fi
if tc-is-clang || use osl; then
@@ -445,7 +572,7 @@ src_configure() {
)
fi
- if use test ; then
+ if use test; then
local CYCLES_TEST_DEVICES=( "CPU" )
if use cycles-bin-kernels; then
use cuda && CYCLES_TEST_DEVICES+=( "CUDA" )
@@ -453,46 +580,110 @@ src_configure() {
use hip && CYCLES_TEST_DEVICES+=( "HIP" )
fi
mycmakeargs+=(
- -DCYCLES_TEST_DEVICES:STRING="$(local IFS=";"; echo "${CYCLES_TEST_DEVICES[*]}")"
- -DWITH_COMPOSITOR_REALTIME_TESTS=yes
- -DWITH_GPU_DRAW_TESTS=yes
- -DWITH_GPU_RENDER_TESTS=yes
+ -DCMAKE_INSTALL_PREFIX_WITH_CONFIG="${T}/usr"
+ -DCYCLES_TEST_DEVICES="$(local IFS=";"; echo "${CYCLES_TEST_DEVICES[*]}")"
)
+
+ # NOTE in lieu of a FEATURE/build_options
+ if [[ "${EXPENSIVE_TESTS:-0}" -gt 0 ]]; then
+ mycmakeargs+=(
+ -DWITH_COMPOSITOR_REALTIME_TESTS="yes"
+
+ -DWITH_CYCLES_TEST_OSL="$(usex osl)"
+
+ -DWITH_GPU_DRAW_TESTS="yes"
+
+ -DWITH_GPU_RENDER_TESTS="yes"
+ -DWITH_GPU_RENDER_TESTS_SILENT="no"
+ )
+
+ if [[ "${PV}" == *9999* && "${BVC}" == "alpha" ]] && use experimental; then
+ mycmakeargs+=(
+ # Enable user-interface tests using a headless display server.
+ # Currently this depends on WITH_GHOST_WAYLAND and the weston compositor (Experimental)
+ -DWITH_UI_TESTS="$(usex wayland)"
+ -DWESTON_BIN="${ESYSROOT}/usr/bin/weston"
+ )
+ fi
+ else
+ mycmakeargs+=(
+ -DWITH_GPU_RENDER_TESTS="no"
+ )
+ fi
fi
cmake_src_configure
}
src_test() {
- # A lot of tests needs to have access to the installed data files.
+ # A lot of tests need to have access to the installed data files.
# So install them into the image directory now.
DESTDIR="${T}" cmake_build install
blender_get_version
- # By default, blender will look for system scripts and data in
- # /usr/share/, but until this is installed, they are not necessarily
- # available there. Use this to have blender search the intermediate
- # install directory instead.
- export BLENDER_SYSTEM_RESOURCES="${T}/usr/share/blender/${BV}"
+ # Define custom blender data/script file paths, or we won't 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)
+ local -x BLENDER_SYSTEM_RESOURCES="${T%/}/usr/share/blender/${BV}"
- # Brake check: Make sure the above path is valid.
- # If not, blender will fallback to the default path which is not what
- # we want.
- [ -d "$BLENDER_SYSTEM_RESOURCES" ] || die "The custom script path is invalid, fix the ebuild!"
+ # Sanity check that the script and datafile path is valid.
+ # If they are not valid, blender will fallback to the default path which is not what we want.
+ [[ -d "${BLENDER_SYSTEM_RESOURCES}" ]] || die "The custom resources path is invalid, fix the ebuild!"
+
+ # TODO only picks first card
+ addwrite "/dev/dri/card0"
+ addwrite "/dev/dri/renderD128"
+ addwrite "/dev/udmabuf"
if use cuda; then
cuda_add_sandbox -w
- addwrite "/dev/dri/renderD128"
addwrite "/dev/char/"
fi
- if use X; then
- xdg_environment_reset
+ if ! has_version "media-libs/openusd"; then
+ CMAKE_SKIP_TESTS+=(
+ # from pxr import Usd # ModuleNotFoundError: No module named 'pxr'
+ "^script_bundled_modules$"
+ )
fi
- addwrite /dev/dri
+ # For debugging, print out all information.
+ local -x VERBOSE="$(usex debug "true" "false")"
+
+ # Show the window in the foreground.
+ local -x USE_WINDOW="false"
+ local -x USE_DEBUG="false"
+
+ if [[ "${EXPENSIVE_TESTS:-0}" -gt 0 ]]; then
+ if [[ "${USE_WINDOW}" = "true" ]] &&
+ [[ "${PV}" == *9999* && "${BVC}" == "alpha" ]] &&
+ use experimental && use wayland; then
+ # This runs weston
+ xdg_environment_reset
+ fi
- cmake_src_test
+ if [[ "${USE_WINDOW}" == "true" ]]; then
+ xdg_environment_reset
+ # WITH_GPU_RENDER_TESTS_HEADED
+ if use wayland; then
+ local compositor exit_code
+ local logfile=${T}/weston.log
+ weston --xwayland --backend=headless --socket=wayland-5 --idle-time=0 2>"${logfile}" &
+ compositor=$!
+ local -x WAYLAND_DISPLAY=wayland-5
+ sleep 1 # wait for xwayland to be up
+ local -x DISPLAY="$(grep "xserver listening on display" "${logfile}" | cut -d ' ' -f 5)"
+
+ cmake_src_test
+
+ exit_code=$?
+ kill "${compositor}"
+ elif use X; then
+ virtx cmake_src_test
+ fi
+ fi
+ else
+ cmake_src_test
+ fi
# Clean up the image directory for src_install
rm -fr "${T}/usr" || die
@@ -506,22 +697,22 @@ src_install() {
cmake_src_install
+ # X-KDE-RunOnDiscreteGpu is obsolete, so trim it
+ sed \
+ -e "s/=blender/=${P}/" \
+ -e "s/Name=Blender/Name=Blender Bin ${PV}/" \
+ -e "/X-KDE-RunOnDiscreteGpu.*/d" \
+ -i "${ED}/usr/share/applications/blender-${BV}.desktop" || die
+
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
if use doc; then
- # By default, blender will look for system scripts and data in
- # /usr/share/, but until this is installed, they are not necessarily
- # available there. Use this to have blender search the intermediate
- # install directory instead.
- export BLENDER_SYSTEM_RESOURCES="${ED}/usr/share/blender/${BV}"
-
- # Brake check: Make sure the above path is valid.
- # If not, blender will fallback to the default path which is not what
- # we want.
- [ -d "$BLENDER_SYSTEM_RESOURCES" ] || die "The custom script path is invalid, fix the ebuild!"
+ # Define custom blender data/script file paths. Otherwise Blender will not be able to find them during doc building.
+ # (Because the data is in the image directory and it will default to look in /usr/share)
+ local -x BLENDER_SYSTEM_RESOURCES="${ED}/usr/share/blender/${BV}"
# Workaround for binary drivers.
addpredict /dev/ati
@@ -547,6 +738,11 @@ src_install() {
dodoc -r "${CMAKE_USE_DIR}"/doc/doxygen/html/.
fi
+ if [[ "${PV}" != *9999* ]]; then
+ insinto "/usr/share/blender/${BV}/datafiles/assets"
+ doins -r "${WORKDIR}/blender-assets/publish/"*
+ fi
+
# Fix doc installdir
docinto html
dodoc "${CMAKE_USE_DIR}"/release/text/readme.html
@@ -554,8 +750,9 @@ src_install() {
python_optimize "${ED}/usr/share/blender/${BV}/scripts"
- mv "${ED}/usr/bin/blender-thumbnailer" "${ED}/usr/bin/blender-${BV}-thumbnailer" || die
- mv "${ED}/usr/bin/blender" "${ED}/usr/bin/blender-${BV}" || die
+ mv "${ED}/usr/bin/blender-thumbnailer" "${ED}/usr/bin/blender-${BV}-thumbnailer" \
+ || die "blender-thumbnailer version rename failed"
+ mv "${ED}/usr/bin/blender" "${ED}/usr/bin/blender-${BV}" || die "blender version rename failed"
}
pkg_postinst() {
@@ -569,7 +766,7 @@ pkg_postinst() {
elog "changing the 'Temporary Files' directory in Blender preferences."
elog
- if use osl; then
+ if use osl && ! has_version "media-libs/mesa[${LLVM_USEDEP}]"; then
ewarn ""
ewarn "OSL is know to cause runtime segfaults if Mesa has been linked to"
ewarn "an other LLVM version than what OSL is linked to."
@@ -577,11 +774,12 @@ pkg_postinst() {
ewarn ""
fi
+ # NOTE build_files/cmake/Modules/FindPythonLibsUnix.cmake: set(_PYTHON_VERSION_SUPPORTED 3.11)
if ! use python_single_target_python3_11; then
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 switch to"
- elog "python_single_target_python3_11 instead."
+ elog "PYTHON_SINGLE_TARGET: python3_11 instead."
elog "Bug: https://bugs.gentoo.org/737388"
elog
fi
@@ -596,9 +794,12 @@ pkg_postrm() {
xdg_mimeinfo_database_update
xdg_desktop_database_update
- ewarn ""
- ewarn "You may want to remove the following directory."
- ewarn "~/.config/${PN}/${BV}/cache/"
- ewarn "It may contain extra render kernels not tracked by portage"
- ewarn ""
+ if [[ -z "${REPLACED_BY_VERSION}" ]]; then
+ ewarn
+ ewarn "You may want to remove the following directories"
+ ewarn "- ~/.config/${PN}/${BV}/cache/"
+ ewarn "- ~/.cache/cycles/"
+ ewarn "It may contain extra render kernels not tracked by portage"
+ ewarn
+ fi
}
diff --git a/media-gfx/blender/files/blender-4.3.2-openvdb-12.patch b/media-gfx/blender/files/blender-4.3.2-openvdb-12.patch
new file mode 100644
index 000000000000..02cca15f7c94
--- /dev/null
+++ b/media-gfx/blender/files/blender-4.3.2-openvdb-12.patch
@@ -0,0 +1,76 @@
+https://projects.blender.org/blender/blender/pulls/131833
+From 91412f2a28db69ac2a73c1bc646e350063d8ddd5 Mon Sep 17 00:00:00 2001
+From: Brecht Van Lommel <brecht@blender.org>
+Date: Fri, 13 Dec 2024 04:29:29 +0100
+Subject: [PATCH] Cycles: Support building with OpenVDB 12
+
+---
+ intern/cycles/scene/image_vdb.cpp | 20 +++++++++++++++-----
+ intern/cycles/scene/image_vdb.h | 8 +++++++-
+ 2 files changed, 22 insertions(+), 6 deletions(-)
+
+diff --git a/intern/cycles/scene/image_vdb.cpp b/intern/cycles/scene/image_vdb.cpp
+index d94a7973adc..42964fac81d 100644
+--- a/intern/cycles/scene/image_vdb.cpp
++++ b/intern/cycles/scene/image_vdb.cpp
+@@ -55,23 +55,33 @@ struct ToNanoOp {
+ try {
+ # if NANOVDB_MAJOR_VERSION_NUMBER > 32 || \
+ (NANOVDB_MAJOR_VERSION_NUMBER == 32 && NANOVDB_MINOR_VERSION_NUMBER >= 6)
++# if NANOVDB_MAJOR_VERSION_NUMBER > 32 || \
++ (NANOVDB_MAJOR_VERSION_NUMBER == 32 && NANOVDB_MINOR_VERSION_NUMBER >= 7)
++ /* OpenVDB 12. */
++ using nanovdb::tools::createNanoGrid;
++ using nanovdb::tools::StatsMode;
++# else
+ /* OpenVDB 11. */
++ using nanovdb::createNanoGrid;
++ using nanovdb::StatsMode;
++# endif
++
+ if constexpr (std::is_same_v<FloatGridType, openvdb::FloatGrid>) {
+ openvdb::FloatGrid floatgrid(*openvdb::gridConstPtrCast<GridType>(grid));
+ if (precision == 0) {
+- nanogrid = nanovdb::createNanoGrid<openvdb::FloatGrid, nanovdb::FpN>(floatgrid);
++ nanogrid = createNanoGrid<openvdb::FloatGrid, nanovdb::FpN>(floatgrid);
+ }
+ else if (precision == 16) {
+- nanogrid = nanovdb::createNanoGrid<openvdb::FloatGrid, nanovdb::Fp16>(floatgrid);
++ nanogrid = createNanoGrid<openvdb::FloatGrid, nanovdb::Fp16>(floatgrid);
+ }
+ else {
+- nanogrid = nanovdb::createNanoGrid<openvdb::FloatGrid, float>(floatgrid);
++ nanogrid = createNanoGrid<openvdb::FloatGrid, float>(floatgrid);
+ }
+ }
+ else if constexpr (std::is_same_v<FloatGridType, openvdb::Vec3fGrid>) {
+ openvdb::Vec3fGrid floatgrid(*openvdb::gridConstPtrCast<GridType>(grid));
+- nanogrid = nanovdb::createNanoGrid<openvdb::Vec3fGrid, nanovdb::Vec3f>(
+- floatgrid, nanovdb::StatsMode::Disable);
++ nanogrid = createNanoGrid<openvdb::Vec3fGrid, nanovdb::Vec3f>(floatgrid,
++ StatsMode::Disable);
+ }
+ # else
+ /* OpenVDB 10. */
+diff --git a/intern/cycles/scene/image_vdb.h b/intern/cycles/scene/image_vdb.h
+index 49853cf3753..e0af9b87db1 100644
+--- a/intern/cycles/scene/image_vdb.h
++++ b/intern/cycles/scene/image_vdb.h
+@@ -9,7 +9,13 @@
+ # include <openvdb/openvdb.h>
+ #endif
+ #ifdef WITH_NANOVDB
+-# include <nanovdb/util/GridHandle.h>
++# include <nanovdb/NanoVDB.h>
++# if NANOVDB_MAJOR_VERSION_NUMBER > 32 || \
++ (NANOVDB_MAJOR_VERSION_NUMBER == 32 && NANOVDB_MINOR_VERSION_NUMBER >= 7)
++# include <nanovdb/GridHandle.h>
++# else
++# include <nanovdb/util/GridHandle.h>
++# endif
+ #endif
+
+ #include "scene/image.h"
+--
+2.45.2
+
diff --git a/media-gfx/blender/files/blender-4.3.2-optix-8.1.0.patch b/media-gfx/blender/files/blender-4.3.2-optix-8.1.0.patch
new file mode 100644
index 000000000000..092c30db2bc5
--- /dev/null
+++ b/media-gfx/blender/files/blender-4.3.2-optix-8.1.0.patch
@@ -0,0 +1,34 @@
+From 7ce8dbf5f82af7c80890d18b27e1d9df6009d5b4 Mon Sep 17 00:00:00 2001
+From: Patrick Mours <pmours@nvidia.com>
+Date: Mon, 18 Nov 2024 13:16:41 +0100
+Subject: [PATCH] Change OptiX function table name for OptiX 8.1 support
+
+---
+ intern/cycles/device/optix/device.cpp | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/intern/cycles/device/optix/device.cpp b/intern/cycles/device/optix/device.cpp
+index 60a1dbfe4e3..c8608ab5d75 100644
+--- a/intern/cycles/device/optix/device.cpp
++++ b/intern/cycles/device/optix/device.cpp
+@@ -21,12 +21,16 @@
+ # include <optix_function_table_definition.h>
+ #endif
+
++#ifndef OPTIX_FUNCTION_TABLE_SYMBOL
++# define OPTIX_FUNCTION_TABLE_SYMBOL g_optixFunctionTable
++#endif
++
+ CCL_NAMESPACE_BEGIN
+
+ bool device_optix_init()
+ {
+ #ifdef WITH_OPTIX
+- if (g_optixFunctionTable.optixDeviceContextCreate != NULL) {
++ if (OPTIX_FUNCTION_TABLE_SYMBOL.optixDeviceContextCreate != NULL) {
+ /* Already initialized function table. */
+ return true;
+ }
+--
+2.47.2
+
diff --git a/media-gfx/blender/metadata.xml b/media-gfx/blender/metadata.xml
index 6c565f9d227f..09310cae2fcc 100644
--- a/media-gfx/blender/metadata.xml
+++ b/media-gfx/blender/metadata.xml
@@ -51,7 +51,7 @@
Use embree to accelerate certain areas of the Cycles render engine.
</flag>
<flag name="experimental">
- Build Experimental Blender Modules
+ Enable experimental features
</flag>
<flag name="fluid">
Adds fluid simulation support via the built-in Mantaflow library.
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/blender/files/, media-gfx/blender/
@ 2025-04-22 0:41 Sam James
0 siblings, 0 replies; 18+ messages in thread
From: Sam James @ 2025-04-22 0:41 UTC (permalink / raw
To: gentoo-commits
commit: 04aae426f32c1a5ac8c8ff0237a4f00d981c8eac
Author: Paul Zander <negril.nx+gentoo <AT> gmail <DOT> com>
AuthorDate: Mon Apr 21 18:14:27 2025 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Apr 22 00:37:50 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=04aae426
media-gfx/blender: bump 4.3.2-r3, 4.2.9, drop 4.1.1-r5, 3.6.18-r1
Bug: https://bugs.gentoo.org/949564
Signed-off-by: Paul Zander <negril.nx+gentoo <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>
media-gfx/blender/Manifest | 3 +-
media-gfx/blender/blender-3.6.18-r1.ebuild | 449 ---------------
...lender-4.1.1-r5.ebuild => blender-4.2.9.ebuild} | 60 +-
...der-4.3.2-r2.ebuild => blender-4.3.2-r3.ebuild} | 3 +
.../blender/files/blender-4.2.9-python3.12.patch | 68 +++
.../blender/files/blender-4.2.9-python3.12_1.patch | 39 ++
.../blender/files/blender-4.2.9-python3.13.patch | 626 +++++++++++++++++++++
media-gfx/blender/metadata.xml | 3 -
8 files changed, 766 insertions(+), 485 deletions(-)
diff --git a/media-gfx/blender/Manifest b/media-gfx/blender/Manifest
index 7c9e4778abea..cd7f4d2f807b 100644
--- a/media-gfx/blender/Manifest
+++ b/media-gfx/blender/Manifest
@@ -1,6 +1,5 @@
-DIST blender-3.6.18.tar.xz 67900952 BLAKE2B d4a619197abc3e4969846913f3c88cd64fd679bbefe007354af6ba2e83d47a8fcd27b3bcbaf6d850d28960eedeb3c50ff9336d0e61fd488d4916b6628bfd67dd SHA512 48a8b3e8b2fe75305061d7cb9b7b8491cef4f23fbd809d1fc34663a4f97f487d6e7e6e92848110fe6aa5a2fed18a2c1a2a0c1c928aa813e2456f7786681eae60
-DIST blender-4.1.1.tar.xz 82146268 BLAKE2B 1ab4a6c1046851ef619394c62fc73794430dc091e2cab26d3d1d542e9d4519889e9b9731606385e9dc8657448ca3827875526f4a57dd1b5c326a73d8a6f9be8d SHA512 13ad0cdd09879b5c28554faca5a54172f43dc3dcb749d2d1723d3e89e741e6255179af3bd88309b735e058b9b350191e44f3158e882e55f1cedea70b8b21540e
DIST blender-4.2.4.tar.xz 72804204 BLAKE2B 613ae4671cc9263d18fe988b07e8744eb04f67fe53f1c14ad3fbc7d80c58a577e7753871ca775cd40ab5f26ef2bc9030cda57012dda0c4785769f04263aea15b SHA512 1f61c1866aaa680c91fc6e3402b1e10533c8cce32572ffb825c53dc7c15ca51f1157a32d10134ca9e612fbf719406421ccc920b2d8ddd2993675784797381c6a
+DIST blender-4.2.9.tar.xz 72811408 BLAKE2B b33227a3d2ab97578d919d37419b5486e049d42404f7d3e0e4f096dae813004749facba571b3525de10c0a9b9d7c9d67a0eefcf7200a3975e4e5b6874c4d47b0 SHA512 71d08f22ee8dd25f9ad260ab16fc7266586a92de5b6ba784a825c179d75ac423a570f62ddccc51a1f22bc86dbee9a628472b26dcd35d2a97b7d0bd951fceeee8
DIST blender-4.3.2.tar.xz 74473996 BLAKE2B 9a5c8973561f3296b0ec35990ab4951e34f7c0dd5bee3dd120a49989dc8ca7ebfc9610654e8be9d14463af2197626f490324cdd03118db755f5d0b1f7acce375 SHA512 44697faf9acc2c1e75783d432a1a0040339c3445834961a995e95974d4088e75ee5cb647a3908125259d1910d180910e5bc50d34d40d35f33e03197893581477
DIST blender-4.4.1.tar.xz 85518840 BLAKE2B a482a2d246222b5395f5e1c5cfa9fd2dbab0d5dc33145ec5cfaae3e7d7083e65034e1f5b54bc4605ab45905d08c2938c97ab488659d822997ee853c9e34fcc55 SHA512 db6b117b841890b172f4d13c6f38b73f36aae5648ed74f5233eb311328d467644005bd24fb4f9c7ea9b2dad7ff584fc7b3831f5ab34f3f900555c68f4af5b901
DIST blender-assets-4.3.2.tar.xz 8763844 BLAKE2B 0eca4a7bfb630096dfe9dd5f8c8071d9ca8c1aaab560a8694df4add507c3e8a641a4e0ad197f110b639d2d399a23c5c25af6fb060ca3316e1a44d286f6b23f7e SHA512 ce9483b3e5b83d1b29bdfa3a14f7be7176e85ec50a414213a67badcce3c24cd8da349fee22b08cc95d6e5906420bbcd5c5f15855445da6364e6054f968c20678
diff --git a/media-gfx/blender/blender-3.6.18-r1.ebuild b/media-gfx/blender/blender-3.6.18-r1.ebuild
deleted file mode 100644
index bd3462a8b278..000000000000
--- a/media-gfx/blender/blender-3.6.18-r1.ebuild
+++ /dev/null
@@ -1,449 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_10 python3_11 )
-
-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
- # Subversion is needed for downloading unit test files
- inherit git-r3 subversion
- EGIT_REPO_URI="https://projects.blender.org/blender/blender.git"
- ADDONS_EGIT_REPO_URI="https://projects.blender.org/blender/blender-addons.git"
-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 )"
- KEYWORDS="amd64 ~arm ~arm64"
-fi
-
-LICENSE="GPL-3+ cycles? ( Apache-2.0 )"
-SLOT="${PV%.*}"
-IUSE="+bullet +dds +fluid +openexr +tbb
- alembic collada +color-management cuda +cycles cycles-bin-kernels
- debug doc +embree +ffmpeg +fftw +gmp jack jemalloc jpeg2k
- man +nanovdb ndof nls openal +oidn +openmp +openpgl +opensubdiv
- +openvdb optix osl +pdf +potrace +pugixml pulseaudio sdl
- +sndfile test +tiff valgrind wayland X"
-RESTRICT="!test? ( test )"
-
-REQUIRED_USE="${PYTHON_REQUIRED_USE}
- alembic? ( openexr )
- cuda? ( cycles )
- cycles? ( openexr tiff )
- fluid? ( tbb )
- openvdb? ( tbb )
- optix? ( cuda )
- osl? ( cycles )
- test? ( color-management )"
-
-# 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?]
- dev-libs/lzo:2=
- $(python_gen_cond_dep '
- dev-python/cython[${PYTHON_USEDEP}]
- dev-python/numpy[${PYTHON_USEDEP}]
- dev-python/zstandard[${PYTHON_USEDEP}]
- dev-python/requests[${PYTHON_USEDEP}]
- ')
- media-libs/freetype:=[brotli]
- media-libs/libepoxy:=
- media-libs/libjpeg-turbo:=
- media-libs/libpng:=
- media-libs/libsamplerate
- >=media-libs/openimageio-2.4.6.0:=
- sys-libs/zlib:=
- virtual/glu
- virtual/libintl
- virtual/opengl
- alembic? ( >=media-gfx/alembic-1.8.3-r2[boost(+),hdf(+)] )
- collada? ( >=media-libs/opencollada-1.6.68 )
- color-management? ( media-libs/opencolorio:= )
- cuda? ( dev-util/nvidia-cuda-toolkit:= )
- embree? ( >=media-libs/embree-3.10.0:=[raymask] )
- ffmpeg? ( <media-video/ffmpeg-7:=[encode(+),lame(-),jpeg2k?,opus,theora,vorbis,vpx,x264,xvid] )
- fftw? ( sci-libs/fftw:3.0= )
- gmp? ( dev-libs/gmp[cxx] )
- 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 )
- oidn? ( >=media-libs/oidn-1.4.1 )
- openexr? (
- >=dev-libs/imath-3.1.4-r2:=
- >=media-libs/openexr-3:0=
- )
- openpgl? ( media-libs/openpgl:0/0.5 )
- opensubdiv? ( >=media-libs/opensubdiv-3.4.0 )
- openvdb? (
- <media-gfx/openvdb-11.0.0:=[nanovdb?]
- dev-libs/c-blosc:=
- )
- optix? ( <dev-libs/optix-7.5.0 )
- osl? ( <media-libs/osl-1.13:= )
- pdf? ( media-libs/libharu )
- potrace? ( media-gfx/potrace )
- pugixml? ( dev-libs/pugixml )
- pulseaudio? ( media-libs/libpulse )
- sdl? ( media-libs/libsdl2[sound,joystick] )
- sndfile? ( media-libs/libsndfile )
- tbb? ( dev-cpp/tbb:= )
- tiff? ( media-libs/tiff:= )
- valgrind? ( dev-debug/valgrind )
- wayland? (
- >=dev-libs/wayland-1.12
- >=dev-libs/wayland-protocols-1.15
- >=x11-libs/libxkbcommon-0.2.0
- media-libs/mesa[wayland]
- sys-apps/dbus
- )
- X? (
- x11-libs/libX11
- x11-libs/libXi
- x11-libs/libXxf86vm
- )
-"
-
-DEPEND="${RDEPEND}
- dev-cpp/eigen:=
-"
-
-BDEPEND="
- virtual/pkgconfig
- doc? (
- app-text/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 )
- wayland? (
- dev-util/wayland-scanner
- )
-"
-
-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)
- if ((${BV:0:1} < 3)) ; then
- # Add period (290 -> 2.90).
- BV=${BV:0:1}.${BV:1}
- else
- # Add period and skip the middle number (301 -> 3.1)
- BV=${BV:0:1}.${BV:2}
- fi
-}
-
-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
-
- git-r3_fetch "${ADDONS_EGIT_REPO_URI}"
- 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
- subversion_fetch ${TESTS_SVN_URL} ../lib/tests
- fi
- ASSETS_SVN_URL=https://svn.blender.org/svnroot/bf-blender/trunk/lib/assets
- subversion_fetch ${ASSETS_SVN_URL} ../lib/assets
- else
- default
-
- # BUG upstream returns LFS references instead of files
- # if use test; then
- # #The tests are downloaded from: https://svn.blender.org/svnroot/bf-blender/tags/blender-${SLOT}-release/lib/tests
- # mkdir -p lib || die
- # mv "${WORKDIR}/blender-${TEST_TARBALL_VERSION}-tests/tests" lib || die
- # fi
- 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|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
-
- if use test; then
- # Without this the tests will try to use /usr/bin/blender and /usr/share/blender/ to run the tests.
- sed -e "s|set(TEST_INSTALL_DIR.*|set(TEST_INSTALL_DIR ${T}/usr)|g" -i tests/CMakeLists.txt || die
- sed -e "s|string(REPLACE.*|set(TEST_INSTALL_DIR ${T}/usr)|g" -i build_files/cmake/Modules/GTestTesting.cmake || die
- fi
-}
-
-src_configure() {
- # -Werror=odr, -Werror=lto-type-mismatch
- # https://bugs.gentoo.org/859607
- # https://projects.blender.org/blender/blender/issues/120444
- filter-lto
-
- # Workaround for bug #922600
- append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
-
- append-lfs-flags
- blender_get_version
-
- 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=$(usex cycles)
- -DWITH_CYCLES_CUDA_BINARIES=$(usex cycles-bin-kernels)
- -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_PATH_GUIDING=$(usex openpgl)
- -DWITH_CYCLES_STANDALONE=OFF
- -DWITH_CYCLES_STANDALONE_GUI=OFF
- -DWITH_DOC_MANPAGE=$(usex man)
- -DWITH_FFTW3=$(usex fftw)
- -DWITH_GHOST_WAYLAND=$(usex wayland)
- -DWITH_GHOST_WAYLAND_APP_ID="blender-${BV}"
- -DWITH_GHOST_WAYLAND_DBUS=$(usex wayland)
- -DWITH_GHOST_WAYLAND_DYNLOAD=OFF
- -DWITH_GHOST_WAYLAND_LIBDECOR=OFF
- -DWITH_GHOST_X11=$(usex X)
- -DWITH_GMP=$(usex gmp)
- -DWITH_GTESTS=$(usex test)
- -DWITH_HARU=$(usex pdf)
- -DWITH_HEADLESS=$($(use X || use wayland) && echo OFF || echo ON)
- -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_NANOVDB=$(usex nanovdb)
- -DWITH_OPENAL=$(usex openal)
- -DWITH_OPENCOLLADA=$(usex collada)
- -DWITH_OPENCOLORIO=$(usex color-management)
- -DWITH_OPENIMAGEDENOISE=$(usex oidn)
- -DWITH_OPENMP=$(usex openmp)
- -DWITH_OPENSUBDIV=$(usex opensubdiv)
- -DWITH_OPENVDB=$(usex openvdb)
- -DWITH_OPENVDB_BLOSC=$(usex openvdb)
- -DWITH_POTRACE=$(usex potrace)
- -DWITH_PUGIXML=$(usex pugixml)
- -DWITH_PULSEAUDIO=$(usex pulseaudio)
- -DWITH_PYTHON_INSTALL=OFF
- -DWITH_SDL=$(usex sdl)
- -DWITH_STATIC_LIBS=OFF
- -DWITH_SYSTEM_EIGEN3=ON
- -DWITH_SYSTEM_FREETYPE=ON
- -DWITH_SYSTEM_LZO=ON
- -DWITH_TBB=$(usex tbb)
- -DWITH_USD=OFF
- -DWITH_XR_OPENXR=OFF
- )
-
- if use optix; then
- mycmakeargs+=(
- -DCYCLES_RUNTIME_OPTIX_ROOT_DIR="${EPREFIX}"/opt/optix
- -DOPTIX_ROOT_DIR="${EPREFIX}"/opt/optix
- )
- 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
-
- append-flags $(usex debug '-DDEBUG' '-DNDEBUG')
-
- if tc-is-gcc ; then
- # These options only exist when GCC is detected.
- # We disable these to respect the user's choice of linker.
- mycmakeargs+=(
- -DWITH_LINKER_GOLD=OFF
- -DWITH_LINKER_LLD=OFF
- )
- fi
-
- cmake_src_configure
-}
-
-src_test() {
- # A lot of tests needs to have access to the installed data files.
- # So install them into the image directory now.
- DESTDIR="${T}" cmake_build 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="${T}/usr/share/blender/${BV}/scripts"
- export BLENDER_SYSTEM_DATAFILES="${T}/usr/share/blender/${BV}/datafiles"
-
- # Sanity check that the script and datafile path is valid.
- # If they are not vaild, blender will fallback to the default path which is not what we want.
- [ -d "$BLENDER_SYSTEM_SCRIPTS" ] || die "The custom script path is invalid, fix the ebuild!"
- [ -d "$BLENDER_SYSTEM_DATAFILES" ] || die "The custom datafiles path is invalid, fix the ebuild!"
-
- cmake_src_test
-
- # Clean up the image directory for src_install
- rm -fr "${T}"/usr || die
-}
-
-src_install() {
- blender_get_version
-
- # Pax mark blender for hardened support.
- pax-mark m "${BUILD_DIR}"/bin/blender
-
- 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
-
- if use doc; then
- # Define custom blender data/script file paths. Otherwise Blender will not be able to find them during doc building.
- # (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
-
- # 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."
-
- 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
-
- # Fix doc installdir
- docinto html
- dodoc "${CMAKE_USE_DIR}"/release/text/readme.html
- rm -r "${ED}"/usr/share/doc/blender || die
-
- python_optimize "${ED}/usr/share/blender/${BV}/scripts"
-
- mv "${ED}/usr/bin/blender-thumbnailer" "${ED}/usr/bin/blender-${BV}-thumbnailer" || die
- 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
-
- if use osl; then
- ewarn ""
- ewarn "OSL is know to cause runtime segfaults if Mesa has been linked to"
- ewarn "an other LLVM version than what OSL is linked to."
- ewarn "See https://bugs.gentoo.org/880671 for more details"
- ewarn ""
- fi
-
- if ! use python_single_target_python3_10; then
- 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 switch to"
- elog "python_single_target_python3_10 instead."
- elog "Bug: https://bugs.gentoo.org/737388"
- elog
- fi
-
- 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-4.1.1-r5.ebuild b/media-gfx/blender/blender-4.2.9.ebuild
similarity index 90%
rename from media-gfx/blender/blender-4.1.1-r5.ebuild
rename to media-gfx/blender/blender-4.2.9.ebuild
index cbe668c639ba..572fa4852873 100644
--- a/media-gfx/blender/blender-4.1.1-r5.ebuild
+++ b/media-gfx/blender/blender-4.2.9.ebuild
@@ -3,7 +3,7 @@
EAPI=8
-PYTHON_COMPAT=( python3_{11..12} )
+PYTHON_COMPAT=( python3_{11..13} )
# NOTE must match media-libs/osl
LLVM_COMPAT=( {15..18} )
LLVM_OPTIONAL=1
@@ -18,7 +18,6 @@ if [[ ${PV} = *9999* ]] ; then
inherit git-r3
EGIT_REPO_URI="https://projects.blender.org/blender/blender.git"
EGIT_SUBMODULES=( '*' '-lib/*' )
- ADDONS_EGIT_REPO_URI="https://projects.blender.org/blender/blender-addons.git"
RESTRICT="!test? ( test )"
else
SRC_URI="
@@ -28,7 +27,7 @@ else
# https://projects.blender.org/blender/blender-test-data/archive/blender-v$(ver_cut 1-2)-release.tar.gz
# )
# "
- KEYWORDS="amd64 ~arm ~arm64"
+ KEYWORDS="~amd64 ~arm ~arm64"
RESTRICT="test" # the test archive returns LFS references.
fi
@@ -36,8 +35,8 @@ LICENSE="GPL-3+ cycles? ( Apache-2.0 )"
SLOT="${PV%.*}"
IUSE="
alembic +bullet collada +color-management cuda +cycles +cycles-bin-kernels
- debug doc +embree experimental +ffmpeg +fftw +fluid +gmp gnome hip jack
- jemalloc jpeg2k man +nanovdb ndof nls +oidn openal +openexr +openmp openpgl
+ debug doc +embree +ffmpeg +fftw +fluid +gmp gnome hip jack
+ jemalloc jpeg2k man +nanovdb ndof nls +oidn openal +openexr +openmp +openpgl
+opensubdiv +openvdb optix osl +otf +pdf +potrace +pugixml pulseaudio
renderdoc sdl +sndfile +tbb test +tiff valgrind vulkan wayland +webp X
"
@@ -97,7 +96,6 @@ RDEPEND="${PYTHON_DEPS}
nls? ( virtual/libiconv )
openal? ( media-libs/openal )
oidn? ( >=media-libs/oidn-2.1.0 )
- oneapi? ( dev-libs/intel-compute-runtime:=[l0] )
openexr? (
>=dev-libs/imath-3.1.7:=
>=media-libs/openexr-3.2.1:0=
@@ -182,6 +180,9 @@ PATCHES=(
"${FILESDIR}/${PN}-4.0.2-CUDA_NVCC_FLAGS.patch"
"${FILESDIR}/${PN}-4.1.1-FindLLVM.patch"
"${FILESDIR}/${PN}-4.1.1-numpy.patch"
+ "${FILESDIR}/${PN}-4.2.9-python3.12.patch"
+ "${FILESDIR}/${PN}-4.2.9-python3.13.patch"
+ "${FILESDIR}/${PN}-4.2.9-python3.12_1.patch"
)
blender_check_requirements() {
@@ -206,12 +207,6 @@ blender_get_version() {
pkg_pretend() {
blender_check_requirements
-
- if use oneapi; then
- einfo "The Intel oneAPI support is rudimentary."
- einfo ""
- einfo "Please report any bugs you find to https://bugs.gentoo.org/"
- fi
}
pkg_setup() {
@@ -229,9 +224,6 @@ src_unpack() {
EGIT_SUBMODULES+=( '-tests/*' )
fi
git-r3_src_unpack
-
- git-r3_fetch "${ADDONS_EGIT_REPO_URI}"
- git-r3_checkout "${ADDONS_EGIT_REPO_URI}" "${S}/scripts/addons"
else
default
@@ -315,6 +307,7 @@ src_configure() {
-DWITH_BULLET=$(usex bullet)
-DWITH_CODEC_FFMPEG=$(usex ffmpeg)
-DWITH_CODEC_SNDFILE=$(usex sndfile)
+ -DWITH_CPU_CHECK=no
-DWITH_CYCLES=$(usex cycles)
@@ -325,9 +318,6 @@ src_configure() {
-DWITH_CYCLES_DEVICE_HIP="$(usex hip)"
-DWITH_CYCLES_HIP_BINARIES=$(usex hip $(usex cycles-bin-kernels))
- -DWITH_CYCLES_DEVICE_ONEAPI="$(usex oneapi)"
- -DWITH_CYCLES_ONEAPI_BINARIES="$(usex oneapi $(usex cycles-bin-kernels))"
-
-DWITH_CYCLES_HYDRA_RENDER_DELEGATE="no" # TODO: package Hydra
-DWITH_CYCLES_EMBREE="$(usex embree)"
-DWITH_CYCLES_OSL=$(usex osl)
@@ -337,7 +327,6 @@ src_configure() {
-DWITH_DOC_MANPAGE=$(usex man)
-DWITH_DRACO="no" # TODO: Package Draco
- -DWITH_EXPERIMENTAL_FEATURES="$(usex experimental)"
-DWITH_FFTW3=$(usex fftw)
-DWITH_GHOST_WAYLAND=$(usex wayland)
-DWITH_GHOST_WAYLAND_DYNLOAD="no"
@@ -477,15 +466,16 @@ src_test() {
DESTDIR="${T}" cmake_build 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="${T}/usr/share/blender/${BV}/scripts"
- export BLENDER_SYSTEM_DATAFILES="${T}/usr/share/blender/${BV}/datafiles"
+ # By default, blender will look for system scripts and data in
+ # /usr/share/, but until this is installed, they are not necessarily
+ # available there. Use this to have blender search the intermediate
+ # install directory instead.
+ export BLENDER_SYSTEM_RESOURCES="${T}/usr/share/blender/${BV}"
- # Sanity check that the script and datafile path is valid.
- # If they are not vaild, blender will fallback to the default path which is not what we want.
- [ -d "$BLENDER_SYSTEM_SCRIPTS" ] || die "The custom script path is invalid, fix the ebuild!"
- [ -d "$BLENDER_SYSTEM_DATAFILES" ] || die "The custom datafiles path is invalid, fix the ebuild!"
+ # Brake check: Make sure the above path is valid.
+ # If not, blender will fallback to the default path which is not what
+ # we want.
+ [ -d "$BLENDER_SYSTEM_RESOURCES" ] || die "The custom script path is invalid, fix the ebuild!"
if use cuda; then
cuda_add_sandbox -w
@@ -497,6 +487,8 @@ src_test() {
xdg_environment_reset
fi
+ addwrite /dev/dri
+
cmake_src_test
# Clean up the image directory for src_install
@@ -524,10 +516,16 @@ src_install() {
fi
if use doc; then
- # Define custom blender data/script file paths. Otherwise Blender will not be able to find them during doc building.
- # (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
+ # By default, blender will look for system scripts and data in
+ # /usr/share/, but until this is installed, they are not necessarily
+ # available there. Use this to have blender search the intermediate
+ # install directory instead.
+ export BLENDER_SYSTEM_RESOURCES="${ED}/usr/share/blender/${BV}"
+
+ # Brake check: Make sure the above path is valid.
+ # If not, blender will fallback to the default path which is not what
+ # we want.
+ [ -d "$BLENDER_SYSTEM_RESOURCES" ] || die "The custom script path is invalid, fix the ebuild!"
# Workaround for binary drivers.
addpredict /dev/ati
diff --git a/media-gfx/blender/blender-4.3.2-r2.ebuild b/media-gfx/blender/blender-4.3.2-r3.ebuild
similarity index 99%
rename from media-gfx/blender/blender-4.3.2-r2.ebuild
rename to media-gfx/blender/blender-4.3.2-r3.ebuild
index 6e5459ec540a..eed06b9229a2 100644
--- a/media-gfx/blender/blender-4.3.2-r2.ebuild
+++ b/media-gfx/blender/blender-4.3.2-r3.ebuild
@@ -242,6 +242,9 @@ PATCHES=(
"${FILESDIR}/${PN}-4.0.2-FindClang.patch"
"${FILESDIR}/${PN}-4.1.1-FindLLVM.patch"
"${FILESDIR}/${PN}-4.1.1-numpy.patch"
+ "${FILESDIR}/${PN}-4.2.9-python3.12.patch"
+ "${FILESDIR}/${PN}-4.2.9-python3.13.patch"
+ "${FILESDIR}/${PN}-4.2.9-python3.12_1.patch"
"${FILESDIR}/${PN}-4.3.2-ffmpeg7.patch"
"${FILESDIR}/${PN}-4.3.2-openvdb-12.patch"
"${FILESDIR}/${PN}-4.3.2-optix-8.1.0.patch"
diff --git a/media-gfx/blender/files/blender-4.2.9-python3.12.patch b/media-gfx/blender/files/blender-4.2.9-python3.12.patch
new file mode 100644
index 000000000000..94d0875cf67d
--- /dev/null
+++ b/media-gfx/blender/files/blender-4.2.9-python3.12.patch
@@ -0,0 +1,68 @@
+From 1865de1c738a1a1ead520fbd38487815e13906e9 Mon Sep 17 00:00:00 2001
+From: Campbell Barton <campbell@blender.org>
+Date: Thu, 28 Nov 2024 12:04:45 +1100
+Subject: [PATCH] Fix #129926: Crash with Python 3.12 & Manta flow
+
+Python 3.12 no longer supports calls to PyImport_AppendInittab
+once initialized.
+
+The call was redundant as Blender's `bpy_internal_modules` already
+includes the "manta" module.
+
+Resolve by disabling the call when Python's lifecycle isn't being
+managed by manta-flow.
+---
+ extern/mantaflow/helper/pwrapper/registry.cpp | 19 ++++++++++++++-----
+ 1 file changed, 14 insertions(+), 5 deletions(-)
+
+diff --git a/extern/mantaflow/helper/pwrapper/registry.cpp b/extern/mantaflow/helper/pwrapper/registry.cpp
+index b4206a41dea..3ad7475d0e3 100644
+--- a/extern/mantaflow/helper/pwrapper/registry.cpp
++++ b/extern/mantaflow/helper/pwrapper/registry.cpp
+@@ -112,7 +112,7 @@ class WrapperRegistry {
+ const std::string &name,
+ Manta::PbArgs &args,
+ Manta::PbClass *parent);
+- void construct(const std::string &scriptname, const vector<string> &args);
++ void construct(bool python_lifecycle, const std::string &scriptname, const vector<string> &args);
+ void cleanup();
+ void renameObjects();
+ void runPreInit(PyObject *name_space);
+@@ -566,7 +566,9 @@ PyObject *WrapperRegistry::createPyObject(const string &classname,
+ }
+
+ // prepare typeinfo and register python module
+-void WrapperRegistry::construct(const string &scriptname, const vector<string> &args)
++void WrapperRegistry::construct(const bool python_lifecycle,
++ const string &scriptname,
++ const vector<string> &args)
+ {
+ mScriptName = scriptname;
+ this->args = args;
+@@ -575,8 +577,15 @@ void WrapperRegistry::construct(const string &scriptname, const vector<string> &
+ registerMeta();
+ registerDummyTypes();
+
+- // work around for certain gcc versions, cast to char*
+- PyImport_AppendInittab((char *)gDefaultModuleName.c_str(), PyInit_manta_main);
++ // Don't extend the init-tab when Python is already initialized.
++ // Since Python 3.12 this isn't supported and will crash.
++ //
++ // When `python_lifecycle` is false (when manta-flow is embedded), it's the responsibility
++ // of the application embedding this code to include #PyInit_manta_main in the init-tab.
++ if (python_lifecycle) {
++ // work around for certain gcc versions, cast to char*
++ PyImport_AppendInittab((char *)gDefaultModuleName.c_str(), PyInit_manta_main);
++ }
+ }
+
+ inline PyObject *castPy(PyTypeObject *p)
+@@ -711,7 +720,7 @@ void setup(const bool python_lifecycle,
+ const std::vector<std::string> &args,
+ PyObject *name_space)
+ {
+- WrapperRegistry::instance().construct(filename, args);
++ WrapperRegistry::instance().construct(python_lifecycle, filename, args);
+ if (python_lifecycle) {
+ Py_Initialize();
+ }
diff --git a/media-gfx/blender/files/blender-4.2.9-python3.12_1.patch b/media-gfx/blender/files/blender-4.2.9-python3.12_1.patch
new file mode 100644
index 000000000000..0312e786861c
--- /dev/null
+++ b/media-gfx/blender/files/blender-4.2.9-python3.12_1.patch
@@ -0,0 +1,39 @@
+From f60f2b769b1d43d253d470c99f8555e90cb45fd9 Mon Sep 17 00:00:00 2001
+From: Campbell Barton <campbell@blender.org>
+Date: Mon, 21 Oct 2024 20:45:35 +1100
+Subject: [PATCH] Unbreak building with Python 3.12
+
+Support for 3.13 [0] broke 3.12.
+
+[0]: d9f38fca5ffe29136cd6f390e318ad8455864582
+---
+ source/blender/python/generic/py_capi_utils.cc | 2 +-
+ source/blender/python/generic/py_capi_utils.hh | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/source/blender/python/generic/py_capi_utils.cc b/source/blender/python/generic/py_capi_utils.cc
+index 74c829d717e..d6c58a5c6eb 100644
+--- a/source/blender/python/generic/py_capi_utils.cc
++++ b/source/blender/python/generic/py_capi_utils.cc
+@@ -39,7 +39,7 @@
+ # include "BLI_math_base.h" /* isfinite() */
+ #endif
+
+-#if PY_VERSION_HEX <= 0x030c0000 /* <=3.12 */
++#if PY_VERSION_HEX < 0x030d0000 /* <3.13 */
+ # define PyLong_AsInt _PyLong_AsInt
+ # define PyUnicode_CompareWithASCIIString _PyUnicode_EqualToASCIIString
+ #endif
+diff --git a/source/blender/python/generic/py_capi_utils.hh b/source/blender/python/generic/py_capi_utils.hh
+index 81740e0d0ad..29222d35c2c 100644
+--- a/source/blender/python/generic/py_capi_utils.hh
++++ b/source/blender/python/generic/py_capi_utils.hh
+@@ -339,7 +339,7 @@ uint64_t PyC_Long_AsU64(PyObject *value);
+ /* inline so type signatures match as expected */
+ Py_LOCAL_INLINE(int32_t) PyC_Long_AsI32(PyObject *value)
+ {
+-#if PY_VERSION_HEX <= 0x030c0000 /* <=3.12 */
++#if PY_VERSION_HEX < 0x030d0000 /* <3.13 */
+ return (int32_t)_PyLong_AsInt(value);
+ #else
+ return (int32_t)PyLong_AsInt(value);
diff --git a/media-gfx/blender/files/blender-4.2.9-python3.13.patch b/media-gfx/blender/files/blender-4.2.9-python3.13.patch
new file mode 100644
index 000000000000..0dd6f4b95b4d
--- /dev/null
+++ b/media-gfx/blender/files/blender-4.2.9-python3.13.patch
@@ -0,0 +1,626 @@
+From d9f38fca5ffe29136cd6f390e318ad8455864582 Mon Sep 17 00:00:00 2001
+From: Campbell Barton <campbell@blender.org>
+Date: Fri, 18 Oct 2024 12:23:34 +1100
+Subject: [PATCH] PyAPI: support Python 3.13
+
+- `_PySet_NextEntry` has been removed, use generic iterator access
+ which will has some additional overhead as it needs to create
+ an iterator to access the values.
+
+- Add v3.13 compatibility defines to account for renaming:
+ _PyObject_LookupAttr -> PyObject_GetOptionalAttr
+ _PyLong_AsInt -> PyLong_AsInt
+
+- Unfortunately use of Python's internal API needs to be used to
+ inspect op-codes in `bpy_driver.cc`.
+
+Testing GLTF/FBX IO there isn't any significant performance impact
+from these changes.
+
+Resolves #123871.
+---
+ .../blender/python/bmesh/bmesh_py_ops_call.cc | 16 +-
+ source/blender/python/generic/py_capi_rna.cc | 140 ++++++++++--------
+ .../blender/python/generic/py_capi_utils.cc | 56 ++++---
+ .../blender/python/generic/py_capi_utils.hh | 4 +
+ .../blender/python/generic/python_compat.hh | 10 +-
+ .../blender/python/gpu/gpu_py_framebuffer.cc | 6 +-
+ source/blender/python/intern/bpy.cc | 48 +++---
+ source/blender/python/intern/bpy_driver.cc | 37 ++++-
+ .../python/intern/bpy_library_write.cc | 27 ++--
+ source/blender/python/intern/bpy_rna.cc | 6 +-
+ 10 files changed, 218 insertions(+), 132 deletions(-)
+
+diff --git a/source/blender/python/bmesh/bmesh_py_ops_call.cc b/source/blender/python/bmesh/bmesh_py_ops_call.cc
+index d5a2e6b02ad..624e4d02e98 100644
+--- a/source/blender/python/bmesh/bmesh_py_ops_call.cc
++++ b/source/blender/python/bmesh/bmesh_py_ops_call.cc
+@@ -548,11 +548,12 @@ static int bpy_slot_from_py(BMesh *bm,
+ break;
+ }
+ case BMO_OP_SLOT_SUBTYPE_MAP_EMPTY: {
+- if (PySet_Size(value) > 0) {
++ if (PySet_GET_SIZE(value) > 0) {
++ PyObject *it = PyObject_GetIter(value);
+ PyObject *arg_key;
+- Py_ssize_t arg_pos = 0;
+- Py_ssize_t arg_hash = 0;
+- while (_PySet_NextEntry(value, &arg_pos, &arg_key, &arg_hash)) {
++ while ((arg_key = PyIter_Next(it))) {
++ /* Borrow from the set. */
++ Py_DECREF(arg_key);
+
+ if (bpy_slot_from_py_elem_check((BPy_BMElem *)arg_key,
+ bm,
+@@ -561,11 +562,16 @@ static int bpy_slot_from_py(BMesh *bm,
+ slot_name,
+ "invalid key in set") == -1)
+ {
+- return -1; /* error is set in bpy_slot_from_py_elem_check() */
++ /* Error is set in #bpy_slot_from_py_elem_check(). */
++ break;
+ }
+
+ BMO_slot_map_empty_insert(bmop, slot, ((BPy_BMElem *)arg_key)->ele);
+ }
++ Py_DECREF(it);
++ if (arg_key) {
++ return -1;
++ }
+ }
+ break;
+ }
+diff --git a/source/blender/python/generic/py_capi_rna.cc b/source/blender/python/generic/py_capi_rna.cc
+index 11827fa0836..a41e474f619 100644
+--- a/source/blender/python/generic/py_capi_rna.cc
++++ b/source/blender/python/generic/py_capi_rna.cc
+@@ -75,60 +75,66 @@ BLI_bitmap *pyrna_enum_bitmap_from_set(const EnumPropertyItem *items,
+ int bitmap_size,
+ const char *error_prefix)
+ {
+- /* Set looping. */
+- Py_ssize_t pos = 0;
+- Py_ssize_t hash = 0;
+- PyObject *key;
+-
++ BLI_assert(PySet_Check(value));
+ BLI_bitmap *bitmap = BLI_BITMAP_NEW(bitmap_size, __func__);
+
+- while (_PySet_NextEntry(value, &pos, &key, &hash)) {
+- const char *param = PyUnicode_AsUTF8(key);
+- if (param == nullptr) {
+- PyErr_Format(PyExc_TypeError,
+- "%.200s expected a string, not %.200s",
+- error_prefix,
+- Py_TYPE(key)->tp_name);
+- goto error;
+- }
++ if (PySet_GET_SIZE(value) > 0) {
++ /* Set looping. */
++ PyObject *it = PyObject_GetIter(value);
++ PyObject *key;
++ while ((key = PyIter_Next(it))) {
++ /* Borrow from the set. */
++ Py_DECREF(key);
+
+- int ret;
+- if (pyrna_enum_value_from_id(items, param, &ret, error_prefix) == -1) {
+- goto error;
+- }
++ const char *param = PyUnicode_AsUTF8(key);
++ if (param == nullptr) {
++ PyErr_Format(PyExc_TypeError,
++ "%.200s expected a string, not %.200s",
++ error_prefix,
++ Py_TYPE(key)->tp_name);
++ break;
++ }
+
+- int index = ret;
++ int ret;
++ if (pyrna_enum_value_from_id(items, param, &ret, error_prefix) == -1) {
++ break;
++ }
+
+- if (type_convert_sign) {
+- if (type_size == 2) {
+- union {
+- signed short as_signed;
+- ushort as_unsigned;
+- } ret_convert;
+- ret_convert.as_signed = (signed short)ret;
+- index = int(ret_convert.as_unsigned);
+- }
+- else if (type_size == 1) {
+- union {
+- signed char as_signed;
+- uchar as_unsigned;
+- } ret_convert;
+- ret_convert.as_signed = (signed char)ret;
+- index = int(ret_convert.as_unsigned);
+- }
+- else {
+- BLI_assert_unreachable();
++ int index = ret;
++
++ if (type_convert_sign) {
++ if (type_size == 2) {
++ union {
++ signed short as_signed;
++ ushort as_unsigned;
++ } ret_convert;
++ ret_convert.as_signed = (signed short)ret;
++ index = int(ret_convert.as_unsigned);
++ }
++ else if (type_size == 1) {
++ union {
++ signed char as_signed;
++ uchar as_unsigned;
++ } ret_convert;
++ ret_convert.as_signed = (signed char)ret;
++ index = int(ret_convert.as_unsigned);
++ }
++ else {
++ BLI_assert_unreachable();
++ }
+ }
++ BLI_assert(index < bitmap_size);
++ BLI_BITMAP_ENABLE(bitmap, index);
++ }
++ Py_DECREF(it);
++
++ if (key) {
++ MEM_freeN(bitmap);
++ bitmap = nullptr;
+ }
+- BLI_assert(index < bitmap_size);
+- BLI_BITMAP_ENABLE(bitmap, index);
+ }
+
+ return bitmap;
+-
+-error:
+- MEM_freeN(bitmap);
+- return nullptr;
+ }
+
+ int pyrna_enum_bitfield_from_set(const EnumPropertyItem *items,
+@@ -136,32 +142,40 @@ int pyrna_enum_bitfield_from_set(const EnumPropertyItem *items,
+ int *r_value,
+ const char *error_prefix)
+ {
++ BLI_assert(PySet_Check(value));
+ /* Set of enum items, concatenate all values with OR. */
+- int ret, flag = 0;
+-
+- /* Set looping. */
+- Py_ssize_t pos = 0;
+- Py_ssize_t hash = 0;
+- PyObject *key;
++ int flag = 0;
+
+ *r_value = 0;
+
+- while (_PySet_NextEntry(value, &pos, &key, &hash)) {
+- const char *param = PyUnicode_AsUTF8(key);
++ PyObject *key = nullptr;
++ if (PySet_GET_SIZE(value) > 0) {
++ /* Set looping. */
++ PyObject *it = PyObject_GetIter(value);
++ while ((key = PyIter_Next(it))) {
++ /* Borrow from the set. */
++ Py_DECREF(key);
+
+- if (param == nullptr) {
+- PyErr_Format(PyExc_TypeError,
+- "%.200s expected a string, not %.200s",
+- error_prefix,
+- Py_TYPE(key)->tp_name);
++ const char *param = PyUnicode_AsUTF8(key);
++ if (param == nullptr) {
++ PyErr_Format(PyExc_TypeError,
++ "%.200s expected a string, not %.200s",
++ error_prefix,
++ Py_TYPE(key)->tp_name);
++ break;
++ }
++
++ int ret;
++ if (pyrna_enum_value_from_id(items, param, &ret, error_prefix) == -1) {
++ break;
++ }
++
++ flag |= ret;
++ }
++ Py_DECREF(it);
++ if (key) {
+ return -1;
+ }
+-
+- if (pyrna_enum_value_from_id(items, param, &ret, error_prefix) == -1) {
+- return -1;
+- }
+-
+- flag |= ret;
+ }
+
+ *r_value = flag;
+diff --git a/source/blender/python/generic/py_capi_utils.cc b/source/blender/python/generic/py_capi_utils.cc
+index 3311064e7c5..74c829d717e 100644
+--- a/source/blender/python/generic/py_capi_utils.cc
++++ b/source/blender/python/generic/py_capi_utils.cc
+@@ -39,6 +39,11 @@
+ # include "BLI_math_base.h" /* isfinite() */
+ #endif
+
++#if PY_VERSION_HEX <= 0x030c0000 /* <=3.12 */
++# define PyLong_AsInt _PyLong_AsInt
++# define PyUnicode_CompareWithASCIIString _PyUnicode_EqualToASCIIString
++#endif
++
+ /* -------------------------------------------------------------------- */
+ /** \name Fast Python to C Array Conversion for Primitive Types
+ * \{ */
+@@ -874,10 +879,12 @@ static void pyc_exception_buffer_handle_system_exit()
+ if (!PyErr_ExceptionMatches(PyExc_SystemExit)) {
+ return;
+ }
+- /* Inspecting, follow Python's logic in #_Py_HandleSystemExit & treat as a regular exception. */
++/* Inspecting, follow Python's logic in #_Py_HandleSystemExit & treat as a regular exception. */
++# if 0 /* FIXME: */
+ if (_Py_GetConfig()->inspect) {
+ return;
+ }
++# endif
+
+ /* NOTE(@ideasman42): A `SystemExit` exception will exit immediately (unless inspecting).
+ * So print the error and exit now. Without this #PyErr_Display shows the error stack-trace
+@@ -1424,11 +1431,6 @@ int PyC_FlagSet_ToBitfield(const PyC_FlagSet *items,
+ /* set of enum items, concatenate all values with OR */
+ int ret, flag = 0;
+
+- /* set looping */
+- Py_ssize_t pos = 0;
+- Py_ssize_t hash = 0;
+- PyObject *key;
+-
+ if (!PySet_Check(value)) {
+ PyErr_Format(PyExc_TypeError,
+ "%.200s expected a set, not %.200s",
+@@ -1439,22 +1441,32 @@ int PyC_FlagSet_ToBitfield(const PyC_FlagSet *items,
+
+ *r_value = 0;
+
+- while (_PySet_NextEntry(value, &pos, &key, &hash)) {
+- const char *param = PyUnicode_AsUTF8(key);
++ if (PySet_GET_SIZE(value) > 0) {
++ PyObject *it = PyObject_GetIter(value);
++ PyObject *key;
++ while ((key = PyIter_Next(it))) {
++ /* Borrow from the set. */
++ Py_DECREF(key);
+
+- if (param == nullptr) {
+- PyErr_Format(PyExc_TypeError,
+- "%.200s set must contain strings, not %.200s",
+- error_prefix,
+- Py_TYPE(key)->tp_name);
++ const char *param = PyUnicode_AsUTF8(key);
++ if (param == nullptr) {
++ PyErr_Format(PyExc_TypeError,
++ "%.200s set must contain strings, not %.200s",
++ error_prefix,
++ Py_TYPE(key)->tp_name);
++ break;
++ }
++
++ if (PyC_FlagSet_ValueFromID(items, param, &ret, error_prefix) < 0) {
++ break;
++ }
++
++ flag |= ret;
++ }
++ Py_DECREF(it);
++ if (key != nullptr) {
+ return -1;
+ }
+-
+- if (PyC_FlagSet_ValueFromID(items, param, &ret, error_prefix) < 0) {
+- return -1;
+- }
+-
+- flag |= ret;
+ }
+
+ *r_value = flag;
+@@ -1724,7 +1736,7 @@ static ulong pyc_Long_AsUnsignedLong(PyObject *value)
+
+ int PyC_Long_AsBool(PyObject *value)
+ {
+- const int test = _PyLong_AsInt(value);
++ const int test = PyLong_AsInt(value);
+ if (UNLIKELY(test == -1 && PyErr_Occurred())) {
+ return -1;
+ }
+@@ -1737,7 +1749,7 @@ int PyC_Long_AsBool(PyObject *value)
+
+ int8_t PyC_Long_AsI8(PyObject *value)
+ {
+- const int test = _PyLong_AsInt(value);
++ const int test = PyLong_AsInt(value);
+ if (UNLIKELY(test == -1 && PyErr_Occurred())) {
+ return -1;
+ }
+@@ -1750,7 +1762,7 @@ int8_t PyC_Long_AsI8(PyObject *value)
+
+ int16_t PyC_Long_AsI16(PyObject *value)
+ {
+- const int test = _PyLong_AsInt(value);
++ const int test = PyLong_AsInt(value);
+ if (UNLIKELY(test == -1 && PyErr_Occurred())) {
+ return -1;
+ }
+diff --git a/source/blender/python/generic/py_capi_utils.hh b/source/blender/python/generic/py_capi_utils.hh
+index 4a641f78471..81740e0d0ad 100644
+--- a/source/blender/python/generic/py_capi_utils.hh
++++ b/source/blender/python/generic/py_capi_utils.hh
+@@ -339,7 +339,11 @@ uint64_t PyC_Long_AsU64(PyObject *value);
+ /* inline so type signatures match as expected */
+ Py_LOCAL_INLINE(int32_t) PyC_Long_AsI32(PyObject *value)
+ {
++#if PY_VERSION_HEX <= 0x030c0000 /* <=3.12 */
+ return (int32_t)_PyLong_AsInt(value);
++#else
++ return (int32_t)PyLong_AsInt(value);
++#endif
+ }
+ Py_LOCAL_INLINE(int64_t) PyC_Long_AsI64(PyObject *value)
+ {
+diff --git a/source/blender/python/generic/python_compat.hh b/source/blender/python/generic/python_compat.hh
+index f18d0fb59b3..e2799aeeb46 100644
+--- a/source/blender/python/generic/python_compat.hh
++++ b/source/blender/python/generic/python_compat.hh
+@@ -9,9 +9,17 @@
+
+ #pragma once
+
++/* Removes `intialized` member from Python 3.13+. */
++#if PY_VERSION_HEX >= 0x030d0000
++# define PY_ARG_PARSER_HEAD_COMPAT()
++#elif PY_VERSION_HEX >= 0x030c0000
+ /* Add `intialized` member for Python 3.12+. */
+-#if PY_VERSION_HEX >= 0x030c0000
+ # define PY_ARG_PARSER_HEAD_COMPAT() 0,
+ #else
+ # define PY_ARG_PARSER_HEAD_COMPAT()
+ #endif
++
++/* Python 3.13 made some changes, use the "new" names. */
++#if PY_VERSION_HEX < 0x030d0000
++# define PyObject_GetOptionalAttr _PyObject_LookupAttr
++#endif
+diff --git a/source/blender/python/gpu/gpu_py_framebuffer.cc b/source/blender/python/gpu/gpu_py_framebuffer.cc
+index 899ad21f770..9bef53654df 100644
+--- a/source/blender/python/gpu/gpu_py_framebuffer.cc
++++ b/source/blender/python/gpu/gpu_py_framebuffer.cc
+@@ -286,14 +286,14 @@ static bool pygpu_framebuffer_new_parse_arg(PyObject *o, GPUAttachment *r_attach
+ return false;
+ }
+
+- if (c_texture && _PyUnicode_EqualToASCIIString(key, c_texture)) {
++ if (c_texture && PyUnicode_CompareWithASCIIString(key, c_texture)) {
+ /* Compare only once. */
+ c_texture = nullptr;
+ if (!bpygpu_ParseTexture(value, &tmp_attach.tex)) {
+ return false;
+ }
+ }
+- else if (c_layer && _PyUnicode_EqualToASCIIString(key, c_layer)) {
++ else if (c_layer && PyUnicode_CompareWithASCIIString(key, c_layer)) {
+ /* Compare only once. */
+ c_layer = nullptr;
+ tmp_attach.layer = PyLong_AsLong(value);
+@@ -301,7 +301,7 @@ static bool pygpu_framebuffer_new_parse_arg(PyObject *o, GPUAttachment *r_attach
+ return false;
+ }
+ }
+- else if (c_mip && _PyUnicode_EqualToASCIIString(key, c_mip)) {
++ else if (c_mip && PyUnicode_CompareWithASCIIString(key, c_mip)) {
+ /* Compare only once. */
+ c_mip = nullptr;
+ tmp_attach.mip = PyLong_AsLong(value);
+diff --git a/source/blender/python/intern/bpy.cc b/source/blender/python/intern/bpy.cc
+index 7cdd00fc7a3..42ea76e40ac 100644
+--- a/source/blender/python/intern/bpy.cc
++++ b/source/blender/python/intern/bpy.cc
+@@ -610,38 +610,40 @@ PyDoc_STRVAR(
+ " :rtype: dict\n");
+ static PyObject *bpy_wm_capabilities(PyObject *self)
+ {
+- static _Py_Identifier PyId_capabilities = {"_wm_capabilities_", -1};
+-
++ PyObject *py_id_capabilities = PyUnicode_FromString("_wm_capabilities_");
+ PyObject *result = nullptr;
+- switch (_PyObject_LookupAttrId(self, &PyId_capabilities, &result)) {
+- case 1:
+- return result;
+- case 0:
+- break;
+- default:
+- /* Unlikely, but there may be an error, forward it. */
+- return nullptr;
+- }
++ switch (PyObject_GetOptionalAttr(self, py_id_capabilities, &result)) {
++ case 1: {
++ result = PyDict_New();
+
+- result = PyDict_New();
+-
+- const eWM_CapabilitiesFlag flag = WM_capabilities_flag();
++ const eWM_CapabilitiesFlag flag = WM_capabilities_flag();
+
+ #define SetFlagItem(x) \
+ PyDict_SetItemString(result, STRINGIFY(x), PyBool_FromLong((WM_CAPABILITY_##x) & flag));
+
+- SetFlagItem(CURSOR_WARP);
+- SetFlagItem(WINDOW_POSITION);
+- SetFlagItem(PRIMARY_CLIPBOARD);
+- SetFlagItem(GPU_FRONT_BUFFER_READ);
+- SetFlagItem(CLIPBOARD_IMAGES);
+- SetFlagItem(DESKTOP_SAMPLE);
+- SetFlagItem(INPUT_IME);
+- SetFlagItem(TRACKPAD_PHYSICAL_DIRECTION);
++ SetFlagItem(CURSOR_WARP);
++ SetFlagItem(WINDOW_POSITION);
++ SetFlagItem(PRIMARY_CLIPBOARD);
++ SetFlagItem(GPU_FRONT_BUFFER_READ);
++ SetFlagItem(CLIPBOARD_IMAGES);
++ SetFlagItem(DESKTOP_SAMPLE);
++ SetFlagItem(INPUT_IME);
++ SetFlagItem(TRACKPAD_PHYSICAL_DIRECTION);
+
+ #undef SetFlagItem
++ PyObject_SetAttr(self, py_id_capabilities, result);
++ break;
++ }
++ case 0:
++ BLI_assert(result != nullptr);
++ break;
++ default:
++ /* Unlikely, but there may be an error, forward it. */
++ BLI_assert(result == nullptr);
++ break;
++ }
+
+- _PyObject_SetAttrId(self, &PyId_capabilities, result);
++ Py_DECREF(py_id_capabilities);
+ return result;
+ }
+
+diff --git a/source/blender/python/intern/bpy_driver.cc b/source/blender/python/intern/bpy_driver.cc
+index b32bfbc2a56..e589f0992e1 100644
+--- a/source/blender/python/intern/bpy_driver.cc
++++ b/source/blender/python/intern/bpy_driver.cc
+@@ -43,6 +43,13 @@
+ # include <opcode.h>
+ #endif
+
++#if PY_VERSION_HEX >= 0x030d0000 /* >=3.13 */
++/* WARNING(@ideasman42): Using `Py_BUILD_CORE` is a last resort,
++ * the alternative would be not to inspect OP-CODES at all. */
++# define Py_BUILD_CORE
++# include <internal/pycore_code.h>
++#endif
++
+ PyObject *bpy_pydriver_Dict = nullptr;
+
+ #ifdef USE_BYTECODE_WHITELIST
+@@ -375,7 +382,35 @@ static bool is_opcode_secure(const int opcode)
+ OK_OP(LOAD_CONST) /* Ok because constants are accepted. */
+ OK_OP(LOAD_NAME) /* Ok, because `PyCodeObject.names` is checked. */
+ OK_OP(CALL) /* Ok, because we check its "name" before calling. */
+- OK_OP(KW_NAMES) /* Ok, because it's used for calling functions with keyword arguments. */
++# if PY_VERSION_HEX >= 0x030d0000
++ OK_OP(CALL_KW) /* Ok, because it's used for calling functions with keyword arguments. */
++
++ OK_OP(CALL_FUNCTION_EX);
++
++ /* OK because the names are checked. */
++ OK_OP(CALL_ALLOC_AND_ENTER_INIT)
++ OK_OP(CALL_BOUND_METHOD_EXACT_ARGS)
++ OK_OP(CALL_BOUND_METHOD_GENERAL)
++ OK_OP(CALL_BUILTIN_CLASS)
++ OK_OP(CALL_BUILTIN_FAST)
++ OK_OP(CALL_BUILTIN_FAST_WITH_KEYWORDS)
++ OK_OP(CALL_BUILTIN_O)
++ OK_OP(CALL_ISINSTANCE)
++ OK_OP(CALL_LEN)
++ OK_OP(CALL_LIST_APPEND)
++ OK_OP(CALL_METHOD_DESCRIPTOR_FAST)
++ OK_OP(CALL_METHOD_DESCRIPTOR_FAST_WITH_KEYWORDS)
++ OK_OP(CALL_METHOD_DESCRIPTOR_NOARGS)
++ OK_OP(CALL_METHOD_DESCRIPTOR_O)
++ OK_OP(CALL_NON_PY_GENERAL)
++ OK_OP(CALL_PY_EXACT_ARGS)
++ OK_OP(CALL_PY_GENERAL)
++ OK_OP(CALL_STR_1)
++ OK_OP(CALL_TUPLE_1)
++ OK_OP(CALL_TYPE_1)
++# else
++ OK_OP(KW_NAMES) /* Ok, because it's used for calling functions with keyword arguments. */
++# endif
+
+ # if PY_VERSION_HEX < 0x030c0000
+ OK_OP(PRECALL) /* Ok, because it's used for calling. */
+diff --git a/source/blender/python/intern/bpy_library_write.cc b/source/blender/python/intern/bpy_library_write.cc
+index d1c0b32ac07..59bf476427f 100644
+--- a/source/blender/python/intern/bpy_library_write.cc
++++ b/source/blender/python/intern/bpy_library_write.cc
+@@ -136,20 +136,25 @@ static PyObject *bpy_lib_write(BPy_PropertyRNA *self, PyObject *args, PyObject *
+ PartialWriteContext::IDAddOperations::ADD_DEPENDENCIES |
+ (use_fake_user ? PartialWriteContext::IDAddOperations::SET_FAKE_USER : 0))};
+
+- Py_ssize_t pos, hash;
+- PyObject *key;
+- ID *id = nullptr;
+-
+- pos = hash = 0;
+- while (_PySet_NextEntry(datablocks, &pos, &key, &hash)) {
+- if (!pyrna_id_FromPyObject(key, &id)) {
+- PyErr_Format(PyExc_TypeError, "Expected an ID type, not %.200s", Py_TYPE(key)->tp_name);
+- return nullptr;
+- }
+- else {
++ if (PySet_GET_SIZE(datablocks) > 0) {
++ PyObject *it = PyObject_GetIter(datablocks);
++ PyObject *key;
++ while ((key = PyIter_Next(it))) {
++ /* Borrow from the set. */
++ Py_DECREF(key);
++ ID *id;
++ if (!pyrna_id_FromPyObject(key, &id)) {
++ PyErr_Format(PyExc_TypeError, "Expected an ID type, not %.200s", Py_TYPE(key)->tp_name);
++ break;
++ }
+ partial_write_ctx.id_add(id, add_options, nullptr);
+ }
++ Py_DECREF(it);
++ if (key) {
++ return nullptr;
++ }
+ }
++
+ BLI_assert(partial_write_ctx.is_valid());
+
+ /* write blend */
+diff --git a/source/blender/python/intern/bpy_rna.cc b/source/blender/python/intern/bpy_rna.cc
+index eb365bf0238..a9cb115f57e 100644
+--- a/source/blender/python/intern/bpy_rna.cc
++++ b/source/blender/python/intern/bpy_rna.cc
+@@ -8639,7 +8639,7 @@ static int bpy_class_validate_recursive(PointerRNA *dummy_ptr,
+ continue;
+ }
+
+- /* TODO(@ideasman42): Use Python3.7x _PyObject_LookupAttr(), also in the macro below. */
++ /* TODO(@ideasman42): Use #PyObject_GetOptionalAttr(), also in the macro below. */
+ identifier = RNA_property_identifier(prop);
+ item = PyObject_GetAttrString(py_class, identifier);
+
+@@ -9263,7 +9263,7 @@ static PyObject *pyrna_register_class(PyObject * /*self*/, PyObject *py_class)
+
+ /* Call classed register method.
+ * Note that zero falls through, no attribute, no error. */
+- switch (_PyObject_LookupAttr(py_class, bpy_intern_str_register, &py_cls_meth)) {
++ switch (PyObject_GetOptionalAttr(py_class, bpy_intern_str_register, &py_cls_meth)) {
+ case 1: {
+ PyObject *ret = PyObject_CallObject(py_cls_meth, nullptr);
+ Py_DECREF(py_cls_meth);
+@@ -9378,7 +9378,7 @@ static PyObject *pyrna_unregister_class(PyObject * /*self*/, PyObject *py_class)
+
+ /* Call classed unregister method.
+ * Note that zero falls through, no attribute, no error. */
+- switch (_PyObject_LookupAttr(py_class, bpy_intern_str_unregister, &py_cls_meth)) {
++ switch (PyObject_GetOptionalAttr(py_class, bpy_intern_str_unregister, &py_cls_meth)) {
+ case 1: {
+ PyObject *ret = PyObject_CallObject(py_cls_meth, nullptr);
+ Py_DECREF(py_cls_meth);
diff --git a/media-gfx/blender/metadata.xml b/media-gfx/blender/metadata.xml
index 09310cae2fcc..ad273f3c5990 100644
--- a/media-gfx/blender/metadata.xml
+++ b/media-gfx/blender/metadata.xml
@@ -44,9 +44,6 @@
This makes it so that the user doesn't have to wait for the kernels to compile when they are used for the first time in Blender.
If this option is not on, they will be built as needed at runtime.
</flag>
- <flag name="dds">
- Adds DDS textures support to Blender.
- </flag>
<flag name="embree">
Use embree to accelerate certain areas of the Cycles render engine.
</flag>
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/blender/files/, media-gfx/blender/
@ 2024-12-01 8:34 Sam James
0 siblings, 0 replies; 18+ messages in thread
From: Sam James @ 2024-12-01 8:34 UTC (permalink / raw
To: gentoo-commits
commit: def2af6a70ba329939bf0aba423cf6a781ddcb3c
Author: Sebastian Parborg <darkdefende <AT> gmail <DOT> com>
AuthorDate: Sat Nov 30 16:25:53 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Dec 1 08:33:35 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=def2af6a
media-gfx/blender: drop blender-3.3.*
This old LTS series is no longer supported upstream anymore
Signed-off-by: Sebastian Parborg <darkdefende <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>
media-gfx/blender/Manifest | 3 -
media-gfx/blender/blender-3.3.15.ebuild | 432 ---------------------
media-gfx/blender/blender-3.3.21.ebuild | 432 ---------------------
media-gfx/blender/blender-3.3.8.ebuild | 432 ---------------------
...option-to-specify-OptiX-runtime-root-dire.patch | 108 ------
...-wrong-Cycles-OptiX-runtime-compilation-i.patch | 23 --
...der-3.2.2-support-building-with-musl-libc.patch | 177 ---------
.../blender-3.3.0-fix-build-with-boost-1.81.patch | 17 -
.../blender/files/blender-3.3.6-cycles-gcc13.patch | 12 -
9 files changed, 1636 deletions(-)
diff --git a/media-gfx/blender/Manifest b/media-gfx/blender/Manifest
index 3ff715802914..c56e4d00f3f9 100644
--- a/media-gfx/blender/Manifest
+++ b/media-gfx/blender/Manifest
@@ -1,6 +1,3 @@
-DIST blender-3.3.15.tar.xz 41928632 BLAKE2B d93d7d47183fcd7afa547b8d3f0bd7240ea204dcce885f42d79d29352ebacac43a2f92e380f576c2688d2d90d910caff069484e22669847b0eea71079a8bdc7e SHA512 d55223b7b9ae9f9c6fdbf5ed2988e997693fcb8262196acb08bbe58bae86f9f34474ed1cf5a213ee0247225601726265ded3cb4ad4d89910fc247f9cf5fec1ff
-DIST blender-3.3.21.tar.xz 41940868 BLAKE2B 74874226a0f690d2b81c0f96c441f519bd37ff0fec5c2dcae0f4f673d55863e2b2edbd60d2ed05890c440c5287e4cab943646cf4029d7c8287a636ac405e9bce SHA512 715a9808b25fe4c90ee3097edf21bdb3facfec51df0f6b6c6404a95bafe417d1e4998994f532ae9bac1e95de84cc8fd8fce8f8e672f9117646ad840074344d0e
-DIST blender-3.3.8.tar.xz 41915180 BLAKE2B 7fb24afe2151bba53d8c25160bd697145aced74a8cd9a7ac92b2f66bc0ab59e995009f20f9e9bb622b05d614919137153805a2e233de5b0bb0a41a2ac3405a76 SHA512 63aef1e543a9c8bbc5f8838292ad2e8d0d9a8ee6fd2d71a419c1edc1a0ee1f59f7e9eab59bc20bf32ca56ba440bab1534c6c94c6ca2c5ab964e80bd452b7e519
DIST blender-3.6.15.tar.xz 67906200 BLAKE2B 8709b20347e78f3f71d22fee9799b1c0e20a39521b35cff83d6cd3462d4b172e31c1656812d7ce51eef25341a0cff2e9efdcdab0bc9a361ec843a666fc8c3185 SHA512 dfd1d80850fe6ab0616fd99ab039345da621418890b1a006e5320a4b739d1cf6f4ca313e8f8aed6e27c976400c75e8d6085847623d933de71932aefe82f3fd32
DIST blender-3.6.18.tar.xz 67900952 BLAKE2B d4a619197abc3e4969846913f3c88cd64fd679bbefe007354af6ba2e83d47a8fcd27b3bcbaf6d850d28960eedeb3c50ff9336d0e61fd488d4916b6628bfd67dd SHA512 48a8b3e8b2fe75305061d7cb9b7b8491cef4f23fbd809d1fc34663a4f97f487d6e7e6e92848110fe6aa5a2fed18a2c1a2a0c1c928aa813e2456f7786681eae60
DIST blender-3.6.8.tar.xz 70453744 BLAKE2B 5361977951fa1720899fad26092b967cc78b7ba82c8823f92fe1e6a14419edae1f3914f639e88dd8b5fb3ec7c124783e1ece56199a80b9b51a0f320764e1eba7 SHA512 a5e15dc9de7024cebb955fc531ae592a4c58336196a07fd63ed5bb4eb14d66751a3697ea8b120283ca5078c92d8c87966e882862011ebb4368f132e2de004a45
diff --git a/media-gfx/blender/blender-3.3.15.ebuild b/media-gfx/blender/blender-3.3.15.ebuild
deleted file mode 100644
index aa58233b6a81..000000000000
--- a/media-gfx/blender/blender-3.3.15.ebuild
+++ /dev/null
@@ -1,432 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_10 python3_11 )
-
-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
- # Subversion is needed for downloading unit test files
- inherit git-r3 subversion
- EGIT_REPO_URI="https://git.blender.org/blender.git"
-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 )"
- KEYWORDS="~amd64 ~arm ~arm64"
-fi
-
-LICENSE="GPL-3+ cycles? ( Apache-2.0 )"
-SLOT="${PV%.*}"
-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 optix osl +pdf +potrace +pugixml pulseaudio sdl +sndfile \
- test +tiff valgrind"
-RESTRICT="!test? ( test ) test"
-
-REQUIRED_USE="${PYTHON_REQUIRED_USE}
- alembic? ( openexr )
- cuda? ( cycles )
- cycles? ( openexr tiff openimageio )
- fluid? ( tbb )
- openvdb? ( tbb )
- optix? ( cuda )
- osl? ( cycles )
- test? ( color-management )"
-
-# 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=
- $(python_gen_cond_dep '
- dev-python/cython[${PYTHON_USEDEP}]
- dev-python/numpy[${PYTHON_USEDEP}]
- dev-python/zstandard[${PYTHON_USEDEP}]
- dev-python/requests[${PYTHON_USEDEP}]
- ')
- media-libs/freetype:=[brotli]
- media-libs/glew:*
- media-libs/libjpeg-turbo:=
- media-libs/libpng:=
- media-libs/libsamplerate
- sys-libs/zlib:=
- virtual/glu
- virtual/libintl
- 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:= )
- 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] )
- fftw? ( sci-libs/fftw:3.0= )
- gmp? ( dev-libs/gmp )
- !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 )
- oidn? ( >=media-libs/oidn-1.4.1 )
- openimageio? ( >=media-libs/openimageio-2.3.12.0-r3:= )
- openexr? (
- >=dev-libs/imath-3.1.4-r2:=
- >=media-libs/openexr-3:0=
- )
- opensubdiv? ( >=media-libs/opensubdiv-3.4.0 )
- openvdb? (
- <media-gfx/openvdb-11.0.0:=[nanovdb?]
- dev-libs/c-blosc:=
- )
- optix? ( <dev-libs/optix-7.5.0 )
- osl? ( <media-libs/osl-1.13:= )
- pdf? ( media-libs/libharu )
- potrace? ( media-gfx/potrace )
- pugixml? ( dev-libs/pugixml )
- pulseaudio? ( media-libs/libpulse )
- sdl? ( media-libs/libsdl2[sound,joystick] )
- sndfile? ( media-libs/libsndfile )
- tbb? ( dev-cpp/tbb:= )
- tiff? ( media-libs/tiff:= )
- valgrind? ( dev-debug/valgrind )
-"
-
-DEPEND="${RDEPEND}
- dev-cpp/eigen:=
-"
-
-BDEPEND="
- virtual/pkgconfig
- doc? (
- app-text/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}/${PN}-3.2.2-support-building-with-musl-libc.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"
- "${FILESDIR}/${PN}-3.3.0-fix-build-with-boost-1.81.patch"
- "${FILESDIR}/${PN}-3.3.6-cycles-gcc13.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)
- if ((${BV:0:1} < 3)) ; then
- # Add period (290 -> 2.90).
- BV=${BV:0:1}.${BV:1}
- else
- # Add period and skip the middle number (301 -> 3.1)
- BV=${BV:0:1}.${BV:2}
- fi
-}
-
-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
- if use test; then
- TESTS_SVN_URL=https://svn.blender.org/svnroot/bf-blender/trunk/lib/tests
- subversion_fetch ${TESTS_SVN_URL} ../lib/tests
- fi
- else
- default
- if use test; then
- #The tests are downloaded from: https://svn.blender.org/svnroot/bf-blender/tags/blender-${SLOT}-release/lib/tests
- mkdir -p lib || die
- mv "${WORKDIR}/blender-${TEST_TARBALL_VERSION}-tests/tests" lib || die
- fi
- 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|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
-
- 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 ${T}/usr)|g" -i tests/CMakeLists.txt || die
- sed -e "s|string(REPLACE.*|set(TEST_INSTALL_DIR ${T}/usr)|g" -i build_files/cmake/Modules/GTestTesting.cmake || die
- fi
-}
-
-src_configure() {
- # -Werror=odr, -Werror=lto-type-mismatch
- # https://bugs.gentoo.org/859607
- # https://projects.blender.org/blender/blender/issues/120444
- filter-lto
-
- # Workaround for bug #922600
- append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
-
- 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=$(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
- -DWITH_CYCLES_STANDALONE_GUI=OFF
- -DWITH_DOC_MANPAGE=$(usex man)
- -DWITH_FFTW3=$(usex fftw)
- -DWITH_GMP=$(usex gmp)
- -DWITH_GTESTS=$(usex test)
- -DWITH_HARU=$(usex pdf)
- -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_NANOVDB=$(usex nanovdb)
- -DWITH_OPENAL=$(usex openal)
- -DWITH_OPENCOLLADA=$(usex collada)
- -DWITH_OPENCOLORIO=$(usex color-management)
- -DWITH_OPENIMAGEDENOISE=$(usex oidn)
- -DWITH_OPENIMAGEIO=$(usex openimageio)
- -DWITH_OPENMP=$(usex openmp)
- -DWITH_OPENSUBDIV=$(usex opensubdiv)
- -DWITH_OPENVDB=$(usex openvdb)
- -DWITH_OPENVDB_BLOSC=$(usex openvdb)
- -DWITH_POTRACE=$(usex potrace)
- -DWITH_PUGIXML=$(usex pugixml)
- -DWITH_PULSEAUDIO=$(usex pulseaudio)
- -DWITH_PYTHON_INSTALL=OFF
- -DWITH_SDL=$(usex sdl)
- -DWITH_STATIC_LIBS=OFF
- -DWITH_SYSTEM_EIGEN3=ON
- -DWITH_SYSTEM_FREETYPE=ON
- -DWITH_SYSTEM_GLEW=ON
- -DWITH_SYSTEM_LZO=ON
- -DWITH_TBB=$(usex tbb)
- -DWITH_USD=OFF
- -DWITH_XR_OPENXR=OFF
- )
-
- if use optix; then
- mycmakeargs+=(
- -DCYCLES_RUNTIME_OPTIX_ROOT_DIR="${EPREFIX}"/opt/optix
- -DOPTIX_ROOT_DIR="${EPREFIX}"/opt/optix
- )
- 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
-
- append-flags $(usex debug '-DDEBUG' '-DNDEBUG')
-
- if tc-is-gcc ; then
- # These options only exist when GCC is detected.
- # We disable these to respect the user's choice of linker.
- mycmakeargs+=(
- -DWITH_LINKER_GOLD=OFF
- -DWITH_LINKER_LLD=OFF
- )
- fi
-
- cmake_src_configure
-}
-
-src_test() {
- # A lot of tests needs to have access to the installed data files.
- # So install them into the image directory now.
- DESTDIR="${T}" cmake_build 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="${T}/usr/share/blender/${BV}/scripts"
- export BLENDER_SYSTEM_DATAFILES="${T}/usr/share/blender/${BV}/datafiles"
-
- # Sanity check that the script and datafile path is valid.
- # If they are not vaild, blender will fallback to the default path which is not what we want.
- [ -d "$BLENDER_SYSTEM_SCRIPTS" ] || die "The custom script path is invalid, fix the ebuild!"
- [ -d "$BLENDER_SYSTEM_DATAFILES" ] || die "The custom datafiles path is invalid, fix the ebuild!"
-
- cmake_src_test
-
- # Clean up the image directory for src_install
- rm -fr "${T}"/usr || die
-}
-
-src_install() {
- blender_get_version
-
- # Pax mark blender for hardened support.
- pax-mark m "${BUILD_DIR}"/bin/blender
-
- 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
-
- if use doc; then
- # Define custom blender data/script file paths. Otherwise Blender will not be able to find them during doc building.
- # (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
-
- # 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."
-
- 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
-
- # Fix doc installdir
- docinto html
- dodoc "${CMAKE_USE_DIR}"/release/text/readme.html
- rm -r "${ED}"/usr/share/doc/blender || die
-
- python_optimize "${ED}/usr/share/blender/${BV}/scripts"
-
- mv "${ED}/usr/bin/blender-thumbnailer" "${ED}/usr/bin/blender-${BV}-thumbnailer" || die
- 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
-
- if use osl; then
- ewarn ""
- ewarn "OSL is know to cause runtime segfaults if Mesa has been linked to"
- ewarn "an other LLVM version than what OSL is linked to."
- ewarn "See https://bugs.gentoo.org/880671 for more details"
- ewarn ""
- fi
-
- if ! use python_single_target_python3_10; then
- 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 switch to"
- elog "python_single_target_python3_10 instead."
- elog "Bug: https://bugs.gentoo.org/737388"
- elog
- fi
-
- 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-3.3.21.ebuild b/media-gfx/blender/blender-3.3.21.ebuild
deleted file mode 100644
index a0f55249f096..000000000000
--- a/media-gfx/blender/blender-3.3.21.ebuild
+++ /dev/null
@@ -1,432 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_10 python3_11 )
-
-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
- # Subversion is needed for downloading unit test files
- inherit git-r3 subversion
- EGIT_REPO_URI="https://git.blender.org/blender.git"
-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 )"
- KEYWORDS="amd64 ~arm ~arm64"
-fi
-
-LICENSE="GPL-3+ cycles? ( Apache-2.0 )"
-SLOT="${PV%.*}"
-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 optix osl +pdf +potrace +pugixml pulseaudio sdl +sndfile \
- test +tiff valgrind"
-RESTRICT="!test? ( test ) test"
-
-REQUIRED_USE="${PYTHON_REQUIRED_USE}
- alembic? ( openexr )
- cuda? ( cycles )
- cycles? ( openexr tiff openimageio )
- fluid? ( tbb )
- openvdb? ( tbb )
- optix? ( cuda )
- osl? ( cycles )
- test? ( color-management )"
-
-# 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=
- $(python_gen_cond_dep '
- dev-python/cython[${PYTHON_USEDEP}]
- dev-python/numpy[${PYTHON_USEDEP}]
- dev-python/zstandard[${PYTHON_USEDEP}]
- dev-python/requests[${PYTHON_USEDEP}]
- ')
- media-libs/freetype:=[brotli]
- media-libs/glew:*
- media-libs/libjpeg-turbo:=
- media-libs/libpng:=
- media-libs/libsamplerate
- sys-libs/zlib:=
- virtual/glu
- virtual/libintl
- 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:= )
- cuda? ( dev-util/nvidia-cuda-toolkit:= )
- embree? ( <media-libs/embree-4.0.0:=[raymask] )
- ffmpeg? ( media-video/ffmpeg:=[x264,mp3,encode,theora,jpeg2k?,vpx,vorbis,opus,xvid] )
- fftw? ( sci-libs/fftw:3.0= )
- gmp? ( dev-libs/gmp[cxx] )
- !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 )
- oidn? ( >=media-libs/oidn-1.4.1 )
- openimageio? ( >=media-libs/openimageio-2.3.12.0-r3:= )
- openexr? (
- >=dev-libs/imath-3.1.4-r2:=
- >=media-libs/openexr-3:0=
- )
- opensubdiv? ( >=media-libs/opensubdiv-3.4.0 )
- openvdb? (
- <media-gfx/openvdb-11.0.0:=[nanovdb?]
- dev-libs/c-blosc:=
- )
- optix? ( <dev-libs/optix-7.5.0 )
- osl? ( <media-libs/osl-1.13:= )
- pdf? ( media-libs/libharu )
- potrace? ( media-gfx/potrace )
- pugixml? ( dev-libs/pugixml )
- pulseaudio? ( media-libs/libpulse )
- sdl? ( media-libs/libsdl2[sound,joystick] )
- sndfile? ( media-libs/libsndfile )
- tbb? ( dev-cpp/tbb:= )
- tiff? ( media-libs/tiff:= )
- valgrind? ( dev-debug/valgrind )
-"
-
-DEPEND="${RDEPEND}
- dev-cpp/eigen:=
-"
-
-BDEPEND="
- virtual/pkgconfig
- doc? (
- app-text/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}/${PN}-3.2.2-support-building-with-musl-libc.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"
- "${FILESDIR}/${PN}-3.3.0-fix-build-with-boost-1.81.patch"
- "${FILESDIR}/${PN}-3.3.6-cycles-gcc13.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)
- if ((${BV:0:1} < 3)) ; then
- # Add period (290 -> 2.90).
- BV=${BV:0:1}.${BV:1}
- else
- # Add period and skip the middle number (301 -> 3.1)
- BV=${BV:0:1}.${BV:2}
- fi
-}
-
-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
- if use test; then
- TESTS_SVN_URL=https://svn.blender.org/svnroot/bf-blender/trunk/lib/tests
- subversion_fetch ${TESTS_SVN_URL} ../lib/tests
- fi
- else
- default
- if use test; then
- #The tests are downloaded from: https://svn.blender.org/svnroot/bf-blender/tags/blender-${SLOT}-release/lib/tests
- mkdir -p lib || die
- mv "${WORKDIR}/blender-${TEST_TARBALL_VERSION}-tests/tests" lib || die
- fi
- 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|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
-
- 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 ${T}/usr)|g" -i tests/CMakeLists.txt || die
- sed -e "s|string(REPLACE.*|set(TEST_INSTALL_DIR ${T}/usr)|g" -i build_files/cmake/Modules/GTestTesting.cmake || die
- fi
-}
-
-src_configure() {
- # -Werror=odr, -Werror=lto-type-mismatch
- # https://bugs.gentoo.org/859607
- # https://projects.blender.org/blender/blender/issues/120444
- filter-lto
-
- # Workaround for bug #922600
- append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
-
- 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=$(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
- -DWITH_CYCLES_STANDALONE_GUI=OFF
- -DWITH_DOC_MANPAGE=$(usex man)
- -DWITH_FFTW3=$(usex fftw)
- -DWITH_GMP=$(usex gmp)
- -DWITH_GTESTS=$(usex test)
- -DWITH_HARU=$(usex pdf)
- -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_NANOVDB=$(usex nanovdb)
- -DWITH_OPENAL=$(usex openal)
- -DWITH_OPENCOLLADA=$(usex collada)
- -DWITH_OPENCOLORIO=$(usex color-management)
- -DWITH_OPENIMAGEDENOISE=$(usex oidn)
- -DWITH_OPENIMAGEIO=$(usex openimageio)
- -DWITH_OPENMP=$(usex openmp)
- -DWITH_OPENSUBDIV=$(usex opensubdiv)
- -DWITH_OPENVDB=$(usex openvdb)
- -DWITH_OPENVDB_BLOSC=$(usex openvdb)
- -DWITH_POTRACE=$(usex potrace)
- -DWITH_PUGIXML=$(usex pugixml)
- -DWITH_PULSEAUDIO=$(usex pulseaudio)
- -DWITH_PYTHON_INSTALL=OFF
- -DWITH_SDL=$(usex sdl)
- -DWITH_STATIC_LIBS=OFF
- -DWITH_SYSTEM_EIGEN3=ON
- -DWITH_SYSTEM_FREETYPE=ON
- -DWITH_SYSTEM_GLEW=ON
- -DWITH_SYSTEM_LZO=ON
- -DWITH_TBB=$(usex tbb)
- -DWITH_USD=OFF
- -DWITH_XR_OPENXR=OFF
- )
-
- if use optix; then
- mycmakeargs+=(
- -DCYCLES_RUNTIME_OPTIX_ROOT_DIR="${EPREFIX}"/opt/optix
- -DOPTIX_ROOT_DIR="${EPREFIX}"/opt/optix
- )
- 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
-
- append-flags $(usex debug '-DDEBUG' '-DNDEBUG')
-
- if tc-is-gcc ; then
- # These options only exist when GCC is detected.
- # We disable these to respect the user's choice of linker.
- mycmakeargs+=(
- -DWITH_LINKER_GOLD=OFF
- -DWITH_LINKER_LLD=OFF
- )
- fi
-
- cmake_src_configure
-}
-
-src_test() {
- # A lot of tests needs to have access to the installed data files.
- # So install them into the image directory now.
- DESTDIR="${T}" cmake_build 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="${T}/usr/share/blender/${BV}/scripts"
- export BLENDER_SYSTEM_DATAFILES="${T}/usr/share/blender/${BV}/datafiles"
-
- # Sanity check that the script and datafile path is valid.
- # If they are not vaild, blender will fallback to the default path which is not what we want.
- [ -d "$BLENDER_SYSTEM_SCRIPTS" ] || die "The custom script path is invalid, fix the ebuild!"
- [ -d "$BLENDER_SYSTEM_DATAFILES" ] || die "The custom datafiles path is invalid, fix the ebuild!"
-
- cmake_src_test
-
- # Clean up the image directory for src_install
- rm -fr "${T}"/usr || die
-}
-
-src_install() {
- blender_get_version
-
- # Pax mark blender for hardened support.
- pax-mark m "${BUILD_DIR}"/bin/blender
-
- 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
-
- if use doc; then
- # Define custom blender data/script file paths. Otherwise Blender will not be able to find them during doc building.
- # (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
-
- # 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."
-
- 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
-
- # Fix doc installdir
- docinto html
- dodoc "${CMAKE_USE_DIR}"/release/text/readme.html
- rm -r "${ED}"/usr/share/doc/blender || die
-
- python_optimize "${ED}/usr/share/blender/${BV}/scripts"
-
- mv "${ED}/usr/bin/blender-thumbnailer" "${ED}/usr/bin/blender-${BV}-thumbnailer" || die
- 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
-
- if use osl; then
- ewarn ""
- ewarn "OSL is know to cause runtime segfaults if Mesa has been linked to"
- ewarn "an other LLVM version than what OSL is linked to."
- ewarn "See https://bugs.gentoo.org/880671 for more details"
- ewarn ""
- fi
-
- if ! use python_single_target_python3_10; then
- 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 switch to"
- elog "python_single_target_python3_10 instead."
- elog "Bug: https://bugs.gentoo.org/737388"
- elog
- fi
-
- 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-3.3.8.ebuild b/media-gfx/blender/blender-3.3.8.ebuild
deleted file mode 100644
index 69f830424c87..000000000000
--- a/media-gfx/blender/blender-3.3.8.ebuild
+++ /dev/null
@@ -1,432 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_10 python3_11 )
-
-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
- # Subversion is needed for downloading unit test files
- inherit git-r3 subversion
- EGIT_REPO_URI="https://git.blender.org/blender.git"
-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 )"
- KEYWORDS="amd64 ~arm ~arm64"
-fi
-
-LICENSE="GPL-3+ cycles? ( Apache-2.0 )"
-SLOT="${PV%.*}"
-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 optix osl +pdf +potrace +pugixml pulseaudio sdl +sndfile \
- test +tiff valgrind"
-RESTRICT="!test? ( test ) test"
-
-REQUIRED_USE="${PYTHON_REQUIRED_USE}
- alembic? ( openexr )
- cuda? ( cycles )
- cycles? ( openexr tiff openimageio )
- fluid? ( tbb )
- openvdb? ( tbb )
- optix? ( cuda )
- osl? ( cycles )
- test? ( color-management )"
-
-# 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=
- $(python_gen_cond_dep '
- dev-python/cython[${PYTHON_USEDEP}]
- dev-python/numpy[${PYTHON_USEDEP}]
- dev-python/zstandard[${PYTHON_USEDEP}]
- dev-python/requests[${PYTHON_USEDEP}]
- ')
- media-libs/freetype:=[brotli]
- media-libs/glew:*
- media-libs/libjpeg-turbo:=
- media-libs/libpng:=
- media-libs/libsamplerate
- sys-libs/zlib:=
- virtual/glu
- virtual/libintl
- 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:= )
- 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] )
- fftw? ( sci-libs/fftw:3.0= )
- gmp? ( dev-libs/gmp )
- !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 )
- oidn? ( >=media-libs/oidn-1.4.1 )
- openimageio? ( >=media-libs/openimageio-2.3.12.0-r3:= )
- openexr? (
- >=dev-libs/imath-3.1.4-r2:=
- >=media-libs/openexr-3:0=
- )
- opensubdiv? ( >=media-libs/opensubdiv-3.4.0 )
- openvdb? (
- <media-gfx/openvdb-11.0.0:=[nanovdb?]
- dev-libs/c-blosc:=
- )
- optix? ( <dev-libs/optix-7.5.0 )
- osl? ( <media-libs/osl-1.13:= )
- pdf? ( media-libs/libharu )
- potrace? ( media-gfx/potrace )
- pugixml? ( dev-libs/pugixml )
- pulseaudio? ( media-libs/libpulse )
- sdl? ( media-libs/libsdl2[sound,joystick] )
- sndfile? ( media-libs/libsndfile )
- tbb? ( dev-cpp/tbb:= )
- tiff? ( media-libs/tiff:= )
- valgrind? ( dev-debug/valgrind )
-"
-
-DEPEND="${RDEPEND}
- dev-cpp/eigen:=
-"
-
-BDEPEND="
- virtual/pkgconfig
- doc? (
- app-text/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}/${PN}-3.2.2-support-building-with-musl-libc.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"
- "${FILESDIR}/${PN}-3.3.0-fix-build-with-boost-1.81.patch"
- "${FILESDIR}/${PN}-3.3.6-cycles-gcc13.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)
- if ((${BV:0:1} < 3)) ; then
- # Add period (290 -> 2.90).
- BV=${BV:0:1}.${BV:1}
- else
- # Add period and skip the middle number (301 -> 3.1)
- BV=${BV:0:1}.${BV:2}
- fi
-}
-
-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
- if use test; then
- TESTS_SVN_URL=https://svn.blender.org/svnroot/bf-blender/trunk/lib/tests
- subversion_fetch ${TESTS_SVN_URL} ../lib/tests
- fi
- else
- default
- if use test; then
- #The tests are downloaded from: https://svn.blender.org/svnroot/bf-blender/tags/blender-${SLOT}-release/lib/tests
- mkdir -p lib || die
- mv "${WORKDIR}/blender-${TEST_TARBALL_VERSION}-tests/tests" lib || die
- fi
- 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|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
-
- 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 ${T}/usr)|g" -i tests/CMakeLists.txt || die
- sed -e "s|string(REPLACE.*|set(TEST_INSTALL_DIR ${T}/usr)|g" -i build_files/cmake/Modules/GTestTesting.cmake || die
- fi
-}
-
-src_configure() {
- # -Werror=odr, -Werror=lto-type-mismatch
- # https://bugs.gentoo.org/859607
- # https://projects.blender.org/blender/blender/issues/120444
- filter-lto
-
- # Workaround for bug #922600
- append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
-
- 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=$(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
- -DWITH_CYCLES_STANDALONE_GUI=OFF
- -DWITH_DOC_MANPAGE=$(usex man)
- -DWITH_FFTW3=$(usex fftw)
- -DWITH_GMP=$(usex gmp)
- -DWITH_GTESTS=$(usex test)
- -DWITH_HARU=$(usex pdf)
- -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_NANOVDB=$(usex nanovdb)
- -DWITH_OPENAL=$(usex openal)
- -DWITH_OPENCOLLADA=$(usex collada)
- -DWITH_OPENCOLORIO=$(usex color-management)
- -DWITH_OPENIMAGEDENOISE=$(usex oidn)
- -DWITH_OPENIMAGEIO=$(usex openimageio)
- -DWITH_OPENMP=$(usex openmp)
- -DWITH_OPENSUBDIV=$(usex opensubdiv)
- -DWITH_OPENVDB=$(usex openvdb)
- -DWITH_OPENVDB_BLOSC=$(usex openvdb)
- -DWITH_POTRACE=$(usex potrace)
- -DWITH_PUGIXML=$(usex pugixml)
- -DWITH_PULSEAUDIO=$(usex pulseaudio)
- -DWITH_PYTHON_INSTALL=OFF
- -DWITH_SDL=$(usex sdl)
- -DWITH_STATIC_LIBS=OFF
- -DWITH_SYSTEM_EIGEN3=ON
- -DWITH_SYSTEM_FREETYPE=ON
- -DWITH_SYSTEM_GLEW=ON
- -DWITH_SYSTEM_LZO=ON
- -DWITH_TBB=$(usex tbb)
- -DWITH_USD=OFF
- -DWITH_XR_OPENXR=OFF
- )
-
- if use optix; then
- mycmakeargs+=(
- -DCYCLES_RUNTIME_OPTIX_ROOT_DIR="${EPREFIX}"/opt/optix
- -DOPTIX_ROOT_DIR="${EPREFIX}"/opt/optix
- )
- 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
-
- append-flags $(usex debug '-DDEBUG' '-DNDEBUG')
-
- if tc-is-gcc ; then
- # These options only exist when GCC is detected.
- # We disable these to respect the user's choice of linker.
- mycmakeargs+=(
- -DWITH_LINKER_GOLD=OFF
- -DWITH_LINKER_LLD=OFF
- )
- fi
-
- cmake_src_configure
-}
-
-src_test() {
- # A lot of tests needs to have access to the installed data files.
- # So install them into the image directory now.
- DESTDIR="${T}" cmake_build 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="${T}/usr/share/blender/${BV}/scripts"
- export BLENDER_SYSTEM_DATAFILES="${T}/usr/share/blender/${BV}/datafiles"
-
- # Sanity check that the script and datafile path is valid.
- # If they are not vaild, blender will fallback to the default path which is not what we want.
- [ -d "$BLENDER_SYSTEM_SCRIPTS" ] || die "The custom script path is invalid, fix the ebuild!"
- [ -d "$BLENDER_SYSTEM_DATAFILES" ] || die "The custom datafiles path is invalid, fix the ebuild!"
-
- cmake_src_test
-
- # Clean up the image directory for src_install
- rm -fr "${T}"/usr || die
-}
-
-src_install() {
- blender_get_version
-
- # Pax mark blender for hardened support.
- pax-mark m "${BUILD_DIR}"/bin/blender
-
- 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
-
- if use doc; then
- # Define custom blender data/script file paths. Otherwise Blender will not be able to find them during doc building.
- # (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
-
- # 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."
-
- 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
-
- # Fix doc installdir
- docinto html
- dodoc "${CMAKE_USE_DIR}"/release/text/readme.html
- rm -r "${ED}"/usr/share/doc/blender || die
-
- python_optimize "${ED}/usr/share/blender/${BV}/scripts"
-
- mv "${ED}/usr/bin/blender-thumbnailer" "${ED}/usr/bin/blender-${BV}-thumbnailer" || die
- 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
-
- if use osl; then
- ewarn ""
- ewarn "OSL is know to cause runtime segfaults if Mesa has been linked to"
- ewarn "an other LLVM version than what OSL is linked to."
- ewarn "See https://bugs.gentoo.org/880671 for more details"
- ewarn ""
- fi
-
- if ! use python_single_target_python3_10; then
- 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 switch to"
- elog "python_single_target_python3_10 instead."
- elog "Bug: https://bugs.gentoo.org/737388"
- elog
- fi
-
- 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-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
deleted file mode 100644
index 2a7b33cf8ac4..000000000000
--- a/media-gfx/blender/files/blender-3.2.2-Cycles-add-option-to-specify-OptiX-runtime-root-dire.patch
+++ /dev/null
@@ -1,108 +0,0 @@
-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
deleted file mode 100644
index 921b648ca388..000000000000
--- a/media-gfx/blender/files/blender-3.2.2-Fix-T100845-wrong-Cycles-OptiX-runtime-compilation-i.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-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/files/blender-3.2.2-support-building-with-musl-libc.patch b/media-gfx/blender/files/blender-3.2.2-support-building-with-musl-libc.patch
deleted file mode 100644
index fb3f2584f0fe..000000000000
--- a/media-gfx/blender/files/blender-3.2.2-support-building-with-musl-libc.patch
+++ /dev/null
@@ -1,177 +0,0 @@
-CMake: support building with musl libc
-
-Instead of using macros like GLIBC we can use the CMake build
-systems internal functions to check if some header or functions are
-present on the running system's libc.
-
-Add ./build_files/cmake/have_features.cmake to add checks for
-platform features which can be used to set defines for source
-files that require them.
-
-Please refer: https://github.com/blender/blender/commit/f197b1a1f1bbc0334310fb1c911327246767a1a3
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -112,6 +112,11 @@ blender_project_hack_post()
-
- enable_testing()
-
-+#-----------------------------------------------------------------------------
-+# Test compiler/library features.
-+
-+include(build_files/cmake/have_features.cmake)
-+
- #-----------------------------------------------------------------------------
- # Redirect output files
-
---- /dev/null
-+++ b/build_files/cmake/have_features.cmake
-@@ -0,0 +1,33 @@
-+# SPDX-License-Identifier: GPL-2.0-or-later
-+# Copyright 2022 Blender Foundation. All rights reserved.
-+
-+# This file is used to test the system for headers & symbols.
-+# Variables should use the `HAVE_` prefix.
-+# Defines should use the same name as the CMAKE variable.
-+
-+include(CheckSymbolExists)
-+
-+# Used for: `intern/guardedalloc/intern/mallocn_intern.h`.
-+# Function `malloc_stats` is only available on GLIBC,
-+# so check that before defining `HAVE_MALLOC_STATS`.
-+check_symbol_exists(malloc_stats "malloc.h" HAVE_MALLOC_STATS_H)
-+
-+# Used for: `source/creator/creator_signals.c`.
-+# The function `feenableexcept` is not present non-GLIBC systems,
-+# hence we need to check if it's available in the `fenv.h` file.
-+set(HAVE_FEENABLEEXCEPT OFF)
-+if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
-+ check_symbol_exists(feenableexcept "fenv.h" HAVE_FEENABLEEXCEPT)
-+endif()
-+
-+# Used for: `source/blender/blenlib/intern/system.c`.
-+# `execinfo` is not available on non-GLIBC systems (at least not on MUSL-LIBC),
-+# so check the presence of the header before including it and using the it for back-trace.
-+set(HAVE_EXECINFO_H OFF)
-+if(NOT MSVC)
-+ include(CheckIncludeFiles)
-+ check_include_files("execinfo.h" HAVE_EXECINFO_H)
-+ if(HAVE_EXECINFO_H)
-+ add_definitions(-DHAVE_EXECINFO_H)
-+ endif()
-+endif()
---- a/intern/guardedalloc/CMakeLists.txt
-+++ b/intern/guardedalloc/CMakeLists.txt
-@@ -1,6 +1,10 @@
- # SPDX-License-Identifier: GPL-2.0-or-later
- # Copyright 2006 Blender Foundation. All rights reserved.
-
-+if(HAVE_MALLOC_STATS_H)
-+ add_definitions(-DHAVE_MALLOC_STATS_H)
-+endif()
-+
- set(INC
- .
- ../atomic
---- a/intern/guardedalloc/intern/mallocn_intern.h
-+++ b/intern/guardedalloc/intern/mallocn_intern.h
-@@ -17,8 +17,7 @@
- #undef HAVE_MALLOC_STATS
- #define USE_MALLOC_USABLE_SIZE /* internal, when we have malloc_usable_size() */
-
--#if defined(__linux__) || (defined(__FreeBSD_kernel__) && !defined(__FreeBSD__)) || \
-- defined(__GLIBC__)
-+#if defined(HAVE_MALLOC_STATS_H)
- # include <malloc.h>
- # define HAVE_MALLOC_STATS
- #elif defined(__FreeBSD__)
---- a/source/blender/blenlib/CMakeLists.txt
-+++ b/source/blender/blenlib/CMakeLists.txt
-@@ -1,6 +1,10 @@
- # SPDX-License-Identifier: GPL-2.0-or-later
- # Copyright 2006 Blender Foundation. All rights reserved.
-
-+if(HAVE_EXECINFO_H)
-+ add_definitions(-DHAVE_EXECINFO_H)
-+endif()
-+
- set(INC
- .
- # ../blenkernel # don't add this back!
---- a/source/blender/blenlib/intern/system.c
-+++ b/source/blender/blenlib/intern/system.c
-@@ -21,7 +21,9 @@
-
- # include "BLI_winstuff.h"
- #else
--# include <execinfo.h>
-+# if defined(HAVE_EXECINFO_H)
-+# include <execinfo.h>
-+# endif
- # include <unistd.h>
- #endif
-
-@@ -61,9 +63,9 @@ int BLI_cpu_support_sse2(void)
- #if !defined(_MSC_VER)
- void BLI_system_backtrace(FILE *fp)
- {
-- /* ------------- */
-- /* Linux / Apple */
--# if defined(__linux__) || defined(__APPLE__)
-+ /* ----------------------- */
-+ /* If system as execinfo.h */
-+# if defined(HAVE_EXECINFO_H)
-
- # define SIZE 100
- void *buffer[SIZE];
---- a/source/blender/makesdna/intern/CMakeLists.txt
-+++ b/source/blender/makesdna/intern/CMakeLists.txt
-@@ -5,6 +5,11 @@
-
- add_definitions(-DWITH_DNA_GHASH)
-
-+# Needed for `mallocn.c`.
-+if(HAVE_MALLOC_STATS_H)
-+ add_definitions(-DHAVE_MALLOC_STATS_H)
-+endif()
-+
- blender_include_dirs(
- ../../../../intern/atomic
- ../../../../intern/guardedalloc
---- a/source/blender/makesrna/intern/CMakeLists.txt
-+++ b/source/blender/makesrna/intern/CMakeLists.txt
-@@ -6,6 +6,11 @@ if(CMAKE_COMPILER_IS_GNUCC)
- string(APPEND CMAKE_C_FLAGS " -Werror=implicit-function-declaration")
- endif()
-
-+# Needed for `mallocn.c`.
-+if(HAVE_MALLOC_STATS_H)
-+ add_definitions(-DHAVE_MALLOC_STATS_H)
-+endif()
-+
- # files rna_access.c rna_define.c makesrna.c intentionally excluded.
- set(DEFSRC
- rna_ID.c
---- a/source/creator/CMakeLists.txt
-+++ b/source/creator/CMakeLists.txt
-@@ -22,6 +22,10 @@ set(LIB
- bf_windowmanager
- )
-
-+if(HAVE_FEENABLEEXCEPT)
-+ add_definitions(-DHAVE_FEENABLEEXCEPT)
-+endif()
-+
- if(WITH_TBB)
- # Force TBB libraries to be in front of MKL (part of OpenImageDenoise), so
- # that it is initialized before MKL and static library initialization order
---- a/source/creator/creator_signals.c
-+++ b/source/creator/creator_signals.c
-@@ -258,7 +258,7 @@ void main_signal_setup_fpe(void)
- * set breakpoints on sig_handle_fpe */
- signal(SIGFPE, sig_handle_fpe);
-
--# if defined(__linux__) && defined(__GNUC__)
-+# if defined(__linux__) && defined(__GNUC__) && defined(HAVE_FEENABLEEXCEPT)
- feenableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW);
- # endif /* defined(__linux__) && defined(__GNUC__) */
- # if defined(OSX_SSE_FPE)
diff --git a/media-gfx/blender/files/blender-3.3.0-fix-build-with-boost-1.81.patch b/media-gfx/blender/files/blender-3.3.0-fix-build-with-boost-1.81.patch
deleted file mode 100644
index 3a544811e484..000000000000
--- a/media-gfx/blender/files/blender-3.3.0-fix-build-with-boost-1.81.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-https://bugs.gentoo.org/887059
-
-Adding include as suggested by the compiler:
-
-"intern/locale/boost_locale_wrapper.cpp:12:1: note: ‘std::cout’ is defined
-in header ‘<iostream>’; did you forget to ‘#include <iostream>’?"
-
---- a/intern/locale/boost_locale_wrapper.cpp
-+++ b/intern/locale/boost_locale_wrapper.cpp
-@@ -9,6 +9,7 @@
- #include <stdio.h>
-
- #include "boost_locale_wrapper.h"
-+#include <iostream>
-
- static std::string messages_path;
- static std::string default_domain;
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
deleted file mode 100644
index 955be2424e19..000000000000
--- a/media-gfx/blender/files/blender-3.3.6-cycles-gcc13.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-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] 18+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/blender/files/, media-gfx/blender/
@ 2023-10-27 2:59 Sam James
0 siblings, 0 replies; 18+ messages in thread
From: Sam James @ 2023-10-27 2:59 UTC (permalink / raw
To: gentoo-commits
commit: 694c68958e60e2e098d63915f8e4dd470bc86905
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 27 02:57:40 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Oct 27 02:57:40 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=694c6895
Revert "media-gfx/blender: add 3.6.5, update 9999"
This reverts commit 824eb57e50e0f5039d42f39e0caa5461d8d73468.
Signed-off-by: Sam James <sam <AT> gentoo.org>
media-gfx/blender/Manifest | 1 -
media-gfx/blender/blender-3.6.5.ebuild | 443 ---------------------
media-gfx/blender/blender-9999.ebuild | 4 +-
.../blender/files/blender-4.0.0-ocio-2.3.0.patch | 110 -----
4 files changed, 3 insertions(+), 555 deletions(-)
diff --git a/media-gfx/blender/Manifest b/media-gfx/blender/Manifest
index 7c56592c6b76..b3c42c94fb98 100644
--- a/media-gfx/blender/Manifest
+++ b/media-gfx/blender/Manifest
@@ -3,4 +3,3 @@ 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-3.6.5.ebuild b/media-gfx/blender/blender-3.6.5.ebuild
deleted file mode 100644
index 1f87c0fac6ef..000000000000
--- a/media-gfx/blender/blender-3.6.5.ebuild
+++ /dev/null
@@ -1,443 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_10 python3_11 )
-
-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
- # Subversion is needed for downloading unit test files
- inherit git-r3 subversion
- EGIT_REPO_URI="https://projects.blender.org/blender/blender.git"
- ADDONS_EGIT_REPO_URI="https://projects.blender.org/blender/blender-addons.git"
-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 )"
- KEYWORDS="~amd64 ~arm ~arm64"
-fi
-
-SLOT="${PV%.*}"
-LICENSE="|| ( GPL-3 BL )"
-IUSE="+bullet +dds +fluid +openexr +tbb
- alembic collada +color-management cuda +cycles cycles-bin-kernels
- debug doc +embree +ffmpeg +fftw +gmp jack jemalloc jpeg2k
- man +nanovdb ndof nls openal +oidn +openmp +openpgl +opensubdiv
- +openvdb optix osl +pdf +potrace +pugixml pulseaudio sdl
- +sndfile test +tiff valgrind wayland X"
-RESTRICT="!test? ( test )"
-
-REQUIRED_USE="${PYTHON_REQUIRED_USE}
- alembic? ( openexr )
- cuda? ( cycles )
- cycles? ( openexr tiff )
- fluid? ( tbb )
- openvdb? ( tbb )
- optix? ( cuda )
- osl? ( cycles )
- test? ( color-management )"
-
-# 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?]
- dev-libs/lzo:2=
- $(python_gen_cond_dep '
- dev-python/cython[${PYTHON_USEDEP}]
- dev-python/numpy[${PYTHON_USEDEP}]
- dev-python/zstandard[${PYTHON_USEDEP}]
- dev-python/requests[${PYTHON_USEDEP}]
- ')
- media-libs/freetype:=[brotli]
- media-libs/libepoxy:=
- media-libs/libjpeg-turbo:=
- media-libs/libpng:=
- media-libs/libsamplerate
- >=media-libs/OpenImageIO-2.4.6.0:=
- sys-libs/zlib:=
- virtual/glu
- virtual/libintl
- virtual/opengl
- alembic? ( >=media-gfx/alembic-1.8.3-r2[boost(+),hdf(+)] )
- collada? ( >=media-libs/opencollada-1.6.68 )
- 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] )
- fftw? ( sci-libs/fftw:3.0= )
- gmp? ( dev-libs/gmp )
- 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 )
- oidn? ( >=media-libs/oidn-1.4.1 )
- openexr? (
- >=dev-libs/Imath-3.1.4-r2:=
- >=media-libs/openexr-3:0=
- )
- openpgl? ( media-libs/openpgl )
- opensubdiv? ( >=media-libs/opensubdiv-3.4.0 )
- openvdb? (
- >=media-gfx/openvdb-9.0.0:=[nanovdb?]
- dev-libs/c-blosc:=
- )
- optix? ( <dev-libs/optix-7.5.0 )
- osl? ( >=media-libs/OpenShadingLanguage-1.11.16.0-r3:= )
- pdf? ( media-libs/libharu )
- potrace? ( media-gfx/potrace )
- pugixml? ( dev-libs/pugixml )
- pulseaudio? ( media-libs/libpulse )
- sdl? ( media-libs/libsdl2[sound,joystick] )
- sndfile? ( media-libs/libsndfile )
- tbb? ( dev-cpp/tbb:= )
- tiff? ( media-libs/tiff:= )
- valgrind? ( dev-util/valgrind )
- wayland? (
- >=dev-libs/wayland-1.12
- >=dev-libs/wayland-protocols-1.15
- >=x11-libs/libxkbcommon-0.2.0
- media-libs/mesa[wayland]
- sys-apps/dbus
- )
- X? (
- x11-libs/libX11
- x11-libs/libXi
- x11-libs/libXxf86vm
- )
-"
-
-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 )
- wayland? (
- dev-util/wayland-scanner
- )
-"
-
-PATCHES=(
- "${FILESDIR}/${PN}-4.0.0-ocio-2.3.0.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)
- if ((${BV:0:1} < 3)) ; then
- # Add period (290 -> 2.90).
- BV=${BV:0:1}.${BV:1}
- else
- # Add period and skip the middle number (301 -> 3.1)
- BV=${BV:0:1}.${BV:2}
- fi
-}
-
-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
-
- git-r3_fetch "${ADDONS_EGIT_REPO_URI}"
- 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
- subversion_fetch ${TESTS_SVN_URL} ../lib/tests
- fi
- ASSETS_SVN_URL=https://svn.blender.org/svnroot/bf-blender/trunk/lib/assets
- subversion_fetch ${ASSETS_SVN_URL} ../lib/assets
- else
- default
- if use test; then
- #The tests are downloaded from: https://svn.blender.org/svnroot/bf-blender/tags/blender-${SLOT}-release/lib/tests
- mkdir -p lib || die
- mv "${WORKDIR}/blender-${TEST_TARBALL_VERSION}-tests/tests" lib || die
- fi
- 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|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
-
- if use test; then
- # Without this the tests will try to use /usr/bin/blender and /usr/share/blender/ to run the tests.
- sed -e "s|set(TEST_INSTALL_DIR.*|set(TEST_INSTALL_DIR ${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() {
- append-lfs-flags
- blender_get_version
-
- 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=$(usex cycles)
- -DWITH_CYCLES_CUDA_BINARIES=$(usex cycles-bin-kernels)
- -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_PATH_GUIDING=$(usex openpgl)
- -DWITH_CYCLES_STANDALONE=OFF
- -DWITH_CYCLES_STANDALONE_GUI=OFF
- -DWITH_DOC_MANPAGE=$(usex man)
- -DWITH_FFTW3=$(usex fftw)
- -DWITH_GHOST_WAYLAND=$(usex wayland)
- -DWITH_GHOST_WAYLAND_APP_ID="blender-${BV}"
- -DWITH_GHOST_WAYLAND_DBUS=$(usex wayland)
- -DWITH_GHOST_WAYLAND_DYNLOAD=OFF
- -DWITH_GHOST_WAYLAND_LIBDECOR=OFF
- -DWITH_GHOST_X11=$(usex X)
- -DWITH_GMP=$(usex gmp)
- -DWITH_GTESTS=$(usex test)
- -DWITH_HARU=$(usex pdf)
- -DWITH_HEADLESS=$($(use X || use wayland) && echo OFF || echo ON)
- -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_NANOVDB=$(usex nanovdb)
- -DWITH_OPENAL=$(usex openal)
- -DWITH_OPENCOLLADA=$(usex collada)
- -DWITH_OPENCOLORIO=$(usex color-management)
- -DWITH_OPENIMAGEDENOISE=$(usex oidn)
- -DWITH_OPENMP=$(usex openmp)
- -DWITH_OPENSUBDIV=$(usex opensubdiv)
- -DWITH_OPENVDB=$(usex openvdb)
- -DWITH_OPENVDB_BLOSC=$(usex openvdb)
- -DWITH_POTRACE=$(usex potrace)
- -DWITH_PUGIXML=$(usex pugixml)
- -DWITH_PULSEAUDIO=$(usex pulseaudio)
- -DWITH_PYTHON_INSTALL=OFF
- -DWITH_SDL=$(usex sdl)
- -DWITH_STATIC_LIBS=OFF
- -DWITH_SYSTEM_EIGEN3=ON
- -DWITH_SYSTEM_FREETYPE=ON
- -DWITH_SYSTEM_LZO=ON
- -DWITH_TBB=$(usex tbb)
- -DWITH_USD=OFF
- -DWITH_XR_OPENXR=OFF
- )
-
- if use optix; then
- mycmakeargs+=(
- -DCYCLES_RUNTIME_OPTIX_ROOT_DIR="${EPREFIX}"/opt/optix
- -DOPTIX_ROOT_DIR="${EPREFIX}"/opt/optix
- )
- 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
-
- append-flags $(usex debug '-DDEBUG' '-DNDEBUG')
-
- if tc-is-gcc ; then
- # These options only exist when GCC is detected.
- # We disable these to respect the user's choice of linker.
- mycmakeargs+=(
- -DWITH_LINKER_GOLD=OFF
- -DWITH_LINKER_LLD=OFF
- )
- fi
-
- cmake_src_configure
-}
-
-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
-
- # Sanity check that the script and datafile path is valid.
- # If they are not vaild, blender will fallback to the default path which is not what we want.
- [ -d "$BLENDER_SYSTEM_SCRIPTS" ] || die "The custom script path is invalid, fix the ebuild!"
- [ -d "$BLENDER_SYSTEM_DATAFILES" ] || die "The custom datafiles path is invalid, fix the ebuild!"
-
- 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
-
- 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
-
- if use doc; then
- # Define custom blender data/script file paths. Otherwise Blender will not be able to find them during doc building.
- # (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
-
- # 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."
-
- 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
-
- # Fix doc installdir
- docinto html
- dodoc "${CMAKE_USE_DIR}"/release/text/readme.html
- rm -r "${ED}"/usr/share/doc/blender || die
-
- python_optimize "${ED}/usr/share/blender/${BV}/scripts"
-
- mv "${ED}/usr/bin/blender-thumbnailer" "${ED}/usr/bin/blender-${BV}-thumbnailer" || die
- 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
-
- if use osl; then
- ewarn ""
- ewarn "OSL is know to cause runtime segfaults if Mesa has been linked to"
- ewarn "an other LLVM version than what OSL is linked to."
- ewarn "See https://bugs.gentoo.org/880671 for more details"
- ewarn ""
- fi
-
- if ! use python_single_target_python3_10; then
- 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 switch to"
- elog "python_single_target_python3_10 instead."
- elog "Bug: https://bugs.gentoo.org/737388"
- elog
- fi
-
- 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-9999.ebuild b/media-gfx/blender/blender-9999.ebuild
index d32731e15fef..a637534483c4 100644
--- a/media-gfx/blender/blender-9999.ebuild
+++ b/media-gfx/blender/blender-9999.ebuild
@@ -45,6 +45,8 @@ 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=
@@ -66,7 +68,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:= )
+ color-management? ( <media-libs/OpenColorIO-2.3.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] )
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
deleted file mode 100644
index e6cc4a6fa026..000000000000
--- a/media-gfx/blender/files/blender-4.0.0-ocio-2.3.0.patch
+++ /dev/null
@@ -1,110 +0,0 @@
-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] 18+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/blender/files/, media-gfx/blender/
@ 2023-05-01 15:15 Sam James
0 siblings, 0 replies; 18+ messages in thread
From: Sam James @ 2023-05-01 15:15 UTC (permalink / raw
To: gentoo-commits
commit: 66a8edbbedeeaf3de50e39676ae4bffb3b38376d
Author: Sebastian Parborg <darkdefende <AT> gmail <DOT> com>
AuthorDate: Mon May 1 09:38:26 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon May 1 15:14:21 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=66a8edbb
media-gfx/blender: Drop 2.93
Does not support python 3.11, and upstream will drop support as well in
a few months.
Signed-off-by: Sebastian Parborg <darkdefende <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>
media-gfx/blender/Manifest | 4 -
media-gfx/blender/blender-2.93.13.ebuild | 402 ---------------------
media-gfx/blender/blender-2.93.14.ebuild | 402 ---------------------
.../blender/files/blender-2.93.13-openvdb-10.patch | 107 ------
...ntern-ghost-fix-typo-in-finding-XF86VMODE.patch | 31 --
.../blender/files/blender-3.0.1-openexr.patch | 190 ----------
.../files/blender-3.0.1-openimageio-2.3.patch | 29 --
media-gfx/blender/metadata.xml | 3 -
8 files changed, 1168 deletions(-)
diff --git a/media-gfx/blender/Manifest b/media-gfx/blender/Manifest
index f1fee3592d06..0a2e6e498460 100644
--- a/media-gfx/blender/Manifest
+++ b/media-gfx/blender/Manifest
@@ -1,7 +1,3 @@
-DIST blender-2.93.0-tests.tar.bz2 286918586 BLAKE2B a2c2c2e900e401a470208e8e5d0082d45e2f8db13b45213f31808d50ae5ea330360702b8e775bdb3307eb753aa7c3264803e9e470b3fb778f8bd87272cd72513 SHA512 0e5e4c67944c4f76df62cdbaf26ba284c415675074e66685c01ec9584a544c47f616bae8fb2ff2b7e03290620d54dc1033b4b0fc617acb1232a90439e96325fe
-DIST blender-2.93.13.tar.xz 43029716 BLAKE2B ca222af581c4cddbc3e0607054ee3fd117b672550466d61bbcb608e85627ae78c816d7fb5f49134e17560fc1357de1505c3c17fc96fde1218239289c2d325055 SHA512 c94ff7f7b6521cc1521a1f0a22a5cb135114485dac78556764e25fc25bece168d96f6074959bf1521910191818785c6eac8c17164094415bd6bd7e23e307e56b
-DIST blender-2.93.14.tar.xz 43035804 BLAKE2B 72ca99143da393bb23e15a26e197c5ac45cd0bfb487b5dda617cb42f107dda0518c787294ad799c34712ee5948da81a573880cd642fc26bd1ae437b516ec41b6 SHA512 2b395a6acad808c3d2eb80355320d237fff7c0a188d1455fecd65189d7672927087ab7dcf7d07c3d541279c142846763be8dc495a2aa625c08f17ef543ba8bc5
-DIST blender-3.0.1-ffmpeg-5.0.patch.bz2 8198 BLAKE2B 2acb1e441bd17cf2d972f981358981d42742ad37656366a52b0adb52efb3f1a6cda0479e1c79d9327b51c8fd3d2c6cb291552adc7716e6a1938ac27b237186b9 SHA512 c09ca2d5a5b99652abcae827965304506e354fc6fc4d6d59c9433c8246e865a0622ddac3118009ad433292690212292a86f7e43e764583525555ca6d653da809
DIST blender-3.3.2.tar.xz 41918064 BLAKE2B 76e689eff9f1e9c1c4e8a9e000a3dec64d7340815966522acb4d827197fae51854060cdfa38104950711fed23b9c66b39011727cf673c1a3e05340a32d2e7783 SHA512 2059cb38dfb56696f80d91420f5f0d1c808b59f4cc7ea71e7ff8e00cfe1cddf8762bcb129f941de8d57c7c72403d88ba4082fca065b59eb17a6d76c2e5006778
DIST blender-3.3.3.tar.xz 41918008 BLAKE2B 6fbd959e18cab6af597a95a4aa392bdc45d53e1efaefc4c4012ce4d1233c3f1118f04833ae6e7c8a2296f127714c665e0de454f2c09887986f5e721dbae3390b SHA512 1560bee9dd770ecd56b1dd3f4b8f3b3b8ba70c4796c0118d13da54f0d8950f26b17678cf66f95f5fcf59d81931518343d401624877fed63f510e3c0ffaea6e83
DIST blender-3.3.5.tar.xz 41889880 BLAKE2B 145589da5170c760901bf1ca9e9dec8d0b05602aa975cb0e74aadbeb96f326ecd5e0f92cd329c4f70e17c9e3590cf9b1c6611e157c984acd1e9bd06134fee17e SHA512 021deb19cf5e1ccf30e41ff8635ba441d48eddcf4778a11f7c089e6b54f44197fb3679eb967d2ffce47884759b563f20dfbb9a3ee027f79ca78bc3080bd0e85f
diff --git a/media-gfx/blender/blender-2.93.13.ebuild b/media-gfx/blender/blender-2.93.13.ebuild
deleted file mode 100644
index f3da165815e3..000000000000
--- a/media-gfx/blender/blender-2.93.13.ebuild
+++ /dev/null
@@ -1,402 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_9 python3_10 )
-
-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
- # Subversion is needed for downloading unit test files
- inherit git-r3 subversion
- 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"
-
- TEST_TARBALL_VERSION=2.93.0
- SRC_URI+=" test? ( https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PN}-${TEST_TARBALL_VERSION}-tests.tar.bz2 )"
- KEYWORDS="amd64 ~arm ~arm64"
-fi
-
-SLOT="${PV%.*}"
-LICENSE="|| ( GPL-3 BL )"
-IUSE="+bullet +dds +fluid +openexr +tbb \
- alembic collada +color-management cuda +cycles \
- debug doc +embree +ffmpeg +fftw +gmp headless jack jemalloc jpeg2k \
- man ndof nls openal opencl +oidn +openimageio +openmp +opensubdiv \
- +openvdb +osl +pdf +potrace +pugixml pulseaudio sdl +sndfile 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 )
- test? ( color-management )"
-
-# 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?]
- dev-libs/lzo:2=
- $(python_gen_cond_dep '
- dev-python/cython[${PYTHON_USEDEP}]
- dev-python/numpy[${PYTHON_USEDEP}]
- dev-python/requests[${PYTHON_USEDEP}]
- ')
- media-libs/freetype:=
- media-libs/glew:*
- media-libs/libjpeg-turbo:=
- media-libs/libpng:=
- media-libs/libsamplerate
- sys-libs/zlib:=
- virtual/glu
- virtual/libintl
- 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-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] )
- fftw? ( sci-libs/fftw:3.0= )
- gmp? ( dev-libs/gmp )
- !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 )
- oidn? ( >=media-libs/oidn-1.3.0 )
- openimageio? ( >=media-libs/openimageio-2.3.12.0-r3:= )
- openexr? (
- >=dev-libs/imath-3.1.4-r2:=
- >=media-libs/openexr-3:0=
- )
- opensubdiv? ( >=media-libs/opensubdiv-3.4.0 )
- openvdb? (
- >=media-gfx/openvdb-8.2.0-r2:=
- dev-libs/c-blosc:=
- )
- osl? ( >=media-libs/osl-1.11.16.0-r3:= )
- pdf? ( media-libs/libharu )
- potrace? ( media-gfx/potrace )
- pugixml? ( dev-libs/pugixml )
- pulseaudio? ( media-sound/pulseaudio )
- 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}"/${PN}-2.93.13-openvdb-10.patch
- "${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
- "${WORKDIR}"/${PN}-3.0.1-ffmpeg-5.0.patch
- "${FILESDIR}"/${PN}-3.3.0-fix-build-with-boost-1.81.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)
- if ((${BV:0:1} < 3)) ; then
- # Add period (290 -> 2.90).
- BV=${BV:0:1}.${BV:1}
- else
- # Add period and strip last number (300 -> 3.0)
- BV=${BV:0:1}.${BV:1:1}
- fi
-}
-
-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() {
- 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=$(usex cycles)
- -DWITH_CYCLES_DEVICE_CUDA=$(usex cuda TRUE FALSE)
- -DWITH_CYCLES_DEVICE_OPENCL=$(usex opencl)
- -DWITH_CYCLES_EMBREE=$(usex embree)
- -DWITH_CYCLES_OSL=$(usex osl)
- -DWITH_CYCLES_STANDALONE=OFF
- -DWITH_CYCLES_STANDALONE_GUI=OFF
- -DWITH_DOC_MANPAGE=$(usex man)
- -DWITH_FFTW3=$(usex fftw)
- -DWITH_GMP=$(usex gmp)
- -DWITH_GTESTS=$(usex test)
- -DWITH_HARU=$(usex pdf)
- -DWITH_HEADLESS=$(usex headless)
- -DWITH_INSTALL_PORTABLE=OFF
- -DWITH_IMAGE_DDS=$(usex dds)
- -DOPENEXR_ROOT_DIR="${ESYSROOT}/usr/$(get_libdir)/OpenEXR-3"
- -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_NANOVDB=OFF
- -DWITH_OPENAL=$(usex openal)
- -DWITH_OPENCOLLADA=$(usex collada)
- -DWITH_OPENCOLORIO=$(usex color-management)
- -DWITH_OPENIMAGEDENOISE=$(usex oidn)
- -DWITH_OPENIMAGEIO=$(usex openimageio)
- -DWITH_OPENMP=$(usex openmp)
- -DWITH_OPENSUBDIV=$(usex opensubdiv)
- -DWITH_OPENVDB=$(usex openvdb)
- -DWITH_OPENVDB_BLOSC=$(usex openvdb)
- -DWITH_POTRACE=$(usex potrace)
- -DWITH_PUGIXML=$(usex pugixml)
- -DWITH_PULSEAUDIO=$(usex pulseaudio)
- -DWITH_PYTHON_INSTALL=OFF
- -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
- -DWITH_XR_OPENXR=OFF
- )
- append-flags $(usex debug '-DDEBUG' '-DNDEBUG')
-
- if tc-is-gcc ; then
- # These options only exist when GCC is detected.
- # We disable these to respect the user's choice of linker.
- mycmakeargs+=(
- -DWITH_LINKER_GOLD=OFF
- -DWITH_LINKER_LLD=OFF
- )
- fi
-
- cmake_src_configure
-}
-
-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
-
- 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
-
- 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
-
- if use doc; then
- # Define custom blender data/script file paths. Otherwise Blender will not be able to find them during doc building.
- # (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
-
- # 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."
-
- 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
-
- # 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
-
- if ! use python_single_target_python3_9; then
- 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 switch to"
- elog "python_single_target_python3_9 instead."
- elog "Bug: https://bugs.gentoo.org/737388"
- elog
- fi
-
- 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.93.14.ebuild b/media-gfx/blender/blender-2.93.14.ebuild
deleted file mode 100644
index e5ed153b5002..000000000000
--- a/media-gfx/blender/blender-2.93.14.ebuild
+++ /dev/null
@@ -1,402 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_9 python3_10 )
-
-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
- # Subversion is needed for downloading unit test files
- inherit git-r3 subversion
- 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"
-
- TEST_TARBALL_VERSION=2.93.0
- SRC_URI+=" test? ( https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PN}-${TEST_TARBALL_VERSION}-tests.tar.bz2 )"
- KEYWORDS="~amd64 ~arm ~arm64"
-fi
-
-SLOT="${PV%.*}"
-LICENSE="|| ( GPL-3 BL )"
-IUSE="+bullet +dds +fluid +openexr +tbb \
- alembic collada +color-management cuda +cycles \
- debug doc +embree +ffmpeg +fftw +gmp headless jack jemalloc jpeg2k \
- man ndof nls openal opencl +oidn +openimageio +openmp +opensubdiv \
- +openvdb +osl +pdf +potrace +pugixml pulseaudio sdl +sndfile 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 )
- test? ( color-management )"
-
-# 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?]
- dev-libs/lzo:2=
- $(python_gen_cond_dep '
- dev-python/cython[${PYTHON_USEDEP}]
- dev-python/numpy[${PYTHON_USEDEP}]
- dev-python/requests[${PYTHON_USEDEP}]
- ')
- media-libs/freetype:=
- media-libs/glew:*
- media-libs/libjpeg-turbo:=
- media-libs/libpng:=
- media-libs/libsamplerate
- sys-libs/zlib:=
- virtual/glu
- virtual/libintl
- 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-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] )
- fftw? ( sci-libs/fftw:3.0= )
- gmp? ( dev-libs/gmp )
- !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 )
- oidn? ( >=media-libs/oidn-1.3.0 )
- openimageio? ( >=media-libs/openimageio-2.3.12.0-r3:= )
- openexr? (
- >=dev-libs/imath-3.1.4-r2:=
- >=media-libs/openexr-3:0=
- )
- opensubdiv? ( >=media-libs/opensubdiv-3.4.0 )
- openvdb? (
- >=media-gfx/openvdb-8.2.0-r2:=
- dev-libs/c-blosc:=
- )
- osl? ( >=media-libs/osl-1.11.16.0-r3:= )
- pdf? ( media-libs/libharu )
- potrace? ( media-gfx/potrace )
- pugixml? ( dev-libs/pugixml )
- pulseaudio? ( media-sound/pulseaudio )
- 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}"/${PN}-2.93.13-openvdb-10.patch
- "${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
- "${WORKDIR}"/${PN}-3.0.1-ffmpeg-5.0.patch
- "${FILESDIR}"/${PN}-3.3.0-fix-build-with-boost-1.81.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)
- if ((${BV:0:1} < 3)) ; then
- # Add period (290 -> 2.90).
- BV=${BV:0:1}.${BV:1}
- else
- # Add period and strip last number (300 -> 3.0)
- BV=${BV:0:1}.${BV:1:1}
- fi
-}
-
-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() {
- 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=$(usex cycles)
- -DWITH_CYCLES_DEVICE_CUDA=$(usex cuda TRUE FALSE)
- -DWITH_CYCLES_DEVICE_OPENCL=$(usex opencl)
- -DWITH_CYCLES_EMBREE=$(usex embree)
- -DWITH_CYCLES_OSL=$(usex osl)
- -DWITH_CYCLES_STANDALONE=OFF
- -DWITH_CYCLES_STANDALONE_GUI=OFF
- -DWITH_DOC_MANPAGE=$(usex man)
- -DWITH_FFTW3=$(usex fftw)
- -DWITH_GMP=$(usex gmp)
- -DWITH_GTESTS=$(usex test)
- -DWITH_HARU=$(usex pdf)
- -DWITH_HEADLESS=$(usex headless)
- -DWITH_INSTALL_PORTABLE=OFF
- -DWITH_IMAGE_DDS=$(usex dds)
- -DOPENEXR_ROOT_DIR="${ESYSROOT}/usr/$(get_libdir)/OpenEXR-3"
- -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_NANOVDB=OFF
- -DWITH_OPENAL=$(usex openal)
- -DWITH_OPENCOLLADA=$(usex collada)
- -DWITH_OPENCOLORIO=$(usex color-management)
- -DWITH_OPENIMAGEDENOISE=$(usex oidn)
- -DWITH_OPENIMAGEIO=$(usex openimageio)
- -DWITH_OPENMP=$(usex openmp)
- -DWITH_OPENSUBDIV=$(usex opensubdiv)
- -DWITH_OPENVDB=$(usex openvdb)
- -DWITH_OPENVDB_BLOSC=$(usex openvdb)
- -DWITH_POTRACE=$(usex potrace)
- -DWITH_PUGIXML=$(usex pugixml)
- -DWITH_PULSEAUDIO=$(usex pulseaudio)
- -DWITH_PYTHON_INSTALL=OFF
- -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
- -DWITH_XR_OPENXR=OFF
- )
- append-flags $(usex debug '-DDEBUG' '-DNDEBUG')
-
- if tc-is-gcc ; then
- # These options only exist when GCC is detected.
- # We disable these to respect the user's choice of linker.
- mycmakeargs+=(
- -DWITH_LINKER_GOLD=OFF
- -DWITH_LINKER_LLD=OFF
- )
- fi
-
- cmake_src_configure
-}
-
-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
-
- 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
-
- 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
-
- if use doc; then
- # Define custom blender data/script file paths. Otherwise Blender will not be able to find them during doc building.
- # (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
-
- # 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."
-
- 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
-
- # 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
-
- if ! use python_single_target_python3_9; then
- 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 switch to"
- elog "python_single_target_python3_9 instead."
- elog "Bug: https://bugs.gentoo.org/737388"
- elog
- fi
-
- 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.93.13-openvdb-10.patch b/media-gfx/blender/files/blender-2.93.13-openvdb-10.patch
deleted file mode 100644
index 42db25179cdc..000000000000
--- a/media-gfx/blender/files/blender-2.93.13-openvdb-10.patch
+++ /dev/null
@@ -1,107 +0,0 @@
---- a/intern/cycles/render/volume.cpp
-+++ b/intern/cycles/render/volume.cpp
-@@ -259,7 +259,8 @@ void VolumeMeshBuilder::add_grid(openvdb::GridBase::ConstPtr grid,
- void VolumeMeshBuilder::add_padding(int pad_size)
- {
- #ifdef WITH_OPENVDB
-- openvdb::tools::dilateVoxels(topology_grid->tree(), pad_size);
-+ openvdb::tools::dilateActiveValues(
-+ topology_grid->tree(), pad_size, openvdb::tools::NN_FACE, openvdb::tools::IGNORE_TILES);
- #else
- (void)pad_size;
- #endif
-diff --git a/source/blender/blenkernel/BKE_volume.h b/source/blender/blenkernel/BKE_volume.h
-index 8b42de7303d..068cdf87d16 100644
---- a/source/blender/blenkernel/BKE_volume.h
-+++ b/source/blender/blenkernel/BKE_volume.h
-@@ -104,7 +104,6 @@ typedef enum VolumeGridType {
- VOLUME_GRID_INT,
- VOLUME_GRID_INT64,
- VOLUME_GRID_MASK,
-- VOLUME_GRID_STRING,
- VOLUME_GRID_VECTOR_FLOAT,
- VOLUME_GRID_VECTOR_DOUBLE,
- VOLUME_GRID_VECTOR_INT,
-@@ -218,8 +217,6 @@ auto BKE_volume_grid_type_operation(const VolumeGridType grid_type, OpType &&op)
- return op.template operator()<openvdb::Vec3IGrid>();
- case VOLUME_GRID_VECTOR_DOUBLE:
- return op.template operator()<openvdb::Vec3dGrid>();
-- case VOLUME_GRID_STRING:
-- return op.template operator()<openvdb::StringGrid>();
- case VOLUME_GRID_MASK:
- return op.template operator()<openvdb::MaskGrid>();
- case VOLUME_GRID_POINTS:
-diff --git a/source/blender/blenkernel/intern/volume.cc b/source/blender/blenkernel/intern/volume.cc
-index 39a7725bfa3..a0e2d1a83cd 100644
---- a/source/blender/blenkernel/intern/volume.cc
-+++ b/source/blender/blenkernel/intern/volume.cc
-@@ -1345,9 +1345,6 @@ VolumeGridType BKE_volume_grid_type_openvdb(const openvdb::GridBase &grid)
- if (grid.isType<openvdb::Vec3dGrid>()) {
- return VOLUME_GRID_VECTOR_DOUBLE;
- }
-- if (grid.isType<openvdb::StringGrid>()) {
-- return VOLUME_GRID_STRING;
-- }
- if (grid.isType<openvdb::MaskGrid>()) {
- return VOLUME_GRID_MASK;
- }
-@@ -1383,7 +1380,6 @@ int BKE_volume_grid_channels(const VolumeGrid *grid)
- case VOLUME_GRID_VECTOR_DOUBLE:
- case VOLUME_GRID_VECTOR_INT:
- return 3;
-- case VOLUME_GRID_STRING:
- case VOLUME_GRID_POINTS:
- case VOLUME_GRID_UNKNOWN:
- return 0;
-@@ -1624,13 +1620,8 @@ struct CreateGridWithChangedResolutionOp {
-
- template<typename GridType> typename openvdb::GridBase::Ptr operator()()
- {
-- if constexpr (std::is_same_v<GridType, openvdb::StringGrid>) {
-- return {};
-- }
-- else {
-- return create_grid_with_changed_resolution(static_cast<const GridType &>(grid),
-- resolution_factor);
-- }
-+ return create_grid_with_changed_resolution(static_cast<const GridType &>(grid),
-+ resolution_factor);
- }
- };
-
-diff --git a/source/blender/blenkernel/intern/volume_render.cc b/source/blender/blenkernel/intern/volume_render.cc
-index c0a205b5673..7ccf04df941 100644
---- a/source/blender/blenkernel/intern/volume_render.cc
-+++ b/source/blender/blenkernel/intern/volume_render.cc
-@@ -77,7 +77,6 @@ static void extract_dense_float_voxels(const VolumeGridType grid_type,
- case VOLUME_GRID_VECTOR_INT:
- return extract_dense_voxels<openvdb::Vec3IGrid, openvdb::Vec3f>(
- grid, bbox, reinterpret_cast<openvdb::Vec3f *>(r_voxels));
-- case VOLUME_GRID_STRING:
- case VOLUME_GRID_POINTS:
- case VOLUME_GRID_UNKNOWN:
- /* Zero channels to copy. */
-diff --git a/source/blender/makesrna/intern/rna_volume.c b/source/blender/makesrna/intern/rna_volume.c
-index 3100c1195f4..2854f02a4d4 100644
---- a/source/blender/makesrna/intern/rna_volume.c
-+++ b/source/blender/makesrna/intern/rna_volume.c
-@@ -241,7 +241,6 @@
- {VOLUME_GRID_INT, "INT", 0, "Integer", "32-bit integer"},
- {VOLUME_GRID_INT64, "INT64", 0, "Integer 64-bit", "64-bit integer"},
- {VOLUME_GRID_MASK, "MASK", 0, "Mask", "No data, boolean mask of active voxels"},
-- {VOLUME_GRID_STRING, "STRING", 0, "String", "Text string"},
- {VOLUME_GRID_VECTOR_FLOAT, "VECTOR_FLOAT", 0, "Float Vector", "3D float vector"},
- {VOLUME_GRID_VECTOR_DOUBLE, "VECTOR_DOUBLE", 0, "Double Vector", "3D double vector"},
- {VOLUME_GRID_VECTOR_INT, "VECTOR_INT", 0, "Integer Vector", "3D integer vector"},
-diff --git a/source/blender/modifiers/intern/MOD_volume_displace.cc b/source/blender/modifiers/intern/MOD_volume_displace.cc
-index af3a502162d..e2d7f445731 100644
---- a/source/blender/modifiers/intern/MOD_volume_displace.cc
-+++ b/source/blender/modifiers/intern/MOD_volume_displace.cc
-@@ -201,7 +201,6 @@
- template<typename GridType> void operator()()
- {
- if constexpr (std::is_same_v<GridType, openvdb::points::PointDataGrid> ||
-- std::is_same_v<GridType, openvdb::StringGrid> ||
- std::is_same_v<GridType, openvdb::MaskGrid>) {
- /* We don't support displacing these grid types yet. */
- return;
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
deleted file mode 100644
index 51d8ded23366..000000000000
--- a/media-gfx/blender/files/blender-3.0.0-intern-ghost-fix-typo-in-finding-XF86VMODE.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-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
-
diff --git a/media-gfx/blender/files/blender-3.0.1-openexr.patch b/media-gfx/blender/files/blender-3.0.1-openexr.patch
deleted file mode 100644
index 435498cd8a3d..000000000000
--- a/media-gfx/blender/files/blender-3.0.1-openexr.patch
+++ /dev/null
@@ -1,190 +0,0 @@
-https://src.fedoraproject.org/rpms/blender/blob/rawhide/f/blender-openexr.patch
-
---- 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/Iex.h>
- #include <ImathBox.h>
--#include <ImfArray.h>
--#include <ImfChannelList.h>
--#include <ImfCompression.h>
--#include <ImfCompressionAttribute.h>
--#include <ImfIO.h>
--#include <ImfInputFile.h>
--#include <ImfOutputFile.h>
--#include <ImfPixelType.h>
--#include <ImfStandardAttributes.h>
--#include <ImfStringAttribute.h>
--#include <ImfVersion.h>
--#include <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>
--#include <ImfMultiPartInputFile.h>
--#include <ImfMultiPartOutputFile.h>
--#include <ImfMultiView.h>
--#include <ImfOutputPart.h>
--#include <ImfPartHelper.h>
--#include <ImfPartType.h>
--#include <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 */
-
-@@ -131,12 +132,12 @@ class IMemStream : public Imf::IStream {
- return false;
- }
-
-- Int64 tellg() override
-+ uint64_t tellg() override
- {
- return _exrpos;
- }
-
-- void seekg(Int64 pos) override
-+ void seekg(uint64_t pos) override
- {
- _exrpos = pos;
- }
-@@ -146,8 +147,8 @@ class IMemStream : public Imf::IStream {
- }
-
- private:
-- Int64 _exrpos;
-- Int64 _exrsize;
-+ uint64_t _exrpos;
-+ uint64_t _exrsize;
- unsigned char *_exrbuf;
- };
-
-@@ -182,12 +183,12 @@ class IFileStream : public Imf::IStream
- return check_error();
- }
-
-- Int64 tellg() override
-+ uint64_t tellg() override
- {
- return std::streamoff(ifs.tellg());
- }
-
-- void seekg(Int64 pos) override
-+ void seekg(uint64_t pos) override
- {
- ifs.seekg(pos);
- check_error();
-@@ -231,19 +232,19 @@ class OMemStream : public OStream {
- ibuf->encodedsize += n;
- }
-
-- Int64 tellp() override
-+ uint64_t tellp() override
- {
- return offset;
- }
-
-- void seekp(Int64 pos) override
-+ void seekp(uint64_t pos) override
- {
- offset = pos;
- ensure_size(offset);
- }
-
- private:
-- void ensure_size(Int64 size)
-+ void ensure_size(uint64_t size)
- {
- /* if buffer is too small increase it. */
- while (size > ibuf->encodedbuffersize) {
-@@ -254,7 +255,7 @@ class OMemStream : public OStream {
- }
-
- ImBuf *ibuf;
-- Int64 offset;
-+ uint64_t offset;
- };
-
- /* File Output Stream */
-@@ -284,12 +285,12 @@ class OFileStream : public OStream {
- check_error();
- }
-
-- Int64 tellp() override
-+ uint64_t tellp() override
- {
- return std::streamoff(ofs.tellp());
- }
-
-- void seekp(Int64 pos) override
-+ void seekp(uint64_t pos) override
- {
- 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(
diff --git a/media-gfx/blender/files/blender-3.0.1-openimageio-2.3.patch b/media-gfx/blender/files/blender-3.0.1-openimageio-2.3.patch
deleted file mode 100644
index 3ba3000037d0..000000000000
--- a/media-gfx/blender/files/blender-3.0.1-openimageio-2.3.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-https://src.fedoraproject.org/rpms/blender/raw/rawhide/f/blender-oiio-2.3.patch
-https://bugs.gentoo.org/831357
---- a/build_files/cmake/Modules/FindOpenImageIO.cmake
-+++ b/build_files/cmake/Modules/FindOpenImageIO.cmake
-@@ -48,6 +48,15 @@ FIND_LIBRARY(OPENIMAGEIO_LIBRARY
- lib64 lib
- )
-
-+FIND_LIBRARY(OPENIMAGEIO_UTIL_LIBRARY
-+ NAMES
-+ OpenImageIO_Util
-+ HINTS
-+ ${_openimageio_SEARCH_DIRS}
-+ PATH_SUFFIXES
-+ lib64 lib
-+ )
-+
- FIND_FILE(OPENIMAGEIO_IDIFF
- NAMES
- idiff
-@@ -64,7 +73,7 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenIm
- OPENIMAGEIO_LIBRARY OPENIMAGEIO_INCLUDE_DIR)
-
- IF(OPENIMAGEIO_FOUND)
-- SET(OPENIMAGEIO_LIBRARIES ${OPENIMAGEIO_LIBRARY})
-+ SET(OPENIMAGEIO_LIBRARIES ${OPENIMAGEIO_LIBRARY} ${OPENIMAGEIO_UTIL_LIBRARY})
- SET(OPENIMAGEIO_INCLUDE_DIRS ${OPENIMAGEIO_INCLUDE_DIR})
- IF(EXISTS ${OPENIMAGEIO_INCLUDE_DIR}/OpenImageIO/pugixml.hpp)
- SET(OPENIMAGEIO_PUGIXML_FOUND TRUE)
diff --git a/media-gfx/blender/metadata.xml b/media-gfx/blender/metadata.xml
index 5107673c50f9..f57d99a79c61 100644
--- a/media-gfx/blender/metadata.xml
+++ b/media-gfx/blender/metadata.xml
@@ -61,9 +61,6 @@
Enable NDOF input devices (SpaceNavigator and friends).
</flag>
<flag name="oidn">Enable OpenImageDenoiser Support</flag>
- <flag name="opencl">
- Allow OpenCL Graphics Acceleration. This may
- require extra graphics card drivers.</flag>
<flag name="openimageio">Enable OpenImageIO Support</flag>
<flag name="openpgl">Enable path guiding support in Cycles</flag>
<flag name="opensubdiv">
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/blender/files/, media-gfx/blender/
@ 2023-02-17 5:29 Sam James
0 siblings, 0 replies; 18+ messages in thread
From: Sam James @ 2023-02-17 5:29 UTC (permalink / raw
To: gentoo-commits
commit: 6598e6d9c4b5e4474e1c31b0603da99f0cfb5e2d
Author: Sebastian Parborg <darkdefende <AT> gmail <DOT> com>
AuthorDate: Fri Feb 3 11:08:24 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Feb 17 05:20:36 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6598e6d9
media-gfx/blender: Fix building 2.93 with openvdb-10
Closes: https://bugs.gentoo.org/892924
Signed-off-by: Sebastian Parborg <darkdefende <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>
media-gfx/blender/blender-2.93.13.ebuild | 1 +
.../blender/files/blender-2.93.13-openvdb-10.patch | 107 +++++++++++++++++++++
2 files changed, 108 insertions(+)
diff --git a/media-gfx/blender/blender-2.93.13.ebuild b/media-gfx/blender/blender-2.93.13.ebuild
index 244f50a0e39f..60c8f2eacc38 100644
--- a/media-gfx/blender/blender-2.93.13.ebuild
+++ b/media-gfx/blender/blender-2.93.13.ebuild
@@ -126,6 +126,7 @@ BDEPEND="
"
PATCHES=(
+ "${FILESDIR}"/${PN}-2.93.13-openvdb-10.patch
"${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
diff --git a/media-gfx/blender/files/blender-2.93.13-openvdb-10.patch b/media-gfx/blender/files/blender-2.93.13-openvdb-10.patch
new file mode 100644
index 000000000000..42db25179cdc
--- /dev/null
+++ b/media-gfx/blender/files/blender-2.93.13-openvdb-10.patch
@@ -0,0 +1,107 @@
+--- a/intern/cycles/render/volume.cpp
++++ b/intern/cycles/render/volume.cpp
+@@ -259,7 +259,8 @@ void VolumeMeshBuilder::add_grid(openvdb::GridBase::ConstPtr grid,
+ void VolumeMeshBuilder::add_padding(int pad_size)
+ {
+ #ifdef WITH_OPENVDB
+- openvdb::tools::dilateVoxels(topology_grid->tree(), pad_size);
++ openvdb::tools::dilateActiveValues(
++ topology_grid->tree(), pad_size, openvdb::tools::NN_FACE, openvdb::tools::IGNORE_TILES);
+ #else
+ (void)pad_size;
+ #endif
+diff --git a/source/blender/blenkernel/BKE_volume.h b/source/blender/blenkernel/BKE_volume.h
+index 8b42de7303d..068cdf87d16 100644
+--- a/source/blender/blenkernel/BKE_volume.h
++++ b/source/blender/blenkernel/BKE_volume.h
+@@ -104,7 +104,6 @@ typedef enum VolumeGridType {
+ VOLUME_GRID_INT,
+ VOLUME_GRID_INT64,
+ VOLUME_GRID_MASK,
+- VOLUME_GRID_STRING,
+ VOLUME_GRID_VECTOR_FLOAT,
+ VOLUME_GRID_VECTOR_DOUBLE,
+ VOLUME_GRID_VECTOR_INT,
+@@ -218,8 +217,6 @@ auto BKE_volume_grid_type_operation(const VolumeGridType grid_type, OpType &&op)
+ return op.template operator()<openvdb::Vec3IGrid>();
+ case VOLUME_GRID_VECTOR_DOUBLE:
+ return op.template operator()<openvdb::Vec3dGrid>();
+- case VOLUME_GRID_STRING:
+- return op.template operator()<openvdb::StringGrid>();
+ case VOLUME_GRID_MASK:
+ return op.template operator()<openvdb::MaskGrid>();
+ case VOLUME_GRID_POINTS:
+diff --git a/source/blender/blenkernel/intern/volume.cc b/source/blender/blenkernel/intern/volume.cc
+index 39a7725bfa3..a0e2d1a83cd 100644
+--- a/source/blender/blenkernel/intern/volume.cc
++++ b/source/blender/blenkernel/intern/volume.cc
+@@ -1345,9 +1345,6 @@ VolumeGridType BKE_volume_grid_type_openvdb(const openvdb::GridBase &grid)
+ if (grid.isType<openvdb::Vec3dGrid>()) {
+ return VOLUME_GRID_VECTOR_DOUBLE;
+ }
+- if (grid.isType<openvdb::StringGrid>()) {
+- return VOLUME_GRID_STRING;
+- }
+ if (grid.isType<openvdb::MaskGrid>()) {
+ return VOLUME_GRID_MASK;
+ }
+@@ -1383,7 +1380,6 @@ int BKE_volume_grid_channels(const VolumeGrid *grid)
+ case VOLUME_GRID_VECTOR_DOUBLE:
+ case VOLUME_GRID_VECTOR_INT:
+ return 3;
+- case VOLUME_GRID_STRING:
+ case VOLUME_GRID_POINTS:
+ case VOLUME_GRID_UNKNOWN:
+ return 0;
+@@ -1624,13 +1620,8 @@ struct CreateGridWithChangedResolutionOp {
+
+ template<typename GridType> typename openvdb::GridBase::Ptr operator()()
+ {
+- if constexpr (std::is_same_v<GridType, openvdb::StringGrid>) {
+- return {};
+- }
+- else {
+- return create_grid_with_changed_resolution(static_cast<const GridType &>(grid),
+- resolution_factor);
+- }
++ return create_grid_with_changed_resolution(static_cast<const GridType &>(grid),
++ resolution_factor);
+ }
+ };
+
+diff --git a/source/blender/blenkernel/intern/volume_render.cc b/source/blender/blenkernel/intern/volume_render.cc
+index c0a205b5673..7ccf04df941 100644
+--- a/source/blender/blenkernel/intern/volume_render.cc
++++ b/source/blender/blenkernel/intern/volume_render.cc
+@@ -77,7 +77,6 @@ static void extract_dense_float_voxels(const VolumeGridType grid_type,
+ case VOLUME_GRID_VECTOR_INT:
+ return extract_dense_voxels<openvdb::Vec3IGrid, openvdb::Vec3f>(
+ grid, bbox, reinterpret_cast<openvdb::Vec3f *>(r_voxels));
+- case VOLUME_GRID_STRING:
+ case VOLUME_GRID_POINTS:
+ case VOLUME_GRID_UNKNOWN:
+ /* Zero channels to copy. */
+diff --git a/source/blender/makesrna/intern/rna_volume.c b/source/blender/makesrna/intern/rna_volume.c
+index 3100c1195f4..2854f02a4d4 100644
+--- a/source/blender/makesrna/intern/rna_volume.c
++++ b/source/blender/makesrna/intern/rna_volume.c
+@@ -241,7 +241,6 @@
+ {VOLUME_GRID_INT, "INT", 0, "Integer", "32-bit integer"},
+ {VOLUME_GRID_INT64, "INT64", 0, "Integer 64-bit", "64-bit integer"},
+ {VOLUME_GRID_MASK, "MASK", 0, "Mask", "No data, boolean mask of active voxels"},
+- {VOLUME_GRID_STRING, "STRING", 0, "String", "Text string"},
+ {VOLUME_GRID_VECTOR_FLOAT, "VECTOR_FLOAT", 0, "Float Vector", "3D float vector"},
+ {VOLUME_GRID_VECTOR_DOUBLE, "VECTOR_DOUBLE", 0, "Double Vector", "3D double vector"},
+ {VOLUME_GRID_VECTOR_INT, "VECTOR_INT", 0, "Integer Vector", "3D integer vector"},
+diff --git a/source/blender/modifiers/intern/MOD_volume_displace.cc b/source/blender/modifiers/intern/MOD_volume_displace.cc
+index af3a502162d..e2d7f445731 100644
+--- a/source/blender/modifiers/intern/MOD_volume_displace.cc
++++ b/source/blender/modifiers/intern/MOD_volume_displace.cc
+@@ -201,7 +201,6 @@
+ template<typename GridType> void operator()()
+ {
+ if constexpr (std::is_same_v<GridType, openvdb::points::PointDataGrid> ||
+- std::is_same_v<GridType, openvdb::StringGrid> ||
+ std::is_same_v<GridType, openvdb::MaskGrid>) {
+ /* We don't support displacing these grid types yet. */
+ return;
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/blender/files/, media-gfx/blender/
@ 2022-12-20 10:53 Sam James
0 siblings, 0 replies; 18+ messages in thread
From: Sam James @ 2022-12-20 10:53 UTC (permalink / raw
To: gentoo-commits
commit: c6f63d6d4100e9bdc95f4e9c6804335e124ac6bd
Author: Christophe Lermytte <gentoo <AT> lermytte <DOT> be>
AuthorDate: Mon Dec 19 13:57:33 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Dec 20 10:53:10 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c6f63d6d
media-gfx/blender: fix build with boost-1.81
Patch as suggested by the compiler:
"intern/locale/boost_locale_wrapper.cpp:12:1: note: ‘std::cout’ is defined
in header ‘<iostream>’; did you forget to ‘#include <iostream>’?"
Signed-off-by: Christophe Lermytte <gentoo <AT> lermytte.be>
Closes: https://bugs.gentoo.org/887059
Closes: https://github.com/gentoo/gentoo/pull/28713
Signed-off-by: Sam James <sam <AT> gentoo.org>
media-gfx/blender/blender-3.3.0-r1.ebuild | 1 +
.../files/blender-3.3.0-fix-build-with-boost-1.81.patch | 17 +++++++++++++++++
2 files changed, 18 insertions(+)
diff --git a/media-gfx/blender/blender-3.3.0-r1.ebuild b/media-gfx/blender/blender-3.3.0-r1.ebuild
index f6a12a88c2fc..6b3e2ff54d0a 100644
--- a/media-gfx/blender/blender-3.3.0-r1.ebuild
+++ b/media-gfx/blender/blender-3.3.0-r1.ebuild
@@ -130,6 +130,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-3.2.2-support-building-with-musl-libc.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
+ "${FILESDIR}"/${PN}-3.3.0-fix-build-with-boost-1.81.patch
)
blender_check_requirements() {
diff --git a/media-gfx/blender/files/blender-3.3.0-fix-build-with-boost-1.81.patch b/media-gfx/blender/files/blender-3.3.0-fix-build-with-boost-1.81.patch
new file mode 100644
index 000000000000..3a544811e484
--- /dev/null
+++ b/media-gfx/blender/files/blender-3.3.0-fix-build-with-boost-1.81.patch
@@ -0,0 +1,17 @@
+https://bugs.gentoo.org/887059
+
+Adding include as suggested by the compiler:
+
+"intern/locale/boost_locale_wrapper.cpp:12:1: note: ‘std::cout’ is defined
+in header ‘<iostream>’; did you forget to ‘#include <iostream>’?"
+
+--- a/intern/locale/boost_locale_wrapper.cpp
++++ b/intern/locale/boost_locale_wrapper.cpp
+@@ -9,6 +9,7 @@
+ #include <stdio.h>
+
+ #include "boost_locale_wrapper.h"
++#include <iostream>
+
+ static std::string messages_path;
+ static std::string default_domain;
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/blender/files/, media-gfx/blender/
@ 2022-09-01 2:06 Sam James
0 siblings, 0 replies; 18+ messages in thread
From: Sam James @ 2022-09-01 2:06 UTC (permalink / raw
To: gentoo-commits
commit: 07f1954e0dd0fb941be3396f15257793f791b23a
Author: brahmajit das <listout <AT> protonmail <DOT> com>
AuthorDate: Tue Aug 23 15:39:17 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Sep 1 02:01:54 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=07f1954e
media-gfx/blender: Upstream musl libc fixes backport
These are some of the patch that I submitted upstream and have been
accepted. They will be a part of next blender release. However, this PR
is a backport of those fixes for blender 3.2.2.
Please refer:
https://github.com/blender/blender/commit/f197b1a1f1bbc0334310fb1c911327246767a1a3, and
https://github.com/blender/blender/commit/7be7280c5710f7831789cdde140d010722be9068
Closes: https://bugs.gentoo.org/739474
Signed-off-by: brahmajit das <listout <AT> protonmail.com>
Closes: https://github.com/gentoo/gentoo/pull/26860
Signed-off-by: Sam James <sam <AT> gentoo.org>
media-gfx/blender/blender-3.2.2.ebuild | 5 +
.../files/blender-3.2.2-musl-glibc-prereq.patch | 27 ++++
...der-3.2.2-support-building-with-musl-libc.patch | 177 +++++++++++++++++++++
3 files changed, 209 insertions(+)
diff --git a/media-gfx/blender/blender-3.2.2.ebuild b/media-gfx/blender/blender-3.2.2.ebuild
index 8c82138b1e5a..70024e231bf6 100644
--- a/media-gfx/blender/blender-3.2.2.ebuild
+++ b/media-gfx/blender/blender-3.2.2.ebuild
@@ -123,6 +123,11 @@ BDEPEND="
nls? ( sys-devel/gettext )
"
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.2.2-support-building-with-musl-libc.patch
+ "${FILESDIR}"/${PN}-3.2.2-musl-glibc-prereq.patch
+)
+
blender_check_requirements() {
[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
diff --git a/media-gfx/blender/files/blender-3.2.2-musl-glibc-prereq.patch b/media-gfx/blender/files/blender-3.2.2-musl-glibc-prereq.patch
new file mode 100644
index 000000000000..a572f25788de
--- /dev/null
+++ b/media-gfx/blender/files/blender-3.2.2-musl-glibc-prereq.patch
@@ -0,0 +1,27 @@
+Fix build error in libc_compat when using musl libc
+
+Checking for the existence of and using __GLIBC_PREREQ can't be done in the
+same conditional.
+
+Please refer: https://github.com/blender/blender/commit/7be7280c5710f7831789cdde140d010722be9068
+--- a/intern/libc_compat/libc_compat.c
++++ b/intern/libc_compat/libc_compat.c
+@@ -13,7 +13,8 @@
+ # include <features.h>
+ # include <math.h>
+
+-# if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 31)
++# if defined(__GLIBC_PREREQ)
++# if __GLIBC_PREREQ(2, 31)
+
+ double __exp_finite(double x);
+ double __exp2_finite(double x);
+@@ -112,5 +113,6 @@ float __powf_finite(float x, float y)
+ return powf(x, y);
+ }
+
+-# endif /* __GLIBC_PREREQ */
+-#endif /* __linux__ */
++# endif /* __GLIBC_PREREQ(2, 31) */
++# endif /* __GLIBC_PREREQ */
++#endif /* __linux__ */
diff --git a/media-gfx/blender/files/blender-3.2.2-support-building-with-musl-libc.patch b/media-gfx/blender/files/blender-3.2.2-support-building-with-musl-libc.patch
new file mode 100644
index 000000000000..fb3f2584f0fe
--- /dev/null
+++ b/media-gfx/blender/files/blender-3.2.2-support-building-with-musl-libc.patch
@@ -0,0 +1,177 @@
+CMake: support building with musl libc
+
+Instead of using macros like GLIBC we can use the CMake build
+systems internal functions to check if some header or functions are
+present on the running system's libc.
+
+Add ./build_files/cmake/have_features.cmake to add checks for
+platform features which can be used to set defines for source
+files that require them.
+
+Please refer: https://github.com/blender/blender/commit/f197b1a1f1bbc0334310fb1c911327246767a1a3
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -112,6 +112,11 @@ blender_project_hack_post()
+
+ enable_testing()
+
++#-----------------------------------------------------------------------------
++# Test compiler/library features.
++
++include(build_files/cmake/have_features.cmake)
++
+ #-----------------------------------------------------------------------------
+ # Redirect output files
+
+--- /dev/null
++++ b/build_files/cmake/have_features.cmake
+@@ -0,0 +1,33 @@
++# SPDX-License-Identifier: GPL-2.0-or-later
++# Copyright 2022 Blender Foundation. All rights reserved.
++
++# This file is used to test the system for headers & symbols.
++# Variables should use the `HAVE_` prefix.
++# Defines should use the same name as the CMAKE variable.
++
++include(CheckSymbolExists)
++
++# Used for: `intern/guardedalloc/intern/mallocn_intern.h`.
++# Function `malloc_stats` is only available on GLIBC,
++# so check that before defining `HAVE_MALLOC_STATS`.
++check_symbol_exists(malloc_stats "malloc.h" HAVE_MALLOC_STATS_H)
++
++# Used for: `source/creator/creator_signals.c`.
++# The function `feenableexcept` is not present non-GLIBC systems,
++# hence we need to check if it's available in the `fenv.h` file.
++set(HAVE_FEENABLEEXCEPT OFF)
++if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
++ check_symbol_exists(feenableexcept "fenv.h" HAVE_FEENABLEEXCEPT)
++endif()
++
++# Used for: `source/blender/blenlib/intern/system.c`.
++# `execinfo` is not available on non-GLIBC systems (at least not on MUSL-LIBC),
++# so check the presence of the header before including it and using the it for back-trace.
++set(HAVE_EXECINFO_H OFF)
++if(NOT MSVC)
++ include(CheckIncludeFiles)
++ check_include_files("execinfo.h" HAVE_EXECINFO_H)
++ if(HAVE_EXECINFO_H)
++ add_definitions(-DHAVE_EXECINFO_H)
++ endif()
++endif()
+--- a/intern/guardedalloc/CMakeLists.txt
++++ b/intern/guardedalloc/CMakeLists.txt
+@@ -1,6 +1,10 @@
+ # SPDX-License-Identifier: GPL-2.0-or-later
+ # Copyright 2006 Blender Foundation. All rights reserved.
+
++if(HAVE_MALLOC_STATS_H)
++ add_definitions(-DHAVE_MALLOC_STATS_H)
++endif()
++
+ set(INC
+ .
+ ../atomic
+--- a/intern/guardedalloc/intern/mallocn_intern.h
++++ b/intern/guardedalloc/intern/mallocn_intern.h
+@@ -17,8 +17,7 @@
+ #undef HAVE_MALLOC_STATS
+ #define USE_MALLOC_USABLE_SIZE /* internal, when we have malloc_usable_size() */
+
+-#if defined(__linux__) || (defined(__FreeBSD_kernel__) && !defined(__FreeBSD__)) || \
+- defined(__GLIBC__)
++#if defined(HAVE_MALLOC_STATS_H)
+ # include <malloc.h>
+ # define HAVE_MALLOC_STATS
+ #elif defined(__FreeBSD__)
+--- a/source/blender/blenlib/CMakeLists.txt
++++ b/source/blender/blenlib/CMakeLists.txt
+@@ -1,6 +1,10 @@
+ # SPDX-License-Identifier: GPL-2.0-or-later
+ # Copyright 2006 Blender Foundation. All rights reserved.
+
++if(HAVE_EXECINFO_H)
++ add_definitions(-DHAVE_EXECINFO_H)
++endif()
++
+ set(INC
+ .
+ # ../blenkernel # don't add this back!
+--- a/source/blender/blenlib/intern/system.c
++++ b/source/blender/blenlib/intern/system.c
+@@ -21,7 +21,9 @@
+
+ # include "BLI_winstuff.h"
+ #else
+-# include <execinfo.h>
++# if defined(HAVE_EXECINFO_H)
++# include <execinfo.h>
++# endif
+ # include <unistd.h>
+ #endif
+
+@@ -61,9 +63,9 @@ int BLI_cpu_support_sse2(void)
+ #if !defined(_MSC_VER)
+ void BLI_system_backtrace(FILE *fp)
+ {
+- /* ------------- */
+- /* Linux / Apple */
+-# if defined(__linux__) || defined(__APPLE__)
++ /* ----------------------- */
++ /* If system as execinfo.h */
++# if defined(HAVE_EXECINFO_H)
+
+ # define SIZE 100
+ void *buffer[SIZE];
+--- a/source/blender/makesdna/intern/CMakeLists.txt
++++ b/source/blender/makesdna/intern/CMakeLists.txt
+@@ -5,6 +5,11 @@
+
+ add_definitions(-DWITH_DNA_GHASH)
+
++# Needed for `mallocn.c`.
++if(HAVE_MALLOC_STATS_H)
++ add_definitions(-DHAVE_MALLOC_STATS_H)
++endif()
++
+ blender_include_dirs(
+ ../../../../intern/atomic
+ ../../../../intern/guardedalloc
+--- a/source/blender/makesrna/intern/CMakeLists.txt
++++ b/source/blender/makesrna/intern/CMakeLists.txt
+@@ -6,6 +6,11 @@ if(CMAKE_COMPILER_IS_GNUCC)
+ string(APPEND CMAKE_C_FLAGS " -Werror=implicit-function-declaration")
+ endif()
+
++# Needed for `mallocn.c`.
++if(HAVE_MALLOC_STATS_H)
++ add_definitions(-DHAVE_MALLOC_STATS_H)
++endif()
++
+ # files rna_access.c rna_define.c makesrna.c intentionally excluded.
+ set(DEFSRC
+ rna_ID.c
+--- a/source/creator/CMakeLists.txt
++++ b/source/creator/CMakeLists.txt
+@@ -22,6 +22,10 @@ set(LIB
+ bf_windowmanager
+ )
+
++if(HAVE_FEENABLEEXCEPT)
++ add_definitions(-DHAVE_FEENABLEEXCEPT)
++endif()
++
+ if(WITH_TBB)
+ # Force TBB libraries to be in front of MKL (part of OpenImageDenoise), so
+ # that it is initialized before MKL and static library initialization order
+--- a/source/creator/creator_signals.c
++++ b/source/creator/creator_signals.c
+@@ -258,7 +258,7 @@ void main_signal_setup_fpe(void)
+ * set breakpoints on sig_handle_fpe */
+ signal(SIGFPE, sig_handle_fpe);
+
+-# if defined(__linux__) && defined(__GNUC__)
++# if defined(__linux__) && defined(__GNUC__) && defined(HAVE_FEENABLEEXCEPT)
+ feenableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW);
+ # endif /* defined(__linux__) && defined(__GNUC__) */
+ # if defined(OSX_SSE_FPE)
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/blender/files/, media-gfx/blender/
@ 2022-02-12 3:55 Sam James
0 siblings, 0 replies; 18+ messages in thread
From: Sam James @ 2022-02-12 3:55 UTC (permalink / raw
To: gentoo-commits
commit: a05e2477ce750c3bf71836b8b8de9e00862cb929
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 8 08:12:57 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Feb 12 03:55:34 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a05e2477
media-gfx/blender: add 3.0.1
... and flip over to OpenEXR 3, because things keep breaking with
the mix-and-match between 2/3 and things are starting to prefer 3
in their build systems.
Bug: https://bugs.gentoo.org/831357
Bug: https://bugs.gentoo.org/832862
Signed-off-by: Sam James <sam <AT> gentoo.org>
media-gfx/blender/Manifest | 1 +
.../{blender-9999.ebuild => blender-3.0.1.ebuild} | 15 +-
media-gfx/blender/blender-9999.ebuild | 12 +-
.../blender/files/blender-3.0.1-openexr.patch | 211 +++++++++++++++++++++
.../files/blender-3.0.1-openimageio-2.3.patch | 29 +++
5 files changed, 261 insertions(+), 7 deletions(-)
diff --git a/media-gfx/blender/Manifest b/media-gfx/blender/Manifest
index 812505b74991..1582fad2110a 100644
--- a/media-gfx/blender/Manifest
+++ b/media-gfx/blender/Manifest
@@ -5,3 +5,4 @@ DIST blender-2.93.2.tar.xz 43028440 BLAKE2B 02ffc5be190445c97e3cb14e4635969df7a7
DIST blender-2.93.6.tar.xz 43031980 BLAKE2B 235b9a08d9eb4ba83c30a4de333cc5b56eefe16209a96e2aeadbfb4d99b0add0031bbf3c4e0059833433475f07c03711ca773e19d57849ae83beb52a750fac48 SHA512 0f8e7686a141ba55be29c73f9b2fcd43b03f7551ec91d226f389295f4866926f9a81ddf627aef54f6d762271ca05ccdea1f80efc00cc52315925ad626b283aea
DIST blender-3.0.0-tests.tar.bz2 302064577 BLAKE2B c86a47231bb704124fe5ed59963176ca45ccc7e92bf8b00ce31d432cf6e35b9593ddb0d71f56aab0af6d1922f08eb158f9b7e355b5323d715b2b075ceafe9294 SHA512 e343f5da88aa7d2bc2a0758c01d3849b61c6ff3a0d65ac4d967aa02b701a5a02bfc8e7ed92b8f67af37e08f138987de8a27b8c7faa3cd8cfc3535adb8c624506
DIST blender-3.0.0.tar.xz 40169212 BLAKE2B 0dd8327cb92d1d5b00ede020fa2fe07fc3f4d02b249e0ed528c330d6423ce28c731055bc623cffa66f2824c3ae667b5b84be2d6c5e2b01baf490468c4b6f42a2 SHA512 727d722e7b750b77b0fe691605a84de58baf15a3cc01af267be0440bd0879772e14dbdfdb16209023df3c28b94d8009b0c389915097cdb0b49bdf42c8de1ef21
+DIST blender-3.0.1.tar.xz 40155604 BLAKE2B b611f08617f1be217604e87cfafe88f6cc9904ed6321a74bea4ee5ad14f3cf4002b12d82fa3b3c6111a681fd7e1c530f66be28c506973ff7722175a9036a19da SHA512 b9af6d49201eb26ec77a3cecdb9c0945ffc915d4eecaaa36091365340244bfd1565a7679c8b7a81d3335383f158dc01339ea8edc108730835d81db1de84049bf
diff --git a/media-gfx/blender/blender-9999.ebuild b/media-gfx/blender/blender-3.0.1.ebuild
similarity index 96%
copy from media-gfx/blender/blender-9999.ebuild
copy to media-gfx/blender/blender-3.0.1.ebuild
index 515e813a2d1b..55af3199fd93 100644
--- a/media-gfx/blender/blender-9999.ebuild
+++ b/media-gfx/blender/blender-3.0.1.ebuild
@@ -17,8 +17,8 @@ if [[ ${PV} = *9999* ]] ; then
else
SRC_URI="https://download.blender.org/source/${P}.tar.xz"
# Update these between major releases.
- #TEST_TARBALL_VERSION=SLOT_NUMBER
- #SRC_URI+=" test? ( https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PN}-${TEST_TARBALL_VERSION}-tests.tar.bz2 )"
+ TEST_TARBALL_VERSION="3.0.0"
+ SRC_URI+=" test? ( https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PN}-${TEST_TARBALL_VERSION}-tests.tar.bz2 )"
KEYWORDS="~amd64 ~arm ~arm64"
fi
@@ -85,8 +85,8 @@ RDEPEND="${PYTHON_DEPS}
oidn? ( >=media-libs/oidn-1.4.1 )
openimageio? ( >=media-libs/openimageio-2.2.13.1:= )
openexr? (
- media-libs/ilmbase:=
- media-libs/openexr:=
+ dev-libs/imath:=
+ media-libs/openexr:3=
)
opensubdiv? ( >=media-libs/opensubdiv-3.4.0[cuda=] )
openvdb? (
@@ -123,6 +123,12 @@ BDEPEND="
nls? ( sys-devel/gettext )
"
+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
+)
+
blender_check_requirements() {
[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
@@ -229,6 +235,7 @@ src_configure() {
-DWITH_HEADLESS=$(usex headless)
-DWITH_INSTALL_PORTABLE=OFF
-DWITH_IMAGE_DDS=$(usex dds)
+ -DOPENEXR_ROOT_DIR="${ESYSROOT}/usr/$(get_libdir)/OpenEXR-3"
-DWITH_IMAGE_OPENEXR=$(usex openexr)
-DWITH_IMAGE_OPENJPEG=$(usex jpeg2k)
-DWITH_IMAGE_TIFF=$(usex tiff)
diff --git a/media-gfx/blender/blender-9999.ebuild b/media-gfx/blender/blender-9999.ebuild
index 515e813a2d1b..2a0b9a5eef41 100644
--- a/media-gfx/blender/blender-9999.ebuild
+++ b/media-gfx/blender/blender-9999.ebuild
@@ -17,7 +17,7 @@ if [[ ${PV} = *9999* ]] ; then
else
SRC_URI="https://download.blender.org/source/${P}.tar.xz"
# Update these between major releases.
- #TEST_TARBALL_VERSION=SLOT_NUMBER
+ #TEST_TARBALL_VERSION="3.0.0"
#SRC_URI+=" test? ( https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PN}-${TEST_TARBALL_VERSION}-tests.tar.bz2 )"
KEYWORDS="~amd64 ~arm ~arm64"
fi
@@ -85,8 +85,8 @@ RDEPEND="${PYTHON_DEPS}
oidn? ( >=media-libs/oidn-1.4.1 )
openimageio? ( >=media-libs/openimageio-2.2.13.1:= )
openexr? (
- media-libs/ilmbase:=
- media-libs/openexr:=
+ dev-libs/imath:=
+ media-libs/openexr:3=
)
opensubdiv? ( >=media-libs/opensubdiv-3.4.0[cuda=] )
openvdb? (
@@ -123,6 +123,11 @@ BDEPEND="
nls? ( sys-devel/gettext )
"
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.0.1-openexr.patch
+ "${FILESDIR}"/${PN}-3.0.1-openimageio-2.3.patch
+)
+
blender_check_requirements() {
[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
@@ -229,6 +234,7 @@ src_configure() {
-DWITH_HEADLESS=$(usex headless)
-DWITH_INSTALL_PORTABLE=OFF
-DWITH_IMAGE_DDS=$(usex dds)
+ -DOPENEXR_ROOT_DIR="${ESYSROOT}/usr/$(get_libdir)/OpenEXR-3"
-DWITH_IMAGE_OPENEXR=$(usex openexr)
-DWITH_IMAGE_OPENJPEG=$(usex jpeg2k)
-DWITH_IMAGE_TIFF=$(usex tiff)
diff --git a/media-gfx/blender/files/blender-3.0.1-openexr.patch b/media-gfx/blender/files/blender-3.0.1-openexr.patch
new file mode 100644
index 000000000000..b1ea45acc76e
--- /dev/null
+++ b/media-gfx/blender/files/blender-3.0.1-openexr.patch
@@ -0,0 +1,211 @@
+Based on 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 CONFIG QUIET)
++if(TARGET Imath::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
+@@ -32,30 +32,31 @@
+ #include <stdexcept>
+ #include <string>
+
+-#include <Iex.h>
++#include <OpenEXR-3/Iex.h>
+ #include <ImathBox.h>
+-#include <ImfArray.h>
+-#include <ImfChannelList.h>
+-#include <ImfCompression.h>
+-#include <ImfCompressionAttribute.h>
+-#include <ImfIO.h>
+-#include <ImfInputFile.h>
+-#include <ImfOutputFile.h>
+-#include <ImfPixelType.h>
+-#include <ImfStandardAttributes.h>
+-#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>
+
+ /* multiview/multipart */
+-#include <ImfInputPart.h>
+-#include <ImfMultiPartInputFile.h>
+-#include <ImfMultiPartOutputFile.h>
+-#include <ImfMultiView.h>
+-#include <ImfOutputPart.h>
+-#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 "DNA_scene_types.h" /* For OpenEXR compression constants */
+
+@@ -131,12 +132,12 @@ class IMemStream : public Imf::IStream {
+ return false;
+ }
+
+- Int64 tellg() override
++ uint64_t tellg() override
+ {
+ return _exrpos;
+ }
+
+- void seekg(Int64 pos) override
++ void seekg(uint64_t pos) override
+ {
+ _exrpos = pos;
+ }
+@@ -146,8 +147,8 @@ class IMemStream : public Imf::IStream {
+ }
+
+ private:
+- Int64 _exrpos;
+- Int64 _exrsize;
++ uint64_t _exrpos;
++ uint64_t _exrsize;
+ unsigned char *_exrbuf;
+ };
+
+@@ -182,12 +183,12 @@ class IFileStream : public Imf::IStream
+ return check_error();
+ }
+
+- Int64 tellg() override
++ uint64_t tellg() override
+ {
+ return std::streamoff(ifs.tellg());
+ }
+
+- void seekg(Int64 pos) override
++ void seekg(uint64_t pos) override
+ {
+ ifs.seekg(pos);
+ check_error();
+@@ -231,19 +232,19 @@ class OMemStream : public OStream {
+ ibuf->encodedsize += n;
+ }
+
+- Int64 tellp() override
++ uint64_t tellp() override
+ {
+ return offset;
+ }
+
+- void seekp(Int64 pos) override
++ void seekp(uint64_t pos) override
+ {
+ offset = pos;
+ ensure_size(offset);
+ }
+
+ private:
+- void ensure_size(Int64 size)
++ void ensure_size(uint64_t size)
+ {
+ /* if buffer is too small increase it. */
+ while (size > ibuf->encodedbuffersize) {
+@@ -254,7 +255,7 @@ class OMemStream : public OStream {
+ }
+
+ ImBuf *ibuf;
+- Int64 offset;
++ uint64_t offset;
+ };
+
+ /* File Output Stream */
+@@ -284,12 +285,12 @@ class OFileStream : public OStream {
+ check_error();
+ }
+
+- Int64 tellp() override
++ uint64_t tellp() override
+ {
+ return std::streamoff(ofs.tellp());
+ }
+
+- void seekp(Int64 pos) override
++ void seekp(uint64_t pos) override
+ {
+ ofs.seekp(pos);
+ check_error();
diff --git a/media-gfx/blender/files/blender-3.0.1-openimageio-2.3.patch b/media-gfx/blender/files/blender-3.0.1-openimageio-2.3.patch
new file mode 100644
index 000000000000..3ba3000037d0
--- /dev/null
+++ b/media-gfx/blender/files/blender-3.0.1-openimageio-2.3.patch
@@ -0,0 +1,29 @@
+https://src.fedoraproject.org/rpms/blender/raw/rawhide/f/blender-oiio-2.3.patch
+https://bugs.gentoo.org/831357
+--- a/build_files/cmake/Modules/FindOpenImageIO.cmake
++++ b/build_files/cmake/Modules/FindOpenImageIO.cmake
+@@ -48,6 +48,15 @@ FIND_LIBRARY(OPENIMAGEIO_LIBRARY
+ lib64 lib
+ )
+
++FIND_LIBRARY(OPENIMAGEIO_UTIL_LIBRARY
++ NAMES
++ OpenImageIO_Util
++ HINTS
++ ${_openimageio_SEARCH_DIRS}
++ PATH_SUFFIXES
++ lib64 lib
++ )
++
+ FIND_FILE(OPENIMAGEIO_IDIFF
+ NAMES
+ idiff
+@@ -64,7 +73,7 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenIm
+ OPENIMAGEIO_LIBRARY OPENIMAGEIO_INCLUDE_DIR)
+
+ IF(OPENIMAGEIO_FOUND)
+- SET(OPENIMAGEIO_LIBRARIES ${OPENIMAGEIO_LIBRARY})
++ SET(OPENIMAGEIO_LIBRARIES ${OPENIMAGEIO_LIBRARY} ${OPENIMAGEIO_UTIL_LIBRARY})
+ SET(OPENIMAGEIO_INCLUDE_DIRS ${OPENIMAGEIO_INCLUDE_DIR})
+ IF(EXISTS ${OPENIMAGEIO_INCLUDE_DIR}/OpenImageIO/pugixml.hpp)
+ SET(OPENIMAGEIO_PUGIXML_FOUND TRUE)
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/blender/files/, media-gfx/blender/
@ 2021-06-10 0:51 Sam James
0 siblings, 0 replies; 18+ messages in thread
From: Sam James @ 2021-06-10 0:51 UTC (permalink / raw
To: gentoo-commits
commit: 61c7536f66bd3a6a3347800226cd8dc969671116
Author: Sebastian Parborg <darkdefende <AT> gmail <DOT> com>
AuthorDate: Wed Apr 28 01:08:31 2021 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Jun 10 00:19:21 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=61c7536f
media-gfx/blender: Slot, bump to 2.93.0, and add live ebuild
Closes: https://bugs.gentoo.org/795003
Closes: https://bugs.gentoo.org/778008
Closes: https://bugs.gentoo.org/774372
Closes: https://bugs.gentoo.org/673422
Closes: https://bugs.gentoo.org/737388
Signed-off-by: Sebastian Parborg <darkdefende <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/20565
Signed-off-by: Sam James <sam <AT> gentoo.org>
media-gfx/blender/Manifest | 4 +-
...ender-2.83.12.ebuild => blender-2.83.15.ebuild} | 192 +++++++++++-------
...blender-2.91.2.ebuild => blender-2.93.0.ebuild} | 211 ++++++++++++--------
...{blender-2.83.12.ebuild => blender-9999.ebuild} | 203 ++++++++++++-------
.../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 +++++++++++++++++++++
media-gfx/blender/metadata.xml | 23 +--
9 files changed, 675 insertions(+), 238 deletions(-)
diff --git a/media-gfx/blender/Manifest b/media-gfx/blender/Manifest
index 46f37a28858..a0063395f2e 100644
--- a/media-gfx/blender/Manifest
+++ b/media-gfx/blender/Manifest
@@ -1,2 +1,2 @@
-DIST blender-2.83.12.tar.xz 39132904 BLAKE2B 175e8c5ab9324421f23357bc367b2e70ee8c391130d376d6d53eefbf90529d09921395cd11e7b1709aaa4d24ec6f8df64050869e41bbe211229126db08f22089 SHA512 f313c92e311e852742e74934504fcd3ccd296bcea2499f605cef568e3c615ececd9d70dec5025e4d4ff19f03803c148a8b03a4b68b7ca978554f5b1122c9890b
-DIST blender-2.91.2.tar.xz 42057100 BLAKE2B f10f838ad6d56135fddf9e9171473e1e589f511a38112845d650436a1eb4da94ea0777571dffc6446f4217dce647b087cf5a18841d7dde2086d187bb8f7d3654 SHA512 9a3bae01bd09b1d665af4882f53e8a88d85ff44678233c90788a7801ce0d551a3cc1f71026b71ea1c77d7eaedf7ab6fc8709104c22b564f4fc6cc0d5b3b76f5e
+DIST blender-2.83.15.tar.xz 39125740 BLAKE2B 687097b45b76b474b1c172c9b8ccf5da1bfc24539d0db894d04c7837572b16c1f552757fd1482219d58afa56c573229878fb43bbecd95e3d61314f2ab05efafa SHA512 2836533691bae0a7942197e67232b396b892cd95c0f07ab561f7de8458b354fe4045453855585484dd533ae76588ea3888f880763b042a264fb813a43933fc25
+DIST blender-2.93.0.tar.xz 42967016 BLAKE2B 1e7b54f08415de8a8908a285ae35c1e18558bf7cab42c5c135323d10ac9a73ec69aa0addd536355a4d19262438a615e03f09dc123b697cbab484e33350bb5ee3 SHA512 660962e5368c8ff52ed095aba97d63c22aa8e2fdcb2042b1299b6d6edeb7eb1f702a9ee95ee7e47824681f9f48b971d2e32ec32cc6264165a4196b5f36c4a66d
diff --git a/media-gfx/blender/blender-2.83.12.ebuild b/media-gfx/blender/blender-2.83.15.ebuild
similarity index 57%
copy from media-gfx/blender/blender-2.83.12.ebuild
copy to media-gfx/blender/blender-2.83.15.ebuild
index 44b4b4f8849..e9a3def3b11 100644
--- a/media-gfx/blender/blender-2.83.12.ebuild
+++ b/media-gfx/blender/blender-2.83.15.ebuild
@@ -3,25 +3,27 @@
EAPI=7
-PYTHON_COMPAT=( python3_{7,8} )
+PYTHON_COMPAT=( python3_{7,8,9} )
-inherit check-reqs cmake flag-o-matic pax-utils python-single-r1 \
+inherit check-reqs cmake flag-o-matic pax-utils python-single-r1 subversion \
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 \
+
+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"
+ 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 )"
@@ -30,15 +32,15 @@ REQUIRED_USE="${PYTHON_REQUIRED_USE}
alembic? ( openexr )
cuda? ( cycles )
cycles? ( openexr tiff openimageio )
- elbeem? ( tbb )
+ fluid? ( tbb )
opencl? ( cycles )
- openvdb? (
- ^^ ( abi6-compat abi7-compat )
- tbb
- )
- osl? ( cycles llvm )
- standalone? ( 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=
@@ -57,9 +59,9 @@ RDEPEND="${PYTHON_DEPS}
virtual/opengl
alembic? ( >=media-gfx/alembic-1.7.12[boost(+),hdf(+)] )
collada? ( >=media-libs/opencollada-1.6.68 )
- color-management? ( media-libs/opencolorio )
+ color-management? ( <media-libs/opencolorio-2.0.0 )
cuda? ( dev-util/nvidia-cuda-toolkit:= )
- ffmpeg? ( media-video/ffmpeg:=[x264,mp3,encode,theora,jpeg2k?] )
+ ffmpeg? ( media-video/ffmpeg:=[x264,mp3,encode,theora,jpeg2k,vpx,vorbis,opus,xvid] )
fftw? ( sci-libs/fftw:3.0= )
!headless? (
x11-libs/libX11
@@ -69,7 +71,6 @@ RDEPEND="${PYTHON_DEPS}
jack? ( virtual/jack )
jemalloc? ( dev-libs/jemalloc:= )
jpeg2k? ( media-libs/openjpeg:2= )
- llvm? ( sys-devel/llvm:= )
ndof? (
app-misc/spacenavd
dev-libs/libspnav
@@ -84,13 +85,14 @@ RDEPEND="${PYTHON_DEPS}
)
opensubdiv? ( >=media-libs/opensubdiv-3.4.0[cuda=,opencl=] )
openvdb? (
- ~media-gfx/openvdb-7.0.0[abi6-compat(-)?,abi7-compat(-)?]
+ >=media-gfx/openvdb-7.0.0
dev-libs/c-blosc:=
)
- osl? ( media-libs/osl:= )
+ osl? ( <media-libs/osl-1.11.0 )
sdl? ( media-libs/libsdl2[sound,joystick] )
sndfile? ( media-libs/libsndfile )
tbb? ( dev-cpp/tbb )
+ test? ( dev-vcs/subversion )
tiff? ( media-libs/tiff )
valgrind? ( dev-util/valgrind )
"
@@ -113,7 +115,12 @@ BDEPEND="
nls? ( sys-devel/gettext )
"
-CMAKE_BUILD_TYPE="Release"
+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
@@ -123,6 +130,13 @@ blender_check_requirements() {
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
}
@@ -132,41 +146,60 @@ pkg_setup() {
python-single-r1_pkg_setup
}
+src_unpack() {
+ if [[ ${PV} = *9999* ]] ; then
+ TESTS_SVN_URL=https://svn.blender.org/svnroot/bf-blender/trunk/lib/tests
+ git-r3_src_unpack
+ else
+ default
+ TESTS_SVN_URL=https://svn.blender.org/svnroot/bf-blender/tags/blender-${SLOT}-release/lib/tests
+ fi
+
+ if use test; then
+ subversion_fetch ${TESTS_SVN_URL} ../lib/tests
+ fi
+}
+
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")
+ 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() {
- # FIX: forcing '-funsigned-char' fixes an anti-aliasing issue with menu
- # shadows, see bug #276338 for reference
- append-flags -funsigned-char
+ # 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
- 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)"
@@ -197,11 +230,10 @@ src_configure() {
-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_MOD_FLUID=$(usex fluid)
+ -DWITH_MOD_OCEANSIM=ON
-DWITH_OPENAL=$(usex openal)
-DWITH_OPENCOLLADA=$(usex collada)
-DWITH_OPENCOLORIO=$(usex color-management)
@@ -218,8 +250,13 @@ src_configure() {
-DWITH_SYSTEM_GLEW=ON
-DWITH_SYSTEM_LZO=ON
-DWITH_TBB=$(usex tbb)
- -DWITH_X11=$(usex !headless)
+ -DWITH_USD=OFF
)
+ if ! use debug ; then
+ append-flags -DNDEBUG
+ else
+ append-flags -DDEBUG
+ fi
cmake_src_configure
}
@@ -247,17 +284,27 @@ src_compile() {
}
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
+ # 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
@@ -280,8 +327,10 @@ src_install() {
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"
+ 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}"
}
pkg_postinst() {
@@ -292,7 +341,7 @@ pkg_postinst() {
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 "changing the 'Temporary Files' directory in Blender preferences."
elog
ewarn
ewarn "This ebuild does not unbundle the massive amount of 3rd party"
@@ -302,13 +351,12 @@ pkg_postinst() {
ewarn " https://developer.blender.org/"
ewarn
- if use python_single_target_python3_8; then
- elog "You've enabled python-3.8 support for blender, which is still experimental."
- elog "If you experience breakages with e.g. plugins, please switch to"
- elog "python_single_target_python3_7 instead."
- elog "Bug: https://bugs.gentoo.org/737388"
- elog
- fi
+ 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
@@ -322,7 +370,7 @@ pkg_postrm() {
ewarn ""
ewarn "You may want to remove the following directory."
- ewarn "~/.config/${PN}/${MY_PV}/cache/"
+ ewarn "~/.config/${PN}/<blender version>/cache/"
ewarn "It may contain extra render kernels not tracked by portage"
ewarn ""
}
diff --git a/media-gfx/blender/blender-2.91.2.ebuild b/media-gfx/blender/blender-2.93.0.ebuild
similarity index 56%
rename from media-gfx/blender/blender-2.91.2.ebuild
rename to media-gfx/blender/blender-2.93.0.ebuild
index 6faddf5b016..1cbc831157b 100644
--- a/media-gfx/blender/blender-2.91.2.ebuild
+++ b/media-gfx/blender/blender-2.93.0.ebuild
@@ -3,53 +3,51 @@
EAPI=7
-PYTHON_COMPAT=( python3_{7,8} )
+PYTHON_COMPAT=( python3_9 )
-inherit check-reqs cmake flag-o-matic pax-utils python-single-r1 \
+inherit check-reqs cmake flag-o-matic pax-utils python-single-r1 subversion \
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 ~arm ~arm64 ~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"
+
+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"
+ KEYWORDS="~amd64"
+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 +embree +ffmpeg +fftw +gmp headless jack jemalloc jpeg2k \
+ man ndof nls openal opencl +oidn +openimageio +openmp +opensubdiv \
+ +openvdb +osl +pdf +potrace +pugixml pulseaudio sdl +sndfile standalone test +tiff valgrind"
RESTRICT="!test? ( test )"
REQUIRED_USE="${PYTHON_REQUIRED_USE}
alembic? ( openexr )
cuda? ( cycles )
- cycles? ( openexr tbb tiff openimageio )
- elbeem? ( tbb )
+ cycles? ( openexr tiff openimageio )
+ fluid? ( tbb )
opencl? ( cycles )
- openvdb? (
- ^^ ( abi6-compat abi7-compat )
- tbb
- )
- osl? ( cycles llvm )
- standalone? ( cycles )"
+ openvdb? ( tbb )
+ osl? ( cycles )
+ standalone? ( cycles )
+ test? ( color-management )"
+# 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/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:=
@@ -61,11 +59,12 @@ RDEPEND="${PYTHON_DEPS}
virtual/opengl
alembic? ( >=media-gfx/alembic-1.7.12[boost(+),hdf(+)] )
collada? ( >=media-libs/opencollada-1.6.68 )
- color-management? ( media-libs/opencolorio )
+ color-management? ( >=media-libs/opencolorio-2.0.0 )
cuda? ( dev-util/nvidia-cuda-toolkit:= )
- cycles? ( media-libs/freeglut )
- ffmpeg? ( media-video/ffmpeg:=[x264,mp3,encode,theora,jpeg2k?] )
+ embree? ( >=media-libs/embree-3.10.0[raymask] )
+ ffmpeg? ( media-video/ffmpeg:=[x264,mp3,encode,theora,jpeg2k,vpx,vorbis,opus,xvid] )
fftw? ( sci-libs/fftw:3.0= )
+ gmp? ( dev-libs/gmp )
!headless? (
x11-libs/libX11
x11-libs/libXi
@@ -74,7 +73,6 @@ RDEPEND="${PYTHON_DEPS}
jack? ( virtual/jack )
jemalloc? ( dev-libs/jemalloc:= )
jpeg2k? ( media-libs/openjpeg:2= )
- llvm? ( sys-devel/llvm:= )
ndof? (
app-misc/spacenavd
dev-libs/libspnav
@@ -82,6 +80,7 @@ RDEPEND="${PYTHON_DEPS}
nls? ( virtual/libiconv )
openal? ( media-libs/openal )
opencl? ( virtual/opencl )
+ oidn? ( >=media-libs/oidn-1.3.0 )
openimageio? ( >=media-libs/openimageio-2.2.13.1:= )
openexr? (
media-libs/ilmbase:=
@@ -89,13 +88,18 @@ RDEPEND="${PYTHON_DEPS}
)
opensubdiv? ( >=media-libs/opensubdiv-3.4.0[cuda=,opencl=] )
openvdb? (
- ~media-gfx/openvdb-7.0.0[abi6-compat(-)?,abi7-compat(-)?]
+ >=media-gfx/openvdb-7.1.0
dev-libs/c-blosc:=
)
- osl? ( media-libs/osl:= )
+ osl? ( >=media-libs/osl-1.11.10.0 )
+ pdf? ( media-libs/libharu )
+ potrace? ( media-gfx/potrace )
+ pugixml? ( dev-libs/pugixml )
+ pulseaudio? ( media-sound/pulseaudio )
sdl? ( media-libs/libsdl2[sound,joystick] )
sndfile? ( media-libs/libsndfile )
tbb? ( dev-cpp/tbb )
+ test? ( dev-vcs/subversion )
tiff? ( media-libs/tiff )
valgrind? ( dev-util/valgrind )
"
@@ -118,8 +122,6 @@ BDEPEND="
nls? ( sys-devel/gettext )
"
-CMAKE_BUILD_TYPE="Release"
-
blender_check_requirements() {
[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
@@ -128,6 +130,18 @@ blender_check_requirements() {
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)
+ if ((${BV:0:1} < 3)) ; then
+ # Add period (290 -> 2.90).
+ BV=${BV:0:1}.${BV:1}
+ else
+ # Add period and strip last number (300 -> 3.0)
+ BV=${BV:0:1}.${BV:1:1}
+ fi
+}
+
pkg_pretend() {
blender_check_requirements
}
@@ -137,41 +151,55 @@ pkg_setup() {
python-single-r1_pkg_setup
}
+src_unpack() {
+ if [[ ${PV} = *9999* ]] ; then
+ TESTS_SVN_URL=https://svn.blender.org/svnroot/bf-blender/trunk/lib/tests
+ git-r3_src_unpack
+ else
+ default
+ TESTS_SVN_URL=https://svn.blender.org/svnroot/bf-blender/tags/blender-${SLOT}-release/lib/tests
+ fi
+
+ if use test; then
+ subversion_fetch ${TESTS_SVN_URL} ../lib/tests
+ fi
+}
+
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")
+ 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() {
- # 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)"
@@ -184,17 +212,18 @@ src_configure() {
-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_CUDA=$(usex cuda TRUE FALSE)
-DWITH_CYCLES_DEVICE_OPENCL=$(usex opencl)
- -DWITH_CYCLES_EMBREE=OFF
+ -DWITH_CYCLES_EMBREE=$(usex embree)
+ -DWITH_CYCLES_OSL=$(usex osl)
-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_GMP=$(usex gmp)
-DWITH_GTESTS=$(usex test)
+ -DWITH_HARU=$(usex pdf)
-DWITH_HEADLESS=$(usex headless)
-DWITH_INSTALL_PORTABLE=OFF
-DWITH_IMAGE_DDS=$(usex dds)
@@ -204,19 +233,23 @@ src_configure() {
-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_MOD_FLUID=$(usex fluid)
+ -DWITH_MOD_OCEANSIM=ON
+ -DWITH_NANOVDB=OFF
-DWITH_OPENAL=$(usex openal)
-DWITH_OPENCOLLADA=$(usex collada)
-DWITH_OPENCOLORIO=$(usex color-management)
+ -DWITH_OPENIMAGEDENOISE=$(usex oidn)
-DWITH_OPENIMAGEIO=$(usex openimageio)
-DWITH_OPENMP=$(usex openmp)
-DWITH_OPENSUBDIV=$(usex opensubdiv)
-DWITH_OPENVDB=$(usex openvdb)
-DWITH_OPENVDB_BLOSC=$(usex openvdb)
+ -DWITH_POTRACE=$(usex potrace)
+ -DWITH_PUGIXML=$(usex pugixml)
+ -DWITH_PULSEAUDIO=$(usex pulseaudio)
-DWITH_PYTHON_INSTALL=$(usex system-python OFF ON)
-DWITH_PYTHON_INSTALL_NUMPY=$(usex system-numpy OFF ON)
-DWITH_SDL=$(usex sdl)
@@ -225,7 +258,14 @@ src_configure() {
-DWITH_SYSTEM_GLEW=ON
-DWITH_SYSTEM_LZO=ON
-DWITH_TBB=$(usex tbb)
+ -DWITH_USD=OFF
+ -DWITH_XR_OPENXR=OFF
)
+ if ! use debug ; then
+ append-flags -DNDEBUG
+ else
+ append-flags -DDEBUG
+ fi
cmake_src_configure
}
@@ -253,17 +293,25 @@ src_compile() {
}
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
+ # 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
+
+ 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
@@ -286,8 +334,10 @@ src_install() {
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"
+ 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}"
}
pkg_postinst() {
@@ -298,7 +348,7 @@ pkg_postinst() {
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 "changing the 'Temporary Files' directory in Blender preferences."
elog
ewarn
ewarn "This ebuild does not unbundle the massive amount of 3rd party"
@@ -308,10 +358,11 @@ pkg_postinst() {
ewarn " https://developer.blender.org/"
ewarn
- if use python_single_target_python3_8; then
- elog "You've enabled python-3.8 support for blender, which is still experimental."
+ if ! use python_single_target_python3_9; then
+ 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 switch to"
- elog "python_single_target_python3_7 instead."
+ elog "python_single_target_python3_9 instead."
elog "Bug: https://bugs.gentoo.org/737388"
elog
fi
@@ -328,7 +379,7 @@ pkg_postrm() {
ewarn ""
ewarn "You may want to remove the following directory."
- ewarn "~/.config/${PN}/${MY_PV}/cache/"
+ ewarn "~/.config/${PN}/<blender version>/cache/"
ewarn "It may contain extra render kernels not tracked by portage"
ewarn ""
}
diff --git a/media-gfx/blender/blender-2.83.12.ebuild b/media-gfx/blender/blender-9999.ebuild
similarity index 56%
rename from media-gfx/blender/blender-2.83.12.ebuild
rename to media-gfx/blender/blender-9999.ebuild
index 44b4b4f8849..a94519d2777 100644
--- a/media-gfx/blender/blender-2.83.12.ebuild
+++ b/media-gfx/blender/blender-9999.ebuild
@@ -3,42 +3,44 @@
EAPI=7
-PYTHON_COMPAT=( python3_{7,8} )
+PYTHON_COMPAT=( python3_9 )
-inherit check-reqs cmake flag-o-matic pax-utils python-single-r1 \
+inherit check-reqs cmake flag-o-matic pax-utils python-single-r1 subversion \
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"
+
+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"
+ 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 +embree +ffmpeg +fftw +gmp headless jack jemalloc jpeg2k \
+ man ndof nls openal opencl +oidn +openimageio +openmp +opensubdiv \
+ +openvdb +osl +pdf +potrace +pugixml pulseaudio sdl +sndfile standalone test +tiff valgrind"
RESTRICT="!test? ( test )"
REQUIRED_USE="${PYTHON_REQUIRED_USE}
alembic? ( openexr )
cuda? ( cycles )
cycles? ( openexr tiff openimageio )
- elbeem? ( tbb )
+ fluid? ( tbb )
opencl? ( cycles )
- openvdb? (
- ^^ ( abi6-compat abi7-compat )
- tbb
- )
- osl? ( cycles llvm )
- standalone? ( cycles )"
+ openvdb? ( tbb )
+ osl? ( cycles )
+ standalone? ( cycles )
+ test? ( color-management )"
+# 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=
@@ -57,10 +59,12 @@ RDEPEND="${PYTHON_DEPS}
virtual/opengl
alembic? ( >=media-gfx/alembic-1.7.12[boost(+),hdf(+)] )
collada? ( >=media-libs/opencollada-1.6.68 )
- color-management? ( media-libs/opencolorio )
+ color-management? ( >=media-libs/opencolorio-2.0.0 )
cuda? ( dev-util/nvidia-cuda-toolkit:= )
- ffmpeg? ( media-video/ffmpeg:=[x264,mp3,encode,theora,jpeg2k?] )
+ embree? ( >=media-libs/embree-3.10.0[raymask] )
+ ffmpeg? ( media-video/ffmpeg:=[x264,mp3,encode,theora,jpeg2k,vpx,vorbis,opus,xvid] )
fftw? ( sci-libs/fftw:3.0= )
+ gmp? ( dev-libs/gmp )
!headless? (
x11-libs/libX11
x11-libs/libXi
@@ -69,7 +73,6 @@ RDEPEND="${PYTHON_DEPS}
jack? ( virtual/jack )
jemalloc? ( dev-libs/jemalloc:= )
jpeg2k? ( media-libs/openjpeg:2= )
- llvm? ( sys-devel/llvm:= )
ndof? (
app-misc/spacenavd
dev-libs/libspnav
@@ -77,6 +80,7 @@ RDEPEND="${PYTHON_DEPS}
nls? ( virtual/libiconv )
openal? ( media-libs/openal )
opencl? ( virtual/opencl )
+ oidn? ( >=media-libs/oidn-1.3.0 )
openimageio? ( >=media-libs/openimageio-2.2.13.1:= )
openexr? (
media-libs/ilmbase:=
@@ -84,13 +88,18 @@ RDEPEND="${PYTHON_DEPS}
)
opensubdiv? ( >=media-libs/opensubdiv-3.4.0[cuda=,opencl=] )
openvdb? (
- ~media-gfx/openvdb-7.0.0[abi6-compat(-)?,abi7-compat(-)?]
+ >=media-gfx/openvdb-7.1.0
dev-libs/c-blosc:=
)
- osl? ( media-libs/osl:= )
+ osl? ( >=media-libs/osl-1.11.10.0 )
+ pdf? ( media-libs/libharu )
+ potrace? ( media-gfx/potrace )
+ pugixml? ( dev-libs/pugixml )
+ pulseaudio? ( media-sound/pulseaudio )
sdl? ( media-libs/libsdl2[sound,joystick] )
sndfile? ( media-libs/libsndfile )
tbb? ( dev-cpp/tbb )
+ test? ( dev-vcs/subversion )
tiff? ( media-libs/tiff )
valgrind? ( dev-util/valgrind )
"
@@ -113,8 +122,6 @@ BDEPEND="
nls? ( sys-devel/gettext )
"
-CMAKE_BUILD_TYPE="Release"
-
blender_check_requirements() {
[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
@@ -123,6 +130,18 @@ blender_check_requirements() {
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)
+ if ((${BV:0:1} < 3)) ; then
+ # Add period (290 -> 2.90).
+ BV=${BV:0:1}.${BV:1}
+ else
+ # Add period and strip last number (300 -> 3.0)
+ BV=${BV:0:1}.${BV:1:1}
+ fi
+}
+
pkg_pretend() {
blender_check_requirements
}
@@ -132,41 +151,55 @@ pkg_setup() {
python-single-r1_pkg_setup
}
+src_unpack() {
+ if [[ ${PV} = *9999* ]] ; then
+ TESTS_SVN_URL=https://svn.blender.org/svnroot/bf-blender/trunk/lib/tests
+ git-r3_src_unpack
+ else
+ default
+ TESTS_SVN_URL=https://svn.blender.org/svnroot/bf-blender/tags/blender-${SLOT}-release/lib/tests
+ fi
+
+ if use test; then
+ subversion_fetch ${TESTS_SVN_URL} ../lib/tests
+ fi
+}
+
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")
+ 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() {
- # 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)"
@@ -179,15 +212,18 @@ src_configure() {
-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_CUDA=$(usex cuda TRUE FALSE)
-DWITH_CYCLES_DEVICE_OPENCL=$(usex opencl)
+ -DWITH_CYCLES_EMBREE=$(usex embree)
+ -DWITH_CYCLES_OSL=$(usex osl)
-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_GMP=$(usex gmp)
-DWITH_GTESTS=$(usex test)
+ -DWITH_HARU=$(usex pdf)
-DWITH_HEADLESS=$(usex headless)
-DWITH_INSTALL_PORTABLE=OFF
-DWITH_IMAGE_DDS=$(usex dds)
@@ -197,19 +233,23 @@ src_configure() {
-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_MOD_FLUID=$(usex fluid)
+ -DWITH_MOD_OCEANSIM=ON
+ -DWITH_NANOVDB=OFF
-DWITH_OPENAL=$(usex openal)
-DWITH_OPENCOLLADA=$(usex collada)
-DWITH_OPENCOLORIO=$(usex color-management)
+ -DWITH_OPENIMAGEDENOISE=$(usex oidn)
-DWITH_OPENIMAGEIO=$(usex openimageio)
-DWITH_OPENMP=$(usex openmp)
-DWITH_OPENSUBDIV=$(usex opensubdiv)
-DWITH_OPENVDB=$(usex openvdb)
-DWITH_OPENVDB_BLOSC=$(usex openvdb)
+ -DWITH_POTRACE=$(usex potrace)
+ -DWITH_PUGIXML=$(usex pugixml)
+ -DWITH_PULSEAUDIO=$(usex pulseaudio)
-DWITH_PYTHON_INSTALL=$(usex system-python OFF ON)
-DWITH_PYTHON_INSTALL_NUMPY=$(usex system-numpy OFF ON)
-DWITH_SDL=$(usex sdl)
@@ -218,8 +258,14 @@ src_configure() {
-DWITH_SYSTEM_GLEW=ON
-DWITH_SYSTEM_LZO=ON
-DWITH_TBB=$(usex tbb)
- -DWITH_X11=$(usex !headless)
+ -DWITH_USD=OFF
+ -DWITH_XR_OPENXR=OFF
)
+ if ! use debug ; then
+ append-flags -DNDEBUG
+ else
+ append-flags -DDEBUG
+ fi
cmake_src_configure
}
@@ -247,17 +293,25 @@ src_compile() {
}
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
+ # 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
+
+ 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
@@ -280,8 +334,10 @@ src_install() {
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"
+ 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}"
}
pkg_postinst() {
@@ -292,7 +348,7 @@ pkg_postinst() {
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 "changing the 'Temporary Files' directory in Blender preferences."
elog
ewarn
ewarn "This ebuild does not unbundle the massive amount of 3rd party"
@@ -302,10 +358,11 @@ pkg_postinst() {
ewarn " https://developer.blender.org/"
ewarn
- if use python_single_target_python3_8; then
- elog "You've enabled python-3.8 support for blender, which is still experimental."
+ if ! use python_single_target_python3_9; then
+ 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 switch to"
- elog "python_single_target_python3_7 instead."
+ elog "python_single_target_python3_9 instead."
elog "Bug: https://bugs.gentoo.org/737388"
elog
fi
@@ -322,7 +379,7 @@ pkg_postrm() {
ewarn ""
ewarn "You may want to remove the following directory."
- ewarn "~/.config/${PN}/${MY_PV}/cache/"
+ ewarn "~/.config/${PN}/<blender version>/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
new file mode 100644
index 00000000000..bf857967588
--- /dev/null
+++ b/media-gfx/blender/files/blender-2.83.13-ffmpeg-4_4.patch
@@ -0,0 +1,27 @@
+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
new file mode 100644
index 00000000000..ab1e9a6d2d4
--- /dev/null
+++ b/media-gfx/blender/files/blender-2.83.6-constraints_test.patch
@@ -0,0 +1,13 @@
+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
new file mode 100644
index 00000000000..b7537f97fc0
--- /dev/null
+++ b/media-gfx/blender/files/blender-2.83.6-fix_opevdb_abi.patch
@@ -0,0 +1,21 @@
+--- 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
new file mode 100644
index 00000000000..1392510a23a
--- /dev/null
+++ b/media-gfx/blender/files/blender-2.83.6-libmv_eigen_alignment.patch
@@ -0,0 +1,219 @@
+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);
diff --git a/media-gfx/blender/metadata.xml b/media-gfx/blender/metadata.xml
index 6fc1b5f9fa5..16d447e5634 100644
--- a/media-gfx/blender/metadata.xml
+++ b/media-gfx/blender/metadata.xml
@@ -14,12 +14,6 @@
rendering, post-production, interactive creation and playback.
</longdescription>
<use>
- <flag name="abi6-compat">
- Build for OpenVDB ABI 6.
- </flag>
- <flag name="abi7-compat">
- Build for OpenVDB ABI 7.
- </flag>
<flag name="alembic">
Add support for Alembic through
<pkg>media-gfx/alembic</pkg>.
@@ -42,18 +36,19 @@
<flag name="dds">
Adds DDS textures support to Blender.
</flag>
- <flag name="elbeem">
- Adds surface fluid simulation to Blender using El'Beem library.
+ <flag name="embree">
+ Use embree to accelerate certain areas of the Cycles render engine.
+ </flag>
+ <flag name="fluid">
+ Adds fluid simulation support via the built-in Mantaflow library.
</flag>
<flag name="headless">
Build without graphical support (renderfarm, server mode only).
</flag>
- <flag name="llvm">
- Enable features depending on llvm.
- </flag>
<flag name="ndof">
Enable NDOF input devices (SpaceNavigator and friends).
</flag>
+ <flag name="oidn">Enable OpenImageDenoiser Support</flag>
<flag name="opencl">
Allow OpenCL Graphics Acceleration. This may
require extra graphics card drivers.</flag>
@@ -68,6 +63,12 @@
<flag name="osl">
Add support for OpenShadingLanguage scripting.
</flag>
+ <flag name="potrace">
+ Add support for converting bitmaps into Grease pencil line using the potrace library.
+ </flag>
+ <flag name="pugixml">
+ Enable PugiXML support (Used for OpenImageIO, Grease Pencil SVG export)
+ </flag>
<flag name="standalone">
Build the standalone version of Cycles.
</flag>
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/blender/files/, media-gfx/blender/
@ 2020-11-08 10:42 Sam James
0 siblings, 0 replies; 18+ messages in thread
From: Sam James @ 2020-11-08 10:42 UTC (permalink / raw
To: gentoo-commits
commit: f5e0466a72f3a02b8d8729f373f70b0067a3556c
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 8 10:40:14 2020 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Nov 8 10:42:17 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f5e0466a
media-gfx/blender: cleanup old
Closes: https://bugs.gentoo.org/735590
Package-Manager: Portage-3.0.8, Repoman-3.0.2
Signed-off-by: Sam James <sam <AT> gentoo.org>
media-gfx/blender/Manifest | 1 -
media-gfx/blender/blender-2.79b-r3.ebuild | 298 ---------------------
.../files/blender-2.79b-ffmpeg-4-compat.patch | 62 -----
....79b-fix-for-gcc9-new-openmp-data-sharing.patch | 31 ---
.../files/blender-2.79b-fix-opencollada.patch | 112 --------
media-gfx/blender/files/blender-2.79b-gcc-8.patch | 22 --
.../blender/files/blender-fix-install-rules.patch | 16 --
media-gfx/blender/metadata.xml | 6 -
8 files changed, 548 deletions(-)
diff --git a/media-gfx/blender/Manifest b/media-gfx/blender/Manifest
index 6ac6b01289b..5f4b3e32e53 100644
--- a/media-gfx/blender/Manifest
+++ b/media-gfx/blender/Manifest
@@ -1,3 +1,2 @@
-DIST blender-2.79b.tar.gz 50204270 BLAKE2B 78bda294df783ee9bcbcf32f9a112737b2947da5146fd4351b8b36d81c6630ed0ea302b2fb539642cfbdcc4b64df35af5c8545a3bbf50b1cf87dcf3a60eb4ac0 SHA512 2db21ace446168dd683cdb5aad9dec001f8888ae4e9603a04ddb44fb78489ded827deb07e83712b0f1118a0e7bf66f2a5d935dc4ebb3a6703d72672ff414367f
DIST blender-2.83.4.tar.xz 38528352 BLAKE2B 54596207cbee34fcaa6b81a0d829976b42c28c793b88de81d78c1c3fdfe9dd2a0189a314be281b2a0f1829a0b7fd30d37bceaa28d35c9794dcb0f009fa71e83d SHA512 061735273159742784ed210d13fb39ad076efbbfd5f0291bab1b983699d43b20462dc7e4795e28dab0cd191c9879b43d9ad0f0545c24ef5da23c74679e5ccab5
DIST blender-2.90.1.tar.xz 38836408 BLAKE2B 42622e742ebd397dc035c85cf26ab72ffee64f2cd46f1523de78dc8861bc19286a7d87b9e31a0d6afdf9a931da7018ccbdb9b4185b8535b4529656c6d85efc34 SHA512 e7d6f8df598f2a2a99f64716331ec4e981a5a49c76b307caf7856480c778455cfc4bbb56fbedc8b22d1e10951ebaeb6844d1ead9476847bf2824dddf5b135992
diff --git a/media-gfx/blender/blender-2.79b-r3.ebuild b/media-gfx/blender/blender-2.79b-r3.ebuild
deleted file mode 100644
index 9d41808c300..00000000000
--- a/media-gfx/blender/blender-2.79b-r3.ebuild
+++ /dev/null
@@ -1,298 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python3_6 )
-
-inherit check-reqs cmake-utils flag-o-matic xdg-utils \
- pax-utils python-single-r1 toolchain-funcs eapi7-ver
-
-DESCRIPTION="3D Creation/Animation/Publishing System"
-HOMEPAGE="https://www.blender.org"
-
-SRC_URI="https://download.blender.org/source/${P}.tar.gz"
-
-# 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 +game-engine +openexr collada color-management \
- cuda cycles debug doc ffmpeg fftw headless jack jemalloc jpeg2k \
- 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 )
- 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
- $(python_gen_cond_dep '
- >=dev-python/numpy-1.10.1[${PYTHON_MULTI_USEDEP}]
- dev-python/requests[${PYTHON_MULTI_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:= )
- 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: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-7[abi4-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[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}/${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"
- "${FILESDIR}/${P}-fix-opencollada.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
- # Blender is compatible ABI 4 or less, so use ABI 4.
- append-cppflags -DOPENVDB_ABI_VERSION_NUMBER=4
-
- 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 color-management)
- -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_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
- xdg_icon_cache_update
- xdg_mimeinfo_database_update
-}
-
-pkg_postrm() {
- xdg_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-ffmpeg-4-compat.patch b/media-gfx/blender/files/blender-2.79b-ffmpeg-4-compat.patch
deleted file mode 100644
index 4ad05aafb15..00000000000
--- a/media-gfx/blender/files/blender-2.79b-ffmpeg-4-compat.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-diff -urN a/intern/ffmpeg/ffmpeg_compat.h b/intern/ffmpeg/ffmpeg_compat.h
---- a/intern/ffmpeg/ffmpeg_compat.h 2018-03-23 15:22:25.000000000 +0000
-+++ b/intern/ffmpeg/ffmpeg_compat.h 2018-08-16 14:39:23.484489828 +0100
-@@ -109,6 +109,45 @@
-
- #endif
-
-+/* XXX TODO Probably fix to correct modern flags in code? Not sure how old FFMPEG we want to support though,
-+ * so for now this will do. */
-+
-+#ifndef FF_MIN_BUFFER_SIZE
-+# ifdef AV_INPUT_BUFFER_MIN_SIZE
-+# define FF_MIN_BUFFER_SIZE AV_INPUT_BUFFER_MIN_SIZE
-+# endif
-+#endif
-+
-+#ifndef FF_INPUT_BUFFER_PADDING_SIZE
-+# ifdef AV_INPUT_BUFFER_PADDING_SIZE
-+# define FF_INPUT_BUFFER_PADDING_SIZE AV_INPUT_BUFFER_PADDING_SIZE
-+# endif
-+#endif
-+
-+#ifndef CODEC_FLAG_GLOBAL_HEADER
-+# ifdef AV_CODEC_FLAG_GLOBAL_HEADER
-+# define CODEC_FLAG_GLOBAL_HEADER AV_CODEC_FLAG_GLOBAL_HEADER
-+# endif
-+#endif
-+
-+#ifndef CODEC_FLAG_GLOBAL_HEADER
-+# ifdef AV_CODEC_FLAG_GLOBAL_HEADER
-+# define CODEC_FLAG_GLOBAL_HEADER AV_CODEC_FLAG_GLOBAL_HEADER
-+# endif
-+#endif
-+
-+#ifndef CODEC_FLAG_INTERLACED_DCT
-+# ifdef AV_CODEC_FLAG_INTERLACED_DCT
-+# define CODEC_FLAG_INTERLACED_DCT AV_CODEC_FLAG_INTERLACED_DCT
-+# endif
-+#endif
-+
-+#ifndef CODEC_FLAG_INTERLACED_ME
-+# ifdef AV_CODEC_FLAG_INTERLACED_ME
-+# define CODEC_FLAG_INTERLACED_ME AV_CODEC_FLAG_INTERLACED_ME
-+# endif
-+#endif
-+
- /* FFmpeg upstream 1.0 is the first who added AV_ prefix. */
- #if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(54, 59, 100)
- # define AV_CODEC_ID_NONE CODEC_ID_NONE
-diff -urN a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c
---- a/source/blender/blenkernel/intern/writeffmpeg.c 2018-03-23 15:22:25.000000000 +0000
-+++ b/source/blender/blenkernel/intern/writeffmpeg.c 2018-08-16 14:39:21.702484751 +0100
-@@ -605,7 +605,8 @@
- c->rc_buffer_aggressivity = 1.0;
- #endif
-
-- c->me_method = ME_EPZS;
-+ /* Deprecated and not doing anything since July 2015, deleted in recent ffmpeg */
-+ //c->me_method = ME_EPZS;
-
- codec = avcodec_find_encoder(c->codec_id);
- if (!codec)
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
deleted file mode 100644
index 0ecc960d28e..00000000000
--- a/media-gfx/blender/files/blender-2.79b-fix-for-gcc9-new-openmp-data-sharing.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-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, \
diff --git a/media-gfx/blender/files/blender-2.79b-fix-opencollada.patch b/media-gfx/blender/files/blender-2.79b-fix-opencollada.patch
deleted file mode 100644
index ab1704864a0..00000000000
--- a/media-gfx/blender/files/blender-2.79b-fix-opencollada.patch
+++ /dev/null
@@ -1,112 +0,0 @@
-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)
diff --git a/media-gfx/blender/files/blender-2.79b-gcc-8.patch b/media-gfx/blender/files/blender-2.79b-gcc-8.patch
deleted file mode 100644
index 3a64ad2f796..00000000000
--- a/media-gfx/blender/files/blender-2.79b-gcc-8.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- 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
- {
diff --git a/media-gfx/blender/files/blender-fix-install-rules.patch b/media-gfx/blender/files/blender-fix-install-rules.patch
deleted file mode 100644
index e62aba814b9..00000000000
--- a/media-gfx/blender/files/blender-fix-install-rules.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-diff -purN a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
---- a/source/creator/CMakeLists.txt 2016-09-28 10:26:55.000000000 +0100
-+++ b/source/creator/CMakeLists.txt 2016-10-03 12:17:08.938928486 +0100
-@@ -328,12 +328,6 @@ endif()
- # Install Targets (Generic, All Platforms)
-
-
--# important to make a clean install each time, else old scripts get loaded.
--install(
-- CODE
-- "file(REMOVE_RECURSE ${TARGETDIR_VER})"
--)
--
- if(WITH_PYTHON)
- # install(CODE "message(\"copying blender scripts...\")")
-
diff --git a/media-gfx/blender/metadata.xml b/media-gfx/blender/metadata.xml
index 2432483fedd..0dff6db1f81 100644
--- a/media-gfx/blender/metadata.xml
+++ b/media-gfx/blender/metadata.xml
@@ -48,9 +48,6 @@
<flag name="elbeem">
Adds surface fluid simulation to Blender using El'Beem library.
</flag>
- <flag name="game-engine">
- Adds Game Engine support to Blender.
- </flag>
<flag name="headless">
Build without graphical support (renderfarm, server mode only).
</flag>
@@ -77,9 +74,6 @@
<flag name="osl">
Add support for OpenShadingLanguage scripting.
</flag>
- <flag name="player">
- Build the Blender Player. THis requires the Game engine.
- </flag>
<flag name="standalone">
Build the standalone version of Cycles.
</flag>
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/blender/files/, media-gfx/blender/
@ 2020-08-24 13:42 Sam James
0 siblings, 0 replies; 18+ messages in thread
From: Sam James @ 2020-08-24 13:42 UTC (permalink / raw
To: gentoo-commits
commit: 5ffd98d291730cc22e4cbbc6e4ae717fbb17f282
Author: Adrian Grigo <agrigo2001 <AT> yahoo <DOT> com <DOT> au>
AuthorDate: Thu Aug 20 07:29:03 2020 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Aug 24 13:41:56 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5ffd98d2
media-gfx/blender: Blender with openvdb requires openvdb-7.0.0 only
Compiling blender with openvdb fails using openvdb-7.1.0, as
std::make_unique is not available in c++11. Upgrading to newer c++ was
discussed upstream and it was decided to remain with c++11 now, in
keeping with the VFX reference platform, and update to c++17 in 2021.
See https://developer.blender.org/T76783
Openvdb 7.0.0 uses c++11, whereas 7.1.0 uses c++14. So it will not
be possible to use versions 7.1.0 and above until blender updates to
c++14 or higher next year.
Signed-off-by: Adrian Grigo <agrigo2001 <AT> yahoo.com.au>
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 | 4 ++--
media-gfx/blender/blender-2.83.4.ebuild | 2 +-
media-gfx/blender/files/blender-fix-install-rules.patch | 16 ++++++++++++++++
3 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/media-gfx/blender/blender-2.79b-r2.ebuild b/media-gfx/blender/blender-2.79b-r2.ebuild
index 1b08a01395b..977f12110a6 100644
--- a/media-gfx/blender/blender-2.79b-r2.ebuild
+++ b/media-gfx/blender/blender-2.79b-r2.ebuild
@@ -5,7 +5,7 @@ EAPI=6
PYTHON_COMPAT=( python3_6 )
-inherit check-reqs cmake-utils xdg-utils flag-o-matic xdg-utils \
+inherit check-reqs cmake-utils flag-o-matic xdg-utils \
pax-utils python-single-r1 toolchain-funcs eapi7-ver
DESCRIPTION="3D Creation/Animation/Publishing System"
@@ -77,7 +77,7 @@ RDEPEND="${PYTHON_DEPS}
)
opensubdiv? ( >=media-libs/opensubdiv-3.3.0:=[cuda=,opencl=] )
openvdb? (
- media-gfx/openvdb[abi4-compat]
+ <media-gfx/openvdb-7[abi4-compat]
dev-cpp/tbb
>=dev-libs/c-blosc-1.5.2
)
diff --git a/media-gfx/blender/blender-2.83.4.ebuild b/media-gfx/blender/blender-2.83.4.ebuild
index de3ba5896dc..b6e7cb00c60 100644
--- a/media-gfx/blender/blender-2.83.4.ebuild
+++ b/media-gfx/blender/blender-2.83.4.ebuild
@@ -85,7 +85,7 @@ RDEPEND="${PYTHON_DEPS}
)
opensubdiv? ( >=media-libs/opensubdiv-3.4.0[cuda=,opencl=] )
openvdb? (
- >=media-gfx/openvdb-7.0.0[abi6-compat(-)?,abi7-compat(-)?]
+ ~media-gfx/openvdb-7.0.0[abi6-compat(-)?,abi7-compat(-)?]
dev-cpp/tbb
dev-libs/c-blosc:=
)
diff --git a/media-gfx/blender/files/blender-fix-install-rules.patch b/media-gfx/blender/files/blender-fix-install-rules.patch
new file mode 100644
index 00000000000..e62aba814b9
--- /dev/null
+++ b/media-gfx/blender/files/blender-fix-install-rules.patch
@@ -0,0 +1,16 @@
+diff -purN a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
+--- a/source/creator/CMakeLists.txt 2016-09-28 10:26:55.000000000 +0100
++++ b/source/creator/CMakeLists.txt 2016-10-03 12:17:08.938928486 +0100
+@@ -328,12 +328,6 @@ endif()
+ # Install Targets (Generic, All Platforms)
+
+
+-# important to make a clean install each time, else old scripts get loaded.
+-install(
+- CODE
+- "file(REMOVE_RECURSE ${TARGETDIR_VER})"
+-)
+-
+ if(WITH_PYTHON)
+ # install(CODE "message(\"copying blender scripts...\")")
+
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/blender/files/, media-gfx/blender/
@ 2020-08-24 13:42 Sam James
0 siblings, 0 replies; 18+ messages in thread
From: Sam James @ 2020-08-24 13:42 UTC (permalink / raw
To: gentoo-commits
commit: cca9b716491a91b496106a19df4e5f554b6a1717
Author: Adrian Grigo <agrigo2001 <AT> yahoo <DOT> com <DOT> au>
AuthorDate: Sat Aug 22 01:08:55 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=cca9b716
media-gfx/blender: Version bump to 2.83.4
Blender 2.83.4 works with python 3.7. It may compile with 3.8, but
blender only supports 3.7 officially as it follows the VFX Reference
Platform to ensure that user add ons are not broken in the process.
They plan to introduce 3.8 support in 2021.
New features include a new interface, the realtime eevee renderer,
and importing openvdb files created by other packages among others.
Game engine and Blender Player were removed in 2.80.
Bug fixes in this version are alembic support, upstream fixes for
opencollada, requiring openjpeg:2 to avoid security issues, and
mimeinfo cache is correctly updated. Where these issues remain in
blender 2.79b, the bug is linked but should be closed only when
blender 2.79b is removed.
On my system the docs do not currently compile,
and the polyfill2d test still fails like 2.79b.
Blender 2.83 support for draco, embree, oidn, usd and openxr is not yet
implemented pending development of ebuilds for these packages.
Signed-off-by: Adrian Grigo <agrigo2001 <AT> yahoo.com.au>
Bug: https://bugs.gentoo.org/667352
Bug: https://bugs.gentoo.org/735590
Bug: https://bugs.gentoo.org/718772
Closes: https://bugs.gentoo.org/737388
Closes: https://bugs.gentoo.org/689740
Package-Manager: Portage-2.3.103, Repoman-2.3.23
Signed-off-by: Sam James <sam <AT> gentoo.org>
media-gfx/blender/Manifest | 1 +
media-gfx/blender/blender-2.83.4.ebuild | 316 +++++++++++++++++++++
.../blender/files/blender-fix-install-rules.patch | 16 --
media-gfx/blender/metadata.xml | 22 ++
4 files changed, 339 insertions(+), 16 deletions(-)
diff --git a/media-gfx/blender/Manifest b/media-gfx/blender/Manifest
index 2a585f30d14..cbe57e4eec0 100644
--- a/media-gfx/blender/Manifest
+++ b/media-gfx/blender/Manifest
@@ -1 +1,2 @@
DIST blender-2.79b.tar.gz 50204270 BLAKE2B 78bda294df783ee9bcbcf32f9a112737b2947da5146fd4351b8b36d81c6630ed0ea302b2fb539642cfbdcc4b64df35af5c8545a3bbf50b1cf87dcf3a60eb4ac0 SHA512 2db21ace446168dd683cdb5aad9dec001f8888ae4e9603a04ddb44fb78489ded827deb07e83712b0f1118a0e7bf66f2a5d935dc4ebb3a6703d72672ff414367f
+DIST blender-2.83.4.tar.xz 38528352 BLAKE2B 54596207cbee34fcaa6b81a0d829976b42c28c793b88de81d78c1c3fdfe9dd2a0189a314be281b2a0f1829a0b7fd30d37bceaa28d35c9794dcb0f009fa71e83d SHA512 061735273159742784ed210d13fb39ad076efbbfd5f0291bab1b983699d43b20462dc7e4795e28dab0cd191c9879b43d9ad0f0545c24ef5da23c74679e5ccab5
diff --git a/media-gfx/blender/blender-2.83.4.ebuild b/media-gfx/blender/blender-2.83.4.ebuild
new file mode 100644
index 00000000000..de3ba5896dc
--- /dev/null
+++ b/media-gfx/blender/blender-2.83.4.ebuild
@@ -0,0 +1,316 @@
+# 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/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 )
+ 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-cpp/tbb
+ dev-libs/c-blosc:=
+ )
+ osl? ( media-libs/osl )
+ sdl? ( media-libs/libsdl2[sound,joystick] )
+ sndfile? ( media-libs/libsndfile )
+ 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 )
+"
+
+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
+
+ 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}
+
+ 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_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)
+ -DWITH_X11=$(usex !headless)
+ )
+ 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 "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
+ 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-fix-install-rules.patch b/media-gfx/blender/files/blender-fix-install-rules.patch
deleted file mode 100644
index e62aba814b9..00000000000
--- a/media-gfx/blender/files/blender-fix-install-rules.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-diff -purN a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
---- a/source/creator/CMakeLists.txt 2016-09-28 10:26:55.000000000 +0100
-+++ b/source/creator/CMakeLists.txt 2016-10-03 12:17:08.938928486 +0100
-@@ -328,12 +328,6 @@ endif()
- # Install Targets (Generic, All Platforms)
-
-
--# important to make a clean install each time, else old scripts get loaded.
--install(
-- CODE
-- "file(REMOVE_RECURSE ${TARGETDIR_VER})"
--)
--
- if(WITH_PYTHON)
- # install(CODE "message(\"copying blender scripts...\")")
-
diff --git a/media-gfx/blender/metadata.xml b/media-gfx/blender/metadata.xml
index c00fc6daf3f..2432483fedd 100644
--- a/media-gfx/blender/metadata.xml
+++ b/media-gfx/blender/metadata.xml
@@ -14,6 +14,16 @@
rendering, post-production, interactive creation and playback.
</longdescription>
<use>
+ <flag name="abi6-compat">
+ Build for OpenVDB ABI 6.
+ </flag>
+ <flag name="abi7-compat">
+ Build for OpenVDB ABI 7.
+ </flag>
+ <flag name="alembic">
+ Add support for Alembic through
+ <pkg>media-gfx/alembic</pkg>.
+ </flag>
<flag name="bullet">
Enable Bullet (Physics Engine).
</flag>
@@ -70,6 +80,18 @@
<flag name="player">
Build the Blender Player. THis requires the Game engine.
</flag>
+ <flag name="standalone">
+ Build the standalone version of Cycles.
+ </flag>
+ <flag name="system-numpy">
+ Use the system numpy implementation rather than a local copy.
+ </flag>
+ <flag name="system-python">
+ Use the system python implementation rather than a local copy.
+ </flag>
+ <flag name="tbb">
+ Use threading building blocks library from <pkg>dev-cpp/tbb</pkg>.
+ </flag>
<flag name="test">
Build the provided unit tests.
</flag>
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/blender/files/, media-gfx/blender/
@ 2019-03-21 18:12 Michał Górny
0 siblings, 0 replies; 18+ messages in thread
From: Michał Górny @ 2019-03-21 18:12 UTC (permalink / raw
To: gentoo-commits
commit: 40d74c39f382e84086c763a23e1b63ef3427714e
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 21 15:21:43 2019 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Mar 21 18:01:21 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=40d74c39
media-gfx/blender: Drop 2.72b-r4, due to py3.4 removal
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
media-gfx/blender/Manifest | 1 -
media-gfx/blender/blender-2.72b-r4.ebuild | 290 ---------------------
.../blender/files/blender-2.68-doxyfile.patch | 19 --
.../files/blender-2.68-fix-install-rules.patch | 26 --
media-gfx/blender/files/blender-2.70-sse2.patch | 35 ---
media-gfx/blender/files/blender-2.72-T42797.diff | 13 -
.../files/blender-2.72b-fix-util_simd.patch | 10 -
.../blender/files/blender-2.72b-gcc6-fixes.patch | 126 ---------
media-gfx/blender/metadata.xml | 34 +--
9 files changed, 12 insertions(+), 542 deletions(-)
diff --git a/media-gfx/blender/Manifest b/media-gfx/blender/Manifest
index 42826ca0c67..1255e093b89 100644
--- a/media-gfx/blender/Manifest
+++ b/media-gfx/blender/Manifest
@@ -1,3 +1,2 @@
-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.72b-r4.ebuild b/media-gfx/blender/blender-2.72b-r4.ebuild
deleted file mode 100644
index 9d68984d4e3..00000000000
--- a/media-gfx/blender/blender-2.72b-r4.ebuild
+++ /dev/null
@@ -1,290 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-## 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 gnome2-utils cmake-utils eutils python-single-r1 versionator flag-o-matic toolchain-funcs pax-utils check-reqs xdg-utils
-
-DESCRIPTION="3D Creation/Animation/Publishing System"
-HOMEPAGE="https://www.blender.org"
-
-case ${PV} in
- *_p*)
- SRC_URI="https://dev.gentoo.org/~lu_zero/${P}.tar.gz" ;;
- *)
- SRC_URI="https://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:0=
- media-libs/libpng:0
- media-libs/libsamplerate
- 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
- "${FILESDIR}"/${P}-gcc6-fixes.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
- xdg_desktop_database_update
-}
-
-pkg_postrm() {
- gnome2_icon_cache_update
- xdg_desktop_database_update
-}
diff --git a/media-gfx/blender/files/blender-2.68-doxyfile.patch b/media-gfx/blender/files/blender-2.68-doxyfile.patch
deleted file mode 100644
index c11c793fda9..00000000000
--- a/media-gfx/blender/files/blender-2.68-doxyfile.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-commit 62308d9fc24bde22a50497816c44c8ca91f96f63
-Author: hasufell <hasufell@gentoo.org>
-Date: Fri Jul 19 18:36:34 2013 +0200
-
- remove hhc.exe reference
-
-diff --git a/doc/doxygen/Doxyfile b/doc/doxygen/Doxyfile
-index 397cc30..ac61756 100644
---- a/doc/doxygen/Doxyfile
-+++ b/doc/doxygen/Doxyfile
-@@ -1051,7 +1051,7 @@ CHM_FILE = blender.chm
- # the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
- # the HTML help compiler on the generated index.hhp.
-
--HHC_LOCATION = "C:/Program Files (x86)/HTML Help Workshop/hhc.exe"
-+HHC_LOCATION =
-
- # If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
- # controls if a separate .chi index file is generated (YES) or that
diff --git a/media-gfx/blender/files/blender-2.68-fix-install-rules.patch b/media-gfx/blender/files/blender-2.68-fix-install-rules.patch
deleted file mode 100644
index aa8ecc9f617..00000000000
--- a/media-gfx/blender/files/blender-2.68-fix-install-rules.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-commit 94eed33f878e35a8c7b69b0c23b3b30026460f33
-Author: hasufell <hasufell@gentoo.org>
-Date: Fri Jul 19 18:50:08 2013 +0200
-
- remove stupid uninstall snippet
-
- whoever coded this... it is dangerous
- uninstall methods have NO PLACE in install rules
-
-diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
-index c84d944..2b9bf46 100644
---- a/source/creator/CMakeLists.txt
-+++ b/source/creator/CMakeLists.txt
-@@ -268,12 +268,6 @@ endif()
- # Install Targets (Generic, All Platforms)
-
-
--# important to make a clean install each time, else old scripts get loaded.
--install(
-- CODE
-- "file(REMOVE_RECURSE ${TARGETDIR_VER})"
--)
--
- if(WITH_PYTHON)
- # install(CODE "message(\"copying blender scripts...\")")
-
diff --git a/media-gfx/blender/files/blender-2.70-sse2.patch b/media-gfx/blender/files/blender-2.70-sse2.patch
deleted file mode 100644
index 6fc870ea325..00000000000
--- a/media-gfx/blender/files/blender-2.70-sse2.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-commit 0e0b27a589680e10e38a26575ad4dba8f3af2ec6
-Author: hasufell <hasufell@gentoo.org>
-Date: Fri Jul 19 18:50:19 2013 +0200
-
- add option to explicitly control sse2 optimization
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 78bb3c6..d5f4576 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -86,6 +86,7 @@
- #-----------------------------------------------------------------------------
- # Load some macros.
- include(build_files/cmake/macros.cmake)
-+include(CMakeDependentOption)
-
-
- #-----------------------------------------------------------------------------
-@@ -251,6 +252,7 @@
- # Misc
- option(WITH_INPUT_NDOF "Enable NDOF input devices (SpaceNavigator and friends)" ON)
- option(WITH_RAYOPTIMIZATION "Enable use of SIMD (SSE) optimizations for the raytracer" ON)
-+cmake_dependent_option(WITH_SSE2 "SSE2 optimizations" ON WITH_RAYOPTIMIZATION OFF)
- option(WITH_OPENNL "Enable use of Open Numerical Library" ON)
- if(UNIX AND NOT APPLE)
- option(WITH_INSTALL_PORTABLE "Install redistributeable runtime, otherwise install into CMAKE_INSTALL_PREFIX" ON)
-@@ -1950,7 +1952,7 @@
- set(PLATFORM_CFLAGS " ${COMPILER_SSE_FLAG} ${PLATFORM_CFLAGS}")
- add_definitions(-D__SSE__ -D__MMX__)
- endif()
-- if(SUPPORT_SSE2_BUILD)
-+ if(WITH_SSE2 AND SUPPORT_SSE2_BUILD)
- set(PLATFORM_CFLAGS " ${COMPILER_SSE2_FLAG} ${PLATFORM_CFLAGS}")
- add_definitions(-D__SSE2__)
- if(NOT SUPPORT_SSE_BUILD) # dont double up
diff --git a/media-gfx/blender/files/blender-2.72-T42797.diff b/media-gfx/blender/files/blender-2.72-T42797.diff
deleted file mode 100644
index cef03853434..00000000000
--- a/media-gfx/blender/files/blender-2.72-T42797.diff
+++ /dev/null
@@ -1,13 +0,0 @@
---- 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;
- bitmap = slot->bitmap;
-- g->width = bitmap.width;
-- g->height = bitmap.rows;
-+ g->width = (int)bitmap.width;
-+ g->height = (int)bitmap.rows;
-
- if (g->width && g->height) {
- if (sharp) {
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
deleted file mode 100644
index 8c83ee09628..00000000000
--- a/media-gfx/blender/files/blender-2.72b-fix-util_simd.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- 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/files/blender-2.72b-gcc6-fixes.patch b/media-gfx/blender/files/blender-2.72b-gcc6-fixes.patch
deleted file mode 100644
index 1c4ab09e62c..00000000000
--- a/media-gfx/blender/files/blender-2.72b-gcc6-fixes.patch
+++ /dev/null
@@ -1,126 +0,0 @@
-diff -purN a/source/blender/imbuf/intern/dds/ColorBlock.cpp b/source/blender/imbuf/intern/dds/ColorBlock.cpp
---- a/source/blender/imbuf/intern/dds/ColorBlock.cpp 2014-10-20 08:58:23.000000000 +0100
-+++ b/source/blender/imbuf/intern/dds/ColorBlock.cpp 2016-09-22 15:50:25.359318967 +0100
-@@ -86,8 +86,8 @@ void ColorBlock::init(const Image *img,
-
- void ColorBlock::init(uint w, uint h, const uint *data, uint x, uint y)
- {
-- const uint bw = min(w - x, 4U);
-- const uint bh = min(h - y, 4U);
-+ const uint bw = MIN(w - x, 4U);
-+ const uint bh = MIN(h - y, 4U);
-
- // Blocks that are smaller than 4x4 are handled by repeating the pixels.
- // @@ Thats only correct when block size is 1, 2 or 4, but not with 3. :(
-@@ -107,8 +107,8 @@ void ColorBlock::init(uint w, uint h, co
-
- void ColorBlock::init(uint w, uint h, const float *data, uint x, uint y)
- {
-- const uint bw = min(w - x, 4U);
-- const uint bh = min(h - y, 4U);
-+ const uint bw = MIN(w - x, 4U);
-+ const uint bh = MIN(h - y, 4U);
-
- // Blocks that are smaller than 4x4 are handled by repeating the pixels.
- // @@ Thats only correct when block size is 1, 2 or 4, but not with 3. :(
-@@ -124,10 +124,10 @@ void ColorBlock::init(uint w, uint h, co
- const uint idx = ((y + by) * w + x + bx);
-
- Color32 & c = color(e, i);
-- c.r = uint8(255 * clamp(data[idx + 0 * srcPlane], 0.0f, 1.0f)); // @@ Is this the right way to quantize floats to bytes?
-- c.g = uint8(255 * clamp(data[idx + 1 * srcPlane], 0.0f, 1.0f));
-- c.b = uint8(255 * clamp(data[idx + 2 * srcPlane], 0.0f, 1.0f));
-- c.a = uint8(255 * clamp(data[idx + 3 * srcPlane], 0.0f, 1.0f));
-+ c.r = uint8(255 * CLAMP(data[idx + 0 * srcPlane], 0.0f, 1.0f)); // @@ Is this the right way to quantize floats to bytes?
-+ c.g = uint8(255 * CLAMP(data[idx + 1 * srcPlane], 0.0f, 1.0f));
-+ c.b = uint8(255 * CLAMP(data[idx + 2 * srcPlane], 0.0f, 1.0f));
-+ c.a = uint8(255 * CLAMP(data[idx + 3 * srcPlane], 0.0f, 1.0f));
- }
- }
- }
-diff -purN a/source/blender/imbuf/intern/dds/Common.h b/source/blender/imbuf/intern/dds/Common.h
---- a/source/blender/imbuf/intern/dds/Common.h 2014-10-20 08:58:23.000000000 +0100
-+++ b/source/blender/imbuf/intern/dds/Common.h 2016-09-22 15:47:31.327081239 +0100
-@@ -28,14 +28,14 @@
- #ifndef __COMMON_H__
- #define __COMMON_H__
-
--#ifndef min
--#define min(a,b) ((a) <= (b) ? (a) : (b))
-+#ifndef MIN
-+#define MIN(a,b) ((a) <= (b) ? (a) : (b))
- #endif
--#ifndef max
--#define max(a,b) ((a) >= (b) ? (a) : (b))
-+#ifndef MAX
-+#define MAX(a,b) ((a) >= (b) ? (a) : (b))
- #endif
--#ifndef clamp
--#define clamp(x,a,b) min(max((x), (a)), (b))
-+#ifndef CLAMP
-+#define CLAMP(x,a,b) MIN(MAX((x), (a)), (b))
- #endif
-
- template<typename T>
-diff -purN a/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp b/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp
---- a/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp 2014-10-20 08:58:23.000000000 +0100
-+++ b/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp 2016-09-22 16:10:53.985775837 +0100
-@@ -1102,8 +1102,8 @@ void DirectDrawSurface::mipmap(Image *im
- // Compute width and height.
- for (uint m = 0; m < mipmap; m++)
- {
-- w = max(1U, w / 2);
-- h = max(1U, h / 2);
-+ w = MAX(1U, w / 2);
-+ h = MAX(1U, h / 2);
- }
-
- img->allocate(w, h);
-@@ -1223,9 +1223,9 @@ void DirectDrawSurface::readBlockImage(I
- readBlock(&block);
-
- // Write color block.
-- for (uint y = 0; y < min(4U, h-4*by); y++)
-+ for (uint y = 0; y < MIN(4U, h-4*by); y++)
- {
-- for (uint x = 0; x < min(4U, w-4*bx); x++)
-+ for (uint x = 0; x < MIN(4U, w-4*bx); x++)
- {
- img->pixel(4*bx+x, 4*by+y) = block.color(x, y);
- }
-@@ -1240,7 +1240,7 @@ static Color32 buildNormal(uint8 x, uint
- float ny = 2 * (y / 255.0f) - 1;
- float nz = 0.0f;
- if (1 - nx*nx - ny*ny > 0) nz = sqrt(1 - nx*nx - ny*ny);
-- uint8 z = clamp(int(255.0f * (nz + 1) / 2.0f), 0, 255);
-+ uint8 z = CLAMP(int(255.0f * (nz + 1) / 2.0f), 0, 255);
-
- return Color32(x, y, z);
- }
-@@ -1379,9 +1379,9 @@ uint DirectDrawSurface::mipmapSize(uint
-
- for (uint m = 0; m < mipmap; m++)
- {
-- w = max(1U, w / 2);
-- h = max(1U, h / 2);
-- d = max(1U, d / 2);
-+ w = MAX(1U, w / 2);
-+ h = MAX(1U, h / 2);
-+ d = MAX(1U, d / 2);
- }
-
- if (header.pf.flags & DDPF_FOURCC)
-diff -purN a/source/blender/imbuf/intern/dds/FlipDXT.cpp b/source/blender/imbuf/intern/dds/FlipDXT.cpp
---- a/source/blender/imbuf/intern/dds/FlipDXT.cpp 2014-10-20 08:58:23.000000000 +0100
-+++ b/source/blender/imbuf/intern/dds/FlipDXT.cpp 2016-09-22 16:11:35.626829002 +0100
-@@ -246,8 +246,8 @@ int FlipDXTCImage(unsigned int width, un
-
- // mip levels are contiguous.
- data += block_bytes * blocks;
-- mip_width = max(1U, mip_width >> 1);
-- mip_height = max(1U, mip_height >> 1);
-+ mip_width = MAX(1U, mip_width >> 1);
-+ mip_height = MAX(1U, mip_height >> 1);
- }
-
- return 1;
diff --git a/media-gfx/blender/metadata.xml b/media-gfx/blender/metadata.xml
index 9dd73dfe352..14a1619c7d4 100644
--- a/media-gfx/blender/metadata.xml
+++ b/media-gfx/blender/metadata.xml
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <maintainer restrict=">=media-gfx/blender-2.77" type="person">
+ <maintainer type="person">
<email>dracwyrm@gentoo.org</email>
<name>Jonathan Scruggs</name>
</maintainer>
- <maintainer restrict=">=media-gfx/blender-2.77" type="person">
+ <maintainer type="person">
<email>agrigo2001@yahoo.com.au</email>
<name>Adrian Grigo</name>
</maintainer>
@@ -20,9 +20,6 @@
</longdescription>
<use>
- <flag name="boost">
- Enable features depending on boost.
- </flag>
<flag name="bullet">
Enable Bullet (Physics Engine).
</flag>
@@ -50,49 +47,42 @@
<flag name="elbeem">
Adds surface fluid simulation to Blender using El'Beem library.
</flag>
- <flag name="game-engine" restrict=">=media-gfx/blender-2.50">
+ <flag name="game-engine">
Adds Game Engine support to Blender.
</flag>
- <flag name="headless" restrict=">=media-gfx/blender-2.77">
+ <flag name="headless">
Build without graphical support (renderfarm, server mode only).
</flag>
- <flag name="llvm" restrict=">=media-gfx/blender-2.77">
+ <flag name="llvm">
Enable features depending on llvm.
</flag>
- <flag name="man" restrict=">=media-gfx/blender-2.77">
+ <flag name="man">
Build and install man pages.
</flag>
<flag name="ndof">
Enable NDOF input devices (SpaceNavigator and friends).
</flag>
- <flag name="opencl" restrict="<=media-gfx/blender-2.79">
+ <flag name="opencl">
Allow OpenCL Graphics Acceleration. This may
require extra graphics card drivers.</flag>
<flag name="openimageio">Enable OpenImageIO Support</flag>
- <flag name="opennl" restrict="<=media-gfx/blender-2.73">
- Enable use of Open Numerical Library
- </flag>
- <flag name="opensubdiv" restrict=">=media-gfx/blender-2.77">
+ <flag name="opensubdiv">
Add rendering support form OpenSubdiv from Dreamworks Animation
through <pkg>media-libs/opensubdiv</pkg>.
</flag>
- <flag name="openvdb" restrict=">=media-gfx/blender-2.77">
+ <flag name="openvdb">
Add GPU preview rendering. Only works with nVidia cards.
</flag>
- <flag name="osl" restrict=">=media-gfx/blender-2.79">
+ <flag name="osl">
Add support for OpenShadingLanguage scripting.
</flag>
<flag name="player">
Build the Blender Player. THis requires the Game engine.
</flag>
- <flag name="redcode" restrict="<=media-gfx/blender-2.73">
- This flag add support for RED CODE camera digital format (5K HD
- images *.r3d) - EXPERIMENTAL.
- </flag>
- <flag name="test" restrict=">=media-gfx/blender-2.77">
+ <flag name="test">
Build the provided unit tests.
</flag>
- <flag name="valgrind" restrict=">=media-gfx/blender-2.77">
+ <flag name="valgrind">
Add support for memory debugging using
<pkg>dev-util/valgrind</pkg>
</flag>
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/blender/files/, media-gfx/blender/
@ 2018-08-16 14:15 Jonathan Scruggs
0 siblings, 0 replies; 18+ messages in thread
From: Jonathan Scruggs @ 2018-08-16 14:15 UTC (permalink / raw
To: gentoo-commits
commit: b58e0ed989f4fcc06d535692214584bf79247ec2
Author: Jonathan Scruggs <dracwyrm <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 16 14:15:07 2018 +0000
Commit: Jonathan Scruggs <dracwyrm <AT> gentoo <DOT> org>
CommitDate: Thu Aug 16 14:15:07 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b58e0ed9
media-gfx/blender: add ffmpeg 4 compatibility patch
Package-Manager: Portage-2.3.44, Repoman-2.3.10
media-gfx/blender/blender-2.79b.ebuild | 1 +
.../files/blender-2.79b-ffmpeg-4-compat.patch | 62 ++++++++++++++++++++++
2 files changed, 63 insertions(+)
diff --git a/media-gfx/blender/blender-2.79b.ebuild b/media-gfx/blender/blender-2.79b.ebuild
index 4dc6dd61ee6..be1c95be0e8 100644
--- a/media-gfx/blender/blender-2.79b.ebuild
+++ b/media-gfx/blender/blender-2.79b.ebuild
@@ -97,6 +97,7 @@ DEPEND="${RDEPEND}
PATCHES=(
"${FILESDIR}/${PN}-fix-install-rules.patch"
"${FILESDIR}/${P}-gcc-8.patch"
+ "${FILESDIR}/${P}-ffmpeg-4-compat.patch"
)
blender_check_requirements() {
diff --git a/media-gfx/blender/files/blender-2.79b-ffmpeg-4-compat.patch b/media-gfx/blender/files/blender-2.79b-ffmpeg-4-compat.patch
new file mode 100644
index 00000000000..4ad05aafb15
--- /dev/null
+++ b/media-gfx/blender/files/blender-2.79b-ffmpeg-4-compat.patch
@@ -0,0 +1,62 @@
+diff -urN a/intern/ffmpeg/ffmpeg_compat.h b/intern/ffmpeg/ffmpeg_compat.h
+--- a/intern/ffmpeg/ffmpeg_compat.h 2018-03-23 15:22:25.000000000 +0000
++++ b/intern/ffmpeg/ffmpeg_compat.h 2018-08-16 14:39:23.484489828 +0100
+@@ -109,6 +109,45 @@
+
+ #endif
+
++/* XXX TODO Probably fix to correct modern flags in code? Not sure how old FFMPEG we want to support though,
++ * so for now this will do. */
++
++#ifndef FF_MIN_BUFFER_SIZE
++# ifdef AV_INPUT_BUFFER_MIN_SIZE
++# define FF_MIN_BUFFER_SIZE AV_INPUT_BUFFER_MIN_SIZE
++# endif
++#endif
++
++#ifndef FF_INPUT_BUFFER_PADDING_SIZE
++# ifdef AV_INPUT_BUFFER_PADDING_SIZE
++# define FF_INPUT_BUFFER_PADDING_SIZE AV_INPUT_BUFFER_PADDING_SIZE
++# endif
++#endif
++
++#ifndef CODEC_FLAG_GLOBAL_HEADER
++# ifdef AV_CODEC_FLAG_GLOBAL_HEADER
++# define CODEC_FLAG_GLOBAL_HEADER AV_CODEC_FLAG_GLOBAL_HEADER
++# endif
++#endif
++
++#ifndef CODEC_FLAG_GLOBAL_HEADER
++# ifdef AV_CODEC_FLAG_GLOBAL_HEADER
++# define CODEC_FLAG_GLOBAL_HEADER AV_CODEC_FLAG_GLOBAL_HEADER
++# endif
++#endif
++
++#ifndef CODEC_FLAG_INTERLACED_DCT
++# ifdef AV_CODEC_FLAG_INTERLACED_DCT
++# define CODEC_FLAG_INTERLACED_DCT AV_CODEC_FLAG_INTERLACED_DCT
++# endif
++#endif
++
++#ifndef CODEC_FLAG_INTERLACED_ME
++# ifdef AV_CODEC_FLAG_INTERLACED_ME
++# define CODEC_FLAG_INTERLACED_ME AV_CODEC_FLAG_INTERLACED_ME
++# endif
++#endif
++
+ /* FFmpeg upstream 1.0 is the first who added AV_ prefix. */
+ #if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(54, 59, 100)
+ # define AV_CODEC_ID_NONE CODEC_ID_NONE
+diff -urN a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c
+--- a/source/blender/blenkernel/intern/writeffmpeg.c 2018-03-23 15:22:25.000000000 +0000
++++ b/source/blender/blenkernel/intern/writeffmpeg.c 2018-08-16 14:39:21.702484751 +0100
+@@ -605,7 +605,8 @@
+ c->rc_buffer_aggressivity = 1.0;
+ #endif
+
+- c->me_method = ME_EPZS;
++ /* Deprecated and not doing anything since July 2015, deleted in recent ffmpeg */
++ //c->me_method = ME_EPZS;
+
+ codec = avcodec_find_encoder(c->codec_id);
+ if (!codec)
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/blender/files/, media-gfx/blender/
@ 2016-10-22 23:26 David Seifert
0 siblings, 0 replies; 18+ messages in thread
From: David Seifert @ 2016-10-22 23:26 UTC (permalink / raw
To: gentoo-commits
commit: cb021f3026afbe8c0acf42de427b209b72e69dc3
Author: Jonathan Scruggs <j.scruggs <AT> gmail <DOT> com>
AuthorDate: Sat Oct 22 17:24:28 2016 +0000
Commit: David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sat Oct 22 23:25:30 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cb021f30
media-gfx/blender: version bump to 2.78
- Switch to EAPI 6
- Added OpenSubDiv support
- Added OpenVDB support
- Fix doc building with binary drivers
- Add warning about directories not tracked by portage
Gentoo-Bug: 536078
Signed off by: Jonathan Scruggs (j.scruggs <AT> gmail.com, irc: Dracwyrm)
Signed off by: Adrian Grigo (agrigo2001 <AT> yahoo.com.au)
Closes: https://github.com/gentoo/gentoo/pull/2531
Signed-off-by: David Seifert <soap <AT> gentoo.org>
media-gfx/blender/Manifest | 1 +
media-gfx/blender/blender-2.78.ebuild | 302 +++++++++++++++++++++
.../files/blender-2.78-C++11-build-fix.patch | 11 +
.../blender/files/blender-fix-install-rules.patch | 16 ++
media-gfx/blender/metadata.xml | 85 ++++--
5 files changed, 391 insertions(+), 24 deletions(-)
diff --git a/media-gfx/blender/Manifest b/media-gfx/blender/Manifest
index 17ebd48..666ec08 100644
--- a/media-gfx/blender/Manifest
+++ b/media-gfx/blender/Manifest
@@ -1 +1,2 @@
DIST blender-2.72b.tar.gz 52018242 SHA256 4436c704afa28e2e5e7b28b2c06981806ddedab70565d40972e422c00644bf47 SHA512 9767797621e443ff9b6810d1713dda110f883c33626d40d7fe5dda676f549e3591516dc24b75feebd85823dd13437c34521ca752139cd31ddacf31ea6b14e124 WHIRLPOOL 3687255bc9f4195b25b66a75630676ee15e67cf10a058dca11b3472617b54aae2bebb1810cc16e19c58ca1c09b1ea8b70f72e30c05632ab0bae8910925a37a54
+DIST blender-2.78.tar.gz 44489809 SHA256 17863e1ccb3bfdcc932d37cf9e525318130064c756cfb92a9ab479780d3ed441 SHA512 9144ce28377271dafe973b59721da41b6e3954736c705e1540be8dba3124e4c32e5cce5fb3ef7158505d45401478d257720350b38fa8e8649cc35cbd28a2f978 WHIRLPOOL a1a70cb723a111d1ae5a33b274a0e23bbd9c1b0777f96c917da1b4854171a88b6abe64c0636613008de68e68200a1d387e940ee592ff87c225745c668508d896
diff --git a/media-gfx/blender/blender-2.78.ebuild b/media-gfx/blender/blender-2.78.ebuild
new file mode 100644
index 00000000..568dadc
--- /dev/null
+++ b/media-gfx/blender/blender-2.78.ebuild
@@ -0,0 +1,302 @@
+# Copyright 1999-2016 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 \
+ openvdb-compression 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.
+COMMON_DEPEND="
+ 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},openvdb-compression=]
+ dev-cpp/tbb
+ )
+ openvdb-compression? ( >=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 )"
+
+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
+ ${COMMON_DEPEND}"
+
+DEPEND="${RDEPEND}
+ >=dev-cpp/eigen-3.2.8:3
+ doc? (
+ app-doc/doxygen[-nodot(-),dot(+),latex]
+ dev-python/sphinx[latex]
+ )
+ nls? ( sys-devel/gettext )
+ ${COMMON_DEPEND}"
+
+PATCHES=( "${FILESDIR}"/${P}-C++11-build-fix.patch
+ "${FILESDIR}"/${PN}-fix-install-rules.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
+
+ 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-compression)
+ -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-C++11-build-fix.patch b/media-gfx/blender/files/blender-2.78-C++11-build-fix.patch
new file mode 100644
index 00000000..ca9b5e1
--- /dev/null
+++ b/media-gfx/blender/files/blender-2.78-C++11-build-fix.patch
@@ -0,0 +1,11 @@
+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-fix-install-rules.patch b/media-gfx/blender/files/blender-fix-install-rules.patch
new file mode 100644
index 00000000..e62aba8
--- /dev/null
+++ b/media-gfx/blender/files/blender-fix-install-rules.patch
@@ -0,0 +1,16 @@
+diff -purN a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
+--- a/source/creator/CMakeLists.txt 2016-09-28 10:26:55.000000000 +0100
++++ b/source/creator/CMakeLists.txt 2016-10-03 12:17:08.938928486 +0100
+@@ -328,12 +328,6 @@ endif()
+ # Install Targets (Generic, All Platforms)
+
+
+-# important to make a clean install each time, else old scripts get loaded.
+-install(
+- CODE
+- "file(REMOVE_RECURSE ${TARGETDIR_VER})"
+-)
+-
+ if(WITH_PYTHON)
+ # install(CODE "message(\"copying blender scripts...\")")
+
diff --git a/media-gfx/blender/metadata.xml b/media-gfx/blender/metadata.xml
index fb04137..003d27d 100644
--- a/media-gfx/blender/metadata.xml
+++ b/media-gfx/blender/metadata.xml
@@ -1,24 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <maintainer restrict=">=media-gfx/blender-2.72b-r4" type="person">
+ <maintainer restrict=">=media-gfx/blender-2.77" type="person">
<email>j.scruggs@gmail.com</email>
<name>Jonathan Scruggs</name>
- <description>Proxy maintainer</description>
</maintainer>
- <maintainer restrict=">=media-gfx/blender-2.72b-r4" type="person">
+ <maintainer restrict=">=media-gfx/blender-2.77" 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>
<maintainer type="project">
<email>proxy-maint@gentoo.org</email>
<name>Proxy Maintainers</name>
</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,
@@ -26,13 +24,23 @@
</longdescription>
<use>
- <flag name="game-engine" restrict=">=media-gfx/blender-2.50">
- Adds Game Engine support to Blender.
+ <flag name="boost">
+ Enable features depending on boost.
+ </flag>
+ <flag name="bullet">
+ Enable Bullet (Physics Engine).
</flag>
<flag name="collada">
Add support for Collada interchange format through
<pkg>media-libs/opencollada</pkg>.
</flag>
+ <flag name="colorio">
+ Enable OpenColorIO color management through
+ <pkg>media-libs/opencolorio</pkg>.
+ </flag>
+ <flag name="cuda">
+ Build cycles renderer with nVidia CUDA support.
+ </flag>
<flag name="cycles">
Build cycles renderer (requires <pkg>media-libs/openimageio</pkg> and
<pkg>dev-libs/boost</pkg>).
@@ -40,32 +48,61 @@
<flag name="dds">
Adds DDS textures support to Blender.
</flag>
- <flag name="player">
- Build the Blender Player. THis requires the Game engine.
+ <flag name="doc">
+ Build C and Python API documentation directly from the source code.
</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 name="game-engine" restrict=">=media-gfx/blender-2.50">
+ Adds Game Engine support to Blender.
</flag>
- <flag name="redcode">
- This flag add support for RED CODE camera digital format (5K HD
- images *.r3d) - EXPERIMENTAL.
+ <flag name="headless" restrict=">=media-gfx/blender-2.77">
+ Build without graphical support (renderfarm, server mode only).
</flag>
- <flag name="boost">
- Enable features depending on boost.
+ <flag name="jemalloc" restrict=">=media-gfx/blender-2.77">
+ Use <pkg>dev-libs/jemalloc</pkg> for memory allocation.
</flag>
- <flag name="bullet">
- Enable Bullet (Physics Engine).
+ <flag name="llvm" restrict=">=media-gfx/blender-2.77">
+ Enable features depending on llvm.
</flag>
- <flag name="colorio">
- Enable OpenColorIO color management.
+ <flag name="man" restrict=">=media-gfx/blender-2.77">
+ Build and install man pages.
</flag>
<flag name="ndof">
Enable NDOF input devices (SpaceNavigator and friends).
</flag>
+ <flag name="opencl">
+ Build cycles renderer with OpenCL GPU enhancements.
+ </flag>
<flag name="openimageio">Enable OpenImageIO Support</flag>
- <flag name="opennl">Enable use of Open Numerical Library</flag>
+ <flag name="opennl" restrict="<=media-gfx/blender-2.73">
+ Enable use of Open Numerical Library
+ </flag>
+ <flag name="opensubdiv" restrict=">=media-gfx/blender-2.77">
+ Add rendering support form OpenSubdiv from Dreamworks Animation
+ through <pkg>media-libs/opensubdiv</pkg>.
+ </flag>
+ <flag name="openvdb" restrict=">=media-gfx/blender-2.77">
+ Add GPU preview rendering. Only works with nVidia cards.
+ </flag>
+ <flag name="openvdb-compression" restrict=">=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>
+ <flag name="redcode" restrict="<=media-gfx/blender-2.73">
+ This flag add support for RED CODE camera digital format (5K HD
+ images *.r3d) - EXPERIMENTAL.
+ </flag>
+ <flag name="test" restrict=">=media-gfx/blender-2.77">
+ Build the provided unit tests.
+ </flag>
+ <flag name="valgrind" restrict=">=media-gfx/blender-2.77">
+ Add support for memory debugging using
+ <pkg>dev-util/valgrind</pkg>
+ </flag>
</use>
</pkgmetadata>
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/blender/files/, media-gfx/blender/
@ 2016-09-29 15:12 Michael Palimaka
0 siblings, 0 replies; 18+ messages in thread
From: Michael Palimaka @ 2016-09-29 15:12 UTC (permalink / raw
To: gentoo-commits
commit: 3259951943dda77ac2072c4079668c948537f82a
Author: Jonathan Scruggs <j.scruggs <AT> gmail <DOT> com>
AuthorDate: Thu Sep 22 17:26:26 2016 +0000
Commit: Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Thu Sep 29 15:12:39 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=32599519
media-gfx/blender: add gcc-6 compile fix
Not doing a revision bump as this patch only affects compiling
with GCC 6.
- Remove one dependency as it's not even used at all
- Add patch that fixes compiling with GCC 6
Closes Gentoo-Bug: 594694
Signed off by Jonathan Scruggs (j.scruggs <AT> gmail.com, irc: Dracwyrm)
media-gfx/blender/blender-2.72b-r4.ebuild | 2 +-
.../blender/files/blender-2.72b-gcc6-fixes.patch | 126 +++++++++++++++++++++
2 files changed, 127 insertions(+), 1 deletion(-)
diff --git a/media-gfx/blender/blender-2.72b-r4.ebuild b/media-gfx/blender/blender-2.72b-r4.ebuild
index c0a7e4d..970b009 100644
--- a/media-gfx/blender/blender-2.72b-r4.ebuild
+++ b/media-gfx/blender/blender-2.72b-r4.ebuild
@@ -68,7 +68,6 @@ RDEPEND="
media-libs/glew
media-libs/libpng:0
media-libs/libsamplerate
- sci-libs/ldl
sys-libs/zlib
virtual/glu
virtual/jpeg:0
@@ -112,6 +111,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-2.70-sse2.patch
"${FILESDIR}"/${PN}-2.72-T42797.diff
"${FILESDIR}"/${P}-fix-util_simd.patch
+ "${FILESDIR}"/${P}-gcc6-fixes.patch
)
pkg_pretend() {
diff --git a/media-gfx/blender/files/blender-2.72b-gcc6-fixes.patch b/media-gfx/blender/files/blender-2.72b-gcc6-fixes.patch
new file mode 100644
index 00000000..1c4ab09
--- /dev/null
+++ b/media-gfx/blender/files/blender-2.72b-gcc6-fixes.patch
@@ -0,0 +1,126 @@
+diff -purN a/source/blender/imbuf/intern/dds/ColorBlock.cpp b/source/blender/imbuf/intern/dds/ColorBlock.cpp
+--- a/source/blender/imbuf/intern/dds/ColorBlock.cpp 2014-10-20 08:58:23.000000000 +0100
++++ b/source/blender/imbuf/intern/dds/ColorBlock.cpp 2016-09-22 15:50:25.359318967 +0100
+@@ -86,8 +86,8 @@ void ColorBlock::init(const Image *img,
+
+ void ColorBlock::init(uint w, uint h, const uint *data, uint x, uint y)
+ {
+- const uint bw = min(w - x, 4U);
+- const uint bh = min(h - y, 4U);
++ const uint bw = MIN(w - x, 4U);
++ const uint bh = MIN(h - y, 4U);
+
+ // Blocks that are smaller than 4x4 are handled by repeating the pixels.
+ // @@ Thats only correct when block size is 1, 2 or 4, but not with 3. :(
+@@ -107,8 +107,8 @@ void ColorBlock::init(uint w, uint h, co
+
+ void ColorBlock::init(uint w, uint h, const float *data, uint x, uint y)
+ {
+- const uint bw = min(w - x, 4U);
+- const uint bh = min(h - y, 4U);
++ const uint bw = MIN(w - x, 4U);
++ const uint bh = MIN(h - y, 4U);
+
+ // Blocks that are smaller than 4x4 are handled by repeating the pixels.
+ // @@ Thats only correct when block size is 1, 2 or 4, but not with 3. :(
+@@ -124,10 +124,10 @@ void ColorBlock::init(uint w, uint h, co
+ const uint idx = ((y + by) * w + x + bx);
+
+ Color32 & c = color(e, i);
+- c.r = uint8(255 * clamp(data[idx + 0 * srcPlane], 0.0f, 1.0f)); // @@ Is this the right way to quantize floats to bytes?
+- c.g = uint8(255 * clamp(data[idx + 1 * srcPlane], 0.0f, 1.0f));
+- c.b = uint8(255 * clamp(data[idx + 2 * srcPlane], 0.0f, 1.0f));
+- c.a = uint8(255 * clamp(data[idx + 3 * srcPlane], 0.0f, 1.0f));
++ c.r = uint8(255 * CLAMP(data[idx + 0 * srcPlane], 0.0f, 1.0f)); // @@ Is this the right way to quantize floats to bytes?
++ c.g = uint8(255 * CLAMP(data[idx + 1 * srcPlane], 0.0f, 1.0f));
++ c.b = uint8(255 * CLAMP(data[idx + 2 * srcPlane], 0.0f, 1.0f));
++ c.a = uint8(255 * CLAMP(data[idx + 3 * srcPlane], 0.0f, 1.0f));
+ }
+ }
+ }
+diff -purN a/source/blender/imbuf/intern/dds/Common.h b/source/blender/imbuf/intern/dds/Common.h
+--- a/source/blender/imbuf/intern/dds/Common.h 2014-10-20 08:58:23.000000000 +0100
++++ b/source/blender/imbuf/intern/dds/Common.h 2016-09-22 15:47:31.327081239 +0100
+@@ -28,14 +28,14 @@
+ #ifndef __COMMON_H__
+ #define __COMMON_H__
+
+-#ifndef min
+-#define min(a,b) ((a) <= (b) ? (a) : (b))
++#ifndef MIN
++#define MIN(a,b) ((a) <= (b) ? (a) : (b))
+ #endif
+-#ifndef max
+-#define max(a,b) ((a) >= (b) ? (a) : (b))
++#ifndef MAX
++#define MAX(a,b) ((a) >= (b) ? (a) : (b))
+ #endif
+-#ifndef clamp
+-#define clamp(x,a,b) min(max((x), (a)), (b))
++#ifndef CLAMP
++#define CLAMP(x,a,b) MIN(MAX((x), (a)), (b))
+ #endif
+
+ template<typename T>
+diff -purN a/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp b/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp
+--- a/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp 2014-10-20 08:58:23.000000000 +0100
++++ b/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp 2016-09-22 16:10:53.985775837 +0100
+@@ -1102,8 +1102,8 @@ void DirectDrawSurface::mipmap(Image *im
+ // Compute width and height.
+ for (uint m = 0; m < mipmap; m++)
+ {
+- w = max(1U, w / 2);
+- h = max(1U, h / 2);
++ w = MAX(1U, w / 2);
++ h = MAX(1U, h / 2);
+ }
+
+ img->allocate(w, h);
+@@ -1223,9 +1223,9 @@ void DirectDrawSurface::readBlockImage(I
+ readBlock(&block);
+
+ // Write color block.
+- for (uint y = 0; y < min(4U, h-4*by); y++)
++ for (uint y = 0; y < MIN(4U, h-4*by); y++)
+ {
+- for (uint x = 0; x < min(4U, w-4*bx); x++)
++ for (uint x = 0; x < MIN(4U, w-4*bx); x++)
+ {
+ img->pixel(4*bx+x, 4*by+y) = block.color(x, y);
+ }
+@@ -1240,7 +1240,7 @@ static Color32 buildNormal(uint8 x, uint
+ float ny = 2 * (y / 255.0f) - 1;
+ float nz = 0.0f;
+ if (1 - nx*nx - ny*ny > 0) nz = sqrt(1 - nx*nx - ny*ny);
+- uint8 z = clamp(int(255.0f * (nz + 1) / 2.0f), 0, 255);
++ uint8 z = CLAMP(int(255.0f * (nz + 1) / 2.0f), 0, 255);
+
+ return Color32(x, y, z);
+ }
+@@ -1379,9 +1379,9 @@ uint DirectDrawSurface::mipmapSize(uint
+
+ for (uint m = 0; m < mipmap; m++)
+ {
+- w = max(1U, w / 2);
+- h = max(1U, h / 2);
+- d = max(1U, d / 2);
++ w = MAX(1U, w / 2);
++ h = MAX(1U, h / 2);
++ d = MAX(1U, d / 2);
+ }
+
+ if (header.pf.flags & DDPF_FOURCC)
+diff -purN a/source/blender/imbuf/intern/dds/FlipDXT.cpp b/source/blender/imbuf/intern/dds/FlipDXT.cpp
+--- a/source/blender/imbuf/intern/dds/FlipDXT.cpp 2014-10-20 08:58:23.000000000 +0100
++++ b/source/blender/imbuf/intern/dds/FlipDXT.cpp 2016-09-22 16:11:35.626829002 +0100
+@@ -246,8 +246,8 @@ int FlipDXTCImage(unsigned int width, un
+
+ // mip levels are contiguous.
+ data += block_bytes * blocks;
+- mip_width = max(1U, mip_width >> 1);
+- mip_height = max(1U, mip_height >> 1);
++ mip_width = MAX(1U, mip_width >> 1);
++ mip_height = MAX(1U, mip_height >> 1);
+ }
+
+ return 1;
^ permalink raw reply related [flat|nested] 18+ messages in thread
end of thread, other threads:[~2025-04-22 0:41 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-06 21:22 [gentoo-commits] repo/gentoo:master commit in: media-gfx/blender/files/, media-gfx/blender/ Andreas Sturmlechner
-- strict thread matches above, loose matches on Subject: below --
2025-04-22 0:41 Sam James
2025-04-22 0:41 Sam James
2024-12-01 8:34 Sam James
2023-10-27 2:59 Sam James
2023-05-01 15:15 Sam James
2023-02-17 5:29 Sam James
2022-12-20 10:53 Sam James
2022-09-01 2:06 Sam James
2022-02-12 3:55 Sam James
2021-06-10 0:51 Sam James
2020-11-08 10:42 Sam James
2020-08-24 13:42 Sam James
2020-08-24 13:42 Sam James
2019-03-21 18:12 Michał Górny
2018-08-16 14:15 Jonathan Scruggs
2016-10-22 23:26 David Seifert
2016-09-29 15:12 Michael Palimaka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox