File GraphicsMagick.spec of Package GraphicsMagick.7782
#
# spec file for package GraphicsMagick
#
# Copyright (c) 2018 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/
#
Name: GraphicsMagick
Version: 1.3.25
Release: 0
# Define Quantum depth
%define quant 16
%define base_version 1.3
%define so_ver 3
%define pp_so_ver 12
%define wand_so_ver 2
Summary: Viewer and Converter for Images
License: MIT
Group: Productivity/Graphics/Convertors
Url: http://www.GraphicsMagick.org/
Source: ftp://ftp.GraphicsMagick.org/pub/%{name}/%{base_version}/%{name}-%{version}.tar.bz2
# following typemap file is needed for building PerlMagick with perl 5.16;
# should be present in Graphics Magick 1.4.0
Source1: typemap
Patch0: %{name}-perl-link.patch
Patch2: %{name}-debian-fixed.patch
Patch10: %{name}-include.patch
Patch11: GraphicsMagick-CVE-2016-5118.patch
Patch12: GraphicsMagick-CVE-2014-9805.patch
Patch13: GraphicsMagick-CVE-2014-9846.patch
Patch14: GraphicsMagick-CVE-2014-9807.patch
Patch15: GraphicsMagick-CVE-2014-9809.patch
Patch16: GraphicsMagick-CVE-2014-9815.patch
Patch17: GraphicsMagick-CVE-2014-9817.patch
Patch18: GraphicsMagick-CVE-2014-9820.patch
Patch19: GraphicsMagick-CVE-2014-9834.patch
Patch20: GraphicsMagick-CVE-2014-9835,9831.patch
Patch21: GraphicsMagick-CVE-2014-9837.patch
Patch22: GraphicsMagick-CVE-2014-9845.patch
Patch23: GraphicsMagick-CVE-2014-9853.patch
Patch24: GraphicsMagick-CVE-2016-7529.patch
Patch25: GraphicsMagick-CVE-2016-7528.patch
Patch26: GraphicsMagick-CVE-2016-7515.patch
Patch27: GraphicsMagick-CVE-2016-7522.patch
Patch28: GraphicsMagick-CVE-2016-7531.patch
Patch29: GraphicsMagick-CVE-2016-7533.patch
Patch30: GraphicsMagick-CVE-2016-7537.patch
Patch31: GraphicsMagick-CVE-2016-6823.patch
Patch32: GraphicsMagick-CVE-2016-7101.patch
Patch33: GraphicsMagick-write-tiff-div-by-zero.patch
Patch34: GraphicsMagick-buffer-overflow-map.patch
Patch35: GraphicsMagick-CVE-2016-7800.patch
Patch36: GraphicsMagick-CVE-2016-7996,7997.patch
Patch37: GraphicsMagick-CVE-2016-8684.patch
Patch38: GraphicsMagick-CVE-2016-8682.patch
Patch39: GraphicsMagick-CVE-2016-8683.patch
Patch40: GraphicsMagick-CVE-2016-8862.patch
Patch41: GraphicsMagick-CVE-2016-9556.patch
Patch42: GraphicsMagick-CVE-2016-8866.patch
Patch43: GraphicsMagick-CVE-2016-9830.patch
Patch44: GraphicsMagick-CVE-2016-10050.patch
Patch45: GraphicsMagick-CVE-2016-10051.patch
Patch46: GraphicsMagick-CVE-2016-10052.patch
Patch47: GraphicsMagick-CVE-2016-10048.patch
Patch48: GraphicsMagick-CVE-2016-10146.patch
Patch49: GraphicsMagick-CVE-2017-5511.patch
Patch50: GraphicsMagick-CVE-2016-10068.patch
Patch51: GraphicsMagick-CVE-2016-10070.patch
Patch52: GraphicsMagick-CVE-2017-6335.patch
Patch53: GraphicsMagick-CVE-2017-8350.patch
Patch54: GraphicsMagick-CVE-2017-8351.patch
Patch55: GraphicsMagick-CVE-2017-8353.patch
Patch56: GraphicsMagick-CVE-2017-8355.patch
Patch57: GraphicsMagick-CVE-2017-9142.patch
Patch58: GraphicsMagick-CVE-2017-11403.patch
Patch59: GraphicsMagick-CVE-2017-11643.patch
Patch60: GraphicsMagick-CVE-2017-11636.patch
Patch61: GraphicsMagick-CVE-2017-14532.patch
Patch62: GraphicsMagick-CVE-2017-15033.patch
Patch63: GraphicsMagick-CVE-2017-13775.patch
Patch64: GraphicsMagick-CVE-2017-13063,13064,13065.patch
Patch65: GraphicsMagick-CVE-2017-12937.patch
Patch66: GraphicsMagick-CVE-2017-13139.patch
Patch67: GraphicsMagick-CVE-2017-12936.patch
Patch68: GraphicsMagick-CVE-2017-14165.patch
Patch69: GraphicsMagick-CVE-2017-12983.patch
Patch70: GraphicsMagick-CVE-2017-15930.patch
Patch71: GraphicsMagick-CVE-2017-13134.patch
Patch72: GraphicsMagick-CVE-2017-13776,13777.patch
Patch73: GraphicsMagick-CVE-2017-14342.patch
Patch74: GraphicsMagick-CVE-2017-14341.patch
Patch75: GraphicsMagick-CVE-2017-16546.patch
Patch76: GraphicsMagick-CVE-2017-16545.patch
Patch77: GraphicsMagick-CVE-2017-16669.patch
Patch78: GraphicsMagick-CVE-2017-13737.patch
Patch79: GraphicsMagick-CVE-2017-11640.patch
Patch80: GraphicsMagick-CVE-2017-10799.patch
Patch81: GraphicsMagick-CVE-2017-14994.patch
Patch82: GraphicsMagick-CVE-2017-12140,12644.patch
Patch83: GraphicsMagick-CVE-2017-12662.patch
Patch84: GraphicsMagick-CVE-2017-14733.patch
Patch85: GraphicsMagick-CVE-2017-15277.patch
Patch86: GraphicsMagick-CVE-2017-14042.patch
Patch87: GraphicsMagick-CVE-2017-14504.patch
Patch88: GraphicsMagick-CVE-2017-17498.patch
Patch89: GraphicsMagick-pwp.c-memory-leak.patch
Patch90: GraphicsMagick-CVE-2017-16547.patch
Patch91: GraphicsMagick-CVE-2017-11449.patch
Patch92: GraphicsMagick-CVE-2017-11532.patch
Patch93: GraphicsMagick-mat.c-update.patch
Patch94: GraphicsMagick-CVE-2017-18022.patch
Patch95: GraphicsMagick-png.c-update.patch
Patch96: GraphicsMagick-CVE-2018-5685.patch
Patch97: GraphicsMagick-CVE-2017-17912.patch
Patch98: GraphicsMagick-CVE-2017-18028.patch
Patch99: GraphicsMagick-CVE-2017-14224.patch
Patch100: GraphicsMagick-CVE-2017-11450.patch
Patch101: GraphicsMagick-CVE-2017-11140.patch
Patch102: GraphicsMagick-dcm.c-update.patch
Patch103: GraphicsMagick-cmyk.c-update.patch
BuildRequires: cups-client
BuildRequires: dcraw
BuildRequires: freetype2-devel
BuildRequires: gcc-c++
BuildRequires: ghostscript-fonts-other
BuildRequires: ghostscript-fonts-std
BuildRequires: ghostscript-library
BuildRequires: libbz2-devel
BuildRequires: libjasper-devel
BuildRequires: libjbig-devel
BuildRequires: liblcms2-devel
BuildRequires: libltdl-devel
BuildRequires: libtiff-devel
BuildRequires: libwebp-devel
BuildRequires: libwmf-devel
BuildRequires: libxml2-devel
BuildRequires: pkgconfig
Requires: xorg-x11-fonts
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
GraphicsMagick(TM) provides a powerful image manipulation
andtranslation utility. It is capable of displaying still images and
animations using the X Window system which provides a simple interface
forinteractively editing images, and is capable of importing selected
windows or the entire desktop. GraphicsMagick is one of your choices if
you need a program to manipulate and display images.It can read and
write over 88 image formats, including JPEG, TIFF, WMF, SVG, PNG, PNM,
GIF, andPhoto CD. Besides it allows you to resize, rotate, sharpen,
color reduce, or add special effects to an image and to save the result
to any supported format. GraphicsMagick may be used to create animated
or transparent .gifs, to composite images, to create thumbnail images
and a lot more. If you want to develop your own applications which use
GraphicsMagick code or APIs, you need to install GraphicsMagick-devel
as well.
This package is compiled with Q%{quant}, which means that it provides better
performance on %{quant} bit images and less.
%package -n libGraphicsMagick-Q%{quant}-%{so_ver}
Summary: Viewer and Converter for Images - runtime library
Group: System/Libraries
Requires: libGraphicsMagick3-config = %{version}
%description -n libGraphicsMagick-Q%{quant}-%{so_ver}
GraphicsMagick(TM) provides a powerful image manipulation and
translation utility. It is capable of displaying still images and
animations using the X Window system, provides a simple interface for
interactively editing images, and is capable of importing selected
windows or the entire desktop. GraphicsMagick can read and write over
88 image formats, including JPEG, TIFF, WMF, SVG, PNG, PNM, GIF, and
Photo CD. It can resize, rotate, sharpen, color reduce, or add special
effects to the image and save the result to any supported format.
GraphicsMagick may be used to create animated or transparent .gifs,
create composite images, create thumbnail images, and much, much, more.
GraphicsMagick is one of your choices if you need a program to
manipulate and display images. If you want to develop your own
applications which use GraphicsMagick code or APIs, you need to install
GraphicsMagick-devel as well.
This package is compiled with Q%{quant}, that means it provides better
performance on %{quant} and less bit images.
%package -n libGraphicsMagick%{so_ver}-config
Summary: Viewer and Converter for Images - library config
Group: Productivity/Graphics/Convertors
%description -n libGraphicsMagick%{so_ver}-config
GraphicsMagick(TM) provides a powerful image manipulation and
translation utility. It is capable of displaying still images and
animations using the X Window system, provides a simple interface for
interactively editing images, and is capable of importing selected
windows or the entire desktop. GraphicsMagick can read and write over
88 image formats, including JPEG, TIFF, WMF, SVG, PNG, PNM, GIF, and
Photo CD. It can resize, rotate, sharpen, color reduce, or add special
effects to the image and save the result to any supported format.
GraphicsMagick may be used to create animated or transparent .gifs,
create composite images, create thumbnail images, and much, much, more.
GraphicsMagick is one of your choices if you need a program to
manipulate and display images. If you want to develop your own
applications which use GraphicsMagick code or APIs, you need to install
GraphicsMagick-devel as well.
This package contains GraphicsMagick library configuration files.
%package -n libGraphicsMagickWand-Q%{quant}-%{wand_so_ver}
Summary: Viewer and Converter for Images - runtime library
Group: System/Libraries
%description -n libGraphicsMagickWand-Q%{quant}-%{wand_so_ver}
GraphicsMagick(TM) provides a powerful image manipulation and
translation utility. It is capable of displaying still images and
animations using the X Window system, provides a simple interface for
interactively editing images, and is capable of importing selected
windows or the entire desktop. GraphicsMagick can read and write over
88 image formats, including JPEG, TIFF, WMF, SVG, PNG, PNM, GIF, and
Photo CD. It can resize, rotate, sharpen, color reduce, or add special
effects to the image and save the result to any supported format.
GraphicsMagick may be used to create animated or transparent .gifs,
create composite images, create thumbnail images, and much, much, more.
GraphicsMagick is one of your choices if you need a program to
manipulate and display images. If you want to develop your own
applications which use GraphicsMagick code or APIs, you need to install
GraphicsMagick-devel as well.
This package is compiled with Q%{quant}, that means it provides better
performance on %{quant} and less bit images.
%package devel
Summary: Viewer and Converter for Images - files mandatory for development
# These comes from check in AB for 11.4
Group: Development/Libraries/C and C++
Requires: glibc-devel
Requires: libGraphicsMagick-Q%{quant}-%{so_ver} = %{version}
Requires: libGraphicsMagickWand-Q%{quant}-%{wand_so_ver} = %{version}
%description devel
GraphicsMagick(TM) provides a powerful image manipulation and
translation utility. It is capable of displaying still images and
animations using the X Window system, provides a simple interface for
interactively editing images, and is capable of importing selected
windows or the entire desktop. GraphicsMagick can read and write over
88 image formats, including JPEG, TIFF, WMF, SVG, PNG, PNM, GIF, and
Photo CD. It can resize, rotate, sharpen, color reduce, or add special
effects to the image and save the result to any supported format.
GraphicsMagick may be used to create animated or transparent .gifs,
create composite images, create thumbnail images, and much, much, more.
%package -n perl-GraphicsMagick
Summary: Viewer and Converter for Images - perl interface
Group: Development/Libraries/Perl
Requires: %{name} = %{version}
Requires: perl = %{perl_version}
%description -n perl-GraphicsMagick
GraphicsMagick(TM) provides a powerful image manipulation and
translation utility. It is capable of displaying still images and
animations using the X Window system, provides a simple interface for
interactively editing images, and is capable of importing selected
windows or the entire desktop. GraphicsMagick can read and write over
88 image formats, including JPEG, TIFF, WMF, SVG, PNG, PNM, GIF, and
Photo CD. It can resize, rotate, sharpen, color reduce, or add special
effects to the image and save the result to any supported format.
GraphicsMagick may be used to create animated or transparent .gifs,
create composite images, create thumbnail images, and much, much, more.
This package contains perl interface to GraphicsMagick library.
%package -n libGraphicsMagick++-Q%{quant}-%{pp_so_ver}
Summary: Viewer and Converter for Images - C++ interface
Group: System/Libraries
%description -n libGraphicsMagick++-Q%{quant}-%{pp_so_ver}
GraphicsMagick(TM) provides a powerful image manipulation and
translation utility. It is capable of displaying still images and
animations using the X Window system, provides a simple interface for
interactively editing images, and is capable of importing selected
windows or the entire desktop. GraphicsMagick can read and write over
88 image formats, including JPEG, TIFF, WMF, SVG, PNG, PNM, GIF, and
Photo CD. It can resize, rotate, sharpen, color reduce, or add special
effects to the image and save the result to any supported format.
GraphicsMagick may be used to create animated or transparent .gifs,
create composite images, create thumbnail images, and much, much, more.
This subpackage contains C++ interface to GraphicsMagick library.
%package -n libGraphicsMagick++-devel
Summary: Viewer and Converter for Images - C++ interface - development files
Group: Development/Libraries/C and C++
Requires: %{name}-devel = %{version}
Requires: c++_compiler
Requires: libGraphicsMagick++-Q%{quant}-%{pp_so_ver} = %{version}
Provides: GraphicsMagick-C++-devel
Obsoletes: GraphicsMagick-C++-devel <= 1.1.7
%description -n libGraphicsMagick++-devel
GraphicsMagick(TM) provides a powerful image manipulation and
translation utility. It is capable of displaying still images and
animations using the X Window system, provides a simple interface for
interactively editing images, and is capable of importing selected
windows or the entire desktop. GraphicsMagick can read and write over
88 image formats, including JPEG, TIFF, WMF, SVG, PNG, PNM, GIF, and
Photo CD. It can resize, rotate, sharpen, color reduce, or add special
effects to the image and save the result to any supported format.
GraphicsMagick may be used to create animated or transparent .gifs,
create composite images, create thumbnail images, and much, much, more.
%prep
%setup -q
%patch0 -p1
%patch2 -p1
%patch10
%patch11 -p1
%patch12 -p1
%patch13 -p1
%patch14 -p1
%patch15 -p1
%patch16 -p1
%patch17 -p1
%patch18 -p1
%patch19 -p1
%patch20 -p1
%patch21 -p1
%patch22 -p1
%patch23 -p1
%patch24 -p1
%patch25 -p1
%patch26 -p1
%patch27 -p1
%patch28 -p1
%patch29 -p1
%patch30 -p1
%patch31 -p1
%patch32 -p1
%patch33 -p1
%patch34 -p1
%patch35 -p1
%patch36 -p1
%patch37 -p1
%patch38 -p1
%patch39 -p1
%patch40 -p1
%patch41 -p1
%patch42 -p1
%patch43 -p1
%patch44 -p1
%patch45 -p1
%patch46 -p1
%patch47 -p1
%patch48 -p1
%patch49 -p1
%patch50 -p1
%patch51 -p1
%patch52 -p1
%patch53 -p1
%patch54 -p1
%patch55 -p1
%patch56 -p1
%patch57 -p1
%patch58 -p1
%patch59 -p1
%patch60 -p1
%patch61 -p1
%patch62 -p1
%patch63 -p1
%patch64 -p1
%patch65 -p1
%patch66 -p1
%patch67 -p1
%patch68 -p1
%patch69 -p1
%patch70 -p1
%patch71 -p1
%patch72 -p1
%patch73 -p1
%patch74 -p1
%patch75 -p1
%patch76 -p1
%patch77 -p1
%patch78 -p1
%patch79 -p1
%patch80 -p1
%patch81 -p1
%patch82 -p1
%patch83 -p1
%patch84 -p1
%patch85 -p1
%patch86 -p1
%patch87 -p1
%patch88 -p1
%patch89 -p1
%patch90 -p1
%patch91 -p1
%patch92 -p1
%patch93 -p1
%patch94 -p1
%patch95 -p1
%patch96 -p1
%patch97 -p1
%patch98 -p1
%patch99 -p1
%patch100 -p1
%patch101 -p1
%patch102 -p1
%patch103 -p1
%build
export PERLOPTS="PREFIX=%{buildroot}%{_prefix}"
# This shouldn't be there yet.
rm -f PerlMagick/Makefile.PL
export CFLAGS="$RPM_OPT_FLAGS -fPIE"
%configure --enable-shared --disable-static \
--with-modules --enable-lzw \
--with-frozenpaths \
--without-perl \
--with-magick-plus-plus \
--with-quantum-depth=%{quant} \
--enable-quantum-library-names \
--docdir=%{_defaultdocdir}/%{name} \
--with-x \
--x-libraries=%{_libdir} \
--x-includes=%{_prefix}/include
# --with-perl-options="$PERLOPTS" \
make %{?_smp_mflags} LDFLAGS="-pie"
cd PerlMagick
if [ -e PerlMagick/typemap ]; then
echo "With Graphics Magick 1.4.0, typmap exists yet, please "
echo "no need to carry it as a package source anymore."
exit 1
else
cp %{SOURCE1} .
fi
perl Makefile.PL
make %{?_smp_mflags} LD_RUN_PATH="%{_libdir}"
%install
%make_install
cp ChangeLog* *.txt %{buildroot}/%{_defaultdocdir}/%{name}
cd PerlMagick
make DESTDIR=%{buildroot} LD_RUN_PATH="%{_libdir}" install_vendor
%perl_process_packlist
# Remove unpackaged files.
rm -f `find %{buildroot}%{_libdir}/perl*/ -name perllocal.pod -type f`
rm -f `find %{buildroot}%{_libdir}/perl*/ -name .packlist -type f`
# perl modules are in lib even on 64 bit arch
rm -f `find %{buildroot}%{_libexecdir}/perl*/ -name perllocal.pod -type f`
rm -f `find %{buildroot}%{_libexecdir}/perl*/ -name .packlist -type f`
rm -f %{buildroot}%{_localstatedir}/adm/perl-modules/GraphicsMagick
rm -f %{buildroot}%{_libdir}/*.la
%check
make check
%post -n libGraphicsMagick-Q%{quant}-%{so_ver} -p /sbin/ldconfig
%postun -n libGraphicsMagick-Q%{quant}-%{so_ver} -p /sbin/ldconfig
%post -n libGraphicsMagickWand-Q%{quant}-%{wand_so_ver} -p /sbin/ldconfig
%postun -n libGraphicsMagickWand-Q%{quant}-%{wand_so_ver} -p /sbin/ldconfig
%post -n libGraphicsMagick++-Q%{quant}-%{pp_so_ver} -p /sbin/ldconfig
%postun -n libGraphicsMagick++-Q%{quant}-%{pp_so_ver} -p /sbin/ldconfig
%files
%defattr(644, root, root, 755)
%docdir %{_defaultdocdir}/%{name}
%{_defaultdocdir}/%{name}
%doc %{_datadir}/%{name}-%{version}
%exclude %{_datadir}/%{name}-%{version}/config
%attr(755, root, root) %{_bindir}/gm
%doc %{_mandir}/man1/gm.1.gz
%doc %{_mandir}/man4/*gz
%doc %{_mandir}/man5/*gz
%files -n libGraphicsMagick-Q%{quant}-%{so_ver}
%defattr(644, root, root, 755)
%{_libdir}/lib%{name}-Q%{quant}.so.*
%dir %{_libdir}/%{name}-%{version}
%dir %{_libdir}/%{name}-%{version}/modules-Q%{quant}
%dir %{_libdir}/%{name}-%{version}/modules-Q%{quant}/coders
%dir %{_libdir}/%{name}-%{version}/modules-Q%{quant}/filters
%{_libdir}/%{name}-%{version}/modules-Q%{quant}/*/*.so
%{_libdir}/%{name}-%{version}/modules-Q%{quant}/*/*.la
%files -n libGraphicsMagick%{so_ver}-config
%defattr(-,root,root)
%dir %{_libdir}/%{name}-%{version}/config
%{_libdir}/%{name}-%{version}/config/*.mgk
%dir %{_datadir}/%{name}-%{version}
%{_datadir}/%{name}-%{version}/config
%files -n libGraphicsMagickWand-Q%{quant}-%{wand_so_ver}
%defattr(644, root, root, 755)
%{_libdir}/lib%{name}Wand-Q%{quant}.so.*
%files devel
%defattr(644, root, root, 755)
%dir %{_includedir}/%{name}
%dir %{_includedir}/%{name}/wand
%{_includedir}/%{name}/wand/*
%dir %{_includedir}/%{name}/magick
%{_includedir}/%{name}/magick/*
%{_libdir}/lib%{name}.so
%{_libdir}/lib%{name}Wand.so
%dir %{_libdir}/%{name}-%{version}/modules-Q%{quant}
%{_libdir}/pkgconfig/%{name}.pc
%{_libdir}/pkgconfig/%{name}Wand.pc
%attr(755, root, root) %{_bindir}/%{name}-config
%attr(755, root, root) %{_bindir}/%{name}Wand-config
%doc %{_mandir}/man1/%{name}-config.1.gz
%doc %{_mandir}/man1/%{name}Wand-config.1.gz
%files -n perl-GraphicsMagick
%defattr(644, root, root, 755)
%dir %{perl_vendorarch}/Graphics
%dir %{perl_vendorarch}/auto/Graphics
%dir %{perl_vendorarch}/auto/Graphics/Magick
%{perl_vendorarch}/Graphics/Magick.pm
%{perl_vendorarch}/auto/Graphics/Magick/*
%doc %{_mandir}/man3/*gz
%files -n libGraphicsMagick++-Q%{quant}-%{pp_so_ver}
%defattr(644, root, root, 755)
%{_libdir}/lib%{name}++-Q%{quant}.so.*
%files -n libGraphicsMagick++-devel
%defattr(644, root, root, 755)
%dir %{_includedir}/%{name}
%dir %{_includedir}/%{name}/Magick++
%{_includedir}/%{name}/Magick++.h
%{_includedir}/%{name}/Magick++/*
%{_libdir}/lib%{name}++.so
%{_libdir}/pkgconfig/%{name}++.pc
%attr(755, root, root) %{_bindir}/%{name}++-config
%doc %{_mandir}/man1/%{name}++-config.1.gz
%changelog