Update ImageMagick to 6.9.12.48

Change the way of calculte VER and Patchlevel which will fix the-new-hotness/release-monitoring.org's scratch build
Sync with Fedora builds
This commit is contained in:
Sérgio M. Basto 2022-05-08 04:50:42 +01:00
parent 354323ea73
commit 4a0cb27f7f
1 changed files with 90 additions and 108 deletions

View File

@ -1,5 +1,3 @@
%global VER 6.9.12
%global Patchlevel 44
# Disable automatic .la file removal
%global __brp_remove_la_files %nil
@ -11,44 +9,44 @@ Epoch: 1
%else
Epoch: 0
%endif
Version: %{VER}.%{Patchlevel}
Version: 6.9.12.48
Release: 1%{?dist}
Summary: An X application for displaying and manipulating images
%global VER %(foo=%{version}; echo ${foo:0:6})
%global Patchlevel %(foo=%{version}; echo ${foo:7})
License: ImageMagick
Url: http://www.imagemagick.org/
Source0: https://www.imagemagick.org/download/%{name}-%{VER}-%{Patchlevel}.tar.xz
Url: https://legacy.imagemagick.org/
Source0: https://www.imagemagick.org/download/releases/%{name}-%{VER}-%{Patchlevel}.tar.xz
#Patch0: ImageMagick-6.9.9-3-multiarch-implicit-pkgconfig-dir.patch
BuildRequires: bzip2-devel, freetype-devel, libjpeg-devel, libpng-devel
BuildRequires: libtiff-devel, giflib-devel, zlib-devel, perl-devel >= 5.8.1
BuildRequires: pkgconfig(bzip2), pkgconfig(freetype2), pkgconfig(libjpeg), pkgconfig(libpng)
BuildRequires: pkgconfig(libtiff-4), giflib-devel, pkgconfig(zlib), perl-devel >= 5.8.1
BuildRequires: perl-generators
%if 0%{?fedora} > 27
BuildRequires: libgs-devel, ghostscript-x11
%else
BuildRequires: ghostscript-devel
%endif
%if 0%{?fedora}
# These are not available in EPEL
BuildRequires: LibRaw-devel >= 0.14.8
BuildRequires: djvulibre-devel
BuildRequires: liblqr-1-devel
BuildRequires: pkgconfig(ddjvuapi)
BuildRequires: pkgconfig(libwmf), pkgconfig(jasper), libtool-ltdl-devel
BuildRequires: pkgconfig(x11), pkgconfig(xext), pkgconfig(xt)
BuildRequires: pkgconfig(lcms2), pkgconfig(libxml-2.0), pkgconfig(librsvg-2.0)
%if 0%{?fedora} > 34 || 0%{?epel} > 8
BuildRequires: pkgconfig(OpenEXR)
%else
%ifarch %{ix86} x86_64 %{power64}
# not in EPEL aarch64/s390x
BuildRequires: LibRaw-devel >= 0.14.8
BuildRequires: pkgconfig(IlmBase), pkgconfig(OpenEXR) < 2.5.6
%endif
%endif
BuildRequires: libwmf-devel, jasper-devel, libtool-ltdl-devel
BuildRequires: libX11-devel, libXext-devel, libXt-devel
BuildRequires: lcms2-devel, libxml2-devel, librsvg2-devel
BuildRequires: fftw-devel, ilmbase-devel, OpenEXR-devel, libwebp-devel
BuildRequires: pkgconfig(fftw3), pkgconfig(libwebp)
BuildRequires: jbigkit-devel
BuildRequires: openjpeg2-devel >= 2.1.0
BuildRequires: graphviz-devel >= 2.9.0
BuildRequires: libraqm-devel
BuildRequires: pkgconfig(libopenjp2) >= 2.1.0
BuildRequires: pkgconfig(libcgraph) >= 2.9.0
BuildRequires: pkgconfig(raqm)
%ifnarch s390x
# not in EPEL s390x
BuildRequires: pkgconfig(libraw) >= 0.14.8
%endif
BuildRequires: autoconf automake gcc gcc-c++
BuildRequires: make
Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release}
@ -71,14 +69,6 @@ ImageMagick-devel as well.
%package devel
Summary: Library links and header files for ImageMagick app development
Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release}
%if 0%{?fedora} > 27
Requires: libgs-devel
%else
Requires: ghostscript-devel
%endif
Requires: libX11-devel, libXext-devel, libXt-devel
Requires: bzip2-devel, freetype-devel, libtiff-devel, libjpeg-devel, lcms2-devel
Requires: libwebp-devel, OpenEXR-devel, jasper-devel, pkgconfig
Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release}
%description devel
@ -99,7 +89,6 @@ Summary: ImageMagick libraries to link with
This packages contains a shared libraries to use within other applications.
%if 0%{?fedora}
%package djvu
Summary: DjVu plugin for ImageMagick
Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release}
@ -107,7 +96,6 @@ Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release}
%description djvu
This packages contains a plugin for ImageMagick which makes it possible to
save and load DjvU files from ImageMagick and libMagickCore using applications.
%endif
%package doc
@ -162,10 +150,7 @@ however.
%prep
%setup -q -n %{name}-%{VER}-%{Patchlevel}
#%%patch0 -p1 -b .multiarch-implicit-pkgconfig-dir
%autosetup -p1 -n %{name}-%{VER}-%{Patchlevel}
# for %%doc
mkdir Magick++/examples
@ -195,24 +180,18 @@ export CFLAGS="%{optflags} -DIMPNG_SETJMP_IS_THREAD_SAFE"
--without-gcc-arch \
--with-jbig \
--with-openjp2 \
%if 0%{?fedora}
%ifnarch s390x
--with-raw \
--with-lqr \
%endif
--with-gvc \
--with-raqm
%else
%ifarch %{ix86} x86_64 %{power64}
--with-raw \
%endif
--with-gvc
%endif
# Do *NOT* use %%{?_smp_mflags}, this causes PerlMagick to be silently misbuild
make
%install
make %{?_smp_mflags} install DESTDIR=%{buildroot} INSTALL="install -p"
%make_install
cp -a www/source %{buildroot}%{_datadir}/doc/%{name}-%{VER}
# Delete *ONLY* _libdir/*.la files! .la files used internally to handle plugins - BUG#185237!!!
rm %{buildroot}%{_libdir}/*.la
@ -269,14 +248,14 @@ multilibFileVersions %{buildroot}%{_includedir}/%{name}-6/magick/version.h
%check
export LD_LIBRARY_PATH=%{buildroot}/%{_libdir}
make %{?_smp_mflags} check
%make_build check
rm PerlMagick/demo/Generic.ttf
%ldconfig_scriptlets libs
%ldconfig_scriptlets c++
%files
%doc README.txt LICENSE NOTICE AUTHORS.txt NEWS.txt ChangeLog.md
%doc README.txt LICENSE NOTICE AUTHORS.txt NEWS.txt
%{_bindir}/[a-z]*
%{_mandir}/man[145]/[a-z]*
%{_mandir}/man1/%{name}.*
@ -314,10 +293,8 @@ rm PerlMagick/demo/Generic.ttf
%{_mandir}/man1/Wand-config.*
%{_mandir}/man1/MagickWand-config.*
%if 0%{?fedora}
%files djvu
%{_libdir}/%{name}-%{VER}/modules-Q16/coders/djvu.*
%endif
%files doc
%doc %{_datadir}/doc/%{name}-6
@ -346,6 +323,11 @@ rm PerlMagick/demo/Generic.ttf
%doc PerlMagick/demo/ PerlMagick/Changelog PerlMagick/README.txt
%changelog
* Sun May 08 2022 Sérgio Basto <sergio@serjux.com> - 1:6.9.12.48-1
- Update ImageMagick to 6.9.12.48
- Change the way of calculte VER and Patchlevel which will fix the-new-hotness/release-monitoring.org's scratch build
- Sync with Fedora builds
* Mon Mar 28 2022 Luya Tshimbalanga <luya@fedoraproject.org> - 1:6.9.12.44-1
- New upstream release 6.9.12.44