add support to libheif and add html docs

This commit is contained in:
Sérgio M. Basto 2023-03-22 22:09:25 +00:00
parent be2a17c6fd
commit a30d676653
1 changed files with 33 additions and 1 deletions

View File

@ -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}