forked from msys2/MINGW-packages
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gimp: fix compatibility with libheif 1.18.0 and newer
- Loading branch information
Showing
2 changed files
with
59 additions
and
0 deletions.
There are no files selected for viewing
56 changes: 56 additions & 0 deletions
56
mingw-w64-gimp/0010-fix-compatibility-with-libheif-1.18.0.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
Since libheif 1.18.0, codecs can be dynamically loaded at runtime and it is | ||
not possible anymore to determine the available codecs at compile-time. | ||
You'll get an unknown codec error at runtime if you try to use an | ||
unavailable codec. | ||
|
||
See: https://github.com/strukturag/libheif/commit/cf0d89c6e0809427427583290547a7757428cf5a | ||
|
||
diff -urN gimp-2.10.38/configure.ac.orig gimp-2.10.38/configure.ac | ||
--- gimp-2.10.38/configure.ac.orig 2024-11-17 14:10:59.244775200 +0100 | ||
+++ gimp-2.10.38/configure.ac 2024-11-17 14:11:10.329184400 +0100 | ||
@@ -1815,10 +1815,15 @@ | ||
# these as last resort, outputting a warning. | ||
have_libheif=no | ||
have_libheif_1_4_0=no | ||
+have_libheif_1_14_0=no | ||
if test "x$with_libheif" != xno; then | ||
+ have_libheif_1_14_0=yes | ||
have_libheif_1_4_0=yes | ||
have_libheif=yes | ||
- PKG_CHECK_MODULES(LIBHEIF, libheif > 1.5.1,, | ||
+ PKG_CHECK_MODULES(LIBHEIF, libheif > 1.5.1, | ||
+ [ | ||
+ PKG_CHECK_MODULES(LIBHEIF, libheif > 1.14.0,,[have_libheif_1_14_0=no]) | ||
+ ], | ||
[ | ||
PKG_CHECK_MODULES(LIBHEIF, libheif = 1.4.0,, | ||
[ | ||
@@ -1843,13 +1848,24 @@ | ||
can_import_avif=no | ||
can_export_avif=no | ||
if test "x$have_libheif" = xyes; then | ||
- can_import_heic=`$PKG_CONFIG --variable=builtin_h265_decoder libheif` | ||
- can_export_heic=`$PKG_CONFIG --variable=builtin_h265_encoder libheif` | ||
+ if test "x$have_libheif_1_14_0" = xyes; then | ||
+ # Since libheif 1.14.0, codecs can be dynamically loaded at runtime and it is | ||
+ # not possible anymore to determine the available codecs at compile-time. | ||
+ # You'll get an unknown codec error at runtime if you try to use an | ||
+ # unavailable codec. | ||
+ can_import_heic=yes | ||
+ can_export_heic=yes | ||
+ can_import_avif=yes | ||
+ can_export_avif=yes | ||
+ else | ||
+ can_import_heic=`$PKG_CONFIG --variable=builtin_h265_decoder libheif` | ||
+ can_export_heic=`$PKG_CONFIG --variable=builtin_h265_encoder libheif` | ||
+ can_import_avif=`$PKG_CONFIG --variable=builtin_avif_decoder libheif` | ||
+ can_export_avif=`$PKG_CONFIG --variable=builtin_avif_encoder libheif` | ||
+ fi | ||
if test "x$can_import_heic" = xyes; then | ||
MIME_TYPES="$MIME_TYPES;image/heif;image/heic" | ||
fi | ||
- can_import_avif=`$PKG_CONFIG --variable=builtin_avif_decoder libheif` | ||
- can_export_avif=`$PKG_CONFIG --variable=builtin_avif_encoder libheif` | ||
if test "x$can_import_avif" = xyes; then | ||
MIME_TYPES="$MIME_TYPES;image/avif" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters