/[packages]/updates/5/graphicsmagick/current/SPECS/graphicsmagick.spec
ViewVC logotype

Contents of /updates/5/graphicsmagick/current/SPECS/graphicsmagick.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1129822 - (show annotations) (download)
Mon Jul 24 05:53:00 2017 UTC (2 years, 4 months ago) by akien
File size: 8100 byte(s)
Fix use-after-free crash (CVE-2017-11403)
1 %define build_modules 1
2 %{?_with_modules: %global build_modules 1}
3
4 %define enable_jasper 1
5 %{?_with_jasper: %global enable_jasper 1}
6
7 %define enable_graphwiz 1
8 %{?_with_graphwiz: %global enable_graphwiz 1}
9
10 %define upstream_name GraphicsMagick
11 %define major 3
12 %define libname %mklibname %{name} %{major}
13 %define ppmajor 12
14 %define libppname %mklibname %{name}++ %{ppmajor}
15 %define libwandname %mklibname graphicsmagickwand 2
16 %define develname %mklibname %{name} -d
17 %define qlev Q8
18
19 Summary: An X application for displaying and manipulating images
20 Name: graphicsmagick
21 Version: 1.3.26
22 %define subrel 1
23 Release: %mkrel 1
24 License: GPLv2+
25 Group: Graphics/Editors and Converters
26 URL: http://www.graphicsmagick.org/
27 Source0: http://downloads.sourceforge.net/%{name}/%{upstream_name}-%{version}.tar.xz
28 Patch0: GraphicsMagick-1.3.15-use-so-for-modules.patch
29 Patch1: GraphicsMagick-1.3.16-perl-link.patch
30
31 # Upstream patches
32 Patch100: GraphicsMagick-CVE-2017-11403.patch
33
34 BuildRequires: x11-proto-devel
35 BuildRequires: perl-devel
36 BuildRequires: freetype2-devel
37 BuildRequires: tiff-devel
38 BuildRequires: png-devel
39 BuildRequires: jpeg-devel
40 BuildRequires: jasper-devel
41 BuildRequires: libwmf-devel
42 BuildRequires: zlib-devel
43 BuildRequires: bzip2-devel
44 BuildRequires: libxml2-devel
45 BuildRequires: lcms-devel
46 BuildRequires: lcms2-devel
47 BuildRequires: libgs-devel
48 BuildRequires: libtool-devel
49 BuildRequires: jbigkit-devel
50 BuildRequires: chrpath
51
52 %description
53 GraphicsMagick is the swiss army knife of image processing. It
54 provides a robust collection of tools and libraries which support
55 reading, writing, and manipulating an image in over 88 major formats
56 including important formats like DPX, GIF, JPEG, JPEG-2000, PNG, PDF,
57 SVG, and TIFF. GraphicsMagick supports huge images on systems that
58 support large files, and has been tested with gigapixel-size images.
59 GraphicsMagick can create new images on the fly, making it suitable
60 for building dynamic Web applications. GraphicsMagick may be used to
61 resize, rotate, sharpen, color reduce, or add special effects to an
62 image and save the result in the same or differing image format.
63 Image processing operations are available from the command line, as
64 well as through C, C++, Perl, or Windows COM programming interfaces.
65 Extensions are available from third-parties to support programming in
66 Python, Tcl, and Ruby. With some modification, language extensions for
67 ImageMagick may be used.
68
69 %files
70 %doc ChangeLog *.txt
71 %{_bindir}/gm
72 %dir %{_libdir}/GraphicsMagick-%{version}/config
73 %{_libdir}/GraphicsMagick-%{version}/config/*.mgk
74 %dir %{_datadir}/GraphicsMagick-%{version}/config
75 %{_datadir}/GraphicsMagick-%{version}/config/*.mgk
76 %if %build_modules
77 %dir %{_libdir}/%{upstream_name}-%{version}/modules-%{qlev}
78 %{_libdir}/%{upstream_name}-%{version}/modules-%{qlev}/filters
79 %dir %{_libdir}/%{upstream_name}-%{version}/modules-%{qlev}/coders
80 %{_libdir}/%{upstream_name}-%{version}/modules-%{qlev}/coders/*.so
81 %endif
82 %{_mandir}/man1/GraphicsMagick++-config.1.*
83 %{_mandir}/man1/GraphicsMagick-config.1.*
84 %{_mandir}/man1/GraphicsMagickWand-config.1.*
85 %{_mandir}/man1/gm.1.*
86 %{_mandir}/man4/miff.4.*
87 %{_mandir}/man5/quantize.5.*
88
89 #--------------------------------------------------------------
90
91 %package -n %{libname}
92 Summary: %upstream_name libraries
93 Group: System/Libraries
94
95 %description -n %{libname}
96 This package contains the libraries needed to run programs dynamically
97 linked with GraphicsMagick libraries.
98
99 %files -n %{libname}
100 %{_libdir}/libGraphicsMagick.so.%{major}*
101
102 #--------------------------------------------------------------
103
104 %package -n %{libppname}
105 Summary: %upstream_name C++ libraries
106 Group: System/Libraries
107
108 %description -n %{libppname}
109 This package contains the libraries needed to run C++ programs dynamically
110 linked with GraphicsMagick libraries.
111
112 %files -n %{libppname}
113 %{_libdir}/libGraphicsMagick++.so.%{ppmajor}*
114
115 #--------------------------------------------------------------
116
117 %package -n %{libwandname}
118 Summary: %upstream_name libraries
119 Group: System/Libraries
120
121 %description -n %{libwandname}
122 This package contains the libraries needed to run programs dynamically
123 linked with GraphicsMagick libraries.
124
125 %files -n %{libwandname}
126 %{_libdir}/libGraphicsMagickWand.so.2*
127
128 #--------------------------------------------------------------
129
130 %package -n %{develname}
131 Summary: Static libraries and header files for %{upstream_name} app development
132 Group: Development/C
133 Provides: %{name}-devel = %{version}-%{release}
134 Provides: %{upstream_name}-devel = %{version}-%{release}
135 Obsoletes: %mklibname -d graphicsmagick 1.1.10
136 Requires: %{libname} = %{version}
137 Requires: %{libppname} = %{version}
138 Requires: %{libwandname} = %{version}
139 Requires: jbig-devel
140 %if %{enable_jasper}
141 Requires: jasper-devel
142 %endif
143 %if %{enable_graphwiz}
144 Requires: graphviz-devel
145 %global __requires_exclude devel\\(libcdt\\)|devel\\(libcircogen\\)|devel\\(libcommon\\)|devel\\(libdotgen\\)|devel\\(libdotneato\\)|devel\\(libfdpgen\\)|devel\\(libgraph\\)|devel\\(libgvrender\\)|devel\\(libneatogen\\)|devel\\(libpack\\)|devel\\(libpathplan\\)|devel\\(libtwopigen\\)|devel\\(libgvc\\)|devel\\(libgvgd\\)
146 %endif
147
148 %description -n %{develname}
149 If you want to create applications that will use GraphicsMagick code or
150 APIs, you'll need to install these packages as well as
151 GraphicsMagick. These additional packages aren't necessary if you simply
152 want to use GraphicsMagick, however.
153
154 graphicsmagick-devel is an addition to GraphicsMagick which includes static
155 libraries and header files necessary to develop applications.
156
157 %files -n %{develname}
158 %{_bindir}/GraphicsMagick++-config
159 %{_bindir}/GraphicsMagick-config
160 %{_bindir}/GraphicsMagickWand-config
161 %dir %{_includedir}/GraphicsMagick
162 %{_includedir}/GraphicsMagick/Magick++.h
163 %dir %{_includedir}/GraphicsMagick/magick
164 %{_includedir}/GraphicsMagick/magick/*.h
165 %dir %{_includedir}/GraphicsMagick/Magick++
166 %{_includedir}/GraphicsMagick/Magick++/*.h
167 %dir %{_includedir}/GraphicsMagick/wand
168 %{_includedir}/GraphicsMagick/wand/*.h
169 %{_libdir}/*.so
170 %{_libdir}/pkgconfig/*.pc
171
172 #--------------------------------------------------------------
173
174 %package -n perl-Graphics-Magick
175 Summary: Libraries and modules for access to %upstream_name from perl
176 Group: Development/Perl
177 Requires: %{name} = %{version}
178 %if %{enable_graphwiz}
179 Requires: graphviz
180 %endif
181
182 %description -n perl-Graphics-Magick
183 This is the %upstream_name perl support package. It includes perl modules
184 and support files for access to GraphicsMagick library from perl.
185
186 %files -n perl-Graphics-Magick
187 %{_mandir}/man3*/*::*.3pm*
188 %{perl_vendorarch}/Graphics
189 %{perl_vendorarch}/auto
190
191 #--------------------------------------------------------------
192
193 %package doc
194 Summary: %{name} Documentation
195 Group: Documentation
196 BuildArch: noarch
197
198 %description doc
199 This package contains HTML/PDF documentation of %{name}.
200
201 %files doc
202 %{_datadir}/doc/GraphicsMagick
203
204 #--------------------------------------------------------------
205
206 %prep
207 %autosetup -p1 -n %{upstream_name}-%{version}
208
209 %build
210 %define Werror_cflags %nil
211 %configure2_5x \
212 --enable-fast-install \
213 --without-dps \
214 %if %{build_modules}
215 --with-modules \
216 %else
217 --without-modules \
218 %endif
219 --enable-shared \
220 --disable-static \
221 --with-pic \
222 %if %{enable_jasper}
223 --with-jp2 \
224 %else
225 --without-jp2 \
226 %endif
227 --with-perl-options="INSTALLDIRS=vendor" \
228 --with-perl
229
230 %make_build
231 %make_build perl-build
232
233 %install
234 %make_install
235 %make_install -C PerlMagick
236
237 # fix rights and remove rpaths
238 chmod 755 %{buildroot}%{perl_vendorarch}/auto/Graphics/Magick/Magick.so
239 chrpath -d %{buildroot}%{perl_vendorarch}/auto/Graphics/Magick/Magick.so
240
241 # remove unwanted files
242 find %{buildroot} -name '*.la' -delete
243 rm -f %{buildroot}%{_datadir}/GraphicsMagick-%{version}/{ChangeLog,NEWS.txt}

  ViewVC Help
Powered by ViewVC 1.1.26