From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: media-gfx/blender/files/, media-gfx/blender/
Date: Sat, 12 Feb 2022 03:55:51 +0000 (UTC) [thread overview]
Message-ID: <1644638134.a05e2477ce750c3bf71836b8b8de9e00862cb929.sam@gentoo> (raw)
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)
next reply other threads:[~2022-02-12 3:55 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-12 3:55 Sam James [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-12-01 8:34 [gentoo-commits] repo/gentoo:master commit in: media-gfx/blender/files/, media-gfx/blender/ 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
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-06-06 21:22 Andreas Sturmlechner
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1644638134.a05e2477ce750c3bf71836b8b8de9e00862cb929.sam@gentoo \
--to=sam@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox