From e4ace369c19c875a9ec994d39f1c299bc247a94c Mon Sep 17 00:00:00 2001 From: Jehan Date: Mon, 23 Jan 2023 19:35:52 +0100 Subject: [PATCH] meson: list both AVIF and HEIC mimetype support if the plug-in is built. Even though, some format support might be missing, since codecs can be added at runtime, it can always change later without having to touch GIMP. Yet we won't be able to edit the desktop file when this happens. See new comments in #9080. --- meson.build | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/meson.build b/meson.build index 4d3f344f8a..f71e0f7124 100644 --- a/meson.build +++ b/meson.build @@ -795,13 +795,6 @@ if have_heif dependencies: [ libheif ], name: 'export HEIC').returncode() == 0 - if can_import_heic - MIMEtypes += [ - 'image/heif', - 'image/heic', - ] - endif - can_import_avif = cc.run(''' #include int main() { @@ -844,16 +837,21 @@ if have_heif dependencies: [ libheif ], name: 'export AVIF').returncode() == 0 - if can_import_avif - MIMEtypes += [ - 'image/avif' - ] - endif - if not can_import_heic and not can_import_avif have_heif = false endif + if have_heif + # Listing support for both HEIC and AVIF if we build with HEIF support, + # because codecs can be added at any time later and we won't be able to edit + # the desktop file once it's installed. See discussion in #9080. + MIMEtypes += [ + 'image/heif', + 'image/heic', + 'image/avif' + ] + endif + if have_heif and (libheif.version().version_compare('==1.5.0') or libheif.version().version_compare('==1.5.1')) libheif_warning='''