public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: media-gfx/krita/, media-gfx/krita/files/
Date: Sat, 13 Jul 2024 18:02:07 +0000 (UTC)	[thread overview]
Message-ID: <1720892078.65dbdb0f311291c3440fe315daf1a23e308af288.sam@gentoo> (raw)

commit:     65dbdb0f311291c3440fe315daf1a23e308af288
Author:     Aliaksei Urbanski <aliaksei.urbanski <AT> gmail <DOT> com>
AuthorDate: Tue Apr 23 11:07:58 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Jul 13 17:34:38 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=65dbdb0f

media-gfx/krita-5.2.2: fix the libjxl patch

The libjxl patch for version 5.1.5 is truncated,
so it doesn't fix the compatibility for 5.2.2.
The full version of the patch should be used.

Patch source:
  - https://invent.kde.org/graphics/krita/-/commit/ace7edcc

Co-authored-by: Timo Gurr <timo.gurr <AT> gmail.com>
Signed-off-by: Aliaksei Urbanski <aliaksei.urbanski <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/34736
Signed-off-by: Sam James <sam <AT> gentoo.org>

 media-gfx/krita/files/krita-5.2.2-libjxl-0.9.patch | 93 ++++++++++++++++++++++
 media-gfx/krita/krita-5.2.2.ebuild                 |  6 +-
 2 files changed, 96 insertions(+), 3 deletions(-)

diff --git a/media-gfx/krita/files/krita-5.2.2-libjxl-0.9.patch b/media-gfx/krita/files/krita-5.2.2-libjxl-0.9.patch
new file mode 100644
index 000000000000..83caf604bf70
--- /dev/null
+++ b/media-gfx/krita/files/krita-5.2.2-libjxl-0.9.patch
@@ -0,0 +1,93 @@
+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()))) {
+@@ -657,7 +666,9 @@ JPEGXLImport::convert(KisDocument *document, QIODevice *io, KisPropertiesConfigu
+                 if (!d.m_info.uses_original_profile) {
+                     if (JXL_DEC_SUCCESS
+                         != JxlDecoderGetICCProfileSize(dec.get(),
++#if JPEGXL_NUMERIC_VERSION < JPEGXL_COMPUTE_NUMERIC_VERSION(0,9,0)
+                                                        nullptr,
++#endif
+                                                        JXL_COLOR_PROFILE_TARGET_ORIGINAL,
+                                                        &iccTargetSize)) {
+                         errFile << "ICC profile size retrieval failed";
+@@ -667,7 +678,9 @@ JPEGXLImport::convert(KisDocument *document, QIODevice *io, KisPropertiesConfigu
+                     iccTargetProfile.resize(static_cast<int>(iccTargetSize));
+                     if (JXL_DEC_SUCCESS
+                         != JxlDecoderGetColorAsICCProfile(dec.get(),
++#if JPEGXL_NUMERIC_VERSION < JPEGXL_COMPUTE_NUMERIC_VERSION(0,9,0)
+                                                           nullptr,
++#endif
+                                                           JXL_COLOR_PROFILE_TARGET_ORIGINAL,
+                                                           reinterpret_cast<uint8_t *>(iccTargetProfile.data()),
+                                                           static_cast<size_t>(iccTargetProfile.size()))) {
+-- 
+GitLab
+

diff --git a/media-gfx/krita/krita-5.2.2.ebuild b/media-gfx/krita/krita-5.2.2.ebuild
index c5dabbfab439..c74e64e7e7ad 100644
--- a/media-gfx/krita/krita-5.2.2.ebuild
+++ b/media-gfx/krita/krita-5.2.2.ebuild
@@ -95,9 +95,9 @@ BDEPEND="
 PATCHES=(
 	"${FILESDIR}/${PN}-4.3.1-tests-optional.patch"
 	"${FILESDIR}/${PN}-5.1.5-sip-6.8.patch" # bug 919139
-	"${FILESDIR}/${PN}-5.1.5-libjxl-0.9.patch" # bug 922524
-	"${FILESDIR}/${PN}-5.2.2-fftw.patch"
-	"${FILESDIR}/${PN}-5.2.2-openjpeg.patch"
+	"${FILESDIR}/${P}-libjxl-0.9.patch" # bug 922524
+	"${FILESDIR}/${P}-fftw.patch"
+	"${FILESDIR}/${P}-openjpeg.patch"
 )
 
 pkg_setup() {


             reply	other threads:[~2024-07-13 18:02 UTC|newest]

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

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=1720892078.65dbdb0f311291c3440fe315daf1a23e308af288.sam@gentoo \
    --to=sam@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