From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 58E5815838C for ; Sun, 21 Jan 2024 19:15:08 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 963F0E29C5; Sun, 21 Jan 2024 19:15:07 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 7734CE29C5 for ; Sun, 21 Jan 2024 19:15:07 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 68B7234329C for ; Sun, 21 Jan 2024 19:15:06 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id CF673AB4 for ; Sun, 21 Jan 2024 19:15:04 +0000 (UTC) From: "Andreas Sturmlechner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andreas Sturmlechner" Message-ID: <1705864494.e4809498c27efa079b477bfcc80b32a403d5e594.asturm@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: media-gfx/krita/files/, media-gfx/krita/ X-VCS-Repository: repo/gentoo X-VCS-Files: media-gfx/krita/files/krita-5.1.5-libjxl-0.9.patch media-gfx/krita/krita-5.1.5.ebuild X-VCS-Directories: media-gfx/krita/ media-gfx/krita/files/ X-VCS-Committer: asturm X-VCS-Committer-Name: Andreas Sturmlechner X-VCS-Revision: e4809498c27efa079b477bfcc80b32a403d5e594 X-VCS-Branch: master Date: Sun, 21 Jan 2024 19:15:04 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 5fad85b0-2a72-4b18-8e02-5390bb8a77ac X-Archives-Hash: 37c1927d9e52c03243e4039cbe379740 commit: e4809498c27efa079b477bfcc80b32a403d5e594 Author: Andreas Sturmlechner gentoo org> AuthorDate: Sun Jan 21 18:37:51 2024 +0000 Commit: Andreas Sturmlechner gentoo 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 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 +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(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(iccProfile.data()), + static_cast(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() {