Enable heif support now that rust-libheif-rs is packaged

This commit is contained in:
Kalev Lember 2023-09-21 22:01:24 +02:00
parent 674e42fe55
commit cd2cc6ea01
5 changed files with 38 additions and 10 deletions

View File

@ -1,7 +1,7 @@
From be5633a760b751f00e434cbee41468930ac95dbd Mon Sep 17 00:00:00 2001
From: Fabio Valentini <decathorpe@gmail.com>
Date: Tue, 19 Sep 2023 15:00:17 +0200
Subject: [PATCH 1/3] Drop OpenEXR decoders since they are not enabled in the
Subject: [PATCH 1/4] Drop OpenEXR decoders since they are not enabled in the
image crate
---

View File

@ -1,22 +1,23 @@
From 9f681a4c2f27a0bc5beac29f17dbdb21c2ce90a9 Mon Sep 17 00:00:00 2001
From fe89df0302d3bc40796260773c862c59269d0528 Mon Sep 17 00:00:00 2001
From: Fabio Valentini <decathorpe@gmail.com>
Date: Tue, 19 Sep 2023 15:00:59 +0200
Subject: [PATCH 2/3] Disable JPEG-XL and HEIF loaders (missing dependencies)
Subject: [PATCH 2/4] Disable JPEG-XL (missing dependencies)
---
Cargo.toml | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
Cargo.toml | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/Cargo.toml b/Cargo.toml
index 18cbdf4a..f2300d3a 100644
index 18cbdf4..01da486 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -17,5 +17,9 @@ opt-level = 3
@@ -17,5 +17,10 @@ opt-level = 3
[workspace]
resolver = "2"
-members = [ "loaders/*", "tests"]
+members = [
+ "loaders/glycin-heif",
+ "loaders/glycin-image-rs",
+ "loaders/glycin-svg",
+ "tests",

View File

@ -1,7 +1,7 @@
From 65b850fad07b7bc2c12b1bcfdbc7addc86a82521 Mon Sep 17 00:00:00 2001
From: Fabio Valentini <decathorpe@gmail.com>
Date: Tue, 19 Sep 2023 15:01:58 +0200
Subject: [PATCH 3/3] Temporarily downgrade librsvg dependency to allow
Subject: [PATCH 3/4] Temporarily downgrade librsvg dependency to allow
2.57.0-beta.2
---

View File

@ -0,0 +1,23 @@
From 170e9905a6c4b8c890450ef00322376bef4454bf Mon Sep 17 00:00:00 2001
From: Kalev Lember <klember@redhat.com>
Date: Thu, 21 Sep 2023 22:11:50 +0200
Subject: [PATCH 4/4] Bump libheif-rs dep 0.21.0
---
loaders/glycin-heif/Cargo.toml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/loaders/glycin-heif/Cargo.toml b/loaders/glycin-heif/Cargo.toml
index b23b70f..1fd011d 100644
--- a/loaders/glycin-heif/Cargo.toml
+++ b/loaders/glycin-heif/Cargo.toml
@@ -11,5 +11,5 @@ rust-version.workspace = true
[dependencies]
glycin-utils = "0.1.0"
-libheif-rs = "0.20.0"
+libheif-rs = "0.21.0"
safe-transmute = "0.11.2"
--
2.41.0

View File

@ -36,10 +36,14 @@ URL: https://gitlab.gnome.org/sophie-h/glycin
Source0: https://download.gnome.org/sources/glycin-loaders/0.1/glycin-loaders-%{tarball_version}.tar.xz
# Fedora-packaged rust-image doesn't have openexr support
Patch: 0001-Drop-OpenEXR-decoders-since-they-are-not-enabled-in-.patch
# libheif and jxl rust wrappers aren't packaged yet
Patch: 0002-Disable-JPEG-XL-and-HEIF-loaders-missing-dependencie.patch
# jxl rust wrapper isn't packaged yet
Patch: 0002-Disable-JPEG-XL-missing-dependencies.patch
# Fedora currently has librsvg 2.57.0-beta.2
Patch: 0003-Temporarily-downgrade-librsvg-dependency-to-allow-2..patch
%if 0%{?fedora}
# Bump libheif-rs dep to the version that's in Fedora
Patch: 0004-Bump-libheif-rs-dep-0.21.0.patch
%endif
# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
ExcludeArch: %{ix86}