From b8a0f403cb3e7c38c7192317a5c954dcce8be570 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 24 Jan 2022 08:18:19 +0100 Subject: update to version 7.1.0 patch level 20 add weak dependencies on default fonts open https://github.com/ImageMagick/ImageMagick/issues/4747 Broken build with old libheif and revert upstream changes on EL7 --- ImageMagick7.spec | 24 ++++++++++++++++++++++-- heic-el7.patch | 43 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+), 2 deletions(-) create mode 100644 heic-el7.patch diff --git a/ImageMagick7.spec b/ImageMagick7.spec index 09d5274..99a7161 100644 --- a/ImageMagick7.spec +++ b/ImageMagick7.spec @@ -9,7 +9,7 @@ # Please preserve changelog entries # %global VER 7.1.0 -%global Patchlevel 19 +%global Patchlevel 20 %global incsuffixe -7 %global libsuffixe -7.Q16HDRI %bcond_without tests @@ -51,6 +51,8 @@ Url: http://www.imagemagick.org/ #Source0: ftp://ftp.imagemagick.org/pub/ImageMagick/releases/ImageMagick-%%{VER}-%%{Patchlevel}.tar.xz Source0: https://www.imagemagick.org/download/ImageMagick-%{VER}-%{Patchlevel}.tar.xz +Patch0: heic-el7.patch + BuildRequires: gcc BuildRequires: gcc-c++ %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 @@ -210,10 +212,18 @@ however. %package libs -Summary: Commands for ImageMagick +Summary: ImageMagick library %if "%{name}" == "%{libname}" Obsoletes: %{libname}7-libs <= %{version}-%{release} %endif +# default font is OpenSans-Regular +%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +Recommends: urw-base35-fonts +Recommends: open-sans-fonts +%else +Requires: urw-base35-fonts +Requires: open-sans-fonts +%endif %description libs Provides the shared libraries and plugins of %{name}. @@ -350,6 +360,9 @@ however. %prep %setup -q -n %{libname}-%{VER}-%{Patchlevel} +%if 0%{?rhel} == 7 +%patch0 -p1 -R +%endif # for %%doc mkdir Magick++/examples @@ -600,6 +613,13 @@ fi %changelog +* Mon Jan 24 2022 Remi Collet - 7.1.0.20-1 +- update to version 7.1.0 patch level 20 +- add weak dependencies on default fonts +- open https://github.com/ImageMagick/ImageMagick/issues/4747 + Broken build with old libheif + and revert upstream changes on EL7 + * Thu Dec 23 2021 Remi Collet - 7.1.0.19-1 - update to version 7.1.0 patch level 19 diff --git a/heic-el7.patch b/heic-el7.patch new file mode 100644 index 0000000..730bf81 --- /dev/null +++ b/heic-el7.patch @@ -0,0 +1,43 @@ +From 1b89b2b729238758a98c596c256a1d5753fa5670 Mon Sep 17 00:00:00 2001 +From: Cristy +Date: Wed, 19 Jan 2022 18:40:35 -0500 +Subject: [PATCH] AVIF is supported by the HEIC coder + +--- + coders/heic.c | 18 +++++++----------- + coders/miff.c | 4 ++-- + coders/mpc.c | 7 +++---- + 3 files changed, 12 insertions(+), 17 deletions(-) + +diff --git a/coders/heic.c b/coders/heic.c +index c17ec7848c..29c5fbc0a9 100644 +--- a/coders/heic.c ++++ b/coders/heic.c +@@ -586,20 +586,16 @@ static Image *ReadHEICImage(const ImageInfo *image_info, + */ + static MagickBooleanType IsHEIC(const unsigned char *magick,const size_t length) + { ++#if defined(MAGICKCORE_HEIC_DELEGATE) ++ enum heif_filetype_result ++ heif_filetype; ++ + if (length < 12) + return(MagickFalse); +- if (LocaleNCompare((const char *) magick+4,"ftyp",4) != 0) +- return(MagickFalse); +- if (LocaleNCompare((const char *) magick+8,"avif",4) == 0) +- return(MagickTrue); +- if (LocaleNCompare((const char *) magick+8,"heic",4) == 0) +- return(MagickTrue); +- if (LocaleNCompare((const char *) magick+8,"heix",4) == 0) +- return(MagickTrue); +- if (LocaleNCompare((const char *) magick+8,"mif1",4) == 0) +- return(MagickTrue); +- if (LocaleNCompare((const char *) magick+8,"msf1",4) == 0) ++ heif_filetype=heif_check_filetype(magick,(int) length); ++ if (heif_filetype == heif_filetype_yes_supported) + return(MagickTrue); ++#endif + return(MagickFalse); + } + -- cgit