From b021f400fa344a465911e4e46eaec79aed869296 Mon Sep 17 00:00:00 2001 From: Imran Hameed Date: Thu, 29 Aug 2024 19:25:28 -0500 Subject: [PATCH] gimp: reenable avif/heic libheif commit cf0d89c6e0809427427583290547a7757428cf5a removes the definitions for the `builtin_h265_decoder`, `builtin_h265_encoder`, `builtin_avif_decoder`, and `builtin_avif_encoder` pkg-config variables. This commit is included in libheif 1.80.0 and newer. gimp 2.10.38 depends on these pkg-config variables in its autoconf morass, and as a result is built without support for importing or exporting avif and heic. This commit "fixes" this by forcefully setting these feature detection flags to "yes" if any version of libheif is present. Technically this logic should only apply to libheif 1.80.0 and above, but I don't think there's really any good reason to bother with that additional complication for a patch meant specifically for compiling gimp in a rolling release distribution. Some links: - - --- .../gimp/patches/libheif-1.18-compat.patch | 20 +++++++++++++++++++ srcpkgs/gimp/template | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/gimp/patches/libheif-1.18-compat.patch diff --git a/srcpkgs/gimp/patches/libheif-1.18-compat.patch b/srcpkgs/gimp/patches/libheif-1.18-compat.patch new file mode 100644 index 00000000000..e714d25f2ba --- /dev/null +++ b/srcpkgs/gimp/patches/libheif-1.18-compat.patch @@ -0,0 +1,20 @@ +--- a/configure.ac 2024-08-29 18:28:19.457012043 -0500 ++++ b/configure.ac 2024-08-29 18:28:29.154953488 -0500 +@@ -1843,13 +1843,13 @@ + 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` ++ can_import_heic=yes ++ can_export_heic=yes + 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` ++ can_import_avif=yes ++ can_export_avif=yes + if test "x$can_import_avif" = xyes; then + MIME_TYPES="$MIME_TYPES;image/avif" + fi diff --git a/srcpkgs/gimp/template b/srcpkgs/gimp/template index 653c5c0f411..a50409d5ce5 100644 --- a/srcpkgs/gimp/template +++ b/srcpkgs/gimp/template @@ -1,7 +1,7 @@ # Template file for 'gimp' pkgname=gimp version=2.10.38 -revision=2 +revision=3 build_style=gnu-configure configure_args="--disable-check-update --datadir=/usr/share --disable-python" hostmakedepends="automake gegl gettext-devel glib-devel gtk+-devel intltool