public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/opencolorio/files/, media-libs/opencolorio/
Date: Sat, 12 Feb 2022 03:55:51 +0000 (UTC)	[thread overview]
Message-ID: <1644638132.f5792b47accb449ecb4a2aafe3b0d8a720b63e94.sam@gentoo> (raw)

commit:     f5792b47accb449ecb4a2aafe3b0d8a720b63e94
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 12 02:13:20 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Feb 12 03:55:32 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f5792b47

media-libs/opencolorio: flip over to OpenEXR 3

Things are getting complicated with trying to keep Blender
on OpenEXR 2. Blender needs to switch as a result, but
so do its dependencies.

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

 .../files/opencolorio-2.1.1-imath-openexr-3.patch  |  75 +++++++++++++++
 media-libs/opencolorio/opencolorio-2.1.1-r3.ebuild | 106 +++++++++++++++++++++
 2 files changed, 181 insertions(+)

diff --git a/media-libs/opencolorio/files/opencolorio-2.1.1-imath-openexr-3.patch b/media-libs/opencolorio/files/opencolorio-2.1.1-imath-openexr-3.patch
new file mode 100644
index 000000000000..bf606889865d
--- /dev/null
+++ b/media-libs/opencolorio/files/opencolorio-2.1.1-imath-openexr-3.patch
@@ -0,0 +1,75 @@
+diff --git a/share/cmake/modules/FindImath.cmake b/share/cmake/modules/FindImath.cmake
+index 44a55e8..8a2d7ca 100644
+--- a/share/cmake/modules/FindImath.cmake
++++ b/share/cmake/modules/FindImath.cmake
+@@ -49,6 +49,7 @@ if(NOT OCIO_INSTALL_EXT_PACKAGES STREQUAL ALL)
+         find_path(Imath_INCLUDE_DIR
+             NAMES
+                 Imath/ImathConfig.h
++                Imath-3/IMathConfig.h
+             HINTS
+                 ${Imath_ROOT}
+                 ${PC_Imath_INCLUDE_DIRS}
+@@ -90,8 +91,8 @@ if(NOT OCIO_INSTALL_EXT_PACKAGES STREQUAL ALL)
+ 
+         # Get version from config header file
+         if(Imath_INCLUDE_DIR)
+-            if(EXISTS "${Imath_INCLUDE_DIR}/Imath/ImathConfig.h")
+-                set(_Imath_CONFIG "${Imath_INCLUDE_DIR}/Imath/ImathConfig.h")
++            if(EXISTS "${Imath_INCLUDE_DIR}/Imath-3/ImathConfig.h")
++                set(_Imath_CONFIG "${Imath_INCLUDE_DIR}/Imath-3/ImathConfig.h")
+             endif()
+         endif()
+ 
+diff --git a/src/utils/Half.h.in b/src/utils/Half.h.in
+index 3784341..237f3ed 100644
+--- a/src/utils/Half.h.in
++++ b/src/utils/Half.h.in
+@@ -8,7 +8,7 @@
+ #define OCIO_USE_IMATH_HALF @OCIO_USE_IMATH_HALF@
+ 
+ #if OCIO_USE_IMATH_HALF
+-#   include <Imath/half.h>
++#   include <Imath-3/half.h>
+ #else
+ #   include <OpenEXR/half.h>
+ #endif
+diff --git a/vendor/aftereffects/vc/vc15/utils/Half.h b/vendor/aftereffects/vc/vc15/utils/Half.h
+index 5035750..5144e72 100644
+--- a/vendor/aftereffects/vc/vc15/utils/Half.h
++++ b/vendor/aftereffects/vc/vc15/utils/Half.h
+@@ -8,7 +8,7 @@
+ #define OCIO_USE_IMATH_HALF 0
+ 
+ #if OCIO_USE_IMATH_HALF
+-#   include <Imath/half.h>
++#   include <Imath-3/half.h>
+ #else
+ #   include <OpenEXR/half.h>
+ #endif
+diff --git a/vendor/aftereffects/xcode/xcode12/utils/Half.h b/vendor/aftereffects/xcode/xcode12/utils/Half.h
+index 5035750..5144e72 100644
+--- a/vendor/aftereffects/xcode/xcode12/utils/Half.h
++++ b/vendor/aftereffects/xcode/xcode12/utils/Half.h
+@@ -8,7 +8,7 @@
+ #define OCIO_USE_IMATH_HALF 0
+ 
+ #if OCIO_USE_IMATH_HALF
+-#   include <Imath/half.h>
++#   include <Imath-3/half.h>
+ #else
+ #   include <OpenEXR/half.h>
+ #endif
+diff --git a/vendor/aftereffects/xcode/xcode9/utils/Half.h b/vendor/aftereffects/xcode/xcode9/utils/Half.h
+index 5035750..5144e72 100644
+--- a/vendor/aftereffects/xcode/xcode9/utils/Half.h
++++ b/vendor/aftereffects/xcode/xcode9/utils/Half.h
+@@ -8,7 +8,7 @@
+ #define OCIO_USE_IMATH_HALF 0
+ 
+ #if OCIO_USE_IMATH_HALF
+-#   include <Imath/half.h>
++#   include <Imath-3/half.h>
+ #else
+ #   include <OpenEXR/half.h>
+ #endif

diff --git a/media-libs/opencolorio/opencolorio-2.1.1-r3.ebuild b/media-libs/opencolorio/opencolorio-2.1.1-r3.ebuild
new file mode 100644
index 000000000000..65a48f36c3c7
--- /dev/null
+++ b/media-libs/opencolorio/opencolorio-2.1.1-r3.ebuild
@@ -0,0 +1,106 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{8..10} )
+
+inherit cmake flag-o-matic python-single-r1
+
+DESCRIPTION="A color management framework for visual effects and animation"
+HOMEPAGE="https://opencolorio.org https://github.com/AcademySoftwareFoundation/OpenColorIO"
+SRC_URI="https://github.com/AcademySoftwareFoundation/OpenColorIO/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/OpenColorIO-${PV}"
+
+LICENSE="BSD"
+# TODO: drop .1 on next SONAME bump (2.1 -> 2.2?) as we needed to nudge it
+# to force rebuild of consumers due to changing to openexr 3 changing API.
+SLOT="0/$(ver_cut 1-2).1"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
+IUSE="cpu_flags_x86_sse2 doc opengl python static-libs test"
+REQUIRED_USE="
+	doc? ( python )
+	python? ( ${PYTHON_REQUIRED_USE} )
+"
+
+# Not compatible with oiio 2.3
+# https://github.com/AcademySoftwareFoundation/OpenColorIO/issues/1509
+# bug #821073
+# 2.1.1 should be?
+RDEPEND="
+	dev-cpp/pystring
+	dev-python/pybind11
+	>=dev-cpp/yaml-cpp-0.7.0:=
+	dev-libs/imath:=
+	dev-libs/tinyxml
+	opengl? (
+		media-libs/lcms:2
+		media-libs/openimageio:=
+		media-libs/glew:=
+		media-libs/freeglut
+		virtual/opengl
+	)
+	python? ( ${PYTHON_DEPS} )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+	>=dev-util/cmake-3.16.2-r1
+	virtual/pkgconfig
+	doc? (
+		$(python_gen_cond_dep '
+			dev-python/sphinx[${PYTHON_USEDEP}]
+			dev-python/testresources[${PYTHON_USEDEP}]
+		')
+	)
+"
+
+# Restricting tests, bugs #439790 and #447908
+RESTRICT="test"
+
+CMAKE_BUILD_TYPE=RelWithDebInfo
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-2.1.1-imath-openexr-3.patch
+)
+
+pkg_setup() {
+	use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+	cmake_src_prepare
+
+	sed -i -e "s|LIBRARY DESTINATION lib|LIBRARY DESTINATION $(get_libdir)|g" {,src/bindings/python/,src/OpenColorIO/,src/libutils/oiiohelpers/,src/libutils/oglapphelpers/}CMakeLists.txt || die
+	sed -i -e "s|ARCHIVE DESTINATION lib|ARCHIVE DESTINATION $(get_libdir)|g" {,src/bindings/python/,src/OpenColorIO/,src/libutils/oiiohelpers/,src/libutils/oglapphelpers/}CMakeLists.txt || die
+}
+
+src_configure() {
+	# Missing features:
+	# - Truelight and Nuke are not in portage for now, so their support are disabled
+	# - Java bindings was not tested, so disabled
+	# Notes:
+	# - OpenImageIO is required for building ociodisplay and ocioconvert (USE opengl)
+	# - OpenGL, GLUT and GLEW is required for building ociodisplay (USE opengl)
+	local mycmakeargs=(
+		-DOCIO_USE_OPENEXR_HALF=OFF
+
+		-DBUILD_SHARED_LIBS=ON
+		-DOCIO_BUILD_STATIC=$(usex static-libs)
+		-DOCIO_BUILD_DOCS=$(usex doc)
+		-DOCIO_BUILD_APPS=$(usex opengl)
+		-DOCIO_BUILD_PYTHON=$(usex python)
+		-DOCIO_PYTHON_VERSION="${EPYTHON/python/}"
+		-DOCIO_BUILD_JAVA=OFF
+		-DOCIO_USE_SSE=$(usex cpu_flags_x86_sse2)
+		-DOCIO_BUILD_TESTS=$(usex test)
+		-DOCIO_BUILD_GPU_TESTS=$(usex test)
+		-DOCIO_BUILD_FROZEN_DOCS=$(usex doc)
+		-DOCIO_INSTALL_EXT_PACKAGES=NONE
+	)
+
+	# We need this to work around asserts that can trigger even in proper use cases.
+	# See https://github.com/AcademySoftwareFoundation/OpenColorIO/issues/1235
+	append-flags -DNDEBUG
+
+	cmake_src_configure
+}


             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 --
2025-01-05 20:35 [gentoo-commits] repo/gentoo:master commit in: media-libs/opencolorio/files/, media-libs/opencolorio/ Sam James
2024-10-04 21:40 Andreas Sturmlechner
2023-10-28 21:46 Sam James
2023-09-26 20:48 Sam James
2021-06-07 17:26 Sam James
2020-11-18 19:21 Sam James
2020-10-10 13:35 Sam James
2019-05-19 17:54 Andreas Sturmlechner
2018-05-26 11:01 Johannes Huber
2018-05-20 22:36 Johannes Huber
2018-01-19 11:57 David Seifert
2018-01-19 11:57 David Seifert
2017-09-23  8:38 David Seifert
2016-11-02 14:44 Sergey Popov
2016-05-30 20:16 Sergey Popov

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=1644638132.f5792b47accb449ecb4a2aafe3b0d8a720b63e94.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