From dd37212aff85adac293c729b52fa8766ff9efe7c Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 6 Jul 2026 07:34:45 +0200 Subject: patch from PR --- 0001-re-add-support-for-libheif-1.7.0.patch | 85 +++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 0001-re-add-support-for-libheif-1.7.0.patch (limited to '0001-re-add-support-for-libheif-1.7.0.patch') diff --git a/0001-re-add-support-for-libheif-1.7.0.patch b/0001-re-add-support-for-libheif-1.7.0.patch new file mode 100644 index 0000000..554daeb --- /dev/null +++ b/0001-re-add-support-for-libheif-1.7.0.patch @@ -0,0 +1,85 @@ +diff --git a/coders/heic.c b/coders/heic.c +index d7cae5b29..788dd3ed6 100644 +--- a/coders/heic.c ++++ b/coders/heic.c +@@ -1035,8 +1035,10 @@ static Image *ReadHEICImage(const ImageInfo *image_info,ExceptionInfo *exception + #endif + ThrowReaderException(CoderError,"ImageTypeNotSupported"); + (void) CloseBlob(image); ++#if LIBHEIF_NUMERIC_VERSION >= HEIC_COMPUTE_NUMERIC_VERSION(1,11,0) + if (heif_has_compatible_brand(magic,sizeof(magic), "avif") == 1) + (void) CopyMagickString(image->magick,"AVIF",MagickPathExtent); ++#endif + /* + Decode HEIF image. + */ +diff --git a/configure b/configure +index 41de9c8f7..d0cb6bfc3 100755 +--- a/configure ++++ b/configure +@@ -33816,19 +33816,19 @@ if test "x$with_heic" = "xyes"; then + printf "%s\n" "-------------------------------------------------------------" >&6; } + + pkg_failed=no +-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libheif >= 1.11.0" >&5 +-printf %s "checking for libheif >= 1.11.0... " >&6; } ++{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libheif >= 1.7.0" >&5 ++printf %s "checking for libheif >= 1.7.0... " >&6; } + + if test -n "$HEIF_CFLAGS"; then + pkg_cv_HEIF_CFLAGS="$HEIF_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ +- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libheif >= 1.11.0\""; } >&5 +- ($PKG_CONFIG --exists --print-errors "libheif >= 1.11.0") 2>&5 ++ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libheif >= 1.7.0\""; } >&5 ++ ($PKG_CONFIG --exists --print-errors "libheif >= 1.7.0") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then +- pkg_cv_HEIF_CFLAGS=`$PKG_CONFIG --cflags "libheif >= 1.11.0" 2>/dev/null` ++ pkg_cv_HEIF_CFLAGS=`$PKG_CONFIG --cflags "libheif >= 1.7.0" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes + else + pkg_failed=yes +@@ -33840,12 +33840,12 @@ if test -n "$HEIF_LIBS"; then + pkg_cv_HEIF_LIBS="$HEIF_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ +- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libheif >= 1.11.0\""; } >&5 +- ($PKG_CONFIG --exists --print-errors "libheif >= 1.11.0") 2>&5 ++ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libheif >= 1.7.0\""; } >&5 ++ ($PKG_CONFIG --exists --print-errors "libheif >= 1.7.0") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then +- pkg_cv_HEIF_LIBS=`$PKG_CONFIG --libs "libheif >= 1.11.0" 2>/dev/null` ++ pkg_cv_HEIF_LIBS=`$PKG_CONFIG --libs "libheif >= 1.7.0" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes + else + pkg_failed=yes +@@ -33866,9 +33866,9 @@ else + _pkg_short_errors_supported=no + fi + if test $_pkg_short_errors_supported = yes; then +- HEIF_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libheif >= 1.11.0" 2>&1` ++ HEIF_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libheif >= 1.7.0" 2>&1` + else +- HEIF_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libheif >= 1.11.0" 2>&1` ++ HEIF_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libheif >= 1.7.0" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$HEIF_PKG_ERRORS" >&5 +diff --git a/configure.ac b/configure.ac +index 3776989ef..7a7e605c9 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -2386,7 +2386,7 @@ HEIF_LIBS="" + HEIF_PKG="" + if test "x$with_heic" = "xyes"; then + AC_MSG_RESULT([-------------------------------------------------------------]) +- PKG_CHECK_MODULES([HEIF],[libheif >= 1.11.0],[have_heic=yes],[have_heic=no]) ++ PKG_CHECK_MODULES([HEIF],[libheif >= 1.7.0],[have_heic=yes],[have_heic=no]) + AC_MSG_RESULT([]) + fi + -- cgit