summaryrefslogtreecommitdiff
path: root/media-libs/opencolorio
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-07-20 01:06:10 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-07-20 01:06:10 +0100
commit6f97f3b697516aeae25033ec37234739fff23fbc (patch)
tree06e8fc580948f1ebb56af172dd293763a2d6e478 /media-libs/opencolorio
parent60cdf17f0a24ced43a795eb9e096087f59c9d571 (diff)
gentoo auto-resync : 20:07:2023 - 01:06:10
Diffstat (limited to 'media-libs/opencolorio')
-rw-r--r--media-libs/opencolorio/Manifest6
-rw-r--r--media-libs/opencolorio/files/opencolorio-2.2.1-adjust-python-installation.patch17
-rw-r--r--media-libs/opencolorio/files/opencolorio-2.2.1-support-minizip-ng-4.patch92
-rw-r--r--media-libs/opencolorio/metadata.xml9
-rw-r--r--media-libs/opencolorio/opencolorio-2.2.1.ebuild130
5 files changed, 252 insertions, 2 deletions
diff --git a/media-libs/opencolorio/Manifest b/media-libs/opencolorio/Manifest
index b4830bce757a..c19671ec2dae 100644
--- a/media-libs/opencolorio/Manifest
+++ b/media-libs/opencolorio/Manifest
@@ -1,5 +1,9 @@
AUX opencolorio-2.1.1-gcc12.patch 421 BLAKE2B 9a16bf4f0fbf1a2fc277a46b547339415de07c07093f45fd7f4f445735f2c7bda437f75b5f7b30e72fd522af97e4995887312b7828d954ff4bc8a179f476f2c3 SHA512 1738924260ee3abf556207f3323c8cc45e3e5f9210ff46b8b1e9ac1766c39ac06cc50a61d0c77bdf10a318405f6f5dda84d15f4c004be950dce40e2dd3087f2b
AUX opencolorio-2.1.2-musl-strtol.patch 1041 BLAKE2B 58384b1a2a6e2778219909aaabe95061f0348ea7302cf97f85f417b709511b250cec578b8c3d85f2b0c1d35a469c4ddde932cc0ee1040daec8664141e9c1df4e SHA512 d268ac0c55ff6dcf5e1756a65c0593e39b2a7b86ccb913d5cbeaf6877465b537592bd903187a4183ae69c96b3c420ac1bcdf2175ff2071339eaaeed49bb6f52e
+AUX opencolorio-2.2.1-adjust-python-installation.patch 864 BLAKE2B e4e68ec13d47648ca41dce07ea7302a218e784e0b2bd700456642708271763c05e1bc667cdd9338a94790ac23f9862f1301e1eb4680bdb5ff948baba7051e3db SHA512 91afc3a825dadca245b046b2fd63edba2ffb44759a124eb3c9665b88d890b0a6cb09c1bed2067adf974faf65dedfd8bddb901e15a80e2d6b1c3645c08a0a7c3e
+AUX opencolorio-2.2.1-support-minizip-ng-4.patch 3133 BLAKE2B f84abb93233d0834b1f1bd8066140db1120ddf1a1eeb95d340283ed5ef56bb598787d8a23cdc5b8acbbdc595d6850956c25e0a0f57139d872e45dd5469407d55 SHA512 d0c811f80978f8d08dccd94cd25b26b5fd9e8ba3bcb2cffa82426e9faea5e0afef46843128e297614d7e2fd0886bc9928ddb7e03b9b691fd03b05923693de8da
DIST opencolorio-2.1.3.tar.gz 11024701 BLAKE2B bcd1eb6a74260f451e49ef40e729bfc4c354ab255d96c261fbf865c586f285fe876ed54b05276f3b6b25ece4fd261672fe1dd519041ffad77d7c78efc8cf161d SHA512 b26fcfa3ea12ab6e4b019a13ce79ebcfd215c674acb348f2d9f85f749b2a5beccd395ed1cc9954e4b3cb83a160b24a8d7d81994ac1d9ea8cfe074b81d6b8a061
+DIST opencolorio-2.2.1.tar.gz 11336775 BLAKE2B b463d6a0a7e7fec0a890fa8a0cd06ed269f925c5986dfb82eb53728a09d884c89e6c4dfe112706ce27351d4440909ff9680387028d1dc887e7d866b30c39c54f SHA512 d5f3a4b5bd661af7336c015d07e0feccb286464a08239a3c259a97217001161e7571f5137475fc2f4d1b9af6381bbfa03c0b60f41de282f114307961b8d84fc9
EBUILD opencolorio-2.1.3.ebuild 3223 BLAKE2B ef075595374b5f7bf5297c21762def8dc7b2d249ddc729bb2625001eb6e86074980aad05e11f40c073ba6c2cf60f3da97373ebd85a766c186a1edcba8b0c894c SHA512 cd4ebd845f05b28374a46f619514d593591030a8088a64d297579ddd8c345b9be4b99055cec1a5a5733aba5c1cc09911d3d3e50d794070e9e6ae2f15e600c0a6
-MISC metadata.xml 475 BLAKE2B a5e021764a849b172bc4e5a70bcf9c45930f2be703ec8b9db4ad2b6c0395eeab9cbe404d9146f2d48df5c7fb1d68b11bc1a5dc235c58ca6d6e715676fe2dea21 SHA512 823dba870b69fabaa8a61351ea24bbca701fec4a5d64d6a9a75a2306910b663447caaac7ef6e06ccb6d945a5e9eea4ebcb5322154eadcdc2d191abf879bf786d
+EBUILD opencolorio-2.2.1.ebuild 3413 BLAKE2B 5dcd8487851d4487eb3dd13fbc32071e9ced89bb2a5befc365a7c551f677c7aee3d1576648df443a3de9cad8a415f9353cbf2c16a77db8a98efaef6827550ef3 SHA512 996b6163f2c56d875ddaa6910ab00a926117f246ad499e85d037b6046011d2f0e76b6bef9e7a9807ae8af6b7b3bf2a335d540ef068114f600efa560108a0c776
+MISC metadata.xml 559 BLAKE2B 7536b8a64ac882a2d5ef74b9943ee018d7d838ea9be5c53660d15b1bc8746def38a0c11e3fa91a9adf21a573db9153f1f95f2b258933366d257fc799d6009484 SHA512 e42d01eacc2298ed20f377234555ca0c008e1996186ee0e3ad63dd1961299c15c7a3902aa73727b03b970c36ee6aa2e66dea2ab6cf9f67e7c41cc2aaa86f7c05
diff --git a/media-libs/opencolorio/files/opencolorio-2.2.1-adjust-python-installation.patch b/media-libs/opencolorio/files/opencolorio-2.2.1-adjust-python-installation.patch
new file mode 100644
index 000000000000..6f023310eb8d
--- /dev/null
+++ b/media-libs/opencolorio/files/opencolorio-2.2.1-adjust-python-installation.patch
@@ -0,0 +1,17 @@
+From 5ca483b67404a9ba2230f2f03ff3255eceb3d2bc Mon Sep 17 00:00:00 2001
+From: Bernd Waibel <waebbl-gentoo@posteo.net>
+Date: Sun, 19 Feb 2023 23:14:44 +0100
+Subject: [PATCH] [Gentoo-specific] adjust python installation
+
+Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
+--- a/src/bindings/python/CMakeLists.txt
++++ b/src/bindings/python/CMakeLists.txt
+@@ -230,7 +230,7 @@ target_compile_definitions(PyOpenColorIO
+ if(WIN32)
+ set(_Python_VARIANT_PATH "${CMAKE_INSTALL_LIBDIR}/site-packages")
+ else()
+- set(_Python_VARIANT_PATH "${CMAKE_INSTALL_LIBDIR}/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/site-packages")
++ set(_Python_VARIANT_PATH "${CMAKE_INSTALL_PREFIX}/lib/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/site-packages")
+ endif()
+
+ # Create an internal global variable to access it in another scope but not publicly visible
diff --git a/media-libs/opencolorio/files/opencolorio-2.2.1-support-minizip-ng-4.patch b/media-libs/opencolorio/files/opencolorio-2.2.1-support-minizip-ng-4.patch
new file mode 100644
index 000000000000..8ee4ceaf9970
--- /dev/null
+++ b/media-libs/opencolorio/files/opencolorio-2.2.1-support-minizip-ng-4.patch
@@ -0,0 +1,92 @@
+# From https://github.com/AcademySoftwareFoundation/OpenColorIO/pull/1806
+From d15ccddd4d20d66749577d7444de861112f6864c Mon Sep 17 00:00:00 2001
+From: Brad Smith <brad@comstyle.com>
+Date: Thu, 29 Jun 2023 09:57:28 -0400
+Subject: [PATCH] Add support for minizip-ng 4 API
+
+Signed-off-by: Brad Smith <brad@comstyle.com>
+---
+ src/OpenColorIO/OCIOZArchive.cpp | 22 +++++++++++++++++++++-
+ src/apps/ocioarchive/main.cpp | 4 ++++
+ 2 files changed, 25 insertions(+), 1 deletion(-)
+
+diff --git a/src/OpenColorIO/OCIOZArchive.cpp b/src/OpenColorIO/OCIOZArchive.cpp
+index 85fc7bb76..24d836e95 100644
+--- a/src/OpenColorIO/OCIOZArchive.cpp
++++ b/src/OpenColorIO/OCIOZArchive.cpp
+@@ -225,7 +225,11 @@ void archiveConfig(std::ostream & ostream, const Config & config, const char * c
+ std::string configStr = ss.str();
+
+ // Write zip to memory stream.
++#if MZ_VERSION_BUILD >= 040000
++ write_mem_stream = mz_stream_mem_create();
++#else
+ mz_stream_mem_create(&write_mem_stream);
++#endif
+ mz_stream_mem_set_grow_size(write_mem_stream, 128 * 1024);
+ mz_stream_open(write_mem_stream, NULL, MZ_OPEN_MODE_CREATE);
+
+@@ -237,7 +241,11 @@ void archiveConfig(std::ostream & ostream, const Config & config, const char * c
+ options.compress_level = ArchiveCompressionLevels::BEST;
+
+ // Create the writer handle.
++#if MZ_VERSION_BUILD >= 040000
++ archiver = mz_zip_writer_create();
++#else
+ mz_zip_writer_create(&archiver);
++#endif
+
+ // Archive options.
+ // Compression method
+@@ -332,7 +340,11 @@ void ExtractOCIOZArchive(const char * archivePath, const char * destination)
+ std::string outputDestination = pystring::os::path::normpath(destination);
+
+ // Create zip reader.
++#if MZ_VERSION_BUILD >= 040000
++ extracter = mz_zip_reader_create();
++#else
+ mz_zip_reader_create(&extracter);
++#endif
+
+ MinizipNgHandlerGuard extracterGuard(extracter, false, false);
+
+@@ -450,7 +462,11 @@ std::vector<uint8_t> getFileStringFromArchiveFile(const std::string & filepath,
+ std::vector<uint8_t> buffer;
+
+ // Create the reader object.
++#if MZ_VERSION_BUILD >= 040000
++ reader = mz_zip_reader_create();
++#else
+ mz_zip_reader_create(&reader);
++#endif
+
+ MinizipNgHandlerGuard extracterGuard(reader, false, true);
+
+@@ -510,7 +526,11 @@ void getEntriesMappingFromArchiveFile(const std::string & archivePath,
+ void *reader = NULL;
+
+ // Create the reader object.
++#if MZ_VERSION_BUILD >= 040000
++ reader = mz_zip_reader_create();
++#else
+ mz_zip_reader_create(&reader);
++#endif
+
+ MinizipNgHandlerGuard extracterGuard(reader, false, false);
+
+diff --git a/src/apps/ocioarchive/main.cpp b/src/apps/ocioarchive/main.cpp
+index 190cadee5..68054a6da 100644
+--- a/src/apps/ocioarchive/main.cpp
++++ b/src/apps/ocioarchive/main.cpp
+@@ -235,7 +235,11 @@ int main(int argc, const char **argv)
+ }
+
+ std::string path = args[0];
++#if MZ_VERSION_BUILD >= 040000
++ reader = mz_zip_reader_create();
++#else
+ mz_zip_reader_create(&reader);
++#endif
+ struct tm tmu_date;
+
+ err = mz_zip_reader_open_file(reader, path.c_str());
diff --git a/media-libs/opencolorio/metadata.xml b/media-libs/opencolorio/metadata.xml
index 8c99b35a00f1..6485e6974262 100644
--- a/media-libs/opencolorio/metadata.xml
+++ b/media-libs/opencolorio/metadata.xml
@@ -2,7 +2,14 @@
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<!-- maintainer-needed -->
- <longdescription lang="en">OpenColorIO (OCIO) is a complete color management solution geared towards motion picture production with an emphasis on visual effects and computer animation.</longdescription>
+ <longdescription lang="en">
+ OpenColorIO (OCIO) is a complete color management solution geared
+ towards motion picture production with an emphasis on visual effects
+ and computer animation.
+ </longdescription>
+ <use>
+ <flag name="apps">Build the OCIO command line apps</flag>
+ </use>
<upstream>
<remote-id type="github">AcademySoftwareFoundation/OpenColorIO</remote-id>
</upstream>
diff --git a/media-libs/opencolorio/opencolorio-2.2.1.ebuild b/media-libs/opencolorio/opencolorio-2.2.1.ebuild
new file mode 100644
index 000000000000..ab405183a85e
--- /dev/null
+++ b/media-libs/opencolorio/opencolorio-2.2.1.ebuild
@@ -0,0 +1,130 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..11} )
+
+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-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.2.1-support-minizip-ng-4.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
+}