From 84c70107a75cc164301bb3fd6bfa47d4a26c6880 Mon Sep 17 00:00:00 2001 From: Sam James Date: Tue, 15 Feb 2022 22:38:52 +0000 Subject: media-libs/opencolorio: force newer version of OIIO for OpenEXR 3 We want to verify we're building against a version that is OpenEXR3'd. Closes: https://bugs.gentoo.org/833439 Signed-off-by: Sam James --- media-libs/opencolorio/opencolorio-2.1.1-r4.ebuild | 102 --------------------- media-libs/opencolorio/opencolorio-2.1.1-r5.ebuild | 99 ++++++++++++++++++++ 2 files changed, 99 insertions(+), 102 deletions(-) delete mode 100644 media-libs/opencolorio/opencolorio-2.1.1-r4.ebuild create mode 100644 media-libs/opencolorio/opencolorio-2.1.1-r5.ebuild (limited to 'media-libs/opencolorio') diff --git a/media-libs/opencolorio/opencolorio-2.1.1-r4.ebuild b/media-libs/opencolorio/opencolorio-2.1.1-r4.ebuild deleted file mode 100644 index f90a88c6c238..000000000000 --- a/media-libs/opencolorio/opencolorio-2.1.1-r4.ebuild +++ /dev/null @@ -1,102 +0,0 @@ -# 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 - -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 -} diff --git a/media-libs/opencolorio/opencolorio-2.1.1-r5.ebuild b/media-libs/opencolorio/opencolorio-2.1.1-r5.ebuild new file mode 100644 index 000000000000..98b170f06824 --- /dev/null +++ b/media-libs/opencolorio/opencolorio-2.1.1-r5.ebuild @@ -0,0 +1,99 @@ +# 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} ) +" + +# Works with older OIIO but need to force a version w/ OpenEXR 3 +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-2.1.1-r4:= + 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 + +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 +} -- cgit v1.2.3-65-gdbad