summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Zander <negril.nx+gentoo@gmail.com>2023-09-26 19:24:38 +0200
committerSam James <sam@gentoo.org>2023-09-26 21:45:40 +0100
commitf6301c1fc5eac9e41164de7fd5c4db0c581979ad (patch)
tree3e183dced3a2b806d3952c1521e81a27ba1105c5 /media-libs/opencolorio
parentmedia-libs/opencolorio: 2.1.3, 2.2.1 require <dev-cpp/yaml-cpp-0.8.0 (diff)
downloadgentoo-f6301c1fc5eac9e41164de7fd5c4db0c581979ad.tar.gz
gentoo-f6301c1fc5eac9e41164de7fd5c4db0c581979ad.tar.bz2
gentoo-f6301c1fc5eac9e41164de7fd5c4db0c581979ad.zip
media-libs/opencolorio: add 2.3.0
Closes: https://bugs.gentoo.org/914716 Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-libs/opencolorio')
-rw-r--r--media-libs/opencolorio/Manifest1
-rw-r--r--media-libs/opencolorio/files/opencolorio-2.3.0-support-yaml-cpp-0.8.0.patch21
-rw-r--r--media-libs/opencolorio/opencolorio-2.3.0.ebuild131
3 files changed, 153 insertions, 0 deletions
diff --git a/media-libs/opencolorio/Manifest b/media-libs/opencolorio/Manifest
index debed58d79d4..fbe8b3a98232 100644
--- a/media-libs/opencolorio/Manifest
+++ b/media-libs/opencolorio/Manifest
@@ -1,2 +1,3 @@
DIST opencolorio-2.1.3.tar.gz 11024701 BLAKE2B bcd1eb6a74260f451e49ef40e729bfc4c354ab255d96c261fbf865c586f285fe876ed54b05276f3b6b25ece4fd261672fe1dd519041ffad77d7c78efc8cf161d SHA512 b26fcfa3ea12ab6e4b019a13ce79ebcfd215c674acb348f2d9f85f749b2a5beccd395ed1cc9954e4b3cb83a160b24a8d7d81994ac1d9ea8cfe074b81d6b8a061
DIST opencolorio-2.2.1.tar.gz 11336775 BLAKE2B b463d6a0a7e7fec0a890fa8a0cd06ed269f925c5986dfb82eb53728a09d884c89e6c4dfe112706ce27351d4440909ff9680387028d1dc887e7d866b30c39c54f SHA512 d5f3a4b5bd661af7336c015d07e0feccb286464a08239a3c259a97217001161e7571f5137475fc2f4d1b9af6381bbfa03c0b60f41de282f114307961b8d84fc9
+DIST opencolorio-2.3.0.tar.gz 11406998 BLAKE2B 0e62e43de076a712f68b68b91c9908bc9050316e3500e0924fafb08a3356ce361953f49dfd1eb022eeada11e499653833a48a22a4ba593504617c1c61b16d488 SHA512 cdf20ca6c85b1d70244d8532d010344f1cf85be6a116d831e83ea04d7c47a961049691e6a241e9a7f632d864df57a4bccb68084e27187ec8a05f1fdf344824d7
diff --git a/media-libs/opencolorio/files/opencolorio-2.3.0-support-yaml-cpp-0.8.0.patch b/media-libs/opencolorio/files/opencolorio-2.3.0-support-yaml-cpp-0.8.0.patch
new file mode 100644
index 000000000000..924ed2092881
--- /dev/null
+++ b/media-libs/opencolorio/files/opencolorio-2.3.0-support-yaml-cpp-0.8.0.patch
@@ -0,0 +1,21 @@
+From: Bernd Feige <Bernd.Feige@gmx.net>
+https://bugs.gentoo.org/914716#c12
+
+Index: OpenColorIO-2.3.0/share/cmake/modules/Findyaml-cpp.cmake
+===================================================================
+--- OpenColorIO-2.3.0.orig/share/cmake/modules/Findyaml-cpp.cmake
++++ OpenColorIO-2.3.0/share/cmake/modules/Findyaml-cpp.cmake
+@@ -50,7 +50,12 @@ if(NOT OCIO_INSTALL_EXT_PACKAGES STREQUA
+ endif()
+
+ if(yaml-cpp_FOUND)
+- get_target_property(yaml-cpp_LIBRARY yaml-cpp LOCATION)
++ if(TARGET yaml-cpp::yaml-cpp)
++ # yaml-cpp >= 0.8
++ get_target_property(yaml-cpp::yaml-cpp_LIBRARY yaml-cpp::yaml-cpp LOCATION)
++ else()
++ get_target_property(yaml-cpp_LIBRARY yaml-cpp LOCATION)
++ endif()
+ else()
+
+ # As yaml-cpp-config.cmake search fails, search an installed library
diff --git a/media-libs/opencolorio/opencolorio-2.3.0.ebuild b/media-libs/opencolorio/opencolorio-2.3.0.ebuild
new file mode 100644
index 000000000000..dc1dfe604786
--- /dev/null
+++ b/media-libs/opencolorio/opencolorio-2.3.0.ebuild
@@ -0,0 +1,131 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit cmake python-single-r1 virtualx
+
+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"
+SLOT="0/$(ver_cut 1-2)"
+# minizip-ng: ~arm ~arm64 ~ppc64 ~riscv
+# osl: ~riscv
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
+IUSE="apps cpu_flags_x86_sse2 doc opengl python static-libs test"
+# TODO: drop opengl? It does nothing without building either the apps or the testsuite
+REQUIRED_USE="
+ apps? ( opengl )
+ doc? ( python )
+ python? ( ${PYTHON_REQUIRED_USE} )
+ test? ( opengl )
+"
+
+RDEPEND="
+ dev-cpp/pystring
+ >=dev-cpp/yaml-cpp-0.7.0:=
+ dev-libs/expat
+ >=dev-libs/imath-3.1.5:=
+ sys-libs/minizip-ng
+ sys-libs/zlib
+ apps? (
+ media-libs/lcms:2
+ >=media-libs/openexr-3.1.5:=
+ )
+ opengl? (
+ media-libs/freeglut
+ media-libs/glew:=
+ media-libs/libglvnd
+ )
+ python? (
+ ${PYTHON_DEPS}
+ $(python_gen_cond_dep 'dev-python/pybind11[${PYTHON_USEDEP}]')
+ )
+"
+DEPEND="${RDEPEND}"
+# TODO: OSL tests would need OIIO, leading to a circular dependency. If OIIO
+# isn't found this test will be skipped (automagic if found?)
+BDEPEND="
+ virtual/pkgconfig
+ doc? (
+ app-doc/doxygen
+ $(python_gen_cond_dep '
+ dev-python/breathe[${PYTHON_USEDEP}]
+ dev-python/recommonmark[${PYTHON_USEDEP}]
+ dev-python/six[${PYTHON_USEDEP}]
+ dev-python/sphinx[${PYTHON_USEDEP}]
+ dev-python/sphinx-press-theme[${PYTHON_USEDEP}]
+ dev-python/sphinx-tabs[${PYTHON_USEDEP}]
+ dev-python/testresources[${PYTHON_USEDEP}]
+ ')
+ )
+ opengl? (
+ media-libs/freeglut
+ media-libs/glew:=
+ media-libs/libglvnd
+ )
+"
+# test? (
+# >=media-libs/openimageio-2.2.14
+# >=media-libs/osl-1.11
+# )
+# "
+
+# Restricting tests, bugs #439790 and #447908
+RESTRICT="!test? ( test )"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-2.2.1-adjust-python-installation.patch"
+ "${FILESDIR}/${PN}-2.3.0-support-yaml-cpp-0.8.0.patch"
+)
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ cmake_src_prepare
+
+ # Avoid automagic test dependency on OSL, bug #833933
+ # Can cause problems during e.g. OpenEXR unsplitting migration
+ cmake_run_in tests cmake_comment_add_subdirectory osl
+}
+
+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 or OpenEXR (default) is required for building ociodisplay and
+ # ocioconvert (USE opengl)
+ # - OpenGL, GLUT and GLEW is required for building ociodisplay (USE opengl)
+ local mycmakeargs=(
+ "-DBUILD_SHARED_LIBS=$(usex !static-libs)"
+ "-DOCIO_BUILD_APPS=$(usex apps)"
+ "-DOCIO_BUILD_DOCS=$(usex doc)"
+ "-DOCIO_BUILD_FROZEN_DOCS=$(usex doc)"
+ "-DOCIO_BUILD_GPU_TESTS=$(usex test)"
+ "-DOCIO_BUILD_JAVA=OFF"
+ "-DOCIO_BUILD_PYTHON=$(usex python)"
+ "-DOCIO_BUILD_TESTS=$(usex test)"
+ "-DOCIO_INSTALL_EXT_PACKAGES=NONE"
+ "-DOCIO_USE_OIIO_CMAKE_CONFIG=ON"
+ "-DOCIO_USE_SSE=$(usex cpu_flags_x86_sse2)"
+ )
+ use python && mycmakeargs+=(
+ "-DOCIO_PYTHON_VERSION=${EPYTHON/python/}"
+ "-DPython_EXECUTABLE=${PYTHON}"
+ "-DPYTHON_VARIANT_PATH=$(python_get_sitedir)"
+ )
+
+ cmake_src_configure
+}
+
+src_test() {
+ virtx cmake_src_test
+}