* [PR PATCH] libjxl: update to 0.9.1.
@ 2024-01-29 23:11 oreo639
2024-01-30 4:13 ` [PR PATCH] [Updated] " oreo639
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: oreo639 @ 2024-01-29 23:11 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1235 bytes --]
There is a new pull request by oreo639 against master on the void-packages repository
https://github.com/oreo639/void-packages libjxl
https://github.com/void-linux/void-packages/pull/48435
libjxl: update to 0.9.1.
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/48435.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libjxl-48435.patch --]
[-- Type: text/x-diff, Size: 21811 bytes --]
From b2cad18a688e139c6aedba0bfa5166fd981dffb1 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 2 Jan 2024 20:32:58 -0800
Subject: [PATCH 1/6] highway: update to 1.0.7.
---
srcpkgs/highway/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/highway/template b/srcpkgs/highway/template
index 4d6898b62c746..96076dbac1535 100644
--- a/srcpkgs/highway/template
+++ b/srcpkgs/highway/template
@@ -1,6 +1,6 @@
# Template file for 'highway'
pkgname=highway
-version=1.0.4
+version=1.0.7
revision=1
build_style=cmake
configure_args="-DHWY_SYSTEM_GTEST=ON -DHWY_ENABLE_EXAMPLES=OFF"
@@ -11,7 +11,7 @@ license="Apache-2.0"
homepage="https://github.com/google/highway"
changelog="https://raw.githubusercontent.com/google/highway/master/debian/changelog"
distfiles="https://github.com/google/highway/archive/${version}.tar.gz"
-checksum=faccd343935c9e98afd1016e9d20e0b8b89d908508d1af958496f8c2d3004ac2
+checksum=5434488108186c170a5e2fca5e3c9b6ef59a1caa4d520b008a9b8be6b8abe6c5
if [ -z "$XBPS_CHECK_PKGS" ]; then
configure_args+=" -DBUILD_TESTING=OFF"
From cc6cbb5d831717451ee68ab8d64e0fde8aed7821 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 2 Jan 2024 20:33:25 -0800
Subject: [PATCH 2/6] libjxl: update to 0.9.1.
---
common/shlibs | 6 +-
srcpkgs/libjxl/patches/fix-pixbuf.patch | 184 ++++++++++++++++++++++++
srcpkgs/libjxl/template | 24 ++--
3 files changed, 197 insertions(+), 17 deletions(-)
create mode 100644 srcpkgs/libjxl/patches/fix-pixbuf.patch
diff --git a/common/shlibs b/common/shlibs
index 71f172740e5c6..a7ebb86ac7c85 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4235,9 +4235,9 @@ libplayerctl.so.2 playerctl-2.4.1_1
libwireplumber-0.4.so.0 wireplumber-0.4.14_1
libjodycode.so.3 libjodycode-3.0.1_1
libgsoapssl++-2.8.124.so gsoap-2.8.124_1
-libjxl.so.0.8 libjxl-0.8.2_1
-libjxl_dec.so.0.8 libjxl-0.8.2_1
-libjxl_threads.so.0.8 libjxl-0.8.2_1
+libjxl.so.0.9 libjxl-0.9.0_1
+libjxl_dec.so.0.9 libjxl-0.9.0_1
+libjxl_threads.so.0.9 libjxl-0.9.0_1
libtext-engine-0.1.so.0 text-engine-0.1.1_1
libvmaf.so.1 vmaf-2.3.1_1
liblc3.so.1 liblc3-1.0.3_1
diff --git a/srcpkgs/libjxl/patches/fix-pixbuf.patch b/srcpkgs/libjxl/patches/fix-pixbuf.patch
new file mode 100644
index 0000000000000..47166a8f60d18
--- /dev/null
+++ b/srcpkgs/libjxl/patches/fix-pixbuf.patch
@@ -0,0 +1,184 @@
+From 7021ada76bd1c1ee44483027c40233cd2e412637 Mon Sep 17 00:00:00 2001
+From: Leo Izen <leo.izen@gmail.com>
+Date: Mon, 29 Jan 2024 09:21:10 -0500
+Subject: [PATCH] lib/jxl/decode.cc: deduplicate and correct min_size
+ calculation
+
+Code to calculate the proper size of the buffer exists in three places
+in this function - one for the standard buffer, one for the extra
+channel buffer, and one for the preview buffer. However, only the code
+for the preview buffer correctly took into account the last row size
+possibly being slightly smaller than the remaining rows.
+
+This commit separates the code out into a separate function to remove
+duplicate code, and uses the algorithm from the prevew buffer which was
+the only correct one.
+
+Signed-off-by: Leo Izen <leo.izen@gmail.com>
+---
+ lib/jxl/decode.cc | 63 ++++++++++++++++--------------------------
+ lib/jxl/decode_test.cc | 8 ++++--
+ 2 files changed, 30 insertions(+), 41 deletions(-)
+
+diff --git a/lib/jxl/decode.cc b/lib/jxl/decode.cc
+index b674d1ba885..953342d76e1 100644
+--- a/lib/jxl/decode.cc
++++ b/lib/jxl/decode.cc
+@@ -2348,29 +2348,40 @@ JXL_EXPORT JxlDecoderStatus JxlDecoderSetCms(JxlDecoder* dec,
+ return JXL_DEC_SUCCESS;
+ }
+
+-JXL_EXPORT JxlDecoderStatus JxlDecoderPreviewOutBufferSize(
+- const JxlDecoder* dec, const JxlPixelFormat* format, size_t* size) {
++static JxlDecoderStatus GetMinSize(const JxlDecoder* dec,
++ const JxlPixelFormat* format,
++ size_t num_channels, size_t* min_size,
++ bool preview) {
+ size_t bits;
+ JxlDecoderStatus status = PrepareSizeCheck(dec, format, &bits);
+ if (status != JXL_DEC_SUCCESS) return status;
+- if (format->num_channels < 3 &&
+- !dec->image_metadata.color_encoding.IsGray()) {
+- return JXL_API_ERROR("Number of channels is too low for color output");
++ size_t xsize, ysize;
++ if (preview) {
++ xsize = dec->metadata.oriented_preview_xsize(dec->keep_orientation);
++ ysize = dec->metadata.oriented_preview_ysize(dec->keep_orientation);
++ } else {
++ GetCurrentDimensions(dec, xsize, ysize);
+ }
+-
+- size_t xsize = dec->metadata.oriented_preview_xsize(dec->keep_orientation);
+- size_t ysize = dec->metadata.oriented_preview_ysize(dec->keep_orientation);
+-
++ if (num_channels == 0) num_channels = format->num_channels;
+ size_t row_size =
+- jxl::DivCeil(xsize * format->num_channels * bits, jxl::kBitsPerByte);
++ jxl::DivCeil(xsize * num_channels * bits, jxl::kBitsPerByte);
+ size_t last_row_size = row_size;
+ if (format->align > 1) {
+ row_size = jxl::DivCeil(row_size, format->align) * format->align;
+ }
+- *size = row_size * (ysize - 1) + last_row_size;
++ *min_size = row_size * (ysize - 1) + last_row_size;
+ return JXL_DEC_SUCCESS;
+ }
+
++JXL_EXPORT JxlDecoderStatus JxlDecoderPreviewOutBufferSize(
++ const JxlDecoder* dec, const JxlPixelFormat* format, size_t* size) {
++ if (format->num_channels < 3 &&
++ !dec->image_metadata.color_encoding.IsGray()) {
++ return JXL_API_ERROR("Number of channels is too low for color output");
++ }
++ return GetMinSize(dec, format, 0, size, true);
++}
++
+ JXL_EXPORT JxlDecoderStatus JxlDecoderSetPreviewOutBuffer(
+ JxlDecoder* dec, const JxlPixelFormat* format, void* buffer, size_t size) {
+ if (!dec->got_basic_info || !dec->metadata.m.have_preview ||
+@@ -2401,23 +2412,12 @@ JXL_EXPORT JxlDecoderStatus JxlDecoderSetPreviewOutBuffer(
+
+ JXL_EXPORT JxlDecoderStatus JxlDecoderImageOutBufferSize(
+ const JxlDecoder* dec, const JxlPixelFormat* format, size_t* size) {
+- size_t bits;
+- JxlDecoderStatus status = PrepareSizeCheck(dec, format, &bits);
+- if (status != JXL_DEC_SUCCESS) return status;
+ if (format->num_channels < 3 &&
+ !dec->image_metadata.color_encoding.IsGray()) {
+ return JXL_API_ERROR("Number of channels is too low for color output");
+ }
+- size_t xsize, ysize;
+- GetCurrentDimensions(dec, xsize, ysize);
+- size_t row_size =
+- jxl::DivCeil(xsize * format->num_channels * bits, jxl::kBitsPerByte);
+- if (format->align > 1) {
+- row_size = jxl::DivCeil(row_size, format->align) * format->align;
+- }
+- *size = row_size * ysize;
+
+- return JXL_DEC_SUCCESS;
++ return GetMinSize(dec, format, 0, size, false);
+ }
+
+ JxlDecoderStatus JxlDecoderSetImageOutBuffer(JxlDecoder* dec,
+@@ -2463,22 +2463,7 @@ JxlDecoderStatus JxlDecoderExtraChannelBufferSize(const JxlDecoder* dec,
+ return JXL_API_ERROR("Invalid extra channel index");
+ }
+
+- size_t num_channels = 1; // Do not use format's num_channels
+-
+- size_t bits;
+- JxlDecoderStatus status = PrepareSizeCheck(dec, format, &bits);
+- if (status != JXL_DEC_SUCCESS) return status;
+-
+- size_t xsize, ysize;
+- GetCurrentDimensions(dec, xsize, ysize);
+- size_t row_size =
+- jxl::DivCeil(xsize * num_channels * bits, jxl::kBitsPerByte);
+- if (format->align > 1) {
+- row_size = jxl::DivCeil(row_size, format->align) * format->align;
+- }
+- *size = row_size * ysize;
+-
+- return JXL_DEC_SUCCESS;
++ return GetMinSize(dec, format, 1, size, false);
+ }
+
+ JxlDecoderStatus JxlDecoderSetExtraChannelBuffer(JxlDecoder* dec,
+diff --git a/lib/jxl/decode_test.cc b/lib/jxl/decode_test.cc
+index caee6dbc568..310742f705f 100644
+--- a/lib/jxl/decode_test.cc
++++ b/lib/jxl/decode_test.cc
+@@ -2575,7 +2575,11 @@ TEST(DecodeTest, AlignTest) {
+ size_t align = 17;
+ JxlPixelFormat format = {3, JXL_TYPE_UINT8, JXL_LITTLE_ENDIAN, align};
+ // On purpose not using jxl::RoundUpTo to test it independently.
+- size_t expected_line_bytes = (1 * 3 * xsize + align - 1) / align * align;
++ size_t expected_line_size_last = 1 * 3 * xsize;
++ size_t expected_line_size =
++ ((expected_line_size_last + align - 1) / align) * align;
++ size_t expected_pixels_size =
++ expected_line_size * (ysize - 1) + expected_line_size_last;
+
+ for (int use_callback = 0; use_callback <= 1; ++use_callback) {
+ std::vector<uint8_t> pixels2 = jxl::DecodeWithAPI(
+@@ -2583,7 +2587,7 @@ TEST(DecodeTest, AlignTest) {
+ /*set_buffer_early=*/false,
+ /*use_resizable_runner=*/false, /*require_boxes=*/false,
+ /*expect_success=*/true);
+- EXPECT_EQ(expected_line_bytes * ysize, pixels2.size());
++ EXPECT_EQ(expected_pixels_size, pixels2.size());
+ EXPECT_EQ(0u, jxl::test::ComparePixels(pixels.data(), pixels2.data(), xsize,
+ ysize, format_orig, format));
+ }
+From c4ebb7e70ee09591ae0269410ebe8929f400713e Mon Sep 17 00:00:00 2001
+From: Leo Izen <leo.izen@gmail.com>
+Date: Mon, 29 Jan 2024 09:23:36 -0500
+Subject: [PATCH] plugins/gdk-pixbuf: consider stride when passing buffer to
+ libjxl
+
+This change uses gdk_pixbuf_get_pixels_with_length to get the actual
+size of the buffer, with stride taken into account. The previous code
+just multiplies width by height and ignores stride.
+
+Signed-off-by: Leo Izen <leo.izen@gmail.com>
+---
+ plugins/gdk-pixbuf/pixbufloader-jxl.c | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/plugins/gdk-pixbuf/pixbufloader-jxl.c b/plugins/gdk-pixbuf/pixbufloader-jxl.c
+index bafa57b1674..066468a5035 100644
+--- a/plugins/gdk-pixbuf/pixbufloader-jxl.c
++++ b/plugins/gdk-pixbuf/pixbufloader-jxl.c
+@@ -491,9 +491,8 @@ static gboolean load_increment(gpointer context, const guchar *buf, guint size,
+ decoder_state->frames->len - 1)
+ .data;
+ decoder_state->pixel_format.align = gdk_pixbuf_get_rowstride(output);
+- guchar *dst = gdk_pixbuf_get_pixels(output);
+- size_t num_pixels = decoder_state->xsize * decoder_state->ysize;
+- size_t size = num_pixels * decoder_state->pixel_format.num_channels;
++ guint size;
++ guchar *dst = gdk_pixbuf_get_pixels_with_length(output, &size);
+ if (JXL_DEC_SUCCESS != JxlDecoderSetImageOutBuffer(
+ decoder_state->decoder,
+ &decoder_state->pixel_format, dst, size)) {
diff --git a/srcpkgs/libjxl/template b/srcpkgs/libjxl/template
index cb2a08809b055..274a540b36a7e 100644
--- a/srcpkgs/libjxl/template
+++ b/srcpkgs/libjxl/template
@@ -1,16 +1,16 @@
# Template file for 'libjxl'
pkgname=libjxl
-version=0.8.2
-revision=2
-_testdata_hash=d6168ffb9e1cc24007e64b65dd84d822ad1fc759
-_skcms_hash=b25b07b4b07990811de121c0356155b2ba0f4318
+version=0.9.1
+revision=1
+_testdata_hash=ff8d743aaba05b3014f17e5475e576242fa979fc
build_style=cmake
build_wrksrc="libjxl-${version}"
configure_args="-DJPEGXL_ENABLE_BENCHMARK=OFF -DJPEGXL_ENABLE_EXAMPLES=OFF
- -DJPEGXL_ENABLE_SJPEG=OFF -DJPEGXL_ENABLE_PLUGINS=ON -DJPEGXL_VERSION=${version}"
+ -DJPEGXL_ENABLE_SJPEG=OFF -DJPEGXL_ENABLE_PLUGINS=ON -DJPEGXL_VERSION=${version}
+ -DJPEGXL_ENABLE_SKCMS=OFF"
hostmakedepends="tar pkg-config asciidoc"
makedepends="brotli-devel highway libpng-devel giflib-devel libjpeg-turbo-devel
- libopenexr-devel libwebp-devel gdk-pixbuf-devel gimp-devel"
+ libopenexr-devel libwebp-devel gdk-pixbuf-devel gimp-devel lcms2-devel"
checkdepends="gtest-devel xdg-utils"
short_desc="JPEG XL image format reference implementation"
maintainer="Joshua Krämer <joshua@kraemer.link>"
@@ -18,12 +18,10 @@ license="BSD-3-Clause, custom:Patent grant"
homepage="https://jpeg.org/jpegxl/"
changelog="https://raw.githubusercontent.com/libjxl/libjxl/main/CHANGELOG.md"
distfiles="https://github.com/libjxl/libjxl/archive/v${version}.tar.gz
- https://github.com/libjxl/testdata/archive/${_testdata_hash}.tar.gz>testdata-${_testdata_hash}.tar.gz
- https://skia.googlesource.com/skcms/+archive/${_skcms_hash}.tar.gz>skcms-${_skcms_hash}.tar.gz"
-checksum="c70916fb3ed43784eb840f82f05d390053a558e2da106e40863919238fa7b420
- 64658d3341bff2976899cb8b140242ffa4de1cd41aed507dfec4aa9e7e05ca24
- @8feb1e33c38ca13f91a0d5bd8ce25f976eb239edf38f49e6db8895ae9f1e833c"
-skip_extraction="skcms-${_skcms_hash}.tar.gz"
+ https://github.com/libjxl/testdata/archive/${_testdata_hash}.tar.gz>testdata-${_testdata_hash}.tar.gz"
+checksum="a0e72e9ece26878147069ad4888ac3382021d4bbee71c2e1b687d5bde7fd7e01
+ 9c45a108df32a002a69465df896d33acf77d97c88fb59dffa0dff5628370e96f"
+patch_args="-Np1 --directory=${build_wrksrc}"
if [ -z "$XBPS_CHECK_PKGS" ]; then
configure_args+=" -DBUILD_TESTING=OFF"
@@ -31,7 +29,6 @@ fi
post_extract() {
mv "testdata-${_testdata_hash}"/* "${build_wrksrc}/testdata/"
- bsdtar -xf "${XBPS_SRCDISTDIR}/${pkgname}-${version}/skcms-${_skcms_hash}.tar.gz" -C "${build_wrksrc}/third_party/skcms"
}
post_install() {
@@ -44,7 +41,6 @@ libjxl-devel_package() {
depends="${sourcepkg}>=${version}_${revision} highway brotli-devel"
pkg_install() {
vmove usr/include
- vmove "usr/lib/*.a"
vmove "usr/lib/*.so"
vmove usr/lib/pkgconfig
}
From 56356cc42eb176938f649c6b644952ee534151c7 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 2 Jan 2024 22:40:00 -0800
Subject: [PATCH 3/6] krita: rebuild for libjxl 0.9
---
srcpkgs/krita/patches/jxl09.patch | 71 +++++++++++++++++++++++++++++++
srcpkgs/krita/patches/sip68.patch | 23 ++++++++++
srcpkgs/krita/template | 2 +-
3 files changed, 95 insertions(+), 1 deletion(-)
create mode 100644 srcpkgs/krita/patches/jxl09.patch
create mode 100644 srcpkgs/krita/patches/sip68.patch
diff --git a/srcpkgs/krita/patches/jxl09.patch b/srcpkgs/krita/patches/jxl09.patch
new file mode 100644
index 0000000000000..50e2cd50bcc66
--- /dev/null
+++ b/srcpkgs/krita/patches/jxl09.patch
@@ -0,0 +1,71 @@
+From d9e258bf9d6af5f53467becf65bb21bf6f96a38e Mon Sep 17 00:00:00 2001
+From: Timo Gurr <timo.gurr@gmail.com>
+Date: Fri, 29 Dec 2023 11:10:26 +0100
+Subject: [PATCH] Fix build with libjxl 0.9.0
+
+BUG:478987
+---
+ 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/srcpkgs/krita/patches/sip68.patch b/srcpkgs/krita/patches/sip68.patch
new file mode 100644
index 0000000000000..e9e4544b7cc27
--- /dev/null
+++ b/srcpkgs/krita/patches/sip68.patch
@@ -0,0 +1,23 @@
+From 2d71c47661d43a4e3c1ab0c27803de980bdf2bb2 Mon Sep 17 00:00:00 2001
+From: Antonio Rojas <arojas@archlinux.org>
+Date: Mon, 11 Dec 2023 20:26:13 +0100
+Subject: [PATCH] Bump SIP ABI version to 12.8
+
+Fixes build with SIP 6.8
+---
+ cmake/modules/pyproject.toml.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/cmake/modules/pyproject.toml.in b/cmake/modules/pyproject.toml.in
+index 090b2d4b0cb..085ddf41799 100644
+--- a/cmake/modules/pyproject.toml.in
++++ b/cmake/modules/pyproject.toml.in
+@@ -9,7 +9,7 @@ name = "@module_name_toml@"
+ sip-module = "@sip_name@"
+ sip-include-dirs = @sip_include_dirs@
+ sip-files-dir = "@module_srcs@"
+-abi-version = "12"
++abi-version = "12.8"
+
+ [tool.sip.bindings.@module_name_toml@]
+ tags = @module_tags@
diff --git a/srcpkgs/krita/template b/srcpkgs/krita/template
index d804b581a8689..4833f8bd33d86 100644
--- a/srcpkgs/krita/template
+++ b/srcpkgs/krita/template
@@ -1,7 +1,7 @@
# Template file for 'krita'
pkgname=krita
version=5.2.1
-revision=3
+revision=4
build_style=cmake
configure_args="-Wno-dev -DBUILD_TESTING=OFF"
hostmakedepends="extra-cmake-modules gettext pkg-config python3
From 5558672acbe4c1535b8b4aa4deda94cd4cdc45b6 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 2 Jan 2024 22:40:19 -0800
Subject: [PATCH 4/6] imlib2: rebuild for libjxl 0.9
---
srcpkgs/imlib2/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/imlib2/template b/srcpkgs/imlib2/template
index bcbf607efa142..9f485b0b2f858 100644
--- a/srcpkgs/imlib2/template
+++ b/srcpkgs/imlib2/template
@@ -1,7 +1,7 @@
# Template file for 'imlib2'
pkgname=imlib2
version=1.12.1
-revision=1
+revision=2
build_style=gnu-configure
configure_args="--disable-static --sysconfdir=/etc/imlib2 --enable-visibility-hiding"
hostmakedepends="pkg-config"
From 13e83b8c76f079a703bcec0677eb8381014ce061 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 2 Jan 2024 22:41:01 -0800
Subject: [PATCH 5/6] darktable: rebuild for libjxl 0.9
---
srcpkgs/darktable/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/darktable/template b/srcpkgs/darktable/template
index 97dfae3471e7c..af29d7cec18bb 100644
--- a/srcpkgs/darktable/template
+++ b/srcpkgs/darktable/template
@@ -1,7 +1,7 @@
# Template file for 'darktable'
pkgname=darktable
version=4.4.2
-revision=5
+revision=6
# upstream only supports these archs:
archs="x86_64* aarch64* ppc64le*"
build_style=cmake
From 06dfa41859cb7f096673e4e959ab8e1b5b1bcddb Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 2 Jan 2024 22:41:26 -0800
Subject: [PATCH 6/6] kimageformats: rebuild for libjxl 0.9
---
srcpkgs/kimageformats/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/kimageformats/template b/srcpkgs/kimageformats/template
index 9ff74b976eab0..9a6a9c6d3bf41 100644
--- a/srcpkgs/kimageformats/template
+++ b/srcpkgs/kimageformats/template
@@ -1,7 +1,7 @@
# Template file for 'kimageformats'
pkgname=kimageformats
version=5.113.0
-revision=1
+revision=2
build_style=cmake
configure_args="-DKIMAGEFORMATS_HEIF=ON"
hostmakedepends="kcoreaddons extra-cmake-modules qt5-qmake qt5-host-tools
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PR PATCH] [Updated] libjxl: update to 0.9.1.
2024-01-29 23:11 [PR PATCH] libjxl: update to 0.9.1 oreo639
@ 2024-01-30 4:13 ` oreo639
2024-01-30 20:42 ` oreo639
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: oreo639 @ 2024-01-30 4:13 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1240 bytes --]
There is an updated pull request by oreo639 against master on the void-packages repository
https://github.com/oreo639/void-packages libjxl
https://github.com/void-linux/void-packages/pull/48435
libjxl: update to 0.9.1.
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/48435.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libjxl-48435.patch --]
[-- Type: text/x-diff, Size: 21811 bytes --]
From cd3e31a46c26f22a4dccc80541eaef5b113bb5de Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 2 Jan 2024 20:32:58 -0800
Subject: [PATCH 1/6] highway: update to 1.0.7.
---
srcpkgs/highway/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/highway/template b/srcpkgs/highway/template
index 4d6898b62c746..96076dbac1535 100644
--- a/srcpkgs/highway/template
+++ b/srcpkgs/highway/template
@@ -1,6 +1,6 @@
# Template file for 'highway'
pkgname=highway
-version=1.0.4
+version=1.0.7
revision=1
build_style=cmake
configure_args="-DHWY_SYSTEM_GTEST=ON -DHWY_ENABLE_EXAMPLES=OFF"
@@ -11,7 +11,7 @@ license="Apache-2.0"
homepage="https://github.com/google/highway"
changelog="https://raw.githubusercontent.com/google/highway/master/debian/changelog"
distfiles="https://github.com/google/highway/archive/${version}.tar.gz"
-checksum=faccd343935c9e98afd1016e9d20e0b8b89d908508d1af958496f8c2d3004ac2
+checksum=5434488108186c170a5e2fca5e3c9b6ef59a1caa4d520b008a9b8be6b8abe6c5
if [ -z "$XBPS_CHECK_PKGS" ]; then
configure_args+=" -DBUILD_TESTING=OFF"
From 56e6ed354b96a3bbca93267ca7e97c8815be6303 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 2 Jan 2024 20:33:25 -0800
Subject: [PATCH 2/6] libjxl: update to 0.9.1.
---
common/shlibs | 6 +-
srcpkgs/libjxl/patches/fix-pixbuf.patch | 184 ++++++++++++++++++++++++
srcpkgs/libjxl/template | 24 ++--
3 files changed, 197 insertions(+), 17 deletions(-)
create mode 100644 srcpkgs/libjxl/patches/fix-pixbuf.patch
diff --git a/common/shlibs b/common/shlibs
index 71f172740e5c6..a7ebb86ac7c85 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4235,9 +4235,9 @@ libplayerctl.so.2 playerctl-2.4.1_1
libwireplumber-0.4.so.0 wireplumber-0.4.14_1
libjodycode.so.3 libjodycode-3.0.1_1
libgsoapssl++-2.8.124.so gsoap-2.8.124_1
-libjxl.so.0.8 libjxl-0.8.2_1
-libjxl_dec.so.0.8 libjxl-0.8.2_1
-libjxl_threads.so.0.8 libjxl-0.8.2_1
+libjxl.so.0.9 libjxl-0.9.0_1
+libjxl_dec.so.0.9 libjxl-0.9.0_1
+libjxl_threads.so.0.9 libjxl-0.9.0_1
libtext-engine-0.1.so.0 text-engine-0.1.1_1
libvmaf.so.1 vmaf-2.3.1_1
liblc3.so.1 liblc3-1.0.3_1
diff --git a/srcpkgs/libjxl/patches/fix-pixbuf.patch b/srcpkgs/libjxl/patches/fix-pixbuf.patch
new file mode 100644
index 0000000000000..47166a8f60d18
--- /dev/null
+++ b/srcpkgs/libjxl/patches/fix-pixbuf.patch
@@ -0,0 +1,184 @@
+From 7021ada76bd1c1ee44483027c40233cd2e412637 Mon Sep 17 00:00:00 2001
+From: Leo Izen <leo.izen@gmail.com>
+Date: Mon, 29 Jan 2024 09:21:10 -0500
+Subject: [PATCH] lib/jxl/decode.cc: deduplicate and correct min_size
+ calculation
+
+Code to calculate the proper size of the buffer exists in three places
+in this function - one for the standard buffer, one for the extra
+channel buffer, and one for the preview buffer. However, only the code
+for the preview buffer correctly took into account the last row size
+possibly being slightly smaller than the remaining rows.
+
+This commit separates the code out into a separate function to remove
+duplicate code, and uses the algorithm from the prevew buffer which was
+the only correct one.
+
+Signed-off-by: Leo Izen <leo.izen@gmail.com>
+---
+ lib/jxl/decode.cc | 63 ++++++++++++++++--------------------------
+ lib/jxl/decode_test.cc | 8 ++++--
+ 2 files changed, 30 insertions(+), 41 deletions(-)
+
+diff --git a/lib/jxl/decode.cc b/lib/jxl/decode.cc
+index b674d1ba885..953342d76e1 100644
+--- a/lib/jxl/decode.cc
++++ b/lib/jxl/decode.cc
+@@ -2348,29 +2348,40 @@ JXL_EXPORT JxlDecoderStatus JxlDecoderSetCms(JxlDecoder* dec,
+ return JXL_DEC_SUCCESS;
+ }
+
+-JXL_EXPORT JxlDecoderStatus JxlDecoderPreviewOutBufferSize(
+- const JxlDecoder* dec, const JxlPixelFormat* format, size_t* size) {
++static JxlDecoderStatus GetMinSize(const JxlDecoder* dec,
++ const JxlPixelFormat* format,
++ size_t num_channels, size_t* min_size,
++ bool preview) {
+ size_t bits;
+ JxlDecoderStatus status = PrepareSizeCheck(dec, format, &bits);
+ if (status != JXL_DEC_SUCCESS) return status;
+- if (format->num_channels < 3 &&
+- !dec->image_metadata.color_encoding.IsGray()) {
+- return JXL_API_ERROR("Number of channels is too low for color output");
++ size_t xsize, ysize;
++ if (preview) {
++ xsize = dec->metadata.oriented_preview_xsize(dec->keep_orientation);
++ ysize = dec->metadata.oriented_preview_ysize(dec->keep_orientation);
++ } else {
++ GetCurrentDimensions(dec, xsize, ysize);
+ }
+-
+- size_t xsize = dec->metadata.oriented_preview_xsize(dec->keep_orientation);
+- size_t ysize = dec->metadata.oriented_preview_ysize(dec->keep_orientation);
+-
++ if (num_channels == 0) num_channels = format->num_channels;
+ size_t row_size =
+- jxl::DivCeil(xsize * format->num_channels * bits, jxl::kBitsPerByte);
++ jxl::DivCeil(xsize * num_channels * bits, jxl::kBitsPerByte);
+ size_t last_row_size = row_size;
+ if (format->align > 1) {
+ row_size = jxl::DivCeil(row_size, format->align) * format->align;
+ }
+- *size = row_size * (ysize - 1) + last_row_size;
++ *min_size = row_size * (ysize - 1) + last_row_size;
+ return JXL_DEC_SUCCESS;
+ }
+
++JXL_EXPORT JxlDecoderStatus JxlDecoderPreviewOutBufferSize(
++ const JxlDecoder* dec, const JxlPixelFormat* format, size_t* size) {
++ if (format->num_channels < 3 &&
++ !dec->image_metadata.color_encoding.IsGray()) {
++ return JXL_API_ERROR("Number of channels is too low for color output");
++ }
++ return GetMinSize(dec, format, 0, size, true);
++}
++
+ JXL_EXPORT JxlDecoderStatus JxlDecoderSetPreviewOutBuffer(
+ JxlDecoder* dec, const JxlPixelFormat* format, void* buffer, size_t size) {
+ if (!dec->got_basic_info || !dec->metadata.m.have_preview ||
+@@ -2401,23 +2412,12 @@ JXL_EXPORT JxlDecoderStatus JxlDecoderSetPreviewOutBuffer(
+
+ JXL_EXPORT JxlDecoderStatus JxlDecoderImageOutBufferSize(
+ const JxlDecoder* dec, const JxlPixelFormat* format, size_t* size) {
+- size_t bits;
+- JxlDecoderStatus status = PrepareSizeCheck(dec, format, &bits);
+- if (status != JXL_DEC_SUCCESS) return status;
+ if (format->num_channels < 3 &&
+ !dec->image_metadata.color_encoding.IsGray()) {
+ return JXL_API_ERROR("Number of channels is too low for color output");
+ }
+- size_t xsize, ysize;
+- GetCurrentDimensions(dec, xsize, ysize);
+- size_t row_size =
+- jxl::DivCeil(xsize * format->num_channels * bits, jxl::kBitsPerByte);
+- if (format->align > 1) {
+- row_size = jxl::DivCeil(row_size, format->align) * format->align;
+- }
+- *size = row_size * ysize;
+
+- return JXL_DEC_SUCCESS;
++ return GetMinSize(dec, format, 0, size, false);
+ }
+
+ JxlDecoderStatus JxlDecoderSetImageOutBuffer(JxlDecoder* dec,
+@@ -2463,22 +2463,7 @@ JxlDecoderStatus JxlDecoderExtraChannelBufferSize(const JxlDecoder* dec,
+ return JXL_API_ERROR("Invalid extra channel index");
+ }
+
+- size_t num_channels = 1; // Do not use format's num_channels
+-
+- size_t bits;
+- JxlDecoderStatus status = PrepareSizeCheck(dec, format, &bits);
+- if (status != JXL_DEC_SUCCESS) return status;
+-
+- size_t xsize, ysize;
+- GetCurrentDimensions(dec, xsize, ysize);
+- size_t row_size =
+- jxl::DivCeil(xsize * num_channels * bits, jxl::kBitsPerByte);
+- if (format->align > 1) {
+- row_size = jxl::DivCeil(row_size, format->align) * format->align;
+- }
+- *size = row_size * ysize;
+-
+- return JXL_DEC_SUCCESS;
++ return GetMinSize(dec, format, 1, size, false);
+ }
+
+ JxlDecoderStatus JxlDecoderSetExtraChannelBuffer(JxlDecoder* dec,
+diff --git a/lib/jxl/decode_test.cc b/lib/jxl/decode_test.cc
+index caee6dbc568..310742f705f 100644
+--- a/lib/jxl/decode_test.cc
++++ b/lib/jxl/decode_test.cc
+@@ -2575,7 +2575,11 @@ TEST(DecodeTest, AlignTest) {
+ size_t align = 17;
+ JxlPixelFormat format = {3, JXL_TYPE_UINT8, JXL_LITTLE_ENDIAN, align};
+ // On purpose not using jxl::RoundUpTo to test it independently.
+- size_t expected_line_bytes = (1 * 3 * xsize + align - 1) / align * align;
++ size_t expected_line_size_last = 1 * 3 * xsize;
++ size_t expected_line_size =
++ ((expected_line_size_last + align - 1) / align) * align;
++ size_t expected_pixels_size =
++ expected_line_size * (ysize - 1) + expected_line_size_last;
+
+ for (int use_callback = 0; use_callback <= 1; ++use_callback) {
+ std::vector<uint8_t> pixels2 = jxl::DecodeWithAPI(
+@@ -2583,7 +2587,7 @@ TEST(DecodeTest, AlignTest) {
+ /*set_buffer_early=*/false,
+ /*use_resizable_runner=*/false, /*require_boxes=*/false,
+ /*expect_success=*/true);
+- EXPECT_EQ(expected_line_bytes * ysize, pixels2.size());
++ EXPECT_EQ(expected_pixels_size, pixels2.size());
+ EXPECT_EQ(0u, jxl::test::ComparePixels(pixels.data(), pixels2.data(), xsize,
+ ysize, format_orig, format));
+ }
+From c4ebb7e70ee09591ae0269410ebe8929f400713e Mon Sep 17 00:00:00 2001
+From: Leo Izen <leo.izen@gmail.com>
+Date: Mon, 29 Jan 2024 09:23:36 -0500
+Subject: [PATCH] plugins/gdk-pixbuf: consider stride when passing buffer to
+ libjxl
+
+This change uses gdk_pixbuf_get_pixels_with_length to get the actual
+size of the buffer, with stride taken into account. The previous code
+just multiplies width by height and ignores stride.
+
+Signed-off-by: Leo Izen <leo.izen@gmail.com>
+---
+ plugins/gdk-pixbuf/pixbufloader-jxl.c | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/plugins/gdk-pixbuf/pixbufloader-jxl.c b/plugins/gdk-pixbuf/pixbufloader-jxl.c
+index bafa57b1674..066468a5035 100644
+--- a/plugins/gdk-pixbuf/pixbufloader-jxl.c
++++ b/plugins/gdk-pixbuf/pixbufloader-jxl.c
+@@ -491,9 +491,8 @@ static gboolean load_increment(gpointer context, const guchar *buf, guint size,
+ decoder_state->frames->len - 1)
+ .data;
+ decoder_state->pixel_format.align = gdk_pixbuf_get_rowstride(output);
+- guchar *dst = gdk_pixbuf_get_pixels(output);
+- size_t num_pixels = decoder_state->xsize * decoder_state->ysize;
+- size_t size = num_pixels * decoder_state->pixel_format.num_channels;
++ guint size;
++ guchar *dst = gdk_pixbuf_get_pixels_with_length(output, &size);
+ if (JXL_DEC_SUCCESS != JxlDecoderSetImageOutBuffer(
+ decoder_state->decoder,
+ &decoder_state->pixel_format, dst, size)) {
diff --git a/srcpkgs/libjxl/template b/srcpkgs/libjxl/template
index cb2a08809b055..274a540b36a7e 100644
--- a/srcpkgs/libjxl/template
+++ b/srcpkgs/libjxl/template
@@ -1,16 +1,16 @@
# Template file for 'libjxl'
pkgname=libjxl
-version=0.8.2
-revision=2
-_testdata_hash=d6168ffb9e1cc24007e64b65dd84d822ad1fc759
-_skcms_hash=b25b07b4b07990811de121c0356155b2ba0f4318
+version=0.9.1
+revision=1
+_testdata_hash=ff8d743aaba05b3014f17e5475e576242fa979fc
build_style=cmake
build_wrksrc="libjxl-${version}"
configure_args="-DJPEGXL_ENABLE_BENCHMARK=OFF -DJPEGXL_ENABLE_EXAMPLES=OFF
- -DJPEGXL_ENABLE_SJPEG=OFF -DJPEGXL_ENABLE_PLUGINS=ON -DJPEGXL_VERSION=${version}"
+ -DJPEGXL_ENABLE_SJPEG=OFF -DJPEGXL_ENABLE_PLUGINS=ON -DJPEGXL_VERSION=${version}
+ -DJPEGXL_ENABLE_SKCMS=OFF"
hostmakedepends="tar pkg-config asciidoc"
makedepends="brotli-devel highway libpng-devel giflib-devel libjpeg-turbo-devel
- libopenexr-devel libwebp-devel gdk-pixbuf-devel gimp-devel"
+ libopenexr-devel libwebp-devel gdk-pixbuf-devel gimp-devel lcms2-devel"
checkdepends="gtest-devel xdg-utils"
short_desc="JPEG XL image format reference implementation"
maintainer="Joshua Krämer <joshua@kraemer.link>"
@@ -18,12 +18,10 @@ license="BSD-3-Clause, custom:Patent grant"
homepage="https://jpeg.org/jpegxl/"
changelog="https://raw.githubusercontent.com/libjxl/libjxl/main/CHANGELOG.md"
distfiles="https://github.com/libjxl/libjxl/archive/v${version}.tar.gz
- https://github.com/libjxl/testdata/archive/${_testdata_hash}.tar.gz>testdata-${_testdata_hash}.tar.gz
- https://skia.googlesource.com/skcms/+archive/${_skcms_hash}.tar.gz>skcms-${_skcms_hash}.tar.gz"
-checksum="c70916fb3ed43784eb840f82f05d390053a558e2da106e40863919238fa7b420
- 64658d3341bff2976899cb8b140242ffa4de1cd41aed507dfec4aa9e7e05ca24
- @8feb1e33c38ca13f91a0d5bd8ce25f976eb239edf38f49e6db8895ae9f1e833c"
-skip_extraction="skcms-${_skcms_hash}.tar.gz"
+ https://github.com/libjxl/testdata/archive/${_testdata_hash}.tar.gz>testdata-${_testdata_hash}.tar.gz"
+checksum="a0e72e9ece26878147069ad4888ac3382021d4bbee71c2e1b687d5bde7fd7e01
+ 9c45a108df32a002a69465df896d33acf77d97c88fb59dffa0dff5628370e96f"
+patch_args="-Np1 --directory=${build_wrksrc}"
if [ -z "$XBPS_CHECK_PKGS" ]; then
configure_args+=" -DBUILD_TESTING=OFF"
@@ -31,7 +29,6 @@ fi
post_extract() {
mv "testdata-${_testdata_hash}"/* "${build_wrksrc}/testdata/"
- bsdtar -xf "${XBPS_SRCDISTDIR}/${pkgname}-${version}/skcms-${_skcms_hash}.tar.gz" -C "${build_wrksrc}/third_party/skcms"
}
post_install() {
@@ -44,7 +41,6 @@ libjxl-devel_package() {
depends="${sourcepkg}>=${version}_${revision} highway brotli-devel"
pkg_install() {
vmove usr/include
- vmove "usr/lib/*.a"
vmove "usr/lib/*.so"
vmove usr/lib/pkgconfig
}
From 56a5f78d972ad7221d48ceb23f52f5e8c09b12ab Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 2 Jan 2024 22:40:00 -0800
Subject: [PATCH 3/6] krita: rebuild for libjxl 0.9
---
srcpkgs/krita/patches/jxl09.patch | 71 +++++++++++++++++++++++++++++++
srcpkgs/krita/patches/sip68.patch | 23 ++++++++++
srcpkgs/krita/template | 2 +-
3 files changed, 95 insertions(+), 1 deletion(-)
create mode 100644 srcpkgs/krita/patches/jxl09.patch
create mode 100644 srcpkgs/krita/patches/sip68.patch
diff --git a/srcpkgs/krita/patches/jxl09.patch b/srcpkgs/krita/patches/jxl09.patch
new file mode 100644
index 0000000000000..50e2cd50bcc66
--- /dev/null
+++ b/srcpkgs/krita/patches/jxl09.patch
@@ -0,0 +1,71 @@
+From d9e258bf9d6af5f53467becf65bb21bf6f96a38e Mon Sep 17 00:00:00 2001
+From: Timo Gurr <timo.gurr@gmail.com>
+Date: Fri, 29 Dec 2023 11:10:26 +0100
+Subject: [PATCH] Fix build with libjxl 0.9.0
+
+BUG:478987
+---
+ 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/srcpkgs/krita/patches/sip68.patch b/srcpkgs/krita/patches/sip68.patch
new file mode 100644
index 0000000000000..e9e4544b7cc27
--- /dev/null
+++ b/srcpkgs/krita/patches/sip68.patch
@@ -0,0 +1,23 @@
+From 2d71c47661d43a4e3c1ab0c27803de980bdf2bb2 Mon Sep 17 00:00:00 2001
+From: Antonio Rojas <arojas@archlinux.org>
+Date: Mon, 11 Dec 2023 20:26:13 +0100
+Subject: [PATCH] Bump SIP ABI version to 12.8
+
+Fixes build with SIP 6.8
+---
+ cmake/modules/pyproject.toml.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/cmake/modules/pyproject.toml.in b/cmake/modules/pyproject.toml.in
+index 090b2d4b0cb..085ddf41799 100644
+--- a/cmake/modules/pyproject.toml.in
++++ b/cmake/modules/pyproject.toml.in
+@@ -9,7 +9,7 @@ name = "@module_name_toml@"
+ sip-module = "@sip_name@"
+ sip-include-dirs = @sip_include_dirs@
+ sip-files-dir = "@module_srcs@"
+-abi-version = "12"
++abi-version = "12.8"
+
+ [tool.sip.bindings.@module_name_toml@]
+ tags = @module_tags@
diff --git a/srcpkgs/krita/template b/srcpkgs/krita/template
index d804b581a8689..4833f8bd33d86 100644
--- a/srcpkgs/krita/template
+++ b/srcpkgs/krita/template
@@ -1,7 +1,7 @@
# Template file for 'krita'
pkgname=krita
version=5.2.1
-revision=3
+revision=4
build_style=cmake
configure_args="-Wno-dev -DBUILD_TESTING=OFF"
hostmakedepends="extra-cmake-modules gettext pkg-config python3
From e50c986f296c7c5e9e79d4597f0929d5ac809f80 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 2 Jan 2024 22:40:19 -0800
Subject: [PATCH 4/6] imlib2: rebuild for libjxl 0.9
---
srcpkgs/imlib2/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/imlib2/template b/srcpkgs/imlib2/template
index bcbf607efa142..9f485b0b2f858 100644
--- a/srcpkgs/imlib2/template
+++ b/srcpkgs/imlib2/template
@@ -1,7 +1,7 @@
# Template file for 'imlib2'
pkgname=imlib2
version=1.12.1
-revision=1
+revision=2
build_style=gnu-configure
configure_args="--disable-static --sysconfdir=/etc/imlib2 --enable-visibility-hiding"
hostmakedepends="pkg-config"
From 486dbd97faa220332d78b1acffd65dbfe25ae1a0 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 2 Jan 2024 22:41:01 -0800
Subject: [PATCH 5/6] darktable: rebuild for libjxl 0.9
---
srcpkgs/darktable/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/darktable/template b/srcpkgs/darktable/template
index 97dfae3471e7c..af29d7cec18bb 100644
--- a/srcpkgs/darktable/template
+++ b/srcpkgs/darktable/template
@@ -1,7 +1,7 @@
# Template file for 'darktable'
pkgname=darktable
version=4.4.2
-revision=5
+revision=6
# upstream only supports these archs:
archs="x86_64* aarch64* ppc64le*"
build_style=cmake
From 39ea7f2e7b9ce1b0983e1db1aa8044cc4bce2588 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 2 Jan 2024 22:41:26 -0800
Subject: [PATCH 6/6] kimageformats: rebuild for libjxl 0.9
---
srcpkgs/kimageformats/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/kimageformats/template b/srcpkgs/kimageformats/template
index 9ff74b976eab0..9a6a9c6d3bf41 100644
--- a/srcpkgs/kimageformats/template
+++ b/srcpkgs/kimageformats/template
@@ -1,7 +1,7 @@
# Template file for 'kimageformats'
pkgname=kimageformats
version=5.113.0
-revision=1
+revision=2
build_style=cmake
configure_args="-DKIMAGEFORMATS_HEIF=ON"
hostmakedepends="kcoreaddons extra-cmake-modules qt5-qmake qt5-host-tools
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PR PATCH] [Updated] libjxl: update to 0.9.1.
2024-01-29 23:11 [PR PATCH] libjxl: update to 0.9.1 oreo639
2024-01-30 4:13 ` [PR PATCH] [Updated] " oreo639
@ 2024-01-30 20:42 ` oreo639
2024-01-31 0:27 ` oreo639
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: oreo639 @ 2024-01-30 20:42 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1240 bytes --]
There is an updated pull request by oreo639 against master on the void-packages repository
https://github.com/oreo639/void-packages libjxl
https://github.com/void-linux/void-packages/pull/48435
libjxl: update to 0.9.1.
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/48435.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libjxl-48435.patch --]
[-- Type: text/x-diff, Size: 24740 bytes --]
From 25cccebe3a0e1dfff05d9d648227190b1d5f9bd7 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 2 Jan 2024 20:32:58 -0800
Subject: [PATCH 1/7] highway: update to 1.0.7.
---
srcpkgs/highway/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/highway/template b/srcpkgs/highway/template
index 4d6898b62c7468..96076dbac1535c 100644
--- a/srcpkgs/highway/template
+++ b/srcpkgs/highway/template
@@ -1,6 +1,6 @@
# Template file for 'highway'
pkgname=highway
-version=1.0.4
+version=1.0.7
revision=1
build_style=cmake
configure_args="-DHWY_SYSTEM_GTEST=ON -DHWY_ENABLE_EXAMPLES=OFF"
@@ -11,7 +11,7 @@ license="Apache-2.0"
homepage="https://github.com/google/highway"
changelog="https://raw.githubusercontent.com/google/highway/master/debian/changelog"
distfiles="https://github.com/google/highway/archive/${version}.tar.gz"
-checksum=faccd343935c9e98afd1016e9d20e0b8b89d908508d1af958496f8c2d3004ac2
+checksum=5434488108186c170a5e2fca5e3c9b6ef59a1caa4d520b008a9b8be6b8abe6c5
if [ -z "$XBPS_CHECK_PKGS" ]; then
configure_args+=" -DBUILD_TESTING=OFF"
From e67e0f2fffcde866e315274c3356c0f6c29878e8 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 2 Jan 2024 20:33:25 -0800
Subject: [PATCH 2/7] libjxl: update to 0.9.1.
---
common/shlibs | 6 +-
srcpkgs/libjxl/patches/2211.patch | 68 ---------
srcpkgs/libjxl/patches/fix-pixbuf.patch | 184 ++++++++++++++++++++++++
srcpkgs/libjxl/template | 23 ++-
4 files changed, 196 insertions(+), 85 deletions(-)
delete mode 100644 srcpkgs/libjxl/patches/2211.patch
create mode 100644 srcpkgs/libjxl/patches/fix-pixbuf.patch
diff --git a/common/shlibs b/common/shlibs
index 71f172740e5c61..a7ebb86ac7c850 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4235,9 +4235,9 @@ libplayerctl.so.2 playerctl-2.4.1_1
libwireplumber-0.4.so.0 wireplumber-0.4.14_1
libjodycode.so.3 libjodycode-3.0.1_1
libgsoapssl++-2.8.124.so gsoap-2.8.124_1
-libjxl.so.0.8 libjxl-0.8.2_1
-libjxl_dec.so.0.8 libjxl-0.8.2_1
-libjxl_threads.so.0.8 libjxl-0.8.2_1
+libjxl.so.0.9 libjxl-0.9.0_1
+libjxl_dec.so.0.9 libjxl-0.9.0_1
+libjxl_threads.so.0.9 libjxl-0.9.0_1
libtext-engine-0.1.so.0 text-engine-0.1.1_1
libvmaf.so.1 vmaf-2.3.1_1
liblc3.so.1 liblc3-1.0.3_1
diff --git a/srcpkgs/libjxl/patches/2211.patch b/srcpkgs/libjxl/patches/2211.patch
deleted file mode 100644
index d74513005d4745..00000000000000
--- a/srcpkgs/libjxl/patches/2211.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-From b73a9e1e8b47fc623c3015ce40466274e4d4bb03 Mon Sep 17 00:00:00 2001
-From: east <xdong181@gmail.com>
-Date: Wed, 22 Feb 2023 20:12:05 +0800
-Subject: [PATCH 1/3] Add missing <atomic> content to fix gcc compilation for
- RISCV architecture.
-
----
- lib/jxl/enc_xyb.cc | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/lib/jxl/enc_xyb.cc b/lib/jxl/enc_xyb.cc
-index 1ef78877a71..1ed13da9574 100644
---- a/lib/jxl/enc_xyb.cc
-+++ b/lib/jxl/enc_xyb.cc
-@@ -7,6 +7,7 @@
-
- #include <algorithm>
- #include <cstdlib>
-+#include <atomic>
-
- #undef HWY_TARGET_INCLUDE
- #define HWY_TARGET_INCLUDE "lib/jxl/enc_xyb.cc"
-
-From 10a521764beb7e9dcc0dbfbe3f4dbb7e2e8d2bcc Mon Sep 17 00:00:00 2001
-From: east <xdong181@gmail.com>
-Date: Thu, 23 Feb 2023 00:50:02 +0800
-Subject: [PATCH 2/3] add name to AUTHORS
-
----
- AUTHORS | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/AUTHORS b/AUTHORS
-index 44dcc409949..3340422d606 100644
---- a/AUTHORS
-+++ b/AUTHORS
-@@ -30,6 +30,7 @@ Daniel Novomeský <dnovomesky@gmail.com>
- David Burnett <vargolsoft@gmail.com>
- Dirk Lemstra <dirk@lemstra.org>
- Don Olmstead <don.j.olmstead@gmail.com>
-+Dong Xu <xdong181@gmail.com>
- Even Rouault <even.rouault@spatialys.com>
- Fred Brennan <copypaste@kittens.ph>
- Heiko Becker <heirecka@exherbo.org>
-
-From fc6b5c316346475379895a6c67b6d97ab7b8c2cb Mon Sep 17 00:00:00 2001
-From: Moritz Firsching <firsching@google.com>
-Date: Wed, 22 Feb 2023 22:46:07 +0100
-Subject: [PATCH 3/3] lint fix
-
----
- lib/jxl/enc_xyb.cc | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/lib/jxl/enc_xyb.cc b/lib/jxl/enc_xyb.cc
-index 1ed13da9574..2ee0abf821a 100644
---- a/lib/jxl/enc_xyb.cc
-+++ b/lib/jxl/enc_xyb.cc
-@@ -6,8 +6,8 @@
- #include "lib/jxl/enc_xyb.h"
-
- #include <algorithm>
--#include <cstdlib>
- #include <atomic>
-+#include <cstdlib>
-
- #undef HWY_TARGET_INCLUDE
- #define HWY_TARGET_INCLUDE "lib/jxl/enc_xyb.cc"
diff --git a/srcpkgs/libjxl/patches/fix-pixbuf.patch b/srcpkgs/libjxl/patches/fix-pixbuf.patch
new file mode 100644
index 00000000000000..47166a8f60d185
--- /dev/null
+++ b/srcpkgs/libjxl/patches/fix-pixbuf.patch
@@ -0,0 +1,184 @@
+From 7021ada76bd1c1ee44483027c40233cd2e412637 Mon Sep 17 00:00:00 2001
+From: Leo Izen <leo.izen@gmail.com>
+Date: Mon, 29 Jan 2024 09:21:10 -0500
+Subject: [PATCH] lib/jxl/decode.cc: deduplicate and correct min_size
+ calculation
+
+Code to calculate the proper size of the buffer exists in three places
+in this function - one for the standard buffer, one for the extra
+channel buffer, and one for the preview buffer. However, only the code
+for the preview buffer correctly took into account the last row size
+possibly being slightly smaller than the remaining rows.
+
+This commit separates the code out into a separate function to remove
+duplicate code, and uses the algorithm from the prevew buffer which was
+the only correct one.
+
+Signed-off-by: Leo Izen <leo.izen@gmail.com>
+---
+ lib/jxl/decode.cc | 63 ++++++++++++++++--------------------------
+ lib/jxl/decode_test.cc | 8 ++++--
+ 2 files changed, 30 insertions(+), 41 deletions(-)
+
+diff --git a/lib/jxl/decode.cc b/lib/jxl/decode.cc
+index b674d1ba885..953342d76e1 100644
+--- a/lib/jxl/decode.cc
++++ b/lib/jxl/decode.cc
+@@ -2348,29 +2348,40 @@ JXL_EXPORT JxlDecoderStatus JxlDecoderSetCms(JxlDecoder* dec,
+ return JXL_DEC_SUCCESS;
+ }
+
+-JXL_EXPORT JxlDecoderStatus JxlDecoderPreviewOutBufferSize(
+- const JxlDecoder* dec, const JxlPixelFormat* format, size_t* size) {
++static JxlDecoderStatus GetMinSize(const JxlDecoder* dec,
++ const JxlPixelFormat* format,
++ size_t num_channels, size_t* min_size,
++ bool preview) {
+ size_t bits;
+ JxlDecoderStatus status = PrepareSizeCheck(dec, format, &bits);
+ if (status != JXL_DEC_SUCCESS) return status;
+- if (format->num_channels < 3 &&
+- !dec->image_metadata.color_encoding.IsGray()) {
+- return JXL_API_ERROR("Number of channels is too low for color output");
++ size_t xsize, ysize;
++ if (preview) {
++ xsize = dec->metadata.oriented_preview_xsize(dec->keep_orientation);
++ ysize = dec->metadata.oriented_preview_ysize(dec->keep_orientation);
++ } else {
++ GetCurrentDimensions(dec, xsize, ysize);
+ }
+-
+- size_t xsize = dec->metadata.oriented_preview_xsize(dec->keep_orientation);
+- size_t ysize = dec->metadata.oriented_preview_ysize(dec->keep_orientation);
+-
++ if (num_channels == 0) num_channels = format->num_channels;
+ size_t row_size =
+- jxl::DivCeil(xsize * format->num_channels * bits, jxl::kBitsPerByte);
++ jxl::DivCeil(xsize * num_channels * bits, jxl::kBitsPerByte);
+ size_t last_row_size = row_size;
+ if (format->align > 1) {
+ row_size = jxl::DivCeil(row_size, format->align) * format->align;
+ }
+- *size = row_size * (ysize - 1) + last_row_size;
++ *min_size = row_size * (ysize - 1) + last_row_size;
+ return JXL_DEC_SUCCESS;
+ }
+
++JXL_EXPORT JxlDecoderStatus JxlDecoderPreviewOutBufferSize(
++ const JxlDecoder* dec, const JxlPixelFormat* format, size_t* size) {
++ if (format->num_channels < 3 &&
++ !dec->image_metadata.color_encoding.IsGray()) {
++ return JXL_API_ERROR("Number of channels is too low for color output");
++ }
++ return GetMinSize(dec, format, 0, size, true);
++}
++
+ JXL_EXPORT JxlDecoderStatus JxlDecoderSetPreviewOutBuffer(
+ JxlDecoder* dec, const JxlPixelFormat* format, void* buffer, size_t size) {
+ if (!dec->got_basic_info || !dec->metadata.m.have_preview ||
+@@ -2401,23 +2412,12 @@ JXL_EXPORT JxlDecoderStatus JxlDecoderSetPreviewOutBuffer(
+
+ JXL_EXPORT JxlDecoderStatus JxlDecoderImageOutBufferSize(
+ const JxlDecoder* dec, const JxlPixelFormat* format, size_t* size) {
+- size_t bits;
+- JxlDecoderStatus status = PrepareSizeCheck(dec, format, &bits);
+- if (status != JXL_DEC_SUCCESS) return status;
+ if (format->num_channels < 3 &&
+ !dec->image_metadata.color_encoding.IsGray()) {
+ return JXL_API_ERROR("Number of channels is too low for color output");
+ }
+- size_t xsize, ysize;
+- GetCurrentDimensions(dec, xsize, ysize);
+- size_t row_size =
+- jxl::DivCeil(xsize * format->num_channels * bits, jxl::kBitsPerByte);
+- if (format->align > 1) {
+- row_size = jxl::DivCeil(row_size, format->align) * format->align;
+- }
+- *size = row_size * ysize;
+
+- return JXL_DEC_SUCCESS;
++ return GetMinSize(dec, format, 0, size, false);
+ }
+
+ JxlDecoderStatus JxlDecoderSetImageOutBuffer(JxlDecoder* dec,
+@@ -2463,22 +2463,7 @@ JxlDecoderStatus JxlDecoderExtraChannelBufferSize(const JxlDecoder* dec,
+ return JXL_API_ERROR("Invalid extra channel index");
+ }
+
+- size_t num_channels = 1; // Do not use format's num_channels
+-
+- size_t bits;
+- JxlDecoderStatus status = PrepareSizeCheck(dec, format, &bits);
+- if (status != JXL_DEC_SUCCESS) return status;
+-
+- size_t xsize, ysize;
+- GetCurrentDimensions(dec, xsize, ysize);
+- size_t row_size =
+- jxl::DivCeil(xsize * num_channels * bits, jxl::kBitsPerByte);
+- if (format->align > 1) {
+- row_size = jxl::DivCeil(row_size, format->align) * format->align;
+- }
+- *size = row_size * ysize;
+-
+- return JXL_DEC_SUCCESS;
++ return GetMinSize(dec, format, 1, size, false);
+ }
+
+ JxlDecoderStatus JxlDecoderSetExtraChannelBuffer(JxlDecoder* dec,
+diff --git a/lib/jxl/decode_test.cc b/lib/jxl/decode_test.cc
+index caee6dbc568..310742f705f 100644
+--- a/lib/jxl/decode_test.cc
++++ b/lib/jxl/decode_test.cc
+@@ -2575,7 +2575,11 @@ TEST(DecodeTest, AlignTest) {
+ size_t align = 17;
+ JxlPixelFormat format = {3, JXL_TYPE_UINT8, JXL_LITTLE_ENDIAN, align};
+ // On purpose not using jxl::RoundUpTo to test it independently.
+- size_t expected_line_bytes = (1 * 3 * xsize + align - 1) / align * align;
++ size_t expected_line_size_last = 1 * 3 * xsize;
++ size_t expected_line_size =
++ ((expected_line_size_last + align - 1) / align) * align;
++ size_t expected_pixels_size =
++ expected_line_size * (ysize - 1) + expected_line_size_last;
+
+ for (int use_callback = 0; use_callback <= 1; ++use_callback) {
+ std::vector<uint8_t> pixels2 = jxl::DecodeWithAPI(
+@@ -2583,7 +2587,7 @@ TEST(DecodeTest, AlignTest) {
+ /*set_buffer_early=*/false,
+ /*use_resizable_runner=*/false, /*require_boxes=*/false,
+ /*expect_success=*/true);
+- EXPECT_EQ(expected_line_bytes * ysize, pixels2.size());
++ EXPECT_EQ(expected_pixels_size, pixels2.size());
+ EXPECT_EQ(0u, jxl::test::ComparePixels(pixels.data(), pixels2.data(), xsize,
+ ysize, format_orig, format));
+ }
+From c4ebb7e70ee09591ae0269410ebe8929f400713e Mon Sep 17 00:00:00 2001
+From: Leo Izen <leo.izen@gmail.com>
+Date: Mon, 29 Jan 2024 09:23:36 -0500
+Subject: [PATCH] plugins/gdk-pixbuf: consider stride when passing buffer to
+ libjxl
+
+This change uses gdk_pixbuf_get_pixels_with_length to get the actual
+size of the buffer, with stride taken into account. The previous code
+just multiplies width by height and ignores stride.
+
+Signed-off-by: Leo Izen <leo.izen@gmail.com>
+---
+ plugins/gdk-pixbuf/pixbufloader-jxl.c | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/plugins/gdk-pixbuf/pixbufloader-jxl.c b/plugins/gdk-pixbuf/pixbufloader-jxl.c
+index bafa57b1674..066468a5035 100644
+--- a/plugins/gdk-pixbuf/pixbufloader-jxl.c
++++ b/plugins/gdk-pixbuf/pixbufloader-jxl.c
+@@ -491,9 +491,8 @@ static gboolean load_increment(gpointer context, const guchar *buf, guint size,
+ decoder_state->frames->len - 1)
+ .data;
+ decoder_state->pixel_format.align = gdk_pixbuf_get_rowstride(output);
+- guchar *dst = gdk_pixbuf_get_pixels(output);
+- size_t num_pixels = decoder_state->xsize * decoder_state->ysize;
+- size_t size = num_pixels * decoder_state->pixel_format.num_channels;
++ guint size;
++ guchar *dst = gdk_pixbuf_get_pixels_with_length(output, &size);
+ if (JXL_DEC_SUCCESS != JxlDecoderSetImageOutBuffer(
+ decoder_state->decoder,
+ &decoder_state->pixel_format, dst, size)) {
diff --git a/srcpkgs/libjxl/template b/srcpkgs/libjxl/template
index e6bd535377f5c1..274a540b36a7ef 100644
--- a/srcpkgs/libjxl/template
+++ b/srcpkgs/libjxl/template
@@ -1,16 +1,16 @@
# Template file for 'libjxl'
pkgname=libjxl
-version=0.8.2
-revision=2
-_testdata_hash=d6168ffb9e1cc24007e64b65dd84d822ad1fc759
-_skcms_hash=b25b07b4b07990811de121c0356155b2ba0f4318
+version=0.9.1
+revision=1
+_testdata_hash=ff8d743aaba05b3014f17e5475e576242fa979fc
build_style=cmake
build_wrksrc="libjxl-${version}"
configure_args="-DJPEGXL_ENABLE_BENCHMARK=OFF -DJPEGXL_ENABLE_EXAMPLES=OFF
- -DJPEGXL_ENABLE_SJPEG=OFF -DJPEGXL_ENABLE_PLUGINS=ON -DJPEGXL_VERSION=${version}"
+ -DJPEGXL_ENABLE_SJPEG=OFF -DJPEGXL_ENABLE_PLUGINS=ON -DJPEGXL_VERSION=${version}
+ -DJPEGXL_ENABLE_SKCMS=OFF"
hostmakedepends="tar pkg-config asciidoc"
makedepends="brotli-devel highway libpng-devel giflib-devel libjpeg-turbo-devel
- libopenexr-devel libwebp-devel gdk-pixbuf-devel gimp-devel"
+ libopenexr-devel libwebp-devel gdk-pixbuf-devel gimp-devel lcms2-devel"
checkdepends="gtest-devel xdg-utils"
short_desc="JPEG XL image format reference implementation"
maintainer="Joshua Krämer <joshua@kraemer.link>"
@@ -18,12 +18,9 @@ license="BSD-3-Clause, custom:Patent grant"
homepage="https://jpeg.org/jpegxl/"
changelog="https://raw.githubusercontent.com/libjxl/libjxl/main/CHANGELOG.md"
distfiles="https://github.com/libjxl/libjxl/archive/v${version}.tar.gz
- https://github.com/libjxl/testdata/archive/${_testdata_hash}.tar.gz>testdata-${_testdata_hash}.tar.gz
- https://skia.googlesource.com/skcms/+archive/${_skcms_hash}.tar.gz>skcms-${_skcms_hash}.tar.gz"
-checksum="c70916fb3ed43784eb840f82f05d390053a558e2da106e40863919238fa7b420
- 64658d3341bff2976899cb8b140242ffa4de1cd41aed507dfec4aa9e7e05ca24
- @8feb1e33c38ca13f91a0d5bd8ce25f976eb239edf38f49e6db8895ae9f1e833c"
-skip_extraction="skcms-${_skcms_hash}.tar.gz"
+ https://github.com/libjxl/testdata/archive/${_testdata_hash}.tar.gz>testdata-${_testdata_hash}.tar.gz"
+checksum="a0e72e9ece26878147069ad4888ac3382021d4bbee71c2e1b687d5bde7fd7e01
+ 9c45a108df32a002a69465df896d33acf77d97c88fb59dffa0dff5628370e96f"
patch_args="-Np1 --directory=${build_wrksrc}"
if [ -z "$XBPS_CHECK_PKGS" ]; then
@@ -32,7 +29,6 @@ fi
post_extract() {
mv "testdata-${_testdata_hash}"/* "${build_wrksrc}/testdata/"
- bsdtar -xf "${XBPS_SRCDISTDIR}/${pkgname}-${version}/skcms-${_skcms_hash}.tar.gz" -C "${build_wrksrc}/third_party/skcms"
}
post_install() {
@@ -45,7 +41,6 @@ libjxl-devel_package() {
depends="${sourcepkg}>=${version}_${revision} highway brotli-devel"
pkg_install() {
vmove usr/include
- vmove "usr/lib/*.a"
vmove "usr/lib/*.so"
vmove usr/lib/pkgconfig
}
From 5702aa8b43b7c3471c58937e4a4d3327c726288e Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 2 Jan 2024 22:40:00 -0800
Subject: [PATCH 3/7] krita: rebuild for libjxl 0.9
---
srcpkgs/krita/patches/jxl09.patch | 71 +++++++++++++++++++++++++++++++
srcpkgs/krita/patches/sip68.patch | 23 ++++++++++
srcpkgs/krita/template | 2 +-
3 files changed, 95 insertions(+), 1 deletion(-)
create mode 100644 srcpkgs/krita/patches/jxl09.patch
create mode 100644 srcpkgs/krita/patches/sip68.patch
diff --git a/srcpkgs/krita/patches/jxl09.patch b/srcpkgs/krita/patches/jxl09.patch
new file mode 100644
index 00000000000000..50e2cd50bcc660
--- /dev/null
+++ b/srcpkgs/krita/patches/jxl09.patch
@@ -0,0 +1,71 @@
+From d9e258bf9d6af5f53467becf65bb21bf6f96a38e Mon Sep 17 00:00:00 2001
+From: Timo Gurr <timo.gurr@gmail.com>
+Date: Fri, 29 Dec 2023 11:10:26 +0100
+Subject: [PATCH] Fix build with libjxl 0.9.0
+
+BUG:478987
+---
+ 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/srcpkgs/krita/patches/sip68.patch b/srcpkgs/krita/patches/sip68.patch
new file mode 100644
index 00000000000000..e9e4544b7cc279
--- /dev/null
+++ b/srcpkgs/krita/patches/sip68.patch
@@ -0,0 +1,23 @@
+From 2d71c47661d43a4e3c1ab0c27803de980bdf2bb2 Mon Sep 17 00:00:00 2001
+From: Antonio Rojas <arojas@archlinux.org>
+Date: Mon, 11 Dec 2023 20:26:13 +0100
+Subject: [PATCH] Bump SIP ABI version to 12.8
+
+Fixes build with SIP 6.8
+---
+ cmake/modules/pyproject.toml.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/cmake/modules/pyproject.toml.in b/cmake/modules/pyproject.toml.in
+index 090b2d4b0cb..085ddf41799 100644
+--- a/cmake/modules/pyproject.toml.in
++++ b/cmake/modules/pyproject.toml.in
+@@ -9,7 +9,7 @@ name = "@module_name_toml@"
+ sip-module = "@sip_name@"
+ sip-include-dirs = @sip_include_dirs@
+ sip-files-dir = "@module_srcs@"
+-abi-version = "12"
++abi-version = "12.8"
+
+ [tool.sip.bindings.@module_name_toml@]
+ tags = @module_tags@
diff --git a/srcpkgs/krita/template b/srcpkgs/krita/template
index d804b581a8689f..4833f8bd33d865 100644
--- a/srcpkgs/krita/template
+++ b/srcpkgs/krita/template
@@ -1,7 +1,7 @@
# Template file for 'krita'
pkgname=krita
version=5.2.1
-revision=3
+revision=4
build_style=cmake
configure_args="-Wno-dev -DBUILD_TESTING=OFF"
hostmakedepends="extra-cmake-modules gettext pkg-config python3
From 43a85297188de996ebc5d8a0ede30e599fe72053 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 2 Jan 2024 22:40:19 -0800
Subject: [PATCH 4/7] imlib2: rebuild for libjxl 0.9
---
srcpkgs/imlib2/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/imlib2/template b/srcpkgs/imlib2/template
index bcbf607efa142b..9f485b0b2f8584 100644
--- a/srcpkgs/imlib2/template
+++ b/srcpkgs/imlib2/template
@@ -1,7 +1,7 @@
# Template file for 'imlib2'
pkgname=imlib2
version=1.12.1
-revision=1
+revision=2
build_style=gnu-configure
configure_args="--disable-static --sysconfdir=/etc/imlib2 --enable-visibility-hiding"
hostmakedepends="pkg-config"
From f9e129140f864781f7f941740f676822004a0da1 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 2 Jan 2024 22:41:01 -0800
Subject: [PATCH 5/7] darktable: rebuild for libjxl 0.9
---
srcpkgs/darktable/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/darktable/template b/srcpkgs/darktable/template
index 97dfae3471e7ca..af29d7cec18bbe 100644
--- a/srcpkgs/darktable/template
+++ b/srcpkgs/darktable/template
@@ -1,7 +1,7 @@
# Template file for 'darktable'
pkgname=darktable
version=4.4.2
-revision=5
+revision=6
# upstream only supports these archs:
archs="x86_64* aarch64* ppc64le*"
build_style=cmake
From 2da3413ce50d0beecb4e2ecaa1d8aa882a46d23e Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 2 Jan 2024 22:41:26 -0800
Subject: [PATCH 6/7] kimageformats: rebuild for libjxl 0.9
---
srcpkgs/kimageformats/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/kimageformats/template b/srcpkgs/kimageformats/template
index 9ff74b976eab04..9a6a9c6d3bf41f 100644
--- a/srcpkgs/kimageformats/template
+++ b/srcpkgs/kimageformats/template
@@ -1,7 +1,7 @@
# Template file for 'kimageformats'
pkgname=kimageformats
version=5.113.0
-revision=1
+revision=2
build_style=cmake
configure_args="-DKIMAGEFORMATS_HEIF=ON"
hostmakedepends="kcoreaddons extra-cmake-modules qt5-qmake qt5-host-tools
From 96ec98704a29cbae8144c36feb3a78ff49b460a3 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 30 Jan 2024 12:38:40 -0800
Subject: [PATCH 7/7] swayimg: reuilbd for libjxl 0.9
---
srcpkgs/swayimg/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/swayimg/template b/srcpkgs/swayimg/template
index 115566a7d39684..34b353098abc60 100644
--- a/srcpkgs/swayimg/template
+++ b/srcpkgs/swayimg/template
@@ -1,7 +1,7 @@
# Template file for 'swayimg'
pkgname=swayimg
version=2.0
-revision=1
+revision=2
build_style=meson
hostmakedepends="pkg-config wayland-devel"
makedepends="wayland-devel cairo-devel json-c-devel libxkbcommon-devel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PR PATCH] [Updated] libjxl: update to 0.9.1.
2024-01-29 23:11 [PR PATCH] libjxl: update to 0.9.1 oreo639
2024-01-30 4:13 ` [PR PATCH] [Updated] " oreo639
2024-01-30 20:42 ` oreo639
@ 2024-01-31 0:27 ` oreo639
2024-02-03 5:30 ` oreo639
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: oreo639 @ 2024-01-31 0:27 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1240 bytes --]
There is an updated pull request by oreo639 against master on the void-packages repository
https://github.com/oreo639/void-packages libjxl
https://github.com/void-linux/void-packages/pull/48435
libjxl: update to 0.9.1.
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/48435.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libjxl-48435.patch --]
[-- Type: text/x-diff, Size: 24901 bytes --]
From bbd56396ab4236827f519f704d977c95b636ed53 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 2 Jan 2024 20:32:58 -0800
Subject: [PATCH 1/7] highway: update to 1.0.7.
---
srcpkgs/highway/template | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/highway/template b/srcpkgs/highway/template
index 4d6898b62c746..6f593049d8ae3 100644
--- a/srcpkgs/highway/template
+++ b/srcpkgs/highway/template
@@ -1,6 +1,6 @@
# Template file for 'highway'
pkgname=highway
-version=1.0.4
+version=1.0.7
revision=1
build_style=cmake
configure_args="-DHWY_SYSTEM_GTEST=ON -DHWY_ENABLE_EXAMPLES=OFF"
@@ -11,8 +11,13 @@ license="Apache-2.0"
homepage="https://github.com/google/highway"
changelog="https://raw.githubusercontent.com/google/highway/master/debian/changelog"
distfiles="https://github.com/google/highway/archive/${version}.tar.gz"
-checksum=faccd343935c9e98afd1016e9d20e0b8b89d908508d1af958496f8c2d3004ac2
+checksum=5434488108186c170a5e2fca5e3c9b6ef59a1caa4d520b008a9b8be6b8abe6c5
if [ -z "$XBPS_CHECK_PKGS" ]; then
configure_args+=" -DBUILD_TESTING=OFF"
fi
+
+# Workaround for i686, requires GCC 13+
+# See: https://github.com/google/highway/issues/1488
+CFLAGS="-fexcess-precision=standard"
+CXXFLAGS="-fexcess-precision=standard"
From 336ac3518736e5b5fcdbf2f39ebe7650c96316fd Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 2 Jan 2024 20:33:25 -0800
Subject: [PATCH 2/7] libjxl: update to 0.9.1.
---
common/shlibs | 6 +-
srcpkgs/libjxl/patches/2211.patch | 68 ---------
srcpkgs/libjxl/patches/fix-pixbuf.patch | 184 ++++++++++++++++++++++++
srcpkgs/libjxl/template | 23 ++-
4 files changed, 196 insertions(+), 85 deletions(-)
delete mode 100644 srcpkgs/libjxl/patches/2211.patch
create mode 100644 srcpkgs/libjxl/patches/fix-pixbuf.patch
diff --git a/common/shlibs b/common/shlibs
index 71f172740e5c6..a7ebb86ac7c85 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4235,9 +4235,9 @@ libplayerctl.so.2 playerctl-2.4.1_1
libwireplumber-0.4.so.0 wireplumber-0.4.14_1
libjodycode.so.3 libjodycode-3.0.1_1
libgsoapssl++-2.8.124.so gsoap-2.8.124_1
-libjxl.so.0.8 libjxl-0.8.2_1
-libjxl_dec.so.0.8 libjxl-0.8.2_1
-libjxl_threads.so.0.8 libjxl-0.8.2_1
+libjxl.so.0.9 libjxl-0.9.0_1
+libjxl_dec.so.0.9 libjxl-0.9.0_1
+libjxl_threads.so.0.9 libjxl-0.9.0_1
libtext-engine-0.1.so.0 text-engine-0.1.1_1
libvmaf.so.1 vmaf-2.3.1_1
liblc3.so.1 liblc3-1.0.3_1
diff --git a/srcpkgs/libjxl/patches/2211.patch b/srcpkgs/libjxl/patches/2211.patch
deleted file mode 100644
index d74513005d474..0000000000000
--- a/srcpkgs/libjxl/patches/2211.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-From b73a9e1e8b47fc623c3015ce40466274e4d4bb03 Mon Sep 17 00:00:00 2001
-From: east <xdong181@gmail.com>
-Date: Wed, 22 Feb 2023 20:12:05 +0800
-Subject: [PATCH 1/3] Add missing <atomic> content to fix gcc compilation for
- RISCV architecture.
-
----
- lib/jxl/enc_xyb.cc | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/lib/jxl/enc_xyb.cc b/lib/jxl/enc_xyb.cc
-index 1ef78877a71..1ed13da9574 100644
---- a/lib/jxl/enc_xyb.cc
-+++ b/lib/jxl/enc_xyb.cc
-@@ -7,6 +7,7 @@
-
- #include <algorithm>
- #include <cstdlib>
-+#include <atomic>
-
- #undef HWY_TARGET_INCLUDE
- #define HWY_TARGET_INCLUDE "lib/jxl/enc_xyb.cc"
-
-From 10a521764beb7e9dcc0dbfbe3f4dbb7e2e8d2bcc Mon Sep 17 00:00:00 2001
-From: east <xdong181@gmail.com>
-Date: Thu, 23 Feb 2023 00:50:02 +0800
-Subject: [PATCH 2/3] add name to AUTHORS
-
----
- AUTHORS | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/AUTHORS b/AUTHORS
-index 44dcc409949..3340422d606 100644
---- a/AUTHORS
-+++ b/AUTHORS
-@@ -30,6 +30,7 @@ Daniel Novomeský <dnovomesky@gmail.com>
- David Burnett <vargolsoft@gmail.com>
- Dirk Lemstra <dirk@lemstra.org>
- Don Olmstead <don.j.olmstead@gmail.com>
-+Dong Xu <xdong181@gmail.com>
- Even Rouault <even.rouault@spatialys.com>
- Fred Brennan <copypaste@kittens.ph>
- Heiko Becker <heirecka@exherbo.org>
-
-From fc6b5c316346475379895a6c67b6d97ab7b8c2cb Mon Sep 17 00:00:00 2001
-From: Moritz Firsching <firsching@google.com>
-Date: Wed, 22 Feb 2023 22:46:07 +0100
-Subject: [PATCH 3/3] lint fix
-
----
- lib/jxl/enc_xyb.cc | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/lib/jxl/enc_xyb.cc b/lib/jxl/enc_xyb.cc
-index 1ed13da9574..2ee0abf821a 100644
---- a/lib/jxl/enc_xyb.cc
-+++ b/lib/jxl/enc_xyb.cc
-@@ -6,8 +6,8 @@
- #include "lib/jxl/enc_xyb.h"
-
- #include <algorithm>
--#include <cstdlib>
- #include <atomic>
-+#include <cstdlib>
-
- #undef HWY_TARGET_INCLUDE
- #define HWY_TARGET_INCLUDE "lib/jxl/enc_xyb.cc"
diff --git a/srcpkgs/libjxl/patches/fix-pixbuf.patch b/srcpkgs/libjxl/patches/fix-pixbuf.patch
new file mode 100644
index 0000000000000..47166a8f60d18
--- /dev/null
+++ b/srcpkgs/libjxl/patches/fix-pixbuf.patch
@@ -0,0 +1,184 @@
+From 7021ada76bd1c1ee44483027c40233cd2e412637 Mon Sep 17 00:00:00 2001
+From: Leo Izen <leo.izen@gmail.com>
+Date: Mon, 29 Jan 2024 09:21:10 -0500
+Subject: [PATCH] lib/jxl/decode.cc: deduplicate and correct min_size
+ calculation
+
+Code to calculate the proper size of the buffer exists in three places
+in this function - one for the standard buffer, one for the extra
+channel buffer, and one for the preview buffer. However, only the code
+for the preview buffer correctly took into account the last row size
+possibly being slightly smaller than the remaining rows.
+
+This commit separates the code out into a separate function to remove
+duplicate code, and uses the algorithm from the prevew buffer which was
+the only correct one.
+
+Signed-off-by: Leo Izen <leo.izen@gmail.com>
+---
+ lib/jxl/decode.cc | 63 ++++++++++++++++--------------------------
+ lib/jxl/decode_test.cc | 8 ++++--
+ 2 files changed, 30 insertions(+), 41 deletions(-)
+
+diff --git a/lib/jxl/decode.cc b/lib/jxl/decode.cc
+index b674d1ba885..953342d76e1 100644
+--- a/lib/jxl/decode.cc
++++ b/lib/jxl/decode.cc
+@@ -2348,29 +2348,40 @@ JXL_EXPORT JxlDecoderStatus JxlDecoderSetCms(JxlDecoder* dec,
+ return JXL_DEC_SUCCESS;
+ }
+
+-JXL_EXPORT JxlDecoderStatus JxlDecoderPreviewOutBufferSize(
+- const JxlDecoder* dec, const JxlPixelFormat* format, size_t* size) {
++static JxlDecoderStatus GetMinSize(const JxlDecoder* dec,
++ const JxlPixelFormat* format,
++ size_t num_channels, size_t* min_size,
++ bool preview) {
+ size_t bits;
+ JxlDecoderStatus status = PrepareSizeCheck(dec, format, &bits);
+ if (status != JXL_DEC_SUCCESS) return status;
+- if (format->num_channels < 3 &&
+- !dec->image_metadata.color_encoding.IsGray()) {
+- return JXL_API_ERROR("Number of channels is too low for color output");
++ size_t xsize, ysize;
++ if (preview) {
++ xsize = dec->metadata.oriented_preview_xsize(dec->keep_orientation);
++ ysize = dec->metadata.oriented_preview_ysize(dec->keep_orientation);
++ } else {
++ GetCurrentDimensions(dec, xsize, ysize);
+ }
+-
+- size_t xsize = dec->metadata.oriented_preview_xsize(dec->keep_orientation);
+- size_t ysize = dec->metadata.oriented_preview_ysize(dec->keep_orientation);
+-
++ if (num_channels == 0) num_channels = format->num_channels;
+ size_t row_size =
+- jxl::DivCeil(xsize * format->num_channels * bits, jxl::kBitsPerByte);
++ jxl::DivCeil(xsize * num_channels * bits, jxl::kBitsPerByte);
+ size_t last_row_size = row_size;
+ if (format->align > 1) {
+ row_size = jxl::DivCeil(row_size, format->align) * format->align;
+ }
+- *size = row_size * (ysize - 1) + last_row_size;
++ *min_size = row_size * (ysize - 1) + last_row_size;
+ return JXL_DEC_SUCCESS;
+ }
+
++JXL_EXPORT JxlDecoderStatus JxlDecoderPreviewOutBufferSize(
++ const JxlDecoder* dec, const JxlPixelFormat* format, size_t* size) {
++ if (format->num_channels < 3 &&
++ !dec->image_metadata.color_encoding.IsGray()) {
++ return JXL_API_ERROR("Number of channels is too low for color output");
++ }
++ return GetMinSize(dec, format, 0, size, true);
++}
++
+ JXL_EXPORT JxlDecoderStatus JxlDecoderSetPreviewOutBuffer(
+ JxlDecoder* dec, const JxlPixelFormat* format, void* buffer, size_t size) {
+ if (!dec->got_basic_info || !dec->metadata.m.have_preview ||
+@@ -2401,23 +2412,12 @@ JXL_EXPORT JxlDecoderStatus JxlDecoderSetPreviewOutBuffer(
+
+ JXL_EXPORT JxlDecoderStatus JxlDecoderImageOutBufferSize(
+ const JxlDecoder* dec, const JxlPixelFormat* format, size_t* size) {
+- size_t bits;
+- JxlDecoderStatus status = PrepareSizeCheck(dec, format, &bits);
+- if (status != JXL_DEC_SUCCESS) return status;
+ if (format->num_channels < 3 &&
+ !dec->image_metadata.color_encoding.IsGray()) {
+ return JXL_API_ERROR("Number of channels is too low for color output");
+ }
+- size_t xsize, ysize;
+- GetCurrentDimensions(dec, xsize, ysize);
+- size_t row_size =
+- jxl::DivCeil(xsize * format->num_channels * bits, jxl::kBitsPerByte);
+- if (format->align > 1) {
+- row_size = jxl::DivCeil(row_size, format->align) * format->align;
+- }
+- *size = row_size * ysize;
+
+- return JXL_DEC_SUCCESS;
++ return GetMinSize(dec, format, 0, size, false);
+ }
+
+ JxlDecoderStatus JxlDecoderSetImageOutBuffer(JxlDecoder* dec,
+@@ -2463,22 +2463,7 @@ JxlDecoderStatus JxlDecoderExtraChannelBufferSize(const JxlDecoder* dec,
+ return JXL_API_ERROR("Invalid extra channel index");
+ }
+
+- size_t num_channels = 1; // Do not use format's num_channels
+-
+- size_t bits;
+- JxlDecoderStatus status = PrepareSizeCheck(dec, format, &bits);
+- if (status != JXL_DEC_SUCCESS) return status;
+-
+- size_t xsize, ysize;
+- GetCurrentDimensions(dec, xsize, ysize);
+- size_t row_size =
+- jxl::DivCeil(xsize * num_channels * bits, jxl::kBitsPerByte);
+- if (format->align > 1) {
+- row_size = jxl::DivCeil(row_size, format->align) * format->align;
+- }
+- *size = row_size * ysize;
+-
+- return JXL_DEC_SUCCESS;
++ return GetMinSize(dec, format, 1, size, false);
+ }
+
+ JxlDecoderStatus JxlDecoderSetExtraChannelBuffer(JxlDecoder* dec,
+diff --git a/lib/jxl/decode_test.cc b/lib/jxl/decode_test.cc
+index caee6dbc568..310742f705f 100644
+--- a/lib/jxl/decode_test.cc
++++ b/lib/jxl/decode_test.cc
+@@ -2575,7 +2575,11 @@ TEST(DecodeTest, AlignTest) {
+ size_t align = 17;
+ JxlPixelFormat format = {3, JXL_TYPE_UINT8, JXL_LITTLE_ENDIAN, align};
+ // On purpose not using jxl::RoundUpTo to test it independently.
+- size_t expected_line_bytes = (1 * 3 * xsize + align - 1) / align * align;
++ size_t expected_line_size_last = 1 * 3 * xsize;
++ size_t expected_line_size =
++ ((expected_line_size_last + align - 1) / align) * align;
++ size_t expected_pixels_size =
++ expected_line_size * (ysize - 1) + expected_line_size_last;
+
+ for (int use_callback = 0; use_callback <= 1; ++use_callback) {
+ std::vector<uint8_t> pixels2 = jxl::DecodeWithAPI(
+@@ -2583,7 +2587,7 @@ TEST(DecodeTest, AlignTest) {
+ /*set_buffer_early=*/false,
+ /*use_resizable_runner=*/false, /*require_boxes=*/false,
+ /*expect_success=*/true);
+- EXPECT_EQ(expected_line_bytes * ysize, pixels2.size());
++ EXPECT_EQ(expected_pixels_size, pixels2.size());
+ EXPECT_EQ(0u, jxl::test::ComparePixels(pixels.data(), pixels2.data(), xsize,
+ ysize, format_orig, format));
+ }
+From c4ebb7e70ee09591ae0269410ebe8929f400713e Mon Sep 17 00:00:00 2001
+From: Leo Izen <leo.izen@gmail.com>
+Date: Mon, 29 Jan 2024 09:23:36 -0500
+Subject: [PATCH] plugins/gdk-pixbuf: consider stride when passing buffer to
+ libjxl
+
+This change uses gdk_pixbuf_get_pixels_with_length to get the actual
+size of the buffer, with stride taken into account. The previous code
+just multiplies width by height and ignores stride.
+
+Signed-off-by: Leo Izen <leo.izen@gmail.com>
+---
+ plugins/gdk-pixbuf/pixbufloader-jxl.c | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/plugins/gdk-pixbuf/pixbufloader-jxl.c b/plugins/gdk-pixbuf/pixbufloader-jxl.c
+index bafa57b1674..066468a5035 100644
+--- a/plugins/gdk-pixbuf/pixbufloader-jxl.c
++++ b/plugins/gdk-pixbuf/pixbufloader-jxl.c
+@@ -491,9 +491,8 @@ static gboolean load_increment(gpointer context, const guchar *buf, guint size,
+ decoder_state->frames->len - 1)
+ .data;
+ decoder_state->pixel_format.align = gdk_pixbuf_get_rowstride(output);
+- guchar *dst = gdk_pixbuf_get_pixels(output);
+- size_t num_pixels = decoder_state->xsize * decoder_state->ysize;
+- size_t size = num_pixels * decoder_state->pixel_format.num_channels;
++ guint size;
++ guchar *dst = gdk_pixbuf_get_pixels_with_length(output, &size);
+ if (JXL_DEC_SUCCESS != JxlDecoderSetImageOutBuffer(
+ decoder_state->decoder,
+ &decoder_state->pixel_format, dst, size)) {
diff --git a/srcpkgs/libjxl/template b/srcpkgs/libjxl/template
index e6bd535377f5c..274a540b36a7e 100644
--- a/srcpkgs/libjxl/template
+++ b/srcpkgs/libjxl/template
@@ -1,16 +1,16 @@
# Template file for 'libjxl'
pkgname=libjxl
-version=0.8.2
-revision=2
-_testdata_hash=d6168ffb9e1cc24007e64b65dd84d822ad1fc759
-_skcms_hash=b25b07b4b07990811de121c0356155b2ba0f4318
+version=0.9.1
+revision=1
+_testdata_hash=ff8d743aaba05b3014f17e5475e576242fa979fc
build_style=cmake
build_wrksrc="libjxl-${version}"
configure_args="-DJPEGXL_ENABLE_BENCHMARK=OFF -DJPEGXL_ENABLE_EXAMPLES=OFF
- -DJPEGXL_ENABLE_SJPEG=OFF -DJPEGXL_ENABLE_PLUGINS=ON -DJPEGXL_VERSION=${version}"
+ -DJPEGXL_ENABLE_SJPEG=OFF -DJPEGXL_ENABLE_PLUGINS=ON -DJPEGXL_VERSION=${version}
+ -DJPEGXL_ENABLE_SKCMS=OFF"
hostmakedepends="tar pkg-config asciidoc"
makedepends="brotli-devel highway libpng-devel giflib-devel libjpeg-turbo-devel
- libopenexr-devel libwebp-devel gdk-pixbuf-devel gimp-devel"
+ libopenexr-devel libwebp-devel gdk-pixbuf-devel gimp-devel lcms2-devel"
checkdepends="gtest-devel xdg-utils"
short_desc="JPEG XL image format reference implementation"
maintainer="Joshua Krämer <joshua@kraemer.link>"
@@ -18,12 +18,9 @@ license="BSD-3-Clause, custom:Patent grant"
homepage="https://jpeg.org/jpegxl/"
changelog="https://raw.githubusercontent.com/libjxl/libjxl/main/CHANGELOG.md"
distfiles="https://github.com/libjxl/libjxl/archive/v${version}.tar.gz
- https://github.com/libjxl/testdata/archive/${_testdata_hash}.tar.gz>testdata-${_testdata_hash}.tar.gz
- https://skia.googlesource.com/skcms/+archive/${_skcms_hash}.tar.gz>skcms-${_skcms_hash}.tar.gz"
-checksum="c70916fb3ed43784eb840f82f05d390053a558e2da106e40863919238fa7b420
- 64658d3341bff2976899cb8b140242ffa4de1cd41aed507dfec4aa9e7e05ca24
- @8feb1e33c38ca13f91a0d5bd8ce25f976eb239edf38f49e6db8895ae9f1e833c"
-skip_extraction="skcms-${_skcms_hash}.tar.gz"
+ https://github.com/libjxl/testdata/archive/${_testdata_hash}.tar.gz>testdata-${_testdata_hash}.tar.gz"
+checksum="a0e72e9ece26878147069ad4888ac3382021d4bbee71c2e1b687d5bde7fd7e01
+ 9c45a108df32a002a69465df896d33acf77d97c88fb59dffa0dff5628370e96f"
patch_args="-Np1 --directory=${build_wrksrc}"
if [ -z "$XBPS_CHECK_PKGS" ]; then
@@ -32,7 +29,6 @@ fi
post_extract() {
mv "testdata-${_testdata_hash}"/* "${build_wrksrc}/testdata/"
- bsdtar -xf "${XBPS_SRCDISTDIR}/${pkgname}-${version}/skcms-${_skcms_hash}.tar.gz" -C "${build_wrksrc}/third_party/skcms"
}
post_install() {
@@ -45,7 +41,6 @@ libjxl-devel_package() {
depends="${sourcepkg}>=${version}_${revision} highway brotli-devel"
pkg_install() {
vmove usr/include
- vmove "usr/lib/*.a"
vmove "usr/lib/*.so"
vmove usr/lib/pkgconfig
}
From 896b7f1a21e097b9e68c2d2213faaa0b136957f9 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 2 Jan 2024 22:40:00 -0800
Subject: [PATCH 3/7] krita: rebuild for libjxl 0.9
---
srcpkgs/krita/patches/jxl09.patch | 71 +++++++++++++++++++++++++++++++
srcpkgs/krita/patches/sip68.patch | 23 ++++++++++
srcpkgs/krita/template | 2 +-
3 files changed, 95 insertions(+), 1 deletion(-)
create mode 100644 srcpkgs/krita/patches/jxl09.patch
create mode 100644 srcpkgs/krita/patches/sip68.patch
diff --git a/srcpkgs/krita/patches/jxl09.patch b/srcpkgs/krita/patches/jxl09.patch
new file mode 100644
index 0000000000000..50e2cd50bcc66
--- /dev/null
+++ b/srcpkgs/krita/patches/jxl09.patch
@@ -0,0 +1,71 @@
+From d9e258bf9d6af5f53467becf65bb21bf6f96a38e Mon Sep 17 00:00:00 2001
+From: Timo Gurr <timo.gurr@gmail.com>
+Date: Fri, 29 Dec 2023 11:10:26 +0100
+Subject: [PATCH] Fix build with libjxl 0.9.0
+
+BUG:478987
+---
+ 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/srcpkgs/krita/patches/sip68.patch b/srcpkgs/krita/patches/sip68.patch
new file mode 100644
index 0000000000000..e9e4544b7cc27
--- /dev/null
+++ b/srcpkgs/krita/patches/sip68.patch
@@ -0,0 +1,23 @@
+From 2d71c47661d43a4e3c1ab0c27803de980bdf2bb2 Mon Sep 17 00:00:00 2001
+From: Antonio Rojas <arojas@archlinux.org>
+Date: Mon, 11 Dec 2023 20:26:13 +0100
+Subject: [PATCH] Bump SIP ABI version to 12.8
+
+Fixes build with SIP 6.8
+---
+ cmake/modules/pyproject.toml.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/cmake/modules/pyproject.toml.in b/cmake/modules/pyproject.toml.in
+index 090b2d4b0cb..085ddf41799 100644
+--- a/cmake/modules/pyproject.toml.in
++++ b/cmake/modules/pyproject.toml.in
+@@ -9,7 +9,7 @@ name = "@module_name_toml@"
+ sip-module = "@sip_name@"
+ sip-include-dirs = @sip_include_dirs@
+ sip-files-dir = "@module_srcs@"
+-abi-version = "12"
++abi-version = "12.8"
+
+ [tool.sip.bindings.@module_name_toml@]
+ tags = @module_tags@
diff --git a/srcpkgs/krita/template b/srcpkgs/krita/template
index d804b581a8689..4833f8bd33d86 100644
--- a/srcpkgs/krita/template
+++ b/srcpkgs/krita/template
@@ -1,7 +1,7 @@
# Template file for 'krita'
pkgname=krita
version=5.2.1
-revision=3
+revision=4
build_style=cmake
configure_args="-Wno-dev -DBUILD_TESTING=OFF"
hostmakedepends="extra-cmake-modules gettext pkg-config python3
From 6c5c418241698dff12134d2d6ce5d3f48283ecc3 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 2 Jan 2024 22:40:19 -0800
Subject: [PATCH 4/7] imlib2: rebuild for libjxl 0.9
---
srcpkgs/imlib2/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/imlib2/template b/srcpkgs/imlib2/template
index bcbf607efa142..9f485b0b2f858 100644
--- a/srcpkgs/imlib2/template
+++ b/srcpkgs/imlib2/template
@@ -1,7 +1,7 @@
# Template file for 'imlib2'
pkgname=imlib2
version=1.12.1
-revision=1
+revision=2
build_style=gnu-configure
configure_args="--disable-static --sysconfdir=/etc/imlib2 --enable-visibility-hiding"
hostmakedepends="pkg-config"
From 4c99a1223f3e05a4df9222203810fcf976d4ee15 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 2 Jan 2024 22:41:01 -0800
Subject: [PATCH 5/7] darktable: rebuild for libjxl 0.9
---
srcpkgs/darktable/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/darktable/template b/srcpkgs/darktable/template
index 97dfae3471e7c..af29d7cec18bb 100644
--- a/srcpkgs/darktable/template
+++ b/srcpkgs/darktable/template
@@ -1,7 +1,7 @@
# Template file for 'darktable'
pkgname=darktable
version=4.4.2
-revision=5
+revision=6
# upstream only supports these archs:
archs="x86_64* aarch64* ppc64le*"
build_style=cmake
From 2929696216c38976e3ca1c0efd42e45bdde4c526 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 2 Jan 2024 22:41:26 -0800
Subject: [PATCH 6/7] kimageformats: rebuild for libjxl 0.9
---
srcpkgs/kimageformats/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/kimageformats/template b/srcpkgs/kimageformats/template
index 9ff74b976eab0..9a6a9c6d3bf41 100644
--- a/srcpkgs/kimageformats/template
+++ b/srcpkgs/kimageformats/template
@@ -1,7 +1,7 @@
# Template file for 'kimageformats'
pkgname=kimageformats
version=5.113.0
-revision=1
+revision=2
build_style=cmake
configure_args="-DKIMAGEFORMATS_HEIF=ON"
hostmakedepends="kcoreaddons extra-cmake-modules qt5-qmake qt5-host-tools
From 5008446adcce36e94a9f2caf6ba9b143cc6c75ae Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 30 Jan 2024 12:38:40 -0800
Subject: [PATCH 7/7] swayimg: reuilbd for libjxl 0.9
---
srcpkgs/swayimg/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/swayimg/template b/srcpkgs/swayimg/template
index 115566a7d3968..34b353098abc6 100644
--- a/srcpkgs/swayimg/template
+++ b/srcpkgs/swayimg/template
@@ -1,7 +1,7 @@
# Template file for 'swayimg'
pkgname=swayimg
version=2.0
-revision=1
+revision=2
build_style=meson
hostmakedepends="pkg-config wayland-devel"
makedepends="wayland-devel cairo-devel json-c-devel libxkbcommon-devel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PR PATCH] [Updated] libjxl: update to 0.9.1.
2024-01-29 23:11 [PR PATCH] libjxl: update to 0.9.1 oreo639
` (2 preceding siblings ...)
2024-01-31 0:27 ` oreo639
@ 2024-02-03 5:30 ` oreo639
2024-02-03 9:01 ` oreo639
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: oreo639 @ 2024-02-03 5:30 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1240 bytes --]
There is an updated pull request by oreo639 against master on the void-packages repository
https://github.com/oreo639/void-packages libjxl
https://github.com/void-linux/void-packages/pull/48435
libjxl: update to 0.9.1.
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/48435.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libjxl-48435.patch --]
[-- Type: text/x-diff, Size: 25350 bytes --]
From feeef5d95d57c9561aabce63e6867cb6275cb8e4 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 2 Jan 2024 20:32:58 -0800
Subject: [PATCH 1/7] highway: update to 1.0.7.
---
srcpkgs/highway/template | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/highway/template b/srcpkgs/highway/template
index 4d6898b62c746..6f593049d8ae3 100644
--- a/srcpkgs/highway/template
+++ b/srcpkgs/highway/template
@@ -1,6 +1,6 @@
# Template file for 'highway'
pkgname=highway
-version=1.0.4
+version=1.0.7
revision=1
build_style=cmake
configure_args="-DHWY_SYSTEM_GTEST=ON -DHWY_ENABLE_EXAMPLES=OFF"
@@ -11,8 +11,13 @@ license="Apache-2.0"
homepage="https://github.com/google/highway"
changelog="https://raw.githubusercontent.com/google/highway/master/debian/changelog"
distfiles="https://github.com/google/highway/archive/${version}.tar.gz"
-checksum=faccd343935c9e98afd1016e9d20e0b8b89d908508d1af958496f8c2d3004ac2
+checksum=5434488108186c170a5e2fca5e3c9b6ef59a1caa4d520b008a9b8be6b8abe6c5
if [ -z "$XBPS_CHECK_PKGS" ]; then
configure_args+=" -DBUILD_TESTING=OFF"
fi
+
+# Workaround for i686, requires GCC 13+
+# See: https://github.com/google/highway/issues/1488
+CFLAGS="-fexcess-precision=standard"
+CXXFLAGS="-fexcess-precision=standard"
From b8f3f8f67d3339517218cb610254e20bf66b936a Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 2 Jan 2024 20:33:25 -0800
Subject: [PATCH 2/7] libjxl: update to 0.9.1.
---
common/shlibs | 6 +-
srcpkgs/libjxl/patches/2211.patch | 68 ---------
srcpkgs/libjxl/patches/fix-pixbuf.patch | 184 ++++++++++++++++++++++++
srcpkgs/libjxl/template | 29 ++--
4 files changed, 202 insertions(+), 85 deletions(-)
delete mode 100644 srcpkgs/libjxl/patches/2211.patch
create mode 100644 srcpkgs/libjxl/patches/fix-pixbuf.patch
diff --git a/common/shlibs b/common/shlibs
index 71f172740e5c6..a7ebb86ac7c85 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4235,9 +4235,9 @@ libplayerctl.so.2 playerctl-2.4.1_1
libwireplumber-0.4.so.0 wireplumber-0.4.14_1
libjodycode.so.3 libjodycode-3.0.1_1
libgsoapssl++-2.8.124.so gsoap-2.8.124_1
-libjxl.so.0.8 libjxl-0.8.2_1
-libjxl_dec.so.0.8 libjxl-0.8.2_1
-libjxl_threads.so.0.8 libjxl-0.8.2_1
+libjxl.so.0.9 libjxl-0.9.0_1
+libjxl_dec.so.0.9 libjxl-0.9.0_1
+libjxl_threads.so.0.9 libjxl-0.9.0_1
libtext-engine-0.1.so.0 text-engine-0.1.1_1
libvmaf.so.1 vmaf-2.3.1_1
liblc3.so.1 liblc3-1.0.3_1
diff --git a/srcpkgs/libjxl/patches/2211.patch b/srcpkgs/libjxl/patches/2211.patch
deleted file mode 100644
index d74513005d474..0000000000000
--- a/srcpkgs/libjxl/patches/2211.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-From b73a9e1e8b47fc623c3015ce40466274e4d4bb03 Mon Sep 17 00:00:00 2001
-From: east <xdong181@gmail.com>
-Date: Wed, 22 Feb 2023 20:12:05 +0800
-Subject: [PATCH 1/3] Add missing <atomic> content to fix gcc compilation for
- RISCV architecture.
-
----
- lib/jxl/enc_xyb.cc | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/lib/jxl/enc_xyb.cc b/lib/jxl/enc_xyb.cc
-index 1ef78877a71..1ed13da9574 100644
---- a/lib/jxl/enc_xyb.cc
-+++ b/lib/jxl/enc_xyb.cc
-@@ -7,6 +7,7 @@
-
- #include <algorithm>
- #include <cstdlib>
-+#include <atomic>
-
- #undef HWY_TARGET_INCLUDE
- #define HWY_TARGET_INCLUDE "lib/jxl/enc_xyb.cc"
-
-From 10a521764beb7e9dcc0dbfbe3f4dbb7e2e8d2bcc Mon Sep 17 00:00:00 2001
-From: east <xdong181@gmail.com>
-Date: Thu, 23 Feb 2023 00:50:02 +0800
-Subject: [PATCH 2/3] add name to AUTHORS
-
----
- AUTHORS | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/AUTHORS b/AUTHORS
-index 44dcc409949..3340422d606 100644
---- a/AUTHORS
-+++ b/AUTHORS
-@@ -30,6 +30,7 @@ Daniel Novomeský <dnovomesky@gmail.com>
- David Burnett <vargolsoft@gmail.com>
- Dirk Lemstra <dirk@lemstra.org>
- Don Olmstead <don.j.olmstead@gmail.com>
-+Dong Xu <xdong181@gmail.com>
- Even Rouault <even.rouault@spatialys.com>
- Fred Brennan <copypaste@kittens.ph>
- Heiko Becker <heirecka@exherbo.org>
-
-From fc6b5c316346475379895a6c67b6d97ab7b8c2cb Mon Sep 17 00:00:00 2001
-From: Moritz Firsching <firsching@google.com>
-Date: Wed, 22 Feb 2023 22:46:07 +0100
-Subject: [PATCH 3/3] lint fix
-
----
- lib/jxl/enc_xyb.cc | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/lib/jxl/enc_xyb.cc b/lib/jxl/enc_xyb.cc
-index 1ed13da9574..2ee0abf821a 100644
---- a/lib/jxl/enc_xyb.cc
-+++ b/lib/jxl/enc_xyb.cc
-@@ -6,8 +6,8 @@
- #include "lib/jxl/enc_xyb.h"
-
- #include <algorithm>
--#include <cstdlib>
- #include <atomic>
-+#include <cstdlib>
-
- #undef HWY_TARGET_INCLUDE
- #define HWY_TARGET_INCLUDE "lib/jxl/enc_xyb.cc"
diff --git a/srcpkgs/libjxl/patches/fix-pixbuf.patch b/srcpkgs/libjxl/patches/fix-pixbuf.patch
new file mode 100644
index 0000000000000..47166a8f60d18
--- /dev/null
+++ b/srcpkgs/libjxl/patches/fix-pixbuf.patch
@@ -0,0 +1,184 @@
+From 7021ada76bd1c1ee44483027c40233cd2e412637 Mon Sep 17 00:00:00 2001
+From: Leo Izen <leo.izen@gmail.com>
+Date: Mon, 29 Jan 2024 09:21:10 -0500
+Subject: [PATCH] lib/jxl/decode.cc: deduplicate and correct min_size
+ calculation
+
+Code to calculate the proper size of the buffer exists in three places
+in this function - one for the standard buffer, one for the extra
+channel buffer, and one for the preview buffer. However, only the code
+for the preview buffer correctly took into account the last row size
+possibly being slightly smaller than the remaining rows.
+
+This commit separates the code out into a separate function to remove
+duplicate code, and uses the algorithm from the prevew buffer which was
+the only correct one.
+
+Signed-off-by: Leo Izen <leo.izen@gmail.com>
+---
+ lib/jxl/decode.cc | 63 ++++++++++++++++--------------------------
+ lib/jxl/decode_test.cc | 8 ++++--
+ 2 files changed, 30 insertions(+), 41 deletions(-)
+
+diff --git a/lib/jxl/decode.cc b/lib/jxl/decode.cc
+index b674d1ba885..953342d76e1 100644
+--- a/lib/jxl/decode.cc
++++ b/lib/jxl/decode.cc
+@@ -2348,29 +2348,40 @@ JXL_EXPORT JxlDecoderStatus JxlDecoderSetCms(JxlDecoder* dec,
+ return JXL_DEC_SUCCESS;
+ }
+
+-JXL_EXPORT JxlDecoderStatus JxlDecoderPreviewOutBufferSize(
+- const JxlDecoder* dec, const JxlPixelFormat* format, size_t* size) {
++static JxlDecoderStatus GetMinSize(const JxlDecoder* dec,
++ const JxlPixelFormat* format,
++ size_t num_channels, size_t* min_size,
++ bool preview) {
+ size_t bits;
+ JxlDecoderStatus status = PrepareSizeCheck(dec, format, &bits);
+ if (status != JXL_DEC_SUCCESS) return status;
+- if (format->num_channels < 3 &&
+- !dec->image_metadata.color_encoding.IsGray()) {
+- return JXL_API_ERROR("Number of channels is too low for color output");
++ size_t xsize, ysize;
++ if (preview) {
++ xsize = dec->metadata.oriented_preview_xsize(dec->keep_orientation);
++ ysize = dec->metadata.oriented_preview_ysize(dec->keep_orientation);
++ } else {
++ GetCurrentDimensions(dec, xsize, ysize);
+ }
+-
+- size_t xsize = dec->metadata.oriented_preview_xsize(dec->keep_orientation);
+- size_t ysize = dec->metadata.oriented_preview_ysize(dec->keep_orientation);
+-
++ if (num_channels == 0) num_channels = format->num_channels;
+ size_t row_size =
+- jxl::DivCeil(xsize * format->num_channels * bits, jxl::kBitsPerByte);
++ jxl::DivCeil(xsize * num_channels * bits, jxl::kBitsPerByte);
+ size_t last_row_size = row_size;
+ if (format->align > 1) {
+ row_size = jxl::DivCeil(row_size, format->align) * format->align;
+ }
+- *size = row_size * (ysize - 1) + last_row_size;
++ *min_size = row_size * (ysize - 1) + last_row_size;
+ return JXL_DEC_SUCCESS;
+ }
+
++JXL_EXPORT JxlDecoderStatus JxlDecoderPreviewOutBufferSize(
++ const JxlDecoder* dec, const JxlPixelFormat* format, size_t* size) {
++ if (format->num_channels < 3 &&
++ !dec->image_metadata.color_encoding.IsGray()) {
++ return JXL_API_ERROR("Number of channels is too low for color output");
++ }
++ return GetMinSize(dec, format, 0, size, true);
++}
++
+ JXL_EXPORT JxlDecoderStatus JxlDecoderSetPreviewOutBuffer(
+ JxlDecoder* dec, const JxlPixelFormat* format, void* buffer, size_t size) {
+ if (!dec->got_basic_info || !dec->metadata.m.have_preview ||
+@@ -2401,23 +2412,12 @@ JXL_EXPORT JxlDecoderStatus JxlDecoderSetPreviewOutBuffer(
+
+ JXL_EXPORT JxlDecoderStatus JxlDecoderImageOutBufferSize(
+ const JxlDecoder* dec, const JxlPixelFormat* format, size_t* size) {
+- size_t bits;
+- JxlDecoderStatus status = PrepareSizeCheck(dec, format, &bits);
+- if (status != JXL_DEC_SUCCESS) return status;
+ if (format->num_channels < 3 &&
+ !dec->image_metadata.color_encoding.IsGray()) {
+ return JXL_API_ERROR("Number of channels is too low for color output");
+ }
+- size_t xsize, ysize;
+- GetCurrentDimensions(dec, xsize, ysize);
+- size_t row_size =
+- jxl::DivCeil(xsize * format->num_channels * bits, jxl::kBitsPerByte);
+- if (format->align > 1) {
+- row_size = jxl::DivCeil(row_size, format->align) * format->align;
+- }
+- *size = row_size * ysize;
+
+- return JXL_DEC_SUCCESS;
++ return GetMinSize(dec, format, 0, size, false);
+ }
+
+ JxlDecoderStatus JxlDecoderSetImageOutBuffer(JxlDecoder* dec,
+@@ -2463,22 +2463,7 @@ JxlDecoderStatus JxlDecoderExtraChannelBufferSize(const JxlDecoder* dec,
+ return JXL_API_ERROR("Invalid extra channel index");
+ }
+
+- size_t num_channels = 1; // Do not use format's num_channels
+-
+- size_t bits;
+- JxlDecoderStatus status = PrepareSizeCheck(dec, format, &bits);
+- if (status != JXL_DEC_SUCCESS) return status;
+-
+- size_t xsize, ysize;
+- GetCurrentDimensions(dec, xsize, ysize);
+- size_t row_size =
+- jxl::DivCeil(xsize * num_channels * bits, jxl::kBitsPerByte);
+- if (format->align > 1) {
+- row_size = jxl::DivCeil(row_size, format->align) * format->align;
+- }
+- *size = row_size * ysize;
+-
+- return JXL_DEC_SUCCESS;
++ return GetMinSize(dec, format, 1, size, false);
+ }
+
+ JxlDecoderStatus JxlDecoderSetExtraChannelBuffer(JxlDecoder* dec,
+diff --git a/lib/jxl/decode_test.cc b/lib/jxl/decode_test.cc
+index caee6dbc568..310742f705f 100644
+--- a/lib/jxl/decode_test.cc
++++ b/lib/jxl/decode_test.cc
+@@ -2575,7 +2575,11 @@ TEST(DecodeTest, AlignTest) {
+ size_t align = 17;
+ JxlPixelFormat format = {3, JXL_TYPE_UINT8, JXL_LITTLE_ENDIAN, align};
+ // On purpose not using jxl::RoundUpTo to test it independently.
+- size_t expected_line_bytes = (1 * 3 * xsize + align - 1) / align * align;
++ size_t expected_line_size_last = 1 * 3 * xsize;
++ size_t expected_line_size =
++ ((expected_line_size_last + align - 1) / align) * align;
++ size_t expected_pixels_size =
++ expected_line_size * (ysize - 1) + expected_line_size_last;
+
+ for (int use_callback = 0; use_callback <= 1; ++use_callback) {
+ std::vector<uint8_t> pixels2 = jxl::DecodeWithAPI(
+@@ -2583,7 +2587,7 @@ TEST(DecodeTest, AlignTest) {
+ /*set_buffer_early=*/false,
+ /*use_resizable_runner=*/false, /*require_boxes=*/false,
+ /*expect_success=*/true);
+- EXPECT_EQ(expected_line_bytes * ysize, pixels2.size());
++ EXPECT_EQ(expected_pixels_size, pixels2.size());
+ EXPECT_EQ(0u, jxl::test::ComparePixels(pixels.data(), pixels2.data(), xsize,
+ ysize, format_orig, format));
+ }
+From c4ebb7e70ee09591ae0269410ebe8929f400713e Mon Sep 17 00:00:00 2001
+From: Leo Izen <leo.izen@gmail.com>
+Date: Mon, 29 Jan 2024 09:23:36 -0500
+Subject: [PATCH] plugins/gdk-pixbuf: consider stride when passing buffer to
+ libjxl
+
+This change uses gdk_pixbuf_get_pixels_with_length to get the actual
+size of the buffer, with stride taken into account. The previous code
+just multiplies width by height and ignores stride.
+
+Signed-off-by: Leo Izen <leo.izen@gmail.com>
+---
+ plugins/gdk-pixbuf/pixbufloader-jxl.c | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/plugins/gdk-pixbuf/pixbufloader-jxl.c b/plugins/gdk-pixbuf/pixbufloader-jxl.c
+index bafa57b1674..066468a5035 100644
+--- a/plugins/gdk-pixbuf/pixbufloader-jxl.c
++++ b/plugins/gdk-pixbuf/pixbufloader-jxl.c
+@@ -491,9 +491,8 @@ static gboolean load_increment(gpointer context, const guchar *buf, guint size,
+ decoder_state->frames->len - 1)
+ .data;
+ decoder_state->pixel_format.align = gdk_pixbuf_get_rowstride(output);
+- guchar *dst = gdk_pixbuf_get_pixels(output);
+- size_t num_pixels = decoder_state->xsize * decoder_state->ysize;
+- size_t size = num_pixels * decoder_state->pixel_format.num_channels;
++ guint size;
++ guchar *dst = gdk_pixbuf_get_pixels_with_length(output, &size);
+ if (JXL_DEC_SUCCESS != JxlDecoderSetImageOutBuffer(
+ decoder_state->decoder,
+ &decoder_state->pixel_format, dst, size)) {
diff --git a/srcpkgs/libjxl/template b/srcpkgs/libjxl/template
index e6bd535377f5c..4da5cfd7998a2 100644
--- a/srcpkgs/libjxl/template
+++ b/srcpkgs/libjxl/template
@@ -1,16 +1,16 @@
# Template file for 'libjxl'
pkgname=libjxl
-version=0.8.2
-revision=2
-_testdata_hash=d6168ffb9e1cc24007e64b65dd84d822ad1fc759
-_skcms_hash=b25b07b4b07990811de121c0356155b2ba0f4318
+version=0.9.1
+revision=1
+_testdata_hash=ff8d743aaba05b3014f17e5475e576242fa979fc
build_style=cmake
build_wrksrc="libjxl-${version}"
configure_args="-DJPEGXL_ENABLE_BENCHMARK=OFF -DJPEGXL_ENABLE_EXAMPLES=OFF
- -DJPEGXL_ENABLE_SJPEG=OFF -DJPEGXL_ENABLE_PLUGINS=ON -DJPEGXL_VERSION=${version}"
+ -DJPEGXL_ENABLE_SJPEG=OFF -DJPEGXL_ENABLE_PLUGINS=ON -DJPEGXL_VERSION=${version}
+ -DJPEGXL_ENABLE_SKCMS=OFF"
hostmakedepends="tar pkg-config asciidoc"
makedepends="brotli-devel highway libpng-devel giflib-devel libjpeg-turbo-devel
- libopenexr-devel libwebp-devel gdk-pixbuf-devel gimp-devel"
+ libopenexr-devel libwebp-devel gdk-pixbuf-devel gimp-devel lcms2-devel"
checkdepends="gtest-devel xdg-utils"
short_desc="JPEG XL image format reference implementation"
maintainer="Joshua Krämer <joshua@kraemer.link>"
@@ -18,12 +18,9 @@ license="BSD-3-Clause, custom:Patent grant"
homepage="https://jpeg.org/jpegxl/"
changelog="https://raw.githubusercontent.com/libjxl/libjxl/main/CHANGELOG.md"
distfiles="https://github.com/libjxl/libjxl/archive/v${version}.tar.gz
- https://github.com/libjxl/testdata/archive/${_testdata_hash}.tar.gz>testdata-${_testdata_hash}.tar.gz
- https://skia.googlesource.com/skcms/+archive/${_skcms_hash}.tar.gz>skcms-${_skcms_hash}.tar.gz"
-checksum="c70916fb3ed43784eb840f82f05d390053a558e2da106e40863919238fa7b420
- 64658d3341bff2976899cb8b140242ffa4de1cd41aed507dfec4aa9e7e05ca24
- @8feb1e33c38ca13f91a0d5bd8ce25f976eb239edf38f49e6db8895ae9f1e833c"
-skip_extraction="skcms-${_skcms_hash}.tar.gz"
+ https://github.com/libjxl/testdata/archive/${_testdata_hash}.tar.gz>testdata-${_testdata_hash}.tar.gz"
+checksum="a0e72e9ece26878147069ad4888ac3382021d4bbee71c2e1b687d5bde7fd7e01
+ 9c45a108df32a002a69465df896d33acf77d97c88fb59dffa0dff5628370e96f"
patch_args="-Np1 --directory=${build_wrksrc}"
if [ -z "$XBPS_CHECK_PKGS" ]; then
@@ -32,7 +29,6 @@ fi
post_extract() {
mv "testdata-${_testdata_hash}"/* "${build_wrksrc}/testdata/"
- bsdtar -xf "${XBPS_SRCDISTDIR}/${pkgname}-${version}/skcms-${_skcms_hash}.tar.gz" -C "${build_wrksrc}/third_party/skcms"
}
post_install() {
@@ -40,12 +36,16 @@ post_install() {
vlicense PATENTS
}
+post_intall() {
+ # Remove devel symlink for internal library only used for tools. (headers don't get installed)
+ rm ${DESTDIR}/usr/lib/libjxl_extras_codec.so
+}
+
libjxl-devel_package() {
short_desc+=" - development files"
depends="${sourcepkg}>=${version}_${revision} highway brotli-devel"
pkg_install() {
vmove usr/include
- vmove "usr/lib/*.a"
vmove "usr/lib/*.so"
vmove usr/lib/pkgconfig
}
@@ -54,6 +54,7 @@ libjxl-devel_package() {
libjxl-tools_package() {
short_desc+=" - tools"
pkg_install() {
+ vmove "usr/lib/libjxl_extras_codec*"
vmove usr/bin
vmove usr/share/man/man1
}
From 050efa79e57325a2acc5d5c296594bbae316d02d Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 2 Jan 2024 22:40:00 -0800
Subject: [PATCH 3/7] krita: rebuild for libjxl 0.9
---
srcpkgs/krita/patches/jxl09.patch | 71 +++++++++++++++++++++++++++++++
srcpkgs/krita/patches/sip68.patch | 23 ++++++++++
srcpkgs/krita/template | 2 +-
3 files changed, 95 insertions(+), 1 deletion(-)
create mode 100644 srcpkgs/krita/patches/jxl09.patch
create mode 100644 srcpkgs/krita/patches/sip68.patch
diff --git a/srcpkgs/krita/patches/jxl09.patch b/srcpkgs/krita/patches/jxl09.patch
new file mode 100644
index 0000000000000..50e2cd50bcc66
--- /dev/null
+++ b/srcpkgs/krita/patches/jxl09.patch
@@ -0,0 +1,71 @@
+From d9e258bf9d6af5f53467becf65bb21bf6f96a38e Mon Sep 17 00:00:00 2001
+From: Timo Gurr <timo.gurr@gmail.com>
+Date: Fri, 29 Dec 2023 11:10:26 +0100
+Subject: [PATCH] Fix build with libjxl 0.9.0
+
+BUG:478987
+---
+ 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/srcpkgs/krita/patches/sip68.patch b/srcpkgs/krita/patches/sip68.patch
new file mode 100644
index 0000000000000..e9e4544b7cc27
--- /dev/null
+++ b/srcpkgs/krita/patches/sip68.patch
@@ -0,0 +1,23 @@
+From 2d71c47661d43a4e3c1ab0c27803de980bdf2bb2 Mon Sep 17 00:00:00 2001
+From: Antonio Rojas <arojas@archlinux.org>
+Date: Mon, 11 Dec 2023 20:26:13 +0100
+Subject: [PATCH] Bump SIP ABI version to 12.8
+
+Fixes build with SIP 6.8
+---
+ cmake/modules/pyproject.toml.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/cmake/modules/pyproject.toml.in b/cmake/modules/pyproject.toml.in
+index 090b2d4b0cb..085ddf41799 100644
+--- a/cmake/modules/pyproject.toml.in
++++ b/cmake/modules/pyproject.toml.in
+@@ -9,7 +9,7 @@ name = "@module_name_toml@"
+ sip-module = "@sip_name@"
+ sip-include-dirs = @sip_include_dirs@
+ sip-files-dir = "@module_srcs@"
+-abi-version = "12"
++abi-version = "12.8"
+
+ [tool.sip.bindings.@module_name_toml@]
+ tags = @module_tags@
diff --git a/srcpkgs/krita/template b/srcpkgs/krita/template
index d804b581a8689..4833f8bd33d86 100644
--- a/srcpkgs/krita/template
+++ b/srcpkgs/krita/template
@@ -1,7 +1,7 @@
# Template file for 'krita'
pkgname=krita
version=5.2.1
-revision=3
+revision=4
build_style=cmake
configure_args="-Wno-dev -DBUILD_TESTING=OFF"
hostmakedepends="extra-cmake-modules gettext pkg-config python3
From 5c8346492dc6dfe37d8846f7a63620eef21661b4 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 2 Jan 2024 22:40:19 -0800
Subject: [PATCH 4/7] imlib2: rebuild for libjxl 0.9
---
srcpkgs/imlib2/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/imlib2/template b/srcpkgs/imlib2/template
index bcbf607efa142..9f485b0b2f858 100644
--- a/srcpkgs/imlib2/template
+++ b/srcpkgs/imlib2/template
@@ -1,7 +1,7 @@
# Template file for 'imlib2'
pkgname=imlib2
version=1.12.1
-revision=1
+revision=2
build_style=gnu-configure
configure_args="--disable-static --sysconfdir=/etc/imlib2 --enable-visibility-hiding"
hostmakedepends="pkg-config"
From 270a8a905a965417925147efb80f7366d869f3e6 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 2 Jan 2024 22:41:01 -0800
Subject: [PATCH 5/7] darktable: rebuild for libjxl 0.9
---
srcpkgs/darktable/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/darktable/template b/srcpkgs/darktable/template
index 97dfae3471e7c..af29d7cec18bb 100644
--- a/srcpkgs/darktable/template
+++ b/srcpkgs/darktable/template
@@ -1,7 +1,7 @@
# Template file for 'darktable'
pkgname=darktable
version=4.4.2
-revision=5
+revision=6
# upstream only supports these archs:
archs="x86_64* aarch64* ppc64le*"
build_style=cmake
From e4ff97bf7eccbc4929d7129970d002f356587bc9 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 2 Jan 2024 22:41:26 -0800
Subject: [PATCH 6/7] kimageformats: rebuild for libjxl 0.9
---
srcpkgs/kimageformats/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/kimageformats/template b/srcpkgs/kimageformats/template
index 9ff74b976eab0..9a6a9c6d3bf41 100644
--- a/srcpkgs/kimageformats/template
+++ b/srcpkgs/kimageformats/template
@@ -1,7 +1,7 @@
# Template file for 'kimageformats'
pkgname=kimageformats
version=5.113.0
-revision=1
+revision=2
build_style=cmake
configure_args="-DKIMAGEFORMATS_HEIF=ON"
hostmakedepends="kcoreaddons extra-cmake-modules qt5-qmake qt5-host-tools
From afe3f14dcda443dbc403ffbf4c5b592e678233c5 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 30 Jan 2024 12:38:40 -0800
Subject: [PATCH 7/7] swayimg: reuilbd for libjxl 0.9
---
srcpkgs/swayimg/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/swayimg/template b/srcpkgs/swayimg/template
index 115566a7d3968..34b353098abc6 100644
--- a/srcpkgs/swayimg/template
+++ b/srcpkgs/swayimg/template
@@ -1,7 +1,7 @@
# Template file for 'swayimg'
pkgname=swayimg
version=2.0
-revision=1
+revision=2
build_style=meson
hostmakedepends="pkg-config wayland-devel"
makedepends="wayland-devel cairo-devel json-c-devel libxkbcommon-devel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PR PATCH] [Updated] libjxl: update to 0.9.1.
2024-01-29 23:11 [PR PATCH] libjxl: update to 0.9.1 oreo639
` (3 preceding siblings ...)
2024-02-03 5:30 ` oreo639
@ 2024-02-03 9:01 ` oreo639
2024-02-04 5:42 ` oreo639
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: oreo639 @ 2024-02-03 9:01 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1240 bytes --]
There is an updated pull request by oreo639 against master on the void-packages repository
https://github.com/oreo639/void-packages libjxl
https://github.com/void-linux/void-packages/pull/48435
libjxl: update to 0.9.1.
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/48435.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libjxl-48435.patch --]
[-- Type: text/x-diff, Size: 25350 bytes --]
From feeef5d95d57c9561aabce63e6867cb6275cb8e4 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 2 Jan 2024 20:32:58 -0800
Subject: [PATCH 1/7] highway: update to 1.0.7.
---
srcpkgs/highway/template | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/highway/template b/srcpkgs/highway/template
index 4d6898b62c746..6f593049d8ae3 100644
--- a/srcpkgs/highway/template
+++ b/srcpkgs/highway/template
@@ -1,6 +1,6 @@
# Template file for 'highway'
pkgname=highway
-version=1.0.4
+version=1.0.7
revision=1
build_style=cmake
configure_args="-DHWY_SYSTEM_GTEST=ON -DHWY_ENABLE_EXAMPLES=OFF"
@@ -11,8 +11,13 @@ license="Apache-2.0"
homepage="https://github.com/google/highway"
changelog="https://raw.githubusercontent.com/google/highway/master/debian/changelog"
distfiles="https://github.com/google/highway/archive/${version}.tar.gz"
-checksum=faccd343935c9e98afd1016e9d20e0b8b89d908508d1af958496f8c2d3004ac2
+checksum=5434488108186c170a5e2fca5e3c9b6ef59a1caa4d520b008a9b8be6b8abe6c5
if [ -z "$XBPS_CHECK_PKGS" ]; then
configure_args+=" -DBUILD_TESTING=OFF"
fi
+
+# Workaround for i686, requires GCC 13+
+# See: https://github.com/google/highway/issues/1488
+CFLAGS="-fexcess-precision=standard"
+CXXFLAGS="-fexcess-precision=standard"
From b8f3f8f67d3339517218cb610254e20bf66b936a Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 2 Jan 2024 20:33:25 -0800
Subject: [PATCH 2/7] libjxl: update to 0.9.1.
---
common/shlibs | 6 +-
srcpkgs/libjxl/patches/2211.patch | 68 ---------
srcpkgs/libjxl/patches/fix-pixbuf.patch | 184 ++++++++++++++++++++++++
srcpkgs/libjxl/template | 29 ++--
4 files changed, 202 insertions(+), 85 deletions(-)
delete mode 100644 srcpkgs/libjxl/patches/2211.patch
create mode 100644 srcpkgs/libjxl/patches/fix-pixbuf.patch
diff --git a/common/shlibs b/common/shlibs
index 71f172740e5c6..a7ebb86ac7c85 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4235,9 +4235,9 @@ libplayerctl.so.2 playerctl-2.4.1_1
libwireplumber-0.4.so.0 wireplumber-0.4.14_1
libjodycode.so.3 libjodycode-3.0.1_1
libgsoapssl++-2.8.124.so gsoap-2.8.124_1
-libjxl.so.0.8 libjxl-0.8.2_1
-libjxl_dec.so.0.8 libjxl-0.8.2_1
-libjxl_threads.so.0.8 libjxl-0.8.2_1
+libjxl.so.0.9 libjxl-0.9.0_1
+libjxl_dec.so.0.9 libjxl-0.9.0_1
+libjxl_threads.so.0.9 libjxl-0.9.0_1
libtext-engine-0.1.so.0 text-engine-0.1.1_1
libvmaf.so.1 vmaf-2.3.1_1
liblc3.so.1 liblc3-1.0.3_1
diff --git a/srcpkgs/libjxl/patches/2211.patch b/srcpkgs/libjxl/patches/2211.patch
deleted file mode 100644
index d74513005d474..0000000000000
--- a/srcpkgs/libjxl/patches/2211.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-From b73a9e1e8b47fc623c3015ce40466274e4d4bb03 Mon Sep 17 00:00:00 2001
-From: east <xdong181@gmail.com>
-Date: Wed, 22 Feb 2023 20:12:05 +0800
-Subject: [PATCH 1/3] Add missing <atomic> content to fix gcc compilation for
- RISCV architecture.
-
----
- lib/jxl/enc_xyb.cc | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/lib/jxl/enc_xyb.cc b/lib/jxl/enc_xyb.cc
-index 1ef78877a71..1ed13da9574 100644
---- a/lib/jxl/enc_xyb.cc
-+++ b/lib/jxl/enc_xyb.cc
-@@ -7,6 +7,7 @@
-
- #include <algorithm>
- #include <cstdlib>
-+#include <atomic>
-
- #undef HWY_TARGET_INCLUDE
- #define HWY_TARGET_INCLUDE "lib/jxl/enc_xyb.cc"
-
-From 10a521764beb7e9dcc0dbfbe3f4dbb7e2e8d2bcc Mon Sep 17 00:00:00 2001
-From: east <xdong181@gmail.com>
-Date: Thu, 23 Feb 2023 00:50:02 +0800
-Subject: [PATCH 2/3] add name to AUTHORS
-
----
- AUTHORS | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/AUTHORS b/AUTHORS
-index 44dcc409949..3340422d606 100644
---- a/AUTHORS
-+++ b/AUTHORS
-@@ -30,6 +30,7 @@ Daniel Novomeský <dnovomesky@gmail.com>
- David Burnett <vargolsoft@gmail.com>
- Dirk Lemstra <dirk@lemstra.org>
- Don Olmstead <don.j.olmstead@gmail.com>
-+Dong Xu <xdong181@gmail.com>
- Even Rouault <even.rouault@spatialys.com>
- Fred Brennan <copypaste@kittens.ph>
- Heiko Becker <heirecka@exherbo.org>
-
-From fc6b5c316346475379895a6c67b6d97ab7b8c2cb Mon Sep 17 00:00:00 2001
-From: Moritz Firsching <firsching@google.com>
-Date: Wed, 22 Feb 2023 22:46:07 +0100
-Subject: [PATCH 3/3] lint fix
-
----
- lib/jxl/enc_xyb.cc | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/lib/jxl/enc_xyb.cc b/lib/jxl/enc_xyb.cc
-index 1ed13da9574..2ee0abf821a 100644
---- a/lib/jxl/enc_xyb.cc
-+++ b/lib/jxl/enc_xyb.cc
-@@ -6,8 +6,8 @@
- #include "lib/jxl/enc_xyb.h"
-
- #include <algorithm>
--#include <cstdlib>
- #include <atomic>
-+#include <cstdlib>
-
- #undef HWY_TARGET_INCLUDE
- #define HWY_TARGET_INCLUDE "lib/jxl/enc_xyb.cc"
diff --git a/srcpkgs/libjxl/patches/fix-pixbuf.patch b/srcpkgs/libjxl/patches/fix-pixbuf.patch
new file mode 100644
index 0000000000000..47166a8f60d18
--- /dev/null
+++ b/srcpkgs/libjxl/patches/fix-pixbuf.patch
@@ -0,0 +1,184 @@
+From 7021ada76bd1c1ee44483027c40233cd2e412637 Mon Sep 17 00:00:00 2001
+From: Leo Izen <leo.izen@gmail.com>
+Date: Mon, 29 Jan 2024 09:21:10 -0500
+Subject: [PATCH] lib/jxl/decode.cc: deduplicate and correct min_size
+ calculation
+
+Code to calculate the proper size of the buffer exists in three places
+in this function - one for the standard buffer, one for the extra
+channel buffer, and one for the preview buffer. However, only the code
+for the preview buffer correctly took into account the last row size
+possibly being slightly smaller than the remaining rows.
+
+This commit separates the code out into a separate function to remove
+duplicate code, and uses the algorithm from the prevew buffer which was
+the only correct one.
+
+Signed-off-by: Leo Izen <leo.izen@gmail.com>
+---
+ lib/jxl/decode.cc | 63 ++++++++++++++++--------------------------
+ lib/jxl/decode_test.cc | 8 ++++--
+ 2 files changed, 30 insertions(+), 41 deletions(-)
+
+diff --git a/lib/jxl/decode.cc b/lib/jxl/decode.cc
+index b674d1ba885..953342d76e1 100644
+--- a/lib/jxl/decode.cc
++++ b/lib/jxl/decode.cc
+@@ -2348,29 +2348,40 @@ JXL_EXPORT JxlDecoderStatus JxlDecoderSetCms(JxlDecoder* dec,
+ return JXL_DEC_SUCCESS;
+ }
+
+-JXL_EXPORT JxlDecoderStatus JxlDecoderPreviewOutBufferSize(
+- const JxlDecoder* dec, const JxlPixelFormat* format, size_t* size) {
++static JxlDecoderStatus GetMinSize(const JxlDecoder* dec,
++ const JxlPixelFormat* format,
++ size_t num_channels, size_t* min_size,
++ bool preview) {
+ size_t bits;
+ JxlDecoderStatus status = PrepareSizeCheck(dec, format, &bits);
+ if (status != JXL_DEC_SUCCESS) return status;
+- if (format->num_channels < 3 &&
+- !dec->image_metadata.color_encoding.IsGray()) {
+- return JXL_API_ERROR("Number of channels is too low for color output");
++ size_t xsize, ysize;
++ if (preview) {
++ xsize = dec->metadata.oriented_preview_xsize(dec->keep_orientation);
++ ysize = dec->metadata.oriented_preview_ysize(dec->keep_orientation);
++ } else {
++ GetCurrentDimensions(dec, xsize, ysize);
+ }
+-
+- size_t xsize = dec->metadata.oriented_preview_xsize(dec->keep_orientation);
+- size_t ysize = dec->metadata.oriented_preview_ysize(dec->keep_orientation);
+-
++ if (num_channels == 0) num_channels = format->num_channels;
+ size_t row_size =
+- jxl::DivCeil(xsize * format->num_channels * bits, jxl::kBitsPerByte);
++ jxl::DivCeil(xsize * num_channels * bits, jxl::kBitsPerByte);
+ size_t last_row_size = row_size;
+ if (format->align > 1) {
+ row_size = jxl::DivCeil(row_size, format->align) * format->align;
+ }
+- *size = row_size * (ysize - 1) + last_row_size;
++ *min_size = row_size * (ysize - 1) + last_row_size;
+ return JXL_DEC_SUCCESS;
+ }
+
++JXL_EXPORT JxlDecoderStatus JxlDecoderPreviewOutBufferSize(
++ const JxlDecoder* dec, const JxlPixelFormat* format, size_t* size) {
++ if (format->num_channels < 3 &&
++ !dec->image_metadata.color_encoding.IsGray()) {
++ return JXL_API_ERROR("Number of channels is too low for color output");
++ }
++ return GetMinSize(dec, format, 0, size, true);
++}
++
+ JXL_EXPORT JxlDecoderStatus JxlDecoderSetPreviewOutBuffer(
+ JxlDecoder* dec, const JxlPixelFormat* format, void* buffer, size_t size) {
+ if (!dec->got_basic_info || !dec->metadata.m.have_preview ||
+@@ -2401,23 +2412,12 @@ JXL_EXPORT JxlDecoderStatus JxlDecoderSetPreviewOutBuffer(
+
+ JXL_EXPORT JxlDecoderStatus JxlDecoderImageOutBufferSize(
+ const JxlDecoder* dec, const JxlPixelFormat* format, size_t* size) {
+- size_t bits;
+- JxlDecoderStatus status = PrepareSizeCheck(dec, format, &bits);
+- if (status != JXL_DEC_SUCCESS) return status;
+ if (format->num_channels < 3 &&
+ !dec->image_metadata.color_encoding.IsGray()) {
+ return JXL_API_ERROR("Number of channels is too low for color output");
+ }
+- size_t xsize, ysize;
+- GetCurrentDimensions(dec, xsize, ysize);
+- size_t row_size =
+- jxl::DivCeil(xsize * format->num_channels * bits, jxl::kBitsPerByte);
+- if (format->align > 1) {
+- row_size = jxl::DivCeil(row_size, format->align) * format->align;
+- }
+- *size = row_size * ysize;
+
+- return JXL_DEC_SUCCESS;
++ return GetMinSize(dec, format, 0, size, false);
+ }
+
+ JxlDecoderStatus JxlDecoderSetImageOutBuffer(JxlDecoder* dec,
+@@ -2463,22 +2463,7 @@ JxlDecoderStatus JxlDecoderExtraChannelBufferSize(const JxlDecoder* dec,
+ return JXL_API_ERROR("Invalid extra channel index");
+ }
+
+- size_t num_channels = 1; // Do not use format's num_channels
+-
+- size_t bits;
+- JxlDecoderStatus status = PrepareSizeCheck(dec, format, &bits);
+- if (status != JXL_DEC_SUCCESS) return status;
+-
+- size_t xsize, ysize;
+- GetCurrentDimensions(dec, xsize, ysize);
+- size_t row_size =
+- jxl::DivCeil(xsize * num_channels * bits, jxl::kBitsPerByte);
+- if (format->align > 1) {
+- row_size = jxl::DivCeil(row_size, format->align) * format->align;
+- }
+- *size = row_size * ysize;
+-
+- return JXL_DEC_SUCCESS;
++ return GetMinSize(dec, format, 1, size, false);
+ }
+
+ JxlDecoderStatus JxlDecoderSetExtraChannelBuffer(JxlDecoder* dec,
+diff --git a/lib/jxl/decode_test.cc b/lib/jxl/decode_test.cc
+index caee6dbc568..310742f705f 100644
+--- a/lib/jxl/decode_test.cc
++++ b/lib/jxl/decode_test.cc
+@@ -2575,7 +2575,11 @@ TEST(DecodeTest, AlignTest) {
+ size_t align = 17;
+ JxlPixelFormat format = {3, JXL_TYPE_UINT8, JXL_LITTLE_ENDIAN, align};
+ // On purpose not using jxl::RoundUpTo to test it independently.
+- size_t expected_line_bytes = (1 * 3 * xsize + align - 1) / align * align;
++ size_t expected_line_size_last = 1 * 3 * xsize;
++ size_t expected_line_size =
++ ((expected_line_size_last + align - 1) / align) * align;
++ size_t expected_pixels_size =
++ expected_line_size * (ysize - 1) + expected_line_size_last;
+
+ for (int use_callback = 0; use_callback <= 1; ++use_callback) {
+ std::vector<uint8_t> pixels2 = jxl::DecodeWithAPI(
+@@ -2583,7 +2587,7 @@ TEST(DecodeTest, AlignTest) {
+ /*set_buffer_early=*/false,
+ /*use_resizable_runner=*/false, /*require_boxes=*/false,
+ /*expect_success=*/true);
+- EXPECT_EQ(expected_line_bytes * ysize, pixels2.size());
++ EXPECT_EQ(expected_pixels_size, pixels2.size());
+ EXPECT_EQ(0u, jxl::test::ComparePixels(pixels.data(), pixels2.data(), xsize,
+ ysize, format_orig, format));
+ }
+From c4ebb7e70ee09591ae0269410ebe8929f400713e Mon Sep 17 00:00:00 2001
+From: Leo Izen <leo.izen@gmail.com>
+Date: Mon, 29 Jan 2024 09:23:36 -0500
+Subject: [PATCH] plugins/gdk-pixbuf: consider stride when passing buffer to
+ libjxl
+
+This change uses gdk_pixbuf_get_pixels_with_length to get the actual
+size of the buffer, with stride taken into account. The previous code
+just multiplies width by height and ignores stride.
+
+Signed-off-by: Leo Izen <leo.izen@gmail.com>
+---
+ plugins/gdk-pixbuf/pixbufloader-jxl.c | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/plugins/gdk-pixbuf/pixbufloader-jxl.c b/plugins/gdk-pixbuf/pixbufloader-jxl.c
+index bafa57b1674..066468a5035 100644
+--- a/plugins/gdk-pixbuf/pixbufloader-jxl.c
++++ b/plugins/gdk-pixbuf/pixbufloader-jxl.c
+@@ -491,9 +491,8 @@ static gboolean load_increment(gpointer context, const guchar *buf, guint size,
+ decoder_state->frames->len - 1)
+ .data;
+ decoder_state->pixel_format.align = gdk_pixbuf_get_rowstride(output);
+- guchar *dst = gdk_pixbuf_get_pixels(output);
+- size_t num_pixels = decoder_state->xsize * decoder_state->ysize;
+- size_t size = num_pixels * decoder_state->pixel_format.num_channels;
++ guint size;
++ guchar *dst = gdk_pixbuf_get_pixels_with_length(output, &size);
+ if (JXL_DEC_SUCCESS != JxlDecoderSetImageOutBuffer(
+ decoder_state->decoder,
+ &decoder_state->pixel_format, dst, size)) {
diff --git a/srcpkgs/libjxl/template b/srcpkgs/libjxl/template
index e6bd535377f5c..4da5cfd7998a2 100644
--- a/srcpkgs/libjxl/template
+++ b/srcpkgs/libjxl/template
@@ -1,16 +1,16 @@
# Template file for 'libjxl'
pkgname=libjxl
-version=0.8.2
-revision=2
-_testdata_hash=d6168ffb9e1cc24007e64b65dd84d822ad1fc759
-_skcms_hash=b25b07b4b07990811de121c0356155b2ba0f4318
+version=0.9.1
+revision=1
+_testdata_hash=ff8d743aaba05b3014f17e5475e576242fa979fc
build_style=cmake
build_wrksrc="libjxl-${version}"
configure_args="-DJPEGXL_ENABLE_BENCHMARK=OFF -DJPEGXL_ENABLE_EXAMPLES=OFF
- -DJPEGXL_ENABLE_SJPEG=OFF -DJPEGXL_ENABLE_PLUGINS=ON -DJPEGXL_VERSION=${version}"
+ -DJPEGXL_ENABLE_SJPEG=OFF -DJPEGXL_ENABLE_PLUGINS=ON -DJPEGXL_VERSION=${version}
+ -DJPEGXL_ENABLE_SKCMS=OFF"
hostmakedepends="tar pkg-config asciidoc"
makedepends="brotli-devel highway libpng-devel giflib-devel libjpeg-turbo-devel
- libopenexr-devel libwebp-devel gdk-pixbuf-devel gimp-devel"
+ libopenexr-devel libwebp-devel gdk-pixbuf-devel gimp-devel lcms2-devel"
checkdepends="gtest-devel xdg-utils"
short_desc="JPEG XL image format reference implementation"
maintainer="Joshua Krämer <joshua@kraemer.link>"
@@ -18,12 +18,9 @@ license="BSD-3-Clause, custom:Patent grant"
homepage="https://jpeg.org/jpegxl/"
changelog="https://raw.githubusercontent.com/libjxl/libjxl/main/CHANGELOG.md"
distfiles="https://github.com/libjxl/libjxl/archive/v${version}.tar.gz
- https://github.com/libjxl/testdata/archive/${_testdata_hash}.tar.gz>testdata-${_testdata_hash}.tar.gz
- https://skia.googlesource.com/skcms/+archive/${_skcms_hash}.tar.gz>skcms-${_skcms_hash}.tar.gz"
-checksum="c70916fb3ed43784eb840f82f05d390053a558e2da106e40863919238fa7b420
- 64658d3341bff2976899cb8b140242ffa4de1cd41aed507dfec4aa9e7e05ca24
- @8feb1e33c38ca13f91a0d5bd8ce25f976eb239edf38f49e6db8895ae9f1e833c"
-skip_extraction="skcms-${_skcms_hash}.tar.gz"
+ https://github.com/libjxl/testdata/archive/${_testdata_hash}.tar.gz>testdata-${_testdata_hash}.tar.gz"
+checksum="a0e72e9ece26878147069ad4888ac3382021d4bbee71c2e1b687d5bde7fd7e01
+ 9c45a108df32a002a69465df896d33acf77d97c88fb59dffa0dff5628370e96f"
patch_args="-Np1 --directory=${build_wrksrc}"
if [ -z "$XBPS_CHECK_PKGS" ]; then
@@ -32,7 +29,6 @@ fi
post_extract() {
mv "testdata-${_testdata_hash}"/* "${build_wrksrc}/testdata/"
- bsdtar -xf "${XBPS_SRCDISTDIR}/${pkgname}-${version}/skcms-${_skcms_hash}.tar.gz" -C "${build_wrksrc}/third_party/skcms"
}
post_install() {
@@ -40,12 +36,16 @@ post_install() {
vlicense PATENTS
}
+post_intall() {
+ # Remove devel symlink for internal library only used for tools. (headers don't get installed)
+ rm ${DESTDIR}/usr/lib/libjxl_extras_codec.so
+}
+
libjxl-devel_package() {
short_desc+=" - development files"
depends="${sourcepkg}>=${version}_${revision} highway brotli-devel"
pkg_install() {
vmove usr/include
- vmove "usr/lib/*.a"
vmove "usr/lib/*.so"
vmove usr/lib/pkgconfig
}
@@ -54,6 +54,7 @@ libjxl-devel_package() {
libjxl-tools_package() {
short_desc+=" - tools"
pkg_install() {
+ vmove "usr/lib/libjxl_extras_codec*"
vmove usr/bin
vmove usr/share/man/man1
}
From 050efa79e57325a2acc5d5c296594bbae316d02d Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 2 Jan 2024 22:40:00 -0800
Subject: [PATCH 3/7] krita: rebuild for libjxl 0.9
---
srcpkgs/krita/patches/jxl09.patch | 71 +++++++++++++++++++++++++++++++
srcpkgs/krita/patches/sip68.patch | 23 ++++++++++
srcpkgs/krita/template | 2 +-
3 files changed, 95 insertions(+), 1 deletion(-)
create mode 100644 srcpkgs/krita/patches/jxl09.patch
create mode 100644 srcpkgs/krita/patches/sip68.patch
diff --git a/srcpkgs/krita/patches/jxl09.patch b/srcpkgs/krita/patches/jxl09.patch
new file mode 100644
index 0000000000000..50e2cd50bcc66
--- /dev/null
+++ b/srcpkgs/krita/patches/jxl09.patch
@@ -0,0 +1,71 @@
+From d9e258bf9d6af5f53467becf65bb21bf6f96a38e Mon Sep 17 00:00:00 2001
+From: Timo Gurr <timo.gurr@gmail.com>
+Date: Fri, 29 Dec 2023 11:10:26 +0100
+Subject: [PATCH] Fix build with libjxl 0.9.0
+
+BUG:478987
+---
+ 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/srcpkgs/krita/patches/sip68.patch b/srcpkgs/krita/patches/sip68.patch
new file mode 100644
index 0000000000000..e9e4544b7cc27
--- /dev/null
+++ b/srcpkgs/krita/patches/sip68.patch
@@ -0,0 +1,23 @@
+From 2d71c47661d43a4e3c1ab0c27803de980bdf2bb2 Mon Sep 17 00:00:00 2001
+From: Antonio Rojas <arojas@archlinux.org>
+Date: Mon, 11 Dec 2023 20:26:13 +0100
+Subject: [PATCH] Bump SIP ABI version to 12.8
+
+Fixes build with SIP 6.8
+---
+ cmake/modules/pyproject.toml.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/cmake/modules/pyproject.toml.in b/cmake/modules/pyproject.toml.in
+index 090b2d4b0cb..085ddf41799 100644
+--- a/cmake/modules/pyproject.toml.in
++++ b/cmake/modules/pyproject.toml.in
+@@ -9,7 +9,7 @@ name = "@module_name_toml@"
+ sip-module = "@sip_name@"
+ sip-include-dirs = @sip_include_dirs@
+ sip-files-dir = "@module_srcs@"
+-abi-version = "12"
++abi-version = "12.8"
+
+ [tool.sip.bindings.@module_name_toml@]
+ tags = @module_tags@
diff --git a/srcpkgs/krita/template b/srcpkgs/krita/template
index d804b581a8689..4833f8bd33d86 100644
--- a/srcpkgs/krita/template
+++ b/srcpkgs/krita/template
@@ -1,7 +1,7 @@
# Template file for 'krita'
pkgname=krita
version=5.2.1
-revision=3
+revision=4
build_style=cmake
configure_args="-Wno-dev -DBUILD_TESTING=OFF"
hostmakedepends="extra-cmake-modules gettext pkg-config python3
From 5c8346492dc6dfe37d8846f7a63620eef21661b4 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 2 Jan 2024 22:40:19 -0800
Subject: [PATCH 4/7] imlib2: rebuild for libjxl 0.9
---
srcpkgs/imlib2/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/imlib2/template b/srcpkgs/imlib2/template
index bcbf607efa142..9f485b0b2f858 100644
--- a/srcpkgs/imlib2/template
+++ b/srcpkgs/imlib2/template
@@ -1,7 +1,7 @@
# Template file for 'imlib2'
pkgname=imlib2
version=1.12.1
-revision=1
+revision=2
build_style=gnu-configure
configure_args="--disable-static --sysconfdir=/etc/imlib2 --enable-visibility-hiding"
hostmakedepends="pkg-config"
From 270a8a905a965417925147efb80f7366d869f3e6 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 2 Jan 2024 22:41:01 -0800
Subject: [PATCH 5/7] darktable: rebuild for libjxl 0.9
---
srcpkgs/darktable/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/darktable/template b/srcpkgs/darktable/template
index 97dfae3471e7c..af29d7cec18bb 100644
--- a/srcpkgs/darktable/template
+++ b/srcpkgs/darktable/template
@@ -1,7 +1,7 @@
# Template file for 'darktable'
pkgname=darktable
version=4.4.2
-revision=5
+revision=6
# upstream only supports these archs:
archs="x86_64* aarch64* ppc64le*"
build_style=cmake
From e4ff97bf7eccbc4929d7129970d002f356587bc9 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 2 Jan 2024 22:41:26 -0800
Subject: [PATCH 6/7] kimageformats: rebuild for libjxl 0.9
---
srcpkgs/kimageformats/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/kimageformats/template b/srcpkgs/kimageformats/template
index 9ff74b976eab0..9a6a9c6d3bf41 100644
--- a/srcpkgs/kimageformats/template
+++ b/srcpkgs/kimageformats/template
@@ -1,7 +1,7 @@
# Template file for 'kimageformats'
pkgname=kimageformats
version=5.113.0
-revision=1
+revision=2
build_style=cmake
configure_args="-DKIMAGEFORMATS_HEIF=ON"
hostmakedepends="kcoreaddons extra-cmake-modules qt5-qmake qt5-host-tools
From e1f0b8ac430a6ecb215b85ec380ce3aa8eb48a1d Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 30 Jan 2024 12:38:40 -0800
Subject: [PATCH 7/7] swayimg: reuilbd for libjxl 0.9
---
srcpkgs/swayimg/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/swayimg/template b/srcpkgs/swayimg/template
index 115566a7d3968..34b353098abc6 100644
--- a/srcpkgs/swayimg/template
+++ b/srcpkgs/swayimg/template
@@ -1,7 +1,7 @@
# Template file for 'swayimg'
pkgname=swayimg
version=2.0
-revision=1
+revision=2
build_style=meson
hostmakedepends="pkg-config wayland-devel"
makedepends="wayland-devel cairo-devel json-c-devel libxkbcommon-devel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PR PATCH] [Updated] libjxl: update to 0.9.1.
2024-01-29 23:11 [PR PATCH] libjxl: update to 0.9.1 oreo639
` (4 preceding siblings ...)
2024-02-03 9:01 ` oreo639
@ 2024-02-04 5:42 ` oreo639
2024-02-04 11:51 ` oreo639
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: oreo639 @ 2024-02-04 5:42 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1240 bytes --]
There is an updated pull request by oreo639 against master on the void-packages repository
https://github.com/oreo639/void-packages libjxl
https://github.com/void-linux/void-packages/pull/48435
libjxl: update to 0.9.1.
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/48435.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libjxl-48435.patch --]
[-- Type: text/x-diff, Size: 25351 bytes --]
From 8c65eea371abecaa08e8124626938e2d19eaf099 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 2 Jan 2024 20:32:58 -0800
Subject: [PATCH 1/7] highway: update to 1.0.7.
---
srcpkgs/highway/template | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/highway/template b/srcpkgs/highway/template
index 4d6898b62c746..6f593049d8ae3 100644
--- a/srcpkgs/highway/template
+++ b/srcpkgs/highway/template
@@ -1,6 +1,6 @@
# Template file for 'highway'
pkgname=highway
-version=1.0.4
+version=1.0.7
revision=1
build_style=cmake
configure_args="-DHWY_SYSTEM_GTEST=ON -DHWY_ENABLE_EXAMPLES=OFF"
@@ -11,8 +11,13 @@ license="Apache-2.0"
homepage="https://github.com/google/highway"
changelog="https://raw.githubusercontent.com/google/highway/master/debian/changelog"
distfiles="https://github.com/google/highway/archive/${version}.tar.gz"
-checksum=faccd343935c9e98afd1016e9d20e0b8b89d908508d1af958496f8c2d3004ac2
+checksum=5434488108186c170a5e2fca5e3c9b6ef59a1caa4d520b008a9b8be6b8abe6c5
if [ -z "$XBPS_CHECK_PKGS" ]; then
configure_args+=" -DBUILD_TESTING=OFF"
fi
+
+# Workaround for i686, requires GCC 13+
+# See: https://github.com/google/highway/issues/1488
+CFLAGS="-fexcess-precision=standard"
+CXXFLAGS="-fexcess-precision=standard"
From 16c54a51e895ff3b44ff47090223651d36aa49af Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 2 Jan 2024 20:33:25 -0800
Subject: [PATCH 2/7] libjxl: update to 0.9.1.
---
common/shlibs | 6 +-
srcpkgs/libjxl/patches/2211.patch | 68 ---------
srcpkgs/libjxl/patches/fix-pixbuf.patch | 184 ++++++++++++++++++++++++
srcpkgs/libjxl/template | 29 ++--
4 files changed, 202 insertions(+), 85 deletions(-)
delete mode 100644 srcpkgs/libjxl/patches/2211.patch
create mode 100644 srcpkgs/libjxl/patches/fix-pixbuf.patch
diff --git a/common/shlibs b/common/shlibs
index 71f172740e5c6..a897105f16940 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4235,9 +4235,9 @@ libplayerctl.so.2 playerctl-2.4.1_1
libwireplumber-0.4.so.0 wireplumber-0.4.14_1
libjodycode.so.3 libjodycode-3.0.1_1
libgsoapssl++-2.8.124.so gsoap-2.8.124_1
-libjxl.so.0.8 libjxl-0.8.2_1
-libjxl_dec.so.0.8 libjxl-0.8.2_1
-libjxl_threads.so.0.8 libjxl-0.8.2_1
+libjxl.so.0.9 libjxl-0.9.0_1
+libjxl_cms.so.0.9 libjxl-0.9.0_1
+libjxl_threads.so.0.9 libjxl-0.9.0_1
libtext-engine-0.1.so.0 text-engine-0.1.1_1
libvmaf.so.1 vmaf-2.3.1_1
liblc3.so.1 liblc3-1.0.3_1
diff --git a/srcpkgs/libjxl/patches/2211.patch b/srcpkgs/libjxl/patches/2211.patch
deleted file mode 100644
index d74513005d474..0000000000000
--- a/srcpkgs/libjxl/patches/2211.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-From b73a9e1e8b47fc623c3015ce40466274e4d4bb03 Mon Sep 17 00:00:00 2001
-From: east <xdong181@gmail.com>
-Date: Wed, 22 Feb 2023 20:12:05 +0800
-Subject: [PATCH 1/3] Add missing <atomic> content to fix gcc compilation for
- RISCV architecture.
-
----
- lib/jxl/enc_xyb.cc | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/lib/jxl/enc_xyb.cc b/lib/jxl/enc_xyb.cc
-index 1ef78877a71..1ed13da9574 100644
---- a/lib/jxl/enc_xyb.cc
-+++ b/lib/jxl/enc_xyb.cc
-@@ -7,6 +7,7 @@
-
- #include <algorithm>
- #include <cstdlib>
-+#include <atomic>
-
- #undef HWY_TARGET_INCLUDE
- #define HWY_TARGET_INCLUDE "lib/jxl/enc_xyb.cc"
-
-From 10a521764beb7e9dcc0dbfbe3f4dbb7e2e8d2bcc Mon Sep 17 00:00:00 2001
-From: east <xdong181@gmail.com>
-Date: Thu, 23 Feb 2023 00:50:02 +0800
-Subject: [PATCH 2/3] add name to AUTHORS
-
----
- AUTHORS | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/AUTHORS b/AUTHORS
-index 44dcc409949..3340422d606 100644
---- a/AUTHORS
-+++ b/AUTHORS
-@@ -30,6 +30,7 @@ Daniel Novomeský <dnovomesky@gmail.com>
- David Burnett <vargolsoft@gmail.com>
- Dirk Lemstra <dirk@lemstra.org>
- Don Olmstead <don.j.olmstead@gmail.com>
-+Dong Xu <xdong181@gmail.com>
- Even Rouault <even.rouault@spatialys.com>
- Fred Brennan <copypaste@kittens.ph>
- Heiko Becker <heirecka@exherbo.org>
-
-From fc6b5c316346475379895a6c67b6d97ab7b8c2cb Mon Sep 17 00:00:00 2001
-From: Moritz Firsching <firsching@google.com>
-Date: Wed, 22 Feb 2023 22:46:07 +0100
-Subject: [PATCH 3/3] lint fix
-
----
- lib/jxl/enc_xyb.cc | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/lib/jxl/enc_xyb.cc b/lib/jxl/enc_xyb.cc
-index 1ed13da9574..2ee0abf821a 100644
---- a/lib/jxl/enc_xyb.cc
-+++ b/lib/jxl/enc_xyb.cc
-@@ -6,8 +6,8 @@
- #include "lib/jxl/enc_xyb.h"
-
- #include <algorithm>
--#include <cstdlib>
- #include <atomic>
-+#include <cstdlib>
-
- #undef HWY_TARGET_INCLUDE
- #define HWY_TARGET_INCLUDE "lib/jxl/enc_xyb.cc"
diff --git a/srcpkgs/libjxl/patches/fix-pixbuf.patch b/srcpkgs/libjxl/patches/fix-pixbuf.patch
new file mode 100644
index 0000000000000..47166a8f60d18
--- /dev/null
+++ b/srcpkgs/libjxl/patches/fix-pixbuf.patch
@@ -0,0 +1,184 @@
+From 7021ada76bd1c1ee44483027c40233cd2e412637 Mon Sep 17 00:00:00 2001
+From: Leo Izen <leo.izen@gmail.com>
+Date: Mon, 29 Jan 2024 09:21:10 -0500
+Subject: [PATCH] lib/jxl/decode.cc: deduplicate and correct min_size
+ calculation
+
+Code to calculate the proper size of the buffer exists in three places
+in this function - one for the standard buffer, one for the extra
+channel buffer, and one for the preview buffer. However, only the code
+for the preview buffer correctly took into account the last row size
+possibly being slightly smaller than the remaining rows.
+
+This commit separates the code out into a separate function to remove
+duplicate code, and uses the algorithm from the prevew buffer which was
+the only correct one.
+
+Signed-off-by: Leo Izen <leo.izen@gmail.com>
+---
+ lib/jxl/decode.cc | 63 ++++++++++++++++--------------------------
+ lib/jxl/decode_test.cc | 8 ++++--
+ 2 files changed, 30 insertions(+), 41 deletions(-)
+
+diff --git a/lib/jxl/decode.cc b/lib/jxl/decode.cc
+index b674d1ba885..953342d76e1 100644
+--- a/lib/jxl/decode.cc
++++ b/lib/jxl/decode.cc
+@@ -2348,29 +2348,40 @@ JXL_EXPORT JxlDecoderStatus JxlDecoderSetCms(JxlDecoder* dec,
+ return JXL_DEC_SUCCESS;
+ }
+
+-JXL_EXPORT JxlDecoderStatus JxlDecoderPreviewOutBufferSize(
+- const JxlDecoder* dec, const JxlPixelFormat* format, size_t* size) {
++static JxlDecoderStatus GetMinSize(const JxlDecoder* dec,
++ const JxlPixelFormat* format,
++ size_t num_channels, size_t* min_size,
++ bool preview) {
+ size_t bits;
+ JxlDecoderStatus status = PrepareSizeCheck(dec, format, &bits);
+ if (status != JXL_DEC_SUCCESS) return status;
+- if (format->num_channels < 3 &&
+- !dec->image_metadata.color_encoding.IsGray()) {
+- return JXL_API_ERROR("Number of channels is too low for color output");
++ size_t xsize, ysize;
++ if (preview) {
++ xsize = dec->metadata.oriented_preview_xsize(dec->keep_orientation);
++ ysize = dec->metadata.oriented_preview_ysize(dec->keep_orientation);
++ } else {
++ GetCurrentDimensions(dec, xsize, ysize);
+ }
+-
+- size_t xsize = dec->metadata.oriented_preview_xsize(dec->keep_orientation);
+- size_t ysize = dec->metadata.oriented_preview_ysize(dec->keep_orientation);
+-
++ if (num_channels == 0) num_channels = format->num_channels;
+ size_t row_size =
+- jxl::DivCeil(xsize * format->num_channels * bits, jxl::kBitsPerByte);
++ jxl::DivCeil(xsize * num_channels * bits, jxl::kBitsPerByte);
+ size_t last_row_size = row_size;
+ if (format->align > 1) {
+ row_size = jxl::DivCeil(row_size, format->align) * format->align;
+ }
+- *size = row_size * (ysize - 1) + last_row_size;
++ *min_size = row_size * (ysize - 1) + last_row_size;
+ return JXL_DEC_SUCCESS;
+ }
+
++JXL_EXPORT JxlDecoderStatus JxlDecoderPreviewOutBufferSize(
++ const JxlDecoder* dec, const JxlPixelFormat* format, size_t* size) {
++ if (format->num_channels < 3 &&
++ !dec->image_metadata.color_encoding.IsGray()) {
++ return JXL_API_ERROR("Number of channels is too low for color output");
++ }
++ return GetMinSize(dec, format, 0, size, true);
++}
++
+ JXL_EXPORT JxlDecoderStatus JxlDecoderSetPreviewOutBuffer(
+ JxlDecoder* dec, const JxlPixelFormat* format, void* buffer, size_t size) {
+ if (!dec->got_basic_info || !dec->metadata.m.have_preview ||
+@@ -2401,23 +2412,12 @@ JXL_EXPORT JxlDecoderStatus JxlDecoderSetPreviewOutBuffer(
+
+ JXL_EXPORT JxlDecoderStatus JxlDecoderImageOutBufferSize(
+ const JxlDecoder* dec, const JxlPixelFormat* format, size_t* size) {
+- size_t bits;
+- JxlDecoderStatus status = PrepareSizeCheck(dec, format, &bits);
+- if (status != JXL_DEC_SUCCESS) return status;
+ if (format->num_channels < 3 &&
+ !dec->image_metadata.color_encoding.IsGray()) {
+ return JXL_API_ERROR("Number of channels is too low for color output");
+ }
+- size_t xsize, ysize;
+- GetCurrentDimensions(dec, xsize, ysize);
+- size_t row_size =
+- jxl::DivCeil(xsize * format->num_channels * bits, jxl::kBitsPerByte);
+- if (format->align > 1) {
+- row_size = jxl::DivCeil(row_size, format->align) * format->align;
+- }
+- *size = row_size * ysize;
+
+- return JXL_DEC_SUCCESS;
++ return GetMinSize(dec, format, 0, size, false);
+ }
+
+ JxlDecoderStatus JxlDecoderSetImageOutBuffer(JxlDecoder* dec,
+@@ -2463,22 +2463,7 @@ JxlDecoderStatus JxlDecoderExtraChannelBufferSize(const JxlDecoder* dec,
+ return JXL_API_ERROR("Invalid extra channel index");
+ }
+
+- size_t num_channels = 1; // Do not use format's num_channels
+-
+- size_t bits;
+- JxlDecoderStatus status = PrepareSizeCheck(dec, format, &bits);
+- if (status != JXL_DEC_SUCCESS) return status;
+-
+- size_t xsize, ysize;
+- GetCurrentDimensions(dec, xsize, ysize);
+- size_t row_size =
+- jxl::DivCeil(xsize * num_channels * bits, jxl::kBitsPerByte);
+- if (format->align > 1) {
+- row_size = jxl::DivCeil(row_size, format->align) * format->align;
+- }
+- *size = row_size * ysize;
+-
+- return JXL_DEC_SUCCESS;
++ return GetMinSize(dec, format, 1, size, false);
+ }
+
+ JxlDecoderStatus JxlDecoderSetExtraChannelBuffer(JxlDecoder* dec,
+diff --git a/lib/jxl/decode_test.cc b/lib/jxl/decode_test.cc
+index caee6dbc568..310742f705f 100644
+--- a/lib/jxl/decode_test.cc
++++ b/lib/jxl/decode_test.cc
+@@ -2575,7 +2575,11 @@ TEST(DecodeTest, AlignTest) {
+ size_t align = 17;
+ JxlPixelFormat format = {3, JXL_TYPE_UINT8, JXL_LITTLE_ENDIAN, align};
+ // On purpose not using jxl::RoundUpTo to test it independently.
+- size_t expected_line_bytes = (1 * 3 * xsize + align - 1) / align * align;
++ size_t expected_line_size_last = 1 * 3 * xsize;
++ size_t expected_line_size =
++ ((expected_line_size_last + align - 1) / align) * align;
++ size_t expected_pixels_size =
++ expected_line_size * (ysize - 1) + expected_line_size_last;
+
+ for (int use_callback = 0; use_callback <= 1; ++use_callback) {
+ std::vector<uint8_t> pixels2 = jxl::DecodeWithAPI(
+@@ -2583,7 +2587,7 @@ TEST(DecodeTest, AlignTest) {
+ /*set_buffer_early=*/false,
+ /*use_resizable_runner=*/false, /*require_boxes=*/false,
+ /*expect_success=*/true);
+- EXPECT_EQ(expected_line_bytes * ysize, pixels2.size());
++ EXPECT_EQ(expected_pixels_size, pixels2.size());
+ EXPECT_EQ(0u, jxl::test::ComparePixels(pixels.data(), pixels2.data(), xsize,
+ ysize, format_orig, format));
+ }
+From c4ebb7e70ee09591ae0269410ebe8929f400713e Mon Sep 17 00:00:00 2001
+From: Leo Izen <leo.izen@gmail.com>
+Date: Mon, 29 Jan 2024 09:23:36 -0500
+Subject: [PATCH] plugins/gdk-pixbuf: consider stride when passing buffer to
+ libjxl
+
+This change uses gdk_pixbuf_get_pixels_with_length to get the actual
+size of the buffer, with stride taken into account. The previous code
+just multiplies width by height and ignores stride.
+
+Signed-off-by: Leo Izen <leo.izen@gmail.com>
+---
+ plugins/gdk-pixbuf/pixbufloader-jxl.c | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/plugins/gdk-pixbuf/pixbufloader-jxl.c b/plugins/gdk-pixbuf/pixbufloader-jxl.c
+index bafa57b1674..066468a5035 100644
+--- a/plugins/gdk-pixbuf/pixbufloader-jxl.c
++++ b/plugins/gdk-pixbuf/pixbufloader-jxl.c
+@@ -491,9 +491,8 @@ static gboolean load_increment(gpointer context, const guchar *buf, guint size,
+ decoder_state->frames->len - 1)
+ .data;
+ decoder_state->pixel_format.align = gdk_pixbuf_get_rowstride(output);
+- guchar *dst = gdk_pixbuf_get_pixels(output);
+- size_t num_pixels = decoder_state->xsize * decoder_state->ysize;
+- size_t size = num_pixels * decoder_state->pixel_format.num_channels;
++ guint size;
++ guchar *dst = gdk_pixbuf_get_pixels_with_length(output, &size);
+ if (JXL_DEC_SUCCESS != JxlDecoderSetImageOutBuffer(
+ decoder_state->decoder,
+ &decoder_state->pixel_format, dst, size)) {
diff --git a/srcpkgs/libjxl/template b/srcpkgs/libjxl/template
index e6bd535377f5c..bcce3e3213575 100644
--- a/srcpkgs/libjxl/template
+++ b/srcpkgs/libjxl/template
@@ -1,16 +1,16 @@
# Template file for 'libjxl'
pkgname=libjxl
-version=0.8.2
-revision=2
-_testdata_hash=d6168ffb9e1cc24007e64b65dd84d822ad1fc759
-_skcms_hash=b25b07b4b07990811de121c0356155b2ba0f4318
+version=0.9.1
+revision=1
+_testdata_hash=ff8d743aaba05b3014f17e5475e576242fa979fc
build_style=cmake
build_wrksrc="libjxl-${version}"
configure_args="-DJPEGXL_ENABLE_BENCHMARK=OFF -DJPEGXL_ENABLE_EXAMPLES=OFF
- -DJPEGXL_ENABLE_SJPEG=OFF -DJPEGXL_ENABLE_PLUGINS=ON -DJPEGXL_VERSION=${version}"
+ -DJPEGXL_ENABLE_SJPEG=OFF -DJPEGXL_ENABLE_PLUGINS=ON -DJPEGXL_VERSION=${version}
+ -DJPEGXL_ENABLE_SKCMS=OFF"
hostmakedepends="tar pkg-config asciidoc"
makedepends="brotli-devel highway libpng-devel giflib-devel libjpeg-turbo-devel
- libopenexr-devel libwebp-devel gdk-pixbuf-devel gimp-devel"
+ libopenexr-devel libwebp-devel gdk-pixbuf-devel gimp-devel lcms2-devel"
checkdepends="gtest-devel xdg-utils"
short_desc="JPEG XL image format reference implementation"
maintainer="Joshua Krämer <joshua@kraemer.link>"
@@ -18,12 +18,9 @@ license="BSD-3-Clause, custom:Patent grant"
homepage="https://jpeg.org/jpegxl/"
changelog="https://raw.githubusercontent.com/libjxl/libjxl/main/CHANGELOG.md"
distfiles="https://github.com/libjxl/libjxl/archive/v${version}.tar.gz
- https://github.com/libjxl/testdata/archive/${_testdata_hash}.tar.gz>testdata-${_testdata_hash}.tar.gz
- https://skia.googlesource.com/skcms/+archive/${_skcms_hash}.tar.gz>skcms-${_skcms_hash}.tar.gz"
-checksum="c70916fb3ed43784eb840f82f05d390053a558e2da106e40863919238fa7b420
- 64658d3341bff2976899cb8b140242ffa4de1cd41aed507dfec4aa9e7e05ca24
- @8feb1e33c38ca13f91a0d5bd8ce25f976eb239edf38f49e6db8895ae9f1e833c"
-skip_extraction="skcms-${_skcms_hash}.tar.gz"
+ https://github.com/libjxl/testdata/archive/${_testdata_hash}.tar.gz>testdata-${_testdata_hash}.tar.gz"
+checksum="a0e72e9ece26878147069ad4888ac3382021d4bbee71c2e1b687d5bde7fd7e01
+ 9c45a108df32a002a69465df896d33acf77d97c88fb59dffa0dff5628370e96f"
patch_args="-Np1 --directory=${build_wrksrc}"
if [ -z "$XBPS_CHECK_PKGS" ]; then
@@ -32,7 +29,6 @@ fi
post_extract() {
mv "testdata-${_testdata_hash}"/* "${build_wrksrc}/testdata/"
- bsdtar -xf "${XBPS_SRCDISTDIR}/${pkgname}-${version}/skcms-${_skcms_hash}.tar.gz" -C "${build_wrksrc}/third_party/skcms"
}
post_install() {
@@ -40,12 +36,16 @@ post_install() {
vlicense PATENTS
}
+post_install() {
+ # Remove devel symlink for internal library only used for tools. (headers don't get installed)
+ rm ${DESTDIR}/usr/lib/libjxl_extras_codec.so
+}
+
libjxl-devel_package() {
short_desc+=" - development files"
depends="${sourcepkg}>=${version}_${revision} highway brotli-devel"
pkg_install() {
vmove usr/include
- vmove "usr/lib/*.a"
vmove "usr/lib/*.so"
vmove usr/lib/pkgconfig
}
@@ -54,6 +54,7 @@ libjxl-devel_package() {
libjxl-tools_package() {
short_desc+=" - tools"
pkg_install() {
+ vmove "usr/lib/libjxl_extras_codec*"
vmove usr/bin
vmove usr/share/man/man1
}
From 59ae8a7e994dc9f7a18c6ba949c63334030b40d5 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 2 Jan 2024 22:40:00 -0800
Subject: [PATCH 3/7] krita: rebuild for libjxl 0.9
---
srcpkgs/krita/patches/jxl09.patch | 71 +++++++++++++++++++++++++++++++
srcpkgs/krita/patches/sip68.patch | 23 ++++++++++
srcpkgs/krita/template | 2 +-
3 files changed, 95 insertions(+), 1 deletion(-)
create mode 100644 srcpkgs/krita/patches/jxl09.patch
create mode 100644 srcpkgs/krita/patches/sip68.patch
diff --git a/srcpkgs/krita/patches/jxl09.patch b/srcpkgs/krita/patches/jxl09.patch
new file mode 100644
index 0000000000000..50e2cd50bcc66
--- /dev/null
+++ b/srcpkgs/krita/patches/jxl09.patch
@@ -0,0 +1,71 @@
+From d9e258bf9d6af5f53467becf65bb21bf6f96a38e Mon Sep 17 00:00:00 2001
+From: Timo Gurr <timo.gurr@gmail.com>
+Date: Fri, 29 Dec 2023 11:10:26 +0100
+Subject: [PATCH] Fix build with libjxl 0.9.0
+
+BUG:478987
+---
+ 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/srcpkgs/krita/patches/sip68.patch b/srcpkgs/krita/patches/sip68.patch
new file mode 100644
index 0000000000000..e9e4544b7cc27
--- /dev/null
+++ b/srcpkgs/krita/patches/sip68.patch
@@ -0,0 +1,23 @@
+From 2d71c47661d43a4e3c1ab0c27803de980bdf2bb2 Mon Sep 17 00:00:00 2001
+From: Antonio Rojas <arojas@archlinux.org>
+Date: Mon, 11 Dec 2023 20:26:13 +0100
+Subject: [PATCH] Bump SIP ABI version to 12.8
+
+Fixes build with SIP 6.8
+---
+ cmake/modules/pyproject.toml.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/cmake/modules/pyproject.toml.in b/cmake/modules/pyproject.toml.in
+index 090b2d4b0cb..085ddf41799 100644
+--- a/cmake/modules/pyproject.toml.in
++++ b/cmake/modules/pyproject.toml.in
+@@ -9,7 +9,7 @@ name = "@module_name_toml@"
+ sip-module = "@sip_name@"
+ sip-include-dirs = @sip_include_dirs@
+ sip-files-dir = "@module_srcs@"
+-abi-version = "12"
++abi-version = "12.8"
+
+ [tool.sip.bindings.@module_name_toml@]
+ tags = @module_tags@
diff --git a/srcpkgs/krita/template b/srcpkgs/krita/template
index d804b581a8689..4833f8bd33d86 100644
--- a/srcpkgs/krita/template
+++ b/srcpkgs/krita/template
@@ -1,7 +1,7 @@
# Template file for 'krita'
pkgname=krita
version=5.2.1
-revision=3
+revision=4
build_style=cmake
configure_args="-Wno-dev -DBUILD_TESTING=OFF"
hostmakedepends="extra-cmake-modules gettext pkg-config python3
From c2c414409d276b8cdd9271530ea335aa9cfd130d Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 2 Jan 2024 22:40:19 -0800
Subject: [PATCH 4/7] imlib2: rebuild for libjxl 0.9
---
srcpkgs/imlib2/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/imlib2/template b/srcpkgs/imlib2/template
index bcbf607efa142..9f485b0b2f858 100644
--- a/srcpkgs/imlib2/template
+++ b/srcpkgs/imlib2/template
@@ -1,7 +1,7 @@
# Template file for 'imlib2'
pkgname=imlib2
version=1.12.1
-revision=1
+revision=2
build_style=gnu-configure
configure_args="--disable-static --sysconfdir=/etc/imlib2 --enable-visibility-hiding"
hostmakedepends="pkg-config"
From 9bdb5450ceda2fa511d628b3ec549c814a847bd3 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 2 Jan 2024 22:41:01 -0800
Subject: [PATCH 5/7] darktable: rebuild for libjxl 0.9
---
srcpkgs/darktable/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/darktable/template b/srcpkgs/darktable/template
index 97dfae3471e7c..af29d7cec18bb 100644
--- a/srcpkgs/darktable/template
+++ b/srcpkgs/darktable/template
@@ -1,7 +1,7 @@
# Template file for 'darktable'
pkgname=darktable
version=4.4.2
-revision=5
+revision=6
# upstream only supports these archs:
archs="x86_64* aarch64* ppc64le*"
build_style=cmake
From e58621d0fe1febc950303fac572261feae1443b2 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 2 Jan 2024 22:41:26 -0800
Subject: [PATCH 6/7] kimageformats: rebuild for libjxl 0.9
---
srcpkgs/kimageformats/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/kimageformats/template b/srcpkgs/kimageformats/template
index 9ff74b976eab0..9a6a9c6d3bf41 100644
--- a/srcpkgs/kimageformats/template
+++ b/srcpkgs/kimageformats/template
@@ -1,7 +1,7 @@
# Template file for 'kimageformats'
pkgname=kimageformats
version=5.113.0
-revision=1
+revision=2
build_style=cmake
configure_args="-DKIMAGEFORMATS_HEIF=ON"
hostmakedepends="kcoreaddons extra-cmake-modules qt5-qmake qt5-host-tools
From 28aae9b9082c9ec98e280aa59ef418ea2fa5bf16 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Tue, 30 Jan 2024 12:38:40 -0800
Subject: [PATCH 7/7] swayimg: reuilbd for libjxl 0.9
---
srcpkgs/swayimg/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/swayimg/template b/srcpkgs/swayimg/template
index 115566a7d3968..34b353098abc6 100644
--- a/srcpkgs/swayimg/template
+++ b/srcpkgs/swayimg/template
@@ -1,7 +1,7 @@
# Template file for 'swayimg'
pkgname=swayimg
version=2.0
-revision=1
+revision=2
build_style=meson
hostmakedepends="pkg-config wayland-devel"
makedepends="wayland-devel cairo-devel json-c-devel libxkbcommon-devel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: libjxl: update to 0.9.1.
2024-01-29 23:11 [PR PATCH] libjxl: update to 0.9.1 oreo639
` (5 preceding siblings ...)
2024-02-04 5:42 ` oreo639
@ 2024-02-04 11:51 ` oreo639
2024-02-04 11:52 ` oreo639
2024-02-05 6:50 ` [PR PATCH] [Merged]: " oreo639
8 siblings, 0 replies; 10+ messages in thread
From: oreo639 @ 2024-02-04 11:51 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 160 bytes --]
New comment by oreo639 on void-packages repository
https://github.com/void-linux/void-packages/pull/48435#issuecomment-1925721373
Comment:
cc @joshuakraemer
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: libjxl: update to 0.9.1.
2024-01-29 23:11 [PR PATCH] libjxl: update to 0.9.1 oreo639
` (6 preceding siblings ...)
2024-02-04 11:51 ` oreo639
@ 2024-02-04 11:52 ` oreo639
2024-02-05 6:50 ` [PR PATCH] [Merged]: " oreo639
8 siblings, 0 replies; 10+ messages in thread
From: oreo639 @ 2024-02-04 11:52 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 181 bytes --]
New comment by oreo639 on void-packages repository
https://github.com/void-linux/void-packages/pull/48435#issuecomment-1925721373
Comment:
cc @joshuakraemer (I forgot to earlier)
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PR PATCH] [Merged]: libjxl: update to 0.9.1.
2024-01-29 23:11 [PR PATCH] libjxl: update to 0.9.1 oreo639
` (7 preceding siblings ...)
2024-02-04 11:52 ` oreo639
@ 2024-02-05 6:50 ` oreo639
8 siblings, 0 replies; 10+ messages in thread
From: oreo639 @ 2024-02-05 6:50 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1085 bytes --]
There's a merged pull request on the void-packages repository
libjxl: update to 0.9.1.
https://github.com/void-linux/void-packages/pull/48435
Description:
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2024-02-05 6:50 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-29 23:11 [PR PATCH] libjxl: update to 0.9.1 oreo639
2024-01-30 4:13 ` [PR PATCH] [Updated] " oreo639
2024-01-30 20:42 ` oreo639
2024-01-31 0:27 ` oreo639
2024-02-03 5:30 ` oreo639
2024-02-03 9:01 ` oreo639
2024-02-04 5:42 ` oreo639
2024-02-04 11:51 ` oreo639
2024-02-04 11:52 ` oreo639
2024-02-05 6:50 ` [PR PATCH] [Merged]: " oreo639
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).