From a30d67665391ca537d82135c9275ab36aec5fb3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Wed, 22 Mar 2023 22:09:25 +0000 Subject: [PATCH] add support to libheif and add html docs --- ImageMagick.spec | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/ImageMagick.spec b/ImageMagick.spec index 4acfdd9..9d12bac 100644 --- a/ImageMagick.spec +++ b/ImageMagick.spec @@ -1,5 +1,7 @@ %bcond_without tests +%bcond_without libheif + # Disable automatic .la file removal %global __brp_remove_la_files %nil @@ -78,6 +80,8 @@ BuildRequires: urw-base35-fonts-devel BuildRequires: autoconf automake gcc gcc-c++ BuildRequires: make BuildRequires: gnupg2 +# for doc +BuildRequires: doxygen Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release} # allow smooth upgrade for 3rd party repository @@ -125,6 +129,8 @@ Obsoletes: %{name}7-libs < %{epoch}:%{version}-%{release} Provides: %{name}7-libs = %{epoch}:%{version}-%{release} # These may be used for some functions Recommends: urw-base35-fonts +# default font is OpenSans-Regular +Recommends: open-sans-fonts %description libs This packages contains a shared libraries to use within other applications. @@ -141,6 +147,22 @@ This packages contains a plugin for ImageMagick which makes it possible to save and load DjvU files from ImageMagick and libMagickCore using applications. +%if %{with libheif} +%package heic +Summary: HEIC plugin for ImageMagick +BuildRequires: pkgconfig(libheif) >= 1.4.0 +%if 0%{?rhel} == 7 +# ensure we use our on EL-7 +Requires: libheif%{?_isa} >= 1.4.0 +%endif +Requires: %{name}-libs%{?_isa} = %{version}-%{release} + +%description heic +This packages contains a plugin for ImageMagick which makes it possible to +save and load HEIC files from ImageMagick and libMagickCore using applications. +%endif + + %package doc Summary: ImageMagick html documentation Obsoletes: %{name}7-doc < %{epoch}:%{version}-%{release} @@ -240,10 +262,15 @@ export CFLAGS="%{optflags} -DIMPNG_SETJMP_IS_THREAD_SAFE" --with-lqr \ %endif --with-gvc \ - --with-raqm + --with-raqm \ +%if %{with libheif} + --with-heic \ +%endif # Do *NOT* use %%{?_smp_mflags}, this causes PerlMagick to be silently misbuild make +# Generate API docs +make html-local %install @@ -356,6 +383,11 @@ rm PerlMagick/demo/Generic.ttf %files djvu %{_libdir}/%{name}-%{VER}/modules-Q16HDRI/coders/djvu.* +%if %{with libheif} +%files heic +%{_libdir}/%{name}-%{VER}/modules-Q16HDRI/coders/heic.* +%endif + %files doc %doc %{_datadir}/doc/%{name}-7 %doc %{_datadir}/doc/%{name}-%{VER}