mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
kimageformats6, add upstream patch (#11808)
Fixes build for Qt6 version prior to 6.8
This commit is contained in:
@@ -9,6 +9,7 @@ REVISION="1"
|
||||
SOURCE_URI="https://download.kde.org/stable/frameworks/${portVersion%.*}/kimageformats-${portVersion}.tar.xz"
|
||||
CHECKSUM_SHA256="0c45787f97d00fc0257f7de3250d84e950de2a332c45e7528138f7cf843154cc"
|
||||
SOURCE_DIR="kimageformats-$portVersion"
|
||||
PATCHES="335.patch"
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
54
kde-frameworks/kimageformats/patches/335.patch
Normal file
54
kde-frameworks/kimageformats/patches/335.patch
Normal file
@@ -0,0 +1,54 @@
|
||||
From 74a734efedea3ada6e0062202be93bb783b4cff3 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Daniel=20Novomesk=C3=BD?= <dnovomesky@gmail.com>
|
||||
Date: Sat, 15 Feb 2025 16:16:10 +0100
|
||||
Subject: [PATCH] jxl: fix build with Qt before 6.8.0
|
||||
|
||||
---
|
||||
src/imageformats/jxl.cpp | 10 +++++++++-
|
||||
1 file changed, 9 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/imageformats/jxl.cpp b/src/imageformats/jxl.cpp
|
||||
index a055b45e..87409c4d 100644
|
||||
--- a/src/imageformats/jxl.cpp
|
||||
+++ b/src/imageformats/jxl.cpp
|
||||
@@ -1329,7 +1329,10 @@ bool QJpegXLHandler::write(const QImage &image)
|
||||
output_info.uses_original_profile = JXL_FALSE;
|
||||
|
||||
if (tmpimage.colorSpace().isValid()) {
|
||||
- const QPointF whiteP = image.colorSpace().whitePoint();
|
||||
+ QPointF whiteP(0.3127f, 0.329f);
|
||||
+#if QT_VERSION >= QT_VERSION_CHECK(6, 8, 0)
|
||||
+ whiteP = image.colorSpace().whitePoint();
|
||||
+#endif
|
||||
|
||||
switch (tmpimage.colorSpace().primaries()) {
|
||||
case QColorSpace::Primaries::SRgb:
|
||||
@@ -1358,6 +1361,9 @@ bool QJpegXLHandler::write(const QImage &image)
|
||||
break;
|
||||
case QColorSpace::Primaries::ProPhotoRgb:
|
||||
color_profile.white_point = JXL_WHITE_POINT_CUSTOM;
|
||||
+#if QT_VERSION < QT_VERSION_CHECK(6, 8, 0)
|
||||
+ whiteP = QPointF(0.3457f, 0.3585f);
|
||||
+#endif
|
||||
color_profile.white_point_xy[0] = whiteP.x();
|
||||
color_profile.white_point_xy[1] = whiteP.y();
|
||||
color_profile.primaries = JXL_PRIMARIES_CUSTOM;
|
||||
@@ -1368,6 +1374,7 @@ bool QJpegXLHandler::write(const QImage &image)
|
||||
color_profile.primaries_blue_xy[0] = 0.0366;
|
||||
color_profile.primaries_blue_xy[1] = 0.0001;
|
||||
break;
|
||||
+#if QT_VERSION >= QT_VERSION_CHECK(6, 8, 0)
|
||||
case QColorSpace::Primaries::Bt2020:
|
||||
color_profile.white_point = JXL_WHITE_POINT_D65;
|
||||
color_profile.primaries = JXL_PRIMARIES_2100;
|
||||
@@ -1378,6 +1385,7 @@ bool QJpegXLHandler::write(const QImage &image)
|
||||
color_profile.primaries_blue_xy[0] = 0.131;
|
||||
color_profile.primaries_blue_xy[1] = 0.046;
|
||||
break;
|
||||
+#endif
|
||||
default:
|
||||
if (is_gray && !whiteP.isNull()) {
|
||||
color_profile.white_point = JXL_WHITE_POINT_CUSTOM;
|
||||
--
|
||||
GitLab
|
||||
|
||||
Reference in New Issue
Block a user