public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: media-gfx/krita/files/, media-gfx/krita/
Date: Sun, 21 Jan 2024 19:15:04 +0000 (UTC)	[thread overview]
Message-ID: <1705864494.e4809498c27efa079b477bfcc80b32a403d5e594.asturm@gentoo> (raw)

commit:     e4809498c27efa079b477bfcc80b32a403d5e594
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 21 18:37:51 2024 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Jan 21 19:14:54 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e4809498

media-gfx/krita: Fix build with >=media-libs/libjxl-0.9

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

 media-gfx/krita/files/krita-5.1.5-libjxl-0.9.patch | 73 ++++++++++++++++++++++
 media-gfx/krita/krita-5.1.5.ebuild                 |  5 +-
 2 files changed, 76 insertions(+), 2 deletions(-)

diff --git a/media-gfx/krita/files/krita-5.1.5-libjxl-0.9.patch b/media-gfx/krita/files/krita-5.1.5-libjxl-0.9.patch
new file mode 100644
index 000000000000..a578f22c67f9
--- /dev/null
+++ b/media-gfx/krita/files/krita-5.1.5-libjxl-0.9.patch
@@ -0,0 +1,73 @@
+From ace7edcca6ad322581ab39620f21ccf3ffbd3b5a Mon Sep 17 00:00:00 2001
+From: Timo Gurr <timo.gurr@gmail.com>
+Date: Fri, 5 Jan 2024 14:04:50 +0000
+Subject: [PATCH] Fix build with libjxl 0.9.0
+
+Fix build with libjxl 0.9.0
+
+BUG:478987
+
+Test Plan
+---------
+
+* Upgrade to libjxl 0.9.0
+* Apply patch from MR and build krita (5.2.2)
+* Open/Display a sample image e.g. https://jpegxl.info/test-page/red-room.jxl
+
+Formalities Checklist
+---------------------
+
+- [x] I confirmed this builds.
+- [x] I confirmed Krita ran and the relevant functions work (Could successfully open/display a sample image https://jpegxl.info/test-page/red-room.jxl).
+- [ ] I tested the relevant unit tests and can confirm they are not broken. (If not possible, don't hesitate to ask for help!)
+- [x] I made sure my commits build individually and have good descriptions as per [KDE guidelines](https://community.kde.org/Policies/Commit_Policy).
+- [x] I made sure my code conforms to the standards set in the HACKING file.
+- [x] I can confirm the code is licensed and attributed appropriately, and that unattributed code is mine, as per [KDE Licensing Policy](https://community.kde.org/Policies/Licensing_Policy).
+
+_**Reminder: the reviewer is responsible for merging the patch, this is to ensure at the least two people can build the patch. In case a patch breaks the build, both the author and the reviewer should be contacted to fix the build.**_
+_**If this is not possible, the commits shall be reverted, and a notification with the reasoning and any relevant logs shall be sent to the mailing list, kimageshop@kde.org.**_
+---
+ plugins/impex/jxl/JPEGXLImport.cpp | 15 ++++++++++++++-
+ 1 file changed, 14 insertions(+), 1 deletion(-)
+
+diff --git a/plugins/impex/jxl/JPEGXLImport.cpp b/plugins/impex/jxl/JPEGXLImport.cpp
+index 573bae41247..f5b989b3b70 100644
+--- a/plugins/impex/jxl/JPEGXLImport.cpp
++++ b/plugins/impex/jxl/JPEGXLImport.cpp
+@@ -511,7 +511,9 @@ JPEGXLImport::convert(KisDocument *document, QIODevice *io, KisPropertiesConfigu
+             JxlColorEncoding colorEncoding{};
+             if (JXL_DEC_SUCCESS
+                 == JxlDecoderGetColorAsEncodedProfile(dec.get(),
++#if JPEGXL_NUMERIC_VERSION < JPEGXL_COMPUTE_NUMERIC_VERSION(0, 9, 0)
+                                                       nullptr,
++#endif
+                                                       JXL_COLOR_PROFILE_TARGET_DATA,
+                                                       &colorEncoding)) {
+                 const TransferCharacteristics transferFunction = [&]() {
+@@ -635,7 +637,12 @@ JPEGXLImport::convert(KisDocument *document, QIODevice *io, KisPropertiesConfigu
+                 size_t iccSize = 0;
+                 QByteArray iccProfile;
+                 if (JXL_DEC_SUCCESS
+-                    != JxlDecoderGetICCProfileSize(dec.get(), nullptr, JXL_COLOR_PROFILE_TARGET_DATA, &iccSize)) {
++                    != JxlDecoderGetICCProfileSize(dec.get(),
++#if JPEGXL_NUMERIC_VERSION < JPEGXL_COMPUTE_NUMERIC_VERSION(0,9,0)
++                                                   nullptr,
++#endif
++                                                   JXL_COLOR_PROFILE_TARGET_DATA,
++                                                   &iccSize)) {
+                     errFile << "ICC profile size retrieval failed";
+                     document->setErrorMessage(i18nc("JPEG-XL errors", "Unable to read the image profile."));
+                     return ImportExportCodes::ErrorWhileReading;
+@@ -643,7 +650,9 @@ JPEGXLImport::convert(KisDocument *document, QIODevice *io, KisPropertiesConfigu
+                 iccProfile.resize(static_cast<int>(iccSize));
+                 if (JXL_DEC_SUCCESS
+                     != JxlDecoderGetColorAsICCProfile(dec.get(),
++#if JPEGXL_NUMERIC_VERSION < JPEGXL_COMPUTE_NUMERIC_VERSION(0,9,0)
+                                                       nullptr,
++#endif
+                                                       JXL_COLOR_PROFILE_TARGET_DATA,
+                                                       reinterpret_cast<uint8_t *>(iccProfile.data()),
+                                                       static_cast<size_t>(iccProfile.size()))) {
+-- 
+GitLab
+

diff --git a/media-gfx/krita/krita-5.1.5.ebuild b/media-gfx/krita/krita-5.1.5.ebuild
index ab68ac1db844..283b2c2e7a76 100644
--- a/media-gfx/krita/krita-5.1.5.ebuild
+++ b/media-gfx/krita/krita-5.1.5.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -70,7 +70,7 @@ RDEPEND="${PYTHON_DEPS}
 	fftw? ( sci-libs/fftw:3.0= )
 	gif? ( media-libs/giflib )
 	gsl? ( sci-libs/gsl:= )
-	jpegxl? ( >=media-libs/libjxl-0.7.0_pre20220825 )
+	jpegxl? ( >=media-libs/libjxl-0.7.0_pre20220825:= )
 	heif? ( >=media-libs/libheif-1.11:=[x265] )
 	mypaint-brush-engine? ( media-libs/libmypaint:= )
 	openexr? ( media-libs/openexr:= )
@@ -91,6 +91,7 @@ PATCHES=(
 	"${WORKDIR}/${P}-exiv2-0.28.patch" # bug 906472
 	"${FILESDIR}/${P}-ocio-2.3.0.patch" # bug 915107
 	"${FILESDIR}/${P}-sip-6.8.patch" # bug 919139
+	"${FILESDIR}/${P}-libjxl-0.9.patch" # bug 922524
 )
 
 pkg_setup() {


             reply	other threads:[~2024-01-21 19:15 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-21 19:15 Andreas Sturmlechner [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-02-28  8:19 [gentoo-commits] repo/gentoo:master commit in: media-gfx/krita/files/, media-gfx/krita/ Andreas Sturmlechner
2024-11-28 17:34 Andreas Sturmlechner
2024-11-25 22:39 Andreas Sturmlechner
2024-11-09 15:21 Andreas Sturmlechner
2024-07-13 19:59 Andreas Sturmlechner
2024-07-13 18:02 Sam James
2023-10-03 19:21 Andreas Sturmlechner
2023-01-24 16:12 Andreas Sturmlechner
2022-06-06  1:27 Sam James
2022-02-19 16:27 Andreas Sturmlechner
2021-12-29 16:34 Andreas Sturmlechner
2021-02-23 19:53 Andreas Sturmlechner
2020-10-31  9:23 Andreas Sturmlechner
2020-04-18 19:33 Andreas Sturmlechner
2019-11-15 17:37 Andreas Sturmlechner
2019-07-31  9:45 Andreas Sturmlechner
2019-07-16 11:00 Andreas Sturmlechner
2019-06-27 17:21 Andreas Sturmlechner
2019-06-27 17:21 Andreas Sturmlechner
2019-06-01 14:26 Andreas Sturmlechner
2019-04-03 18:59 Andreas Sturmlechner
2019-01-05 21:08 Andreas Sturmlechner
2018-10-15 16:46 Andreas Sturmlechner
2017-10-18  0:35 Andreas Sturmlechner
2017-10-15 20:47 Andreas Sturmlechner
2017-08-19 22:57 Andreas Sturmlechner
2017-02-15 16:40 Guilherme Amadio
2016-12-17 17:51 Johannes Huber
2016-09-22 11:40 Michael Palimaka

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=1705864494.e4809498c27efa079b477bfcc80b32a403d5e594.asturm@gentoo \
    --to=asturm@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