Christophe Marin 2023-08-29 11:00:25 +00:00 committed by Git OBS Bridge
parent 0ba052691d
commit 917a2e6897
3 changed files with 53 additions and 0 deletions

View File

@ -0,0 +1,45 @@
From bcec942cc92e0968c724a2c1f92b4cd048bf8fa7 Mon Sep 17 00:00:00 2001
From: Antonio Rojas <arojas@archlinux.org>
Date: Tue, 29 Aug 2023 09:21:37 +0200
Subject: [PATCH] Support libavif 1.0
Make cmake find libavif 1.0 and adapt to API changes (which is reverting to pre 0.9.2 API)
(cherry picked from commit 4badb3088e90d86208ed6bd435df7fe6a022be64)
---
CMakeLists.txt | 5 ++++-
src/imageformats/avif.cpp | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2597a00..6d0af2e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -51,7 +51,10 @@ set_package_properties(OpenEXR PROPERTIES
PURPOSE "Required for the QImage plugin for OpenEXR images"
)
-find_package(libavif 0.8.2 CONFIG)
+find_package(libavif 0.8.2 CONFIG QUIET)
+if(NOT libavif_FOUND)
+ find_package(libavif 1 CONFIG)
+endif()
set_package_properties(libavif PROPERTIES
TYPE OPTIONAL
PURPOSE "Required for the QImage plugin for AVIF images"
diff --git a/src/imageformats/avif.cpp b/src/imageformats/avif.cpp
index bcebd36..9775dcb 100644
--- a/src/imageformats/avif.cpp
+++ b/src/imageformats/avif.cpp
@@ -424,7 +424,7 @@ bool QAVIFHandler::decode_one_frame()
}
if (m_decoder->image->transformFlags & AVIF_TRANSFORM_IMIR) {
-#if AVIF_VERSION > 90100
+#if AVIF_VERSION > 90100 && AVIF_VERSION < 1000000
switch (m_decoder->image->imir.mode) {
#else
switch (m_decoder->image->imir.axis) {
--
2.41.0

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Aug 29 11:00:22 UTC 2023 - Christophe Marin <christophe@krop.fr>
- Add patch to support avif 1.0:
* 0001-Support-libavif-1.0.patch
-------------------------------------------------------------------
Tue Aug 8 17:42:56 UTC 2023 - Christophe Marin <christophe@krop.fr>

View File

@ -43,6 +43,8 @@ Source: %{name}-%{version}.tar.xz
Source1: %{name}-%{version}.tar.xz.sig
Source2: frameworks.keyring
%endif
# PATCH-FIX-UPSTREAM
Patch0: 0001-Support-libavif-1.0.patch
BuildRequires: extra-cmake-modules >= %{_kf5_bugfix_version}
BuildRequires: fdupes
BuildRequires: kf5-filesystem