- remove ghostscript recommends OBS-URL: https://build.opensuse.org/package/show/graphics/ImageMagick?expand=0&rev=298
395 lines
15 KiB
RPMSpec
395 lines
15 KiB
RPMSpec
#
|
|
# spec file for package ImageMagick
|
|
#
|
|
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%define maj 7
|
|
%define mfr_version %{maj}.0.6
|
|
%define mfr_revision 7
|
|
%define quantum_depth 16
|
|
%define source_version %{mfr_version}-%{mfr_revision}
|
|
%define clibver 3
|
|
%define cwandver 3
|
|
%define cxxlibver 3
|
|
%define libspec -%{maj}_Q%{quantum_depth}HDRI
|
|
Name: ImageMagick
|
|
Version: %{mfr_version}.%{mfr_revision}
|
|
Release: 0
|
|
Summary: Viewer and Converter for Images
|
|
License: ImageMagick
|
|
Group: Productivity/Graphics/Other
|
|
Url: http://www.imagemagick.org
|
|
Source0: http://www.imagemagick.org/download/ImageMagick-%{mfr_version}-%{mfr_revision}.tar.xz
|
|
Source1: baselibs.conf
|
|
Source2: http://www.imagemagick.org/download/ImageMagick-%{mfr_version}-%{mfr_revision}.tar.xz.asc
|
|
Source3: ImageMagick.keyring
|
|
# suse specific patches
|
|
Patch0: ImageMagick-disable-insecure-coders.patch
|
|
# workaround, see https://github.com/ImageMagick/ImageMagick/issues/439
|
|
Patch1: ImageMagick-relax-filter.t.patch
|
|
Patch2: ImageMagick-library-installable-in-parallel.patch
|
|
BuildRequires: autoconf >= 2.69
|
|
BuildRequires: chrpath
|
|
BuildRequires: dcraw
|
|
BuildRequires: dejavu-fonts
|
|
BuildRequires: dos2unix
|
|
BuildRequires: fdupes
|
|
BuildRequires: gcc-c++
|
|
BuildRequires: libjasper-devel
|
|
BuildRequires: libjbig-devel
|
|
BuildRequires: libjpeg-devel
|
|
BuildRequires: libtool
|
|
BuildRequires: libwmf-devel
|
|
BuildRequires: lzma-devel
|
|
BuildRequires: mupdf-devel-static
|
|
BuildRequires: p7zip
|
|
BuildRequires: pkgconfig
|
|
BuildRequires: xdg-utils
|
|
BuildRequires: xz
|
|
BuildRequires: zip
|
|
BuildRequires: pkgconfig(OpenEXR)
|
|
BuildRequires: pkgconfig(bzip2)
|
|
BuildRequires: pkgconfig(ddjvuapi)
|
|
BuildRequires: pkgconfig(fftw3)
|
|
BuildRequires: pkgconfig(freetype2)
|
|
BuildRequires: pkgconfig(ijs)
|
|
BuildRequires: pkgconfig(lcms2)
|
|
BuildRequires: pkgconfig(libexif)
|
|
BuildRequires: pkgconfig(libopenjp2) >= 2.1.0
|
|
BuildRequires: pkgconfig(librsvg-2.0)
|
|
BuildRequires: pkgconfig(libtiff-4) >= 4.0.3
|
|
BuildRequires: pkgconfig(libwebp)
|
|
BuildRequires: pkgconfig(libxml-2.0)
|
|
BuildRequires: pkgconfig(lqr-1)
|
|
BuildRequires: pkgconfig(pango)
|
|
|
|
%package -n perl-PerlMagick
|
|
Summary: Perl interface for ImageMagick
|
|
Group: Development/Libraries/Perl
|
|
Requires: ImageMagick = %{version}
|
|
Requires: libMagickCore%{libspec}%{clibver} = %{version}
|
|
Requires: perl = %{perl_version}
|
|
|
|
%package devel
|
|
Summary: Include Files and Libraries Mandatory for Development
|
|
Group: Development/Libraries/C and C++
|
|
Requires: ImageMagick = %{version}
|
|
Requires: glibc-devel
|
|
Requires: libMagickCore%{libspec}%{clibver} = %{version}
|
|
Requires: libMagickWand%{libspec}%{cwandver} = %{version}
|
|
# bnc#741947:
|
|
Requires: pkgconfig(bzip2)
|
|
|
|
%package extra
|
|
Summary: Viewer and Converter for Images - extra codecs
|
|
Group: Productivity/Graphics/Other
|
|
Requires: ImageMagick = %{version}
|
|
Requires: libMagickCore%{libspec}%{clibver} = %{version}
|
|
Recommends: autotrace
|
|
Recommends: dcraw
|
|
Recommends: hp2xx
|
|
Recommends: libwmf
|
|
Recommends: netpbm
|
|
Recommends: transfig
|
|
|
|
%package -n libMagickCore%{libspec}%{clibver}
|
|
Summary: Viewer and Converter for Images - runtime library
|
|
Group: Productivity/Graphics/Other
|
|
Suggests: ImageMagick-extra = %{version}
|
|
|
|
%package -n libMagickWand%{libspec}%{cwandver}
|
|
Summary: Viewer and Converter for Images - runtime library
|
|
Group: Productivity/Graphics/Other
|
|
|
|
%package -n libMagick++%{libspec}%{cxxlibver}
|
|
Summary: C++ Interface for ImageMagick - runtime library
|
|
Group: Development/Libraries/C and C++
|
|
Requires: ImageMagick
|
|
|
|
%package -n libMagick++-devel
|
|
Summary: C++ Interface for ImageMagick - files mandatory for development
|
|
Group: Development/Libraries/C and C++
|
|
Requires: libMagick++%{libspec}%{cxxlibver} = %{version}
|
|
Requires: libstdc++-devel
|
|
Requires: pkgconfig(ImageMagick) = %{mfr_version}
|
|
|
|
%package doc
|
|
Summary: Document Files for ImageMagick Library
|
|
Group: Development/Libraries/C and C++
|
|
BuildArch: noarch
|
|
|
|
%description
|
|
ImageMagick is a robust collection of tools and libraries to read,
|
|
write, and manipulate an image in many image formats, including popular
|
|
formats like TIFF, JPEG, PNG, PDF, PhotoCD, and GIF. With ImageMagick,
|
|
you can create images dynamically, making it suitable for Web
|
|
applications. You can also resize, rotate, sharpen, color-reduce, or
|
|
add special effects to an image and save your completed work in many
|
|
different image formats. Image processing operations are available from
|
|
the command line as well as through C, C++, and PERL-based programming
|
|
interfaces.
|
|
|
|
%description devel
|
|
ImageMagick is a robust collection of tools and libraries to read,
|
|
write, and manipulate an image in many image formats, including popular
|
|
formats like TIFF, JPEG, PNG, PDF, PhotoCD, and GIF. With ImageMagick,
|
|
you can create images dynamically, making it suitable for Web
|
|
applications. You can also resize, rotate, sharpen, color-reduce, or
|
|
add special effects to an image and save your completed work in many
|
|
different image formats. Image processing operations are available from
|
|
the command line as well as through C, C++, and PERL-based programming
|
|
interfaces.
|
|
|
|
%description extra
|
|
This package adds support for djvu, wmf and jpeg2000 formats and
|
|
installs optional helper applications.
|
|
|
|
ImageMagick is a robust collection of tools and libraries to read,
|
|
write, and manipulate an image in many image formats, including popular
|
|
formats like TIFF, JPEG, PNG, PDF, PhotoCD, and GIF. With ImageMagick,
|
|
you can create images dynamically, making it suitable for Web
|
|
applications. You can also resize, rotate, sharpen, color-reduce, or
|
|
add special effects to an image and save your completed work in many
|
|
different image formats. Image processing operations are available from
|
|
the command line as well as through C, C++, and PERL-based programming
|
|
interfaces.
|
|
|
|
%description -n libMagickCore%{libspec}%{clibver}
|
|
ImageMagick is a robust collection of tools and libraries to read,
|
|
write, and manipulate an image in many image formats, including popular
|
|
formats like TIFF, JPEG, PNG, PDF, PhotoCD, and GIF. With ImageMagick,
|
|
you can create images dynamically, making it suitable for Web
|
|
applications. You can also resize, rotate, sharpen, color-reduce, or
|
|
add special effects to an image and save your completed work in many
|
|
different image formats. Image processing operations are available from
|
|
the command line as well as through C, C++, and PERL-based programming
|
|
interfaces.
|
|
|
|
%description -n libMagickWand%{libspec}%{cwandver}
|
|
ImageMagick is a robust collection of tools and libraries to read,
|
|
write, and manipulate an image in many image formats, including popular
|
|
formats like TIFF, JPEG, PNG, PDF, PhotoCD, and GIF. With ImageMagick,
|
|
you can create images dynamically, making it suitable for Web
|
|
applications. You can also resize, rotate, sharpen, color-reduce, or
|
|
add special effects to an image and save your completed work in many
|
|
different image formats. Image processing operations are available from
|
|
the command line as well as through C, C++, and PERL-based programming
|
|
interfaces.
|
|
|
|
%description -n perl-PerlMagick
|
|
PerlMagick is an objected-oriented Perl interface to ImageMagick. Use
|
|
the module to read, manipulate, or write an image or image sequence
|
|
from within a Perl script. This makes it suitable for Web CGI scripts.
|
|
|
|
%description -n libMagick++%{libspec}%{cxxlibver}
|
|
This is Magick++, the object-oriented C++ API for the ImageMagick
|
|
image-processing library.
|
|
|
|
Magick++ supports an object model inspired by PerlMagick. Magick++
|
|
should be faster than PerlMagick since it is written in a compiled
|
|
language which is not parsed at run-time. This makes it suitable for
|
|
Web CGI programs. Images support implicit reference counting so that
|
|
copy constructors and assignment incur almost no cost. The cost of
|
|
actually copying an image (if necessary) is done just before
|
|
modification and this copy is managed automatically by Magick++.
|
|
De-referenced copies are automatically deleted. The image objects
|
|
support value (rather than pointer) semantics so it is trivial to
|
|
support multiple generations of an image in memory at one time.
|
|
|
|
%description -n libMagick++-devel
|
|
This is Magick++, the object-oriented C++ API for the ImageMagick
|
|
image-processing library.
|
|
|
|
Magick++ supports an object model inspired by PerlMagick. Magick++
|
|
should be faster than PerlMagick since it is written in a compiled
|
|
language which is not parsed at run-time. This makes it suitable for
|
|
Web CGI programs. Images support implicit reference counting so that
|
|
copy constructors and assignment incur almost no cost. The cost of
|
|
actually copying an image (if necessary) is done just before
|
|
modification and this copy is managed automatically by Magick++.
|
|
De-referenced copies are automatically deleted. The image objects
|
|
support value (rather than pointer) semantics so it is trivial to
|
|
support multiple generations of an image in memory at one time.
|
|
|
|
%description doc
|
|
HTML documentation for ImageMagick library and scene examples.
|
|
|
|
%prep
|
|
%setup -q -n ImageMagick-%{source_version}
|
|
%patch0 -p1
|
|
%patch1 -p1
|
|
%patch2 -p1
|
|
|
|
%build
|
|
# make library binary package parallel installable
|
|
export MODULES_DIRNAME="modules%{libspec}%{clibver}"
|
|
export SHAREARCH_DIRNAME="config%{libspec}%{clibver}"
|
|
export CONFIGURE_RELATIVE_PATH="ImageMagick%{libspec}%{clibver}"
|
|
%configure \
|
|
--disable-silent-rules \
|
|
--enable-shared \
|
|
--without-frozenpaths \
|
|
--with-magick_plus_plus \
|
|
--with-modules \
|
|
--with-threads \
|
|
--with-perl \
|
|
--with-perl-options="INSTALLDIRS=vendor %{?perl_prefix} CC='gcc -L$PWD/magick/.libs' LDDLFLAGS='-shared -L$PWD/magick/.libs'" \
|
|
--disable-static \
|
|
--with-gvc \
|
|
--with-djvu \
|
|
--with-lcms \
|
|
--with-jbig \
|
|
--with-openjp2 \
|
|
--with-openexr \
|
|
--with-rsvg \
|
|
--with-webp \
|
|
--with-wmf \
|
|
--with-quantum-depth=%{quantum_depth} \
|
|
--without-gcc-arch \
|
|
--enable-pipes=no \
|
|
--enable-reproducible-build=yes
|
|
# don't build together, PerlMagick could be miscompiled when using parallel build[1]
|
|
# [1] http://pkgs.fedoraproject.org/cgit/ImageMagick.git/tree/ImageMagick.spec
|
|
make %{?_smp_mflags} all
|
|
make -j1 perl-build
|
|
# mostly because */demo is used later with %check
|
|
# polutting dir with .libs etc.
|
|
cp -r Magick++/demo Magick++/examples
|
|
cp -r PerlMagick/demo PerlMagick/examples
|
|
# other improvements
|
|
dos2unix www/api/*.php
|
|
chmod -x PerlMagick/demo/*.pl
|
|
|
|
%check
|
|
make %{?_smp_mflags} check
|
|
export MAGICK_CODER_MODULE_PATH=$PWD/coders/.libs
|
|
export MAGICK_CODER_FILTER_PATH=$PWD/filters/.libs
|
|
export MAGICK_CONFIGURE_PATH=$PWD/config
|
|
cd PerlMagick
|
|
%ifarch i586
|
|
# TODO test is failing completely (19/19), wrong
|
|
# checksums
|
|
rm t/montage.t
|
|
%endif
|
|
make %{?_smp_mflags} test
|
|
cd ..
|
|
|
|
%install
|
|
make install \
|
|
DESTDIR=%{buildroot} \
|
|
pkgdocdir=%{_defaultdocdir}/%{name}-%{maj}/
|
|
# symlink header file relative to /usr/include/ImageMagick-7/
|
|
# so that inclusions like wand/*.h and magick/*.h work
|
|
ln -s ./MagickCore %{buildroot}%{_includedir}/%{name}-%{maj}/magick
|
|
ln -s ./MagickWand %{buildroot}%{_includedir}/%{name}-%{maj}/wand
|
|
# these will be included via %doc
|
|
rm -r %{buildroot}%{_datadir}/doc/%{name}-%{maj}/
|
|
mv -t %{buildroot}%{_sysconfdir}/%{name}* %{buildroot}%{_datadir}/%{name}*/*.xml
|
|
rm %{buildroot}%{_libdir}/*.la
|
|
# remove RPATH from perl module
|
|
perl_module=$(find %{buildroot}%{_prefix}/lib/perl5 -name '*.so')
|
|
chmod 755 $perl_module
|
|
chrpath -d $perl_module
|
|
chmod 555 $perl_module
|
|
# remove %%{buildroot} from distributed file
|
|
sed -i 's:%{buildroot}::' %{buildroot}/%{_libdir}/ImageMagick-%{mfr_version}/config%{libspec}%{clibver}/configure.xml
|
|
#remove duplicates
|
|
%fdupes -s %{buildroot}%{_defaultdocdir}/%{name}-%{maj}
|
|
%fdupes -s %{buildroot}%{_includedir}/%{name}-%{maj}
|
|
%fdupes -s %{buildroot}%{_libdir}/pkgconfig
|
|
%perl_process_packlist
|
|
|
|
%post -n libMagickCore%{libspec}%{clibver} -p /sbin/ldconfig
|
|
%postun -n libMagickCore%{libspec}%{clibver} -p /sbin/ldconfig
|
|
%post -n libMagickWand%{libspec}%{cwandver} -p /sbin/ldconfig
|
|
%postun -n libMagickWand%{libspec}%{cwandver} -p /sbin/ldconfig
|
|
%post -n libMagick++%{libspec}%{cxxlibver} -p /sbin/ldconfig
|
|
%postun -n libMagick++%{libspec}%{cxxlibver} -p /sbin/ldconfig
|
|
|
|
%files
|
|
%doc LICENSE ChangeLog NEWS.txt
|
|
%{_bindir}/[^MW]*
|
|
%{_mandir}/man1/*
|
|
%exclude %{_mandir}/man1/*-config.1%{ext_man}
|
|
|
|
%files -n libMagickCore%{libspec}%{clibver}
|
|
%doc LICENSE ChangeLog NEWS.txt
|
|
%{_libdir}/libMagickCore*.so.%{clibver}*
|
|
%dir %{_sysconfdir}/ImageMagick*
|
|
%config %{_sysconfdir}/ImageMagick*/*
|
|
%dir %{_libdir}/ImageMagick*
|
|
%dir %{_libdir}/ImageMagick*/modules*
|
|
%dir %{_libdir}/ImageMagick*/modules*/*
|
|
%exclude %{_libdir}/ImageMagick*/modules*/*/wmf.*
|
|
%exclude %{_libdir}/ImageMagick*/modules*/*/jp2.*
|
|
%exclude %{_libdir}/ImageMagick*/modules*/*/djvu.*
|
|
%{_libdir}/ImageMagick*/modules*/*/*.so
|
|
# don't remove la files, see bnc#579798
|
|
%{_libdir}/ImageMagick*/modules*/*/*.la
|
|
%{_libdir}/ImageMagick*/config*
|
|
|
|
%files -n libMagickWand%{libspec}%{cwandver}
|
|
%{_libdir}/libMagickWand*.so.%{cwandver}*
|
|
|
|
%files extra
|
|
%{_libdir}/ImageMagick*/modules*/*/wmf.so
|
|
# don't remove la files, see bnc#579798
|
|
%{_libdir}/ImageMagick*/modules*/*/jp2.so
|
|
%{_libdir}/ImageMagick*/modules*/*/jp2.la
|
|
%{_libdir}/ImageMagick*/modules*/*/djvu.so
|
|
%{_libdir}/ImageMagick*/modules*/*/djvu.la
|
|
|
|
%files devel
|
|
%{_libdir}/libMagickCore*.so
|
|
%{_libdir}/libMagickWand*.so
|
|
%dir %{_includedir}/ImageMagick*
|
|
%{_includedir}/ImageMagick*/MagickCore
|
|
%{_includedir}/ImageMagick*/MagickWand
|
|
%{_includedir}/ImageMagick*/magick
|
|
%{_includedir}/ImageMagick*/wand
|
|
%{_bindir}/MagickCore-config
|
|
%{_bindir}/MagickWand-config
|
|
%{_libdir}/pkgconfig/MagickCore*.pc
|
|
%{_libdir}/pkgconfig/ImageMagick*.pc
|
|
%{_libdir}/pkgconfig/MagickWand*.pc
|
|
%{_mandir}/man1/*-config.1%{ext_man}
|
|
%exclude %{_mandir}/man1/Magick++-config.1%{ext_man}
|
|
|
|
%files -n perl-PerlMagick
|
|
%doc PerlMagick/README.txt
|
|
%doc PerlMagick/examples
|
|
%{_mandir}/man3/*
|
|
%{perl_vendorarch}/auto/Image
|
|
%{perl_vendorarch}/Image
|
|
|
|
%files -n libMagick++%{libspec}%{cxxlibver}
|
|
%{_libdir}/libMagick++*.so.%{cxxlibver}*
|
|
|
|
%files -n libMagick++-devel
|
|
%doc Magick++/examples
|
|
%doc Magick++/NEWS Magick++/README Magick++/AUTHORS
|
|
%{_libdir}/libMagick++*.so
|
|
%{_includedir}/ImageMagick*/Magick++.h
|
|
%{_includedir}/ImageMagick*/Magick++
|
|
%{_bindir}/Magick++-config
|
|
%{_libdir}/pkgconfig/Magick++*.pc
|
|
%{_mandir}/man1/Magick++-config.1%{ext_man}
|
|
|
|
%files doc
|
|
%{_defaultdocdir}/%{name}-%{maj}
|
|
|
|
%changelog
|