commit:     55f75efa4e03aa1e1dc18bf1374de7d75212aca1
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue Oct  3 18:57:00 2023 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Tue Oct  3 19:20:58 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=55f75efa

media-gfx/krita: Fix build with >=media-libs/opencolorio-2.3.0

Picked from https://invent.kde.org/graphics/krita/-/merge_requests/1942
after sanitising unrelated changes.

Closes: https://bugs.gentoo.org/915107
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 media-gfx/krita/files/krita-5.1.5-ocio-2.3.0.patch | 37 ++++++++++++++++++++++
 media-gfx/krita/krita-5.1.5.ebuild                 |  1 +
 2 files changed, 38 insertions(+)

diff --git a/media-gfx/krita/files/krita-5.1.5-ocio-2.3.0.patch 
b/media-gfx/krita/files/krita-5.1.5-ocio-2.3.0.patch
new file mode 100644
index 000000000000..534e24469e8a
--- /dev/null
+++ b/media-gfx/krita/files/krita-5.1.5-ocio-2.3.0.patch
@@ -0,0 +1,37 @@
+From 48edd05f32241c537cedf2831efc5eb91a112291 Mon Sep 17 00:00:00 2001
+From: killy |0veufOrever <[email protected]>
+Date: Tue, 19 Sep 2023 02:18:54 +0000
+Subject: [PATCH] Update OCIO to version 2.3.0
+
+---
+ 3rdparty/ext_ocio/CMakeLists.txt                    | 4 ++--
+ plugins/dockers/lut/ocio_display_filter_vfx2021.cpp | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+From 21d384fe9fafde2f45f7339a2234f4022c53152f Mon Sep 17 00:00:00 2001
+From: killy |0veufOrever <[email protected]>
+Date: Tue, 19 Sep 2023 03:17:17 +0000
+Subject: [PATCH] Dimensions are not required when the OCIO version is less
+ than 2.3.0
+
+---
+ plugins/dockers/lut/ocio_display_filter_vfx2021.cpp | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+ 
+diff --git a/plugins/dockers/lut/ocio_display_filter_vfx2021.cpp 
b/plugins/dockers/lut/ocio_display_filter_vfx2021.cpp
+--- a/plugins/dockers/lut/ocio_display_filter_vfx2021.cpp
++++ b/plugins/dockers/lut/ocio_display_filter_vfx2021.cpp
+@@ -507,7 +507,13 @@
+         unsigned height = 0;
+         OCIO::GpuShaderDesc::TextureType channel = 
OCIO::GpuShaderDesc::TEXTURE_RGB_CHANNEL;
+         OCIO::Interpolation interpolation = OCIO::INTERP_LINEAR;
++
++#if OCIO_VERSION_HEX >= 0x2030000
++        OCIO::GpuShaderCreator::TextureDimensions dimensions;
++        shaderDesc->getTexture(idx, textureName, samplerName, width, height, 
channel, dimensions, interpolation);
++#else
+         shaderDesc->getTexture(idx, textureName, samplerName, width, height, 
channel, interpolation);
++#endif
+ 
+         if (!textureName || !*textureName || !samplerName || !*samplerName || 
width == 0) {
+             errOpenGL << "The texture data is corrupted";

diff --git a/media-gfx/krita/krita-5.1.5.ebuild 
b/media-gfx/krita/krita-5.1.5.ebuild
index c8945c944730..f313dc477e04 100644
--- a/media-gfx/krita/krita-5.1.5.ebuild
+++ b/media-gfx/krita/krita-5.1.5.ebuild
@@ -89,6 +89,7 @@ BDEPEND="
 PATCHES=(
        "${FILESDIR}/${PN}-4.3.1-tests-optional.patch"
        "${WORKDIR}/${P}-exiv2-0.28.patch" # bug 906472
+       "${FILESDIR}/${P}-ocio-2.3.0.patch" # bug 915107
 )
 
 pkg_setup() {

Reply via email to