@ -1,16 +1,14 @@
%global VER 7.0.6
%global VER 6.9.9
%global Patchlevel 9
%global Patchlevel 9
Name: ImageMagick
Name: ImageMagick
Version: %{VER}.%{Patchlevel}
Version: %{VER}.%{Patchlevel}
Release: 4 %{?dist}
Release: 1 %{?dist}
Summary: Use ImageMagick to convert, edit, or compose bitmap images in a variety of formats. In addition resize, rotate, shear, distort and transform images.
Summary: An X application for displaying and manipulating images
Group: Applications/Multimedia
Group: Applications/Multimedia
License: https://www.imagemagick.org/script/license.php
License: ImageMagick
Url: https://www.imagemagick.org/
Url: http://www.imagemagick.org/
Source0: https://www.imagemagick.org/download/%{name}/%{name}-%{VER}-%{Patchlevel}.tar.bz2
Source0: https://www.imagemagick.org/download/%{name}-%{VER}-%{Patchlevel}.tar.xz
# workaround for https://bugzilla.redhat.com/show_bug.cgi?id=1484579
Patch0: ImageMagick-7.0.6-9-skip-tests.patch
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
@ -25,6 +23,8 @@ BuildRequires: fftw-devel, OpenEXR-devel, libwebp-devel
BuildRequires: jbigkit-devel
BuildRequires: jbigkit-devel
BuildRequires: openjpeg2-devel >= 2.1.0
BuildRequires: openjpeg2-devel >= 2.1.0
Patch0: ImageMagick-6.9.9-3-multiarch-implicit-pkgconfig-dir.patch
%description
%description
ImageMagick is an image display and manipulation tool for the X
ImageMagick is an image display and manipulation tool for the X
Window System. ImageMagick can read and write JPEG, TIFF, PNM, GIF,
Window System. ImageMagick can read and write JPEG, TIFF, PNM, GIF,
@ -42,12 +42,12 @@ ImageMagick-devel as well.
%package devel
%package devel
Summary: Library links and header files for ImageMagick application development
Summary: Library links and header files for ImageMagick app development
Group: Development/Libraries
Group: Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: libX11-devel, libXext-devel, libXt-devel, ghostscript-devel, jasper-devel, libtool-ltdl-devel
Requires: libX11-devel, libXext-devel, libXt-devel, ghostscript-devel
Requires: bzip2-devel, freetype-devel, libtiff-devel, libjpeg-devel, lcms2-devel
Requires: bzip2-devel, freetype-devel, libtiff-devel, libjpeg-devel, lcms2-devel
Requires: libwebp-devel, OpenEXR-devel, openjpeg2 -devel, pkgconfig
Requires: libwebp-devel, OpenEXR-devel, jasper -devel, pkgconfig
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
%description devel
%description devel
@ -137,18 +137,15 @@ however.
%prep
%prep
%setup -q -n %{name}-%{VER}-%{Patchlevel}
%setup -q -n %{name}-%{VER}-%{Patchlevel}
# skip some tests on big endian arches
%patch0 -p1 -b .multiarch-implicit-pkgconfig-dir
# https://bugzilla.redhat.com/show_bug.cgi?id=1484579
%ifarch ppc64 s390x
%patch0 -p1 -b .big-endian
%endif
# for %%doc
# for %%doc
mkdir Magick++/examples
mkdir Magick++/examples
cp -p Magick++/demo/*.cpp Magick++/demo/*.miff Magick++/examples
cp -p Magick++/demo/*.cpp Magick++/demo/*.miff Magick++/examples
%build
%build
%configure --enable-shared \
%configure \
--enable-shared \
--disable-static \
--disable-static \
--with-modules \
--with-modules \
--with-perl \
--with-perl \
@ -161,7 +158,7 @@ cp -p Magick++/demo/*.cpp Magick++/demo/*.miff Magick++/examples
--with-openexr \
--with-openexr \
--with-rsvg \
--with-rsvg \
--with-xml \
--with-xml \
--with-perl-options="INSTALLDIRS=vendor %{?perl_prefix} CC='%__cc -L$PWD/MagickCore/.libs' LDDLFLAGS='-shared -L$PWD/MagickCore /.libs'" \
--with-perl-options="INSTALLDIRS=vendor %{?perl_prefix} CC='%__cc -L$PWD/magick/.libs' LDDLFLAGS='-shared -L$PWD/magick /.libs'" \
--without-dps \
--without-dps \
--without-gcc-arch \
--without-gcc-arch \
--with-jbig \
--with-jbig \
@ -177,9 +174,6 @@ cp -a www/source %{buildroot}%{_datadir}/doc/%{name}-%{VER}
# Delete *ONLY* _libdir/*.la files! .la files used internally to handle plugins - BUG#185237!!!
# Delete *ONLY* _libdir/*.la files! .la files used internally to handle plugins - BUG#185237!!!
rm %{buildroot}%{_libdir}/*.la
rm %{buildroot}%{_libdir}/*.la
# fix weird perl Magick.so permissions
chmod 755 %{buildroot}%{perl_vendorarch}/auto/Image/Magick/*/*.so
# perlmagick: fix perl path of demo files
# perlmagick: fix perl path of demo files
%{__perl} -MExtUtils::MakeMaker -e 'MY->fixin(@ARGV)' PerlMagick/demo/*.pl
%{__perl} -MExtUtils::MakeMaker -e 'MY->fixin(@ARGV)' PerlMagick/demo/*.pl
@ -222,9 +216,9 @@ cat >$1 <<EOF
EOF
EOF
}
}
multilibFileVersions %{buildroot}%{_includedir}/%{name}-7/MagickCore /magick-config.h
multilibFileVersions %{buildroot}%{_includedir}/%{name}-6/magick /magick-config.h
multilibFileVersions %{buildroot}%{_includedir}/%{name}-7/MagickCore /magick-baseconfig.h
multilibFileVersions %{buildroot}%{_includedir}/%{name}-6/magick /magick-baseconfig.h
multilibFileVersions %{buildroot}%{_includedir}/%{name}-7/MagickCore /version.h
multilibFileVersions %{buildroot}%{_includedir}/%{name}-6/magick /version.h
# Fonts must be packaged separately. It does not have matter and demos work without it.
# Fonts must be packaged separately. It does not have matter and demos work without it.
@ -251,52 +245,60 @@ make %{?_smp_mflags} check
%files libs
%files libs
%doc LICENSE NOTICE AUTHORS.txt QuickStart.txt
%doc LICENSE NOTICE AUTHORS.txt QuickStart.txt
%{_libdir}/libMagickCore-7.Q16HDRI.so. *
%{_libdir}/libMagickCore-6.Q16.so.5 *
%{_libdir}/libMagickWand-7.Q16HDRI.so. *
%{_libdir}/libMagickWand-6.Q16.so.5 *
%{_libdir}/%{name}-%{VER}
%{_libdir}/%{name}-%{VER}
%{_datadir}/%{name}-7
%{_datadir}/%{name}-6
%exclude %{_libdir}/%{name}-%{VER}/modules-Q16HDRI /coders/djvu.*
%exclude %{_libdir}/%{name}-%{VER}/modules-Q16/coders/djvu.*
%dir %{_sysconfdir}/%{name}-7
%dir %{_sysconfdir}/%{name}-6
%config(noreplace) %{_sysconfdir}/%{name}-7 /*.xml
%config(noreplace) %{_sysconfdir}/%{name}-6 /*.xml
%files devel
%files devel
%{_bindir}/MagickCore-config
%{_bindir}/MagickCore-config
%{_bindir}/Magick-config
%{_bindir}/MagickWand-config
%{_bindir}/MagickWand-config
%{_libdir}/libMagickCore-7.Q16HDRI.so
%{_bindir}/Wand-config
%{_libdir}/libMagickWand-7.Q16HDRI.so
%{_libdir}/libMagickCore-6.Q16.so
%{_libdir}/libMagickWand-6.Q16.so
%{_libdir}/pkgconfig/MagickCore.pc
%{_libdir}/pkgconfig/MagickCore.pc
%{_libdir}/pkgconfig/MagickCore-7.Q16HDRI .pc
%{_libdir}/pkgconfig/MagickCore-6.Q16 .pc
%{_libdir}/pkgconfig/ImageMagick.pc
%{_libdir}/pkgconfig/ImageMagick.pc
%{_libdir}/pkgconfig/ImageMagick-7.Q16HDRI .pc
%{_libdir}/pkgconfig/ImageMagick-6.Q16 .pc
%{_libdir}/pkgconfig/MagickWand.pc
%{_libdir}/pkgconfig/MagickWand.pc
%{_libdir}/pkgconfig/MagickWand-7.Q16HDRI.pc
%{_libdir}/pkgconfig/MagickWand-6.Q16.pc
%dir %{_includedir}/%{name}-7
%{_libdir}/pkgconfig/Wand.pc
%{_includedir}/%{name}-7/MagickCore
%{_libdir}/pkgconfig/Wand-6.Q16.pc
%{_includedir}/%{name}-7/MagickWand
%dir %{_includedir}/%{name}-6
%{_includedir}/%{name}-6/magick
%{_includedir}/%{name}-6/wand
%{_mandir}/man1/Magick-config.*
%{_mandir}/man1/MagickCore-config.*
%{_mandir}/man1/MagickCore-config.*
%{_mandir}/man1/Wand-config.*
%{_mandir}/man1/MagickWand-config.*
%{_mandir}/man1/MagickWand-config.*
%files djvu
%files djvu
%{_libdir}/%{name}-%{VER}/modules-Q16HDRI /coders/djvu.*
%{_libdir}/%{name}-%{VER}/modules-Q16/coders/djvu.*
%files doc
%files doc
%doc %{_datadir}/doc/%{name}-7
%doc %{_datadir}/doc/%{name}-6
%doc %{_datadir}/doc/%{name}-%{VER}
%doc %{_datadir}/doc/%{name}-%{VER}
%doc LICENSE
%doc LICENSE
%files c++
%files c++
%doc Magick++/AUTHORS Magick++/ChangeLog Magick++/NEWS Magick++/README
%doc Magick++/AUTHORS Magick++/ChangeLog Magick++/NEWS Magick++/README
%doc www/Magick++/COPYING
%doc www/Magick++/COPYING
%{_libdir}/libMagick++-7.Q16HDRI.so. *
%{_libdir}/libMagick++-6.Q16.so.8 *
%files c++-devel
%files c++-devel
%doc Magick++/examples
%doc Magick++/examples
%{_bindir}/Magick++-config
%{_bindir}/Magick++-config
%{_includedir}/%{name}-7 /Magick++
%{_includedir}/%{name}-6 /Magick++
%{_includedir}/%{name}-7 /Magick++.h
%{_includedir}/%{name}-6 /Magick++.h
%{_libdir}/libMagick++-7.Q16HDRI .so
%{_libdir}/libMagick++-6.Q16 .so
%{_libdir}/pkgconfig/Magick++.pc
%{_libdir}/pkgconfig/Magick++.pc
%{_libdir}/pkgconfig/Magick++-7.Q16HDRI.pc
%{_libdir}/pkgconfig/Magick++-6.Q16.pc
%{_libdir}/pkgconfig/ImageMagick++.pc
%{_libdir}/pkgconfig/ImageMagick++-6.Q16.pc
%{_mandir}/man1/Magick++-config.*
%{_mandir}/man1/Magick++-config.*
%files perl -f perl-pkg-files
%files perl -f perl-pkg-files
@ -304,6 +306,9 @@ make %{?_smp_mflags} check
%doc PerlMagick/demo/ PerlMagick/Changelog PerlMagick/README.txt
%doc PerlMagick/demo/ PerlMagick/Changelog PerlMagick/README.txt
%changelog
%changelog
* Thu Aug 24 2017 Michael Cronenworth <mike@cchtml.com> - 6.9.9.9-1
- Update to 6.9.9-9 (for F27 and Rawhide, revert to 6.9.9-9)
* Thu Aug 24 2017 Adam Williamson <awilliam@redhat.com> - 7.0.6.9-4
* Thu Aug 24 2017 Adam Williamson <awilliam@redhat.com> - 7.0.6.9-4
- Correct versioning (patchlevel is *upstream*, not downstream)
- Correct versioning (patchlevel is *upstream*, not downstream)