/[packages]/updates/3/imagemagick/current/SPECS/imagemagick.spec
ViewVC logotype

Contents of /updates/3/imagemagick/current/SPECS/imagemagick.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 796916 - (show annotations) (download)
Fri Nov 14 00:42:10 2014 UTC (4 years, 7 months ago) by luigiwalser
File size: 11272 byte(s)
SILENT: fix CVE-2014-8355 patch
1 %define build_test 0
2 %{?_with_test: %{expand: %%global build_test 1}}
3 %{?_without_test: %{expand: %%global build_test 0}}
4
5 %define bootstrap 1
6 %{?_without_bootstrap: %global bootstrap 0}
7 %{?_with_bootstrap: %global bootstrap 1}
8
9 # V E R S I O N P A R T S
10
11 # their "official" version
12 %define rversion 6.8.1
13
14 # their "minor" version
15 %define minor_rev 1
16
17 # some other funny version
18 # (aw) from the docs: Versions with Q8 in the name are 8 bits-per-pixel
19 # component (e.g. 8-bit red, 8-bit green, etc.), whereas, Q16 in the
20 # filename are 16 bits-per-pixel component. A Q16 version permits you
21 # to read or write 16-bit images without losing precision but requires
22 # twice as much resources as the Q8 version.
23 %define qlev Q16
24
25 # the full file version
26 %define dversion %{rversion}-%{minor_rev}
27
28 %define major 7
29
30 %define libname %mklibname magick %{major}
31 %define develname %mklibname magick -d
32
33 Summary: An X application for displaying and manipulating images
34 Name: imagemagick
35 Version: %{rversion}.%{minor_rev}
36 %define subrel 3
37 Release: %mkrel 2
38 License: BSD-like
39 Group: Graphics/Editors and Converters
40 URL: http://www.imagemagick.org/
41 Source0: http://www.imagemagick.org/download/ImageMagick-%{dversion}.tar.xz
42 Source1: ImageMagick.pdf.bz2
43 # re-scaled from ftp://ftp.imagemagick.org/pub/ImageMagick/images/magick-icon.png
44 Source10: magick-icon_16x16.png
45 Source11: magick-icon_32x32.png
46 Source12: magick-icon_48x48.png
47 Source13: magick-icon_64x64.png
48 Patch0: imagemagick-docdir.diff
49 #gw fix format strings, but it doesn't work for the perl-Magick
50 Patch1: ImageMagick-6.4.8-9-format-strings.patch
51 Patch2: ImageMagick-6.7.4-force-so.patch
52 Patch7: imagemagick-urw.diff
53 Patch17: imagemagick-fpx.diff
54 Patch19: ImageMagick-libpath.diff
55 Patch20: ImageMagick-6.7.7-9-fix-montageimages-test.patch
56 Patch21: imagemagick-CVE-2014-2030.patch
57 Patch22: imagemagick-CVE-2014-1958.patch
58 Patch23: imagemagick-CVE-2014-8354.patch
59 Patch24: imagemagick-CVE-2014-8355.patch
60 Patch25: imagemagick-CVE-2014-8562.patch
61 Patch26: imagemagick-CVE-2014-8716.patch
62
63 Requires: %{libname} = %{version}
64 Obsoletes: ImageMagick < 6.3.2.9-6
65 Provides: ImageMagick = %{version}-%{release}
66
67 BuildRequires: libx11-devel
68 BuildRequires: libxext-devel
69 BuildRequires: bzip2-devel
70 BuildRequires: cairo-devel
71 BuildRequires: fontconfig-devel
72 BuildRequires: freetype2-devel >= 2.1.7
73 BuildRequires: chrpath
74 BuildRequires: graphviz-devel >= 2.9.0
75 BuildRequires: libjasper-devel
76 BuildRequires: libjbig-devel
77 BuildRequires: libjpeg-devel
78 BuildRequires: libpng-devel
79 BuildRequires: zlib-devel
80 BuildRequires: lcms-devel
81 BuildRequires: lcms2-devel
82 BuildRequires: fftw-devel
83 BuildRequires: lqr-devel
84 BuildRequires: libltdl-devel
85 BuildRequires: perl-devel
86 BuildRequires: librsvg-devel
87 BuildRequires: tiff-devel
88 BuildRequires: libwmf-devel
89 BuildRequires: libxml2-devel
90 BuildRequires: lzma-devel
91 BuildRequires: pkgconfig(libwebp)
92 %if !%bootstrap
93 BuildRequires: djvulibre-devel
94 %endif
95 BuildRequires: ghostscript
96 BuildRequires: subversion
97 BuildConflicts: %{develname}
98
99 %description
100 ImageMagick is a powerful image display, conversion and manipulation tool. It
101 runs in an X session. With this tool, you can view, edit and display a variety
102 of image formats.
103
104 ImageMagick can make use of the following delegate programs, available as
105 packages in %{_vendor}: curl enscript ffmpeg ghostscript ghostscript-X gimp
106 gnuplot graphviz html2ps mplayer ncompress netpbm sane-backends texlive-texmf
107 transfig ufraw xdg-utils zip autotrace povray
108
109 %package desktop
110 Summary: ImageMagick menus
111 Group: Graphics/Editors and Converters
112 Requires: xterm
113 Obsoletes: ImageMagick-desktop < 6.3.2.9-6
114
115 %description desktop
116 This package contains the menu and .desktop entries to run the "display"
117 command from the menu.
118
119 %package -n %{libname}
120 Summary: ImageMagick libraries
121 Group: System/Libraries
122 Provides: %{_lib}magick = %{version}
123 # (Anssi 02/2008): Wrongly named at first, can be removed when major changes again:
124 Obsoletes: %{_lib}magick%{major}.0.0 < %{version}-%{release}
125
126 %description -n %{libname}
127 This package contains the libraries needed to run programs dynamically linked
128 with ImageMagick libraries.
129
130 %package -n %{develname}
131 Summary: Static libraries and header files for ImageMagick app development
132 Group: Development/C
133 Requires: %{libname} = %{version}
134 Provides: %{name}-devel = %{version}-%{release}
135 Provides: ImageMagick-devel = %{version}-%{release}
136 Provides: libmagick-devel = %{version}-%{release}
137 Provides: libMagick-devel = %{version}-%{release}
138 Obsoletes: ImageMagick-devel
139 Provides: libMagick5-devel = %{version}-%{release}
140 Obsoletes: libMagick5-devel
141 Conflicts: %{name} < 6.7.5.0-2
142 # 2006
143 Obsoletes: %{mklibname Magick 8.3.2 -d}
144 # 2007.0
145 Obsoletes: %{mklibname magick 10.4.0 -d} %{mklibname Magick 10.4.0 -d}
146 # 2007.1/2008.0
147 Obsoletes: %{mklibname magick 10.7.0 -d} %{mklibname Magick 10.7.0 -d}
148 # pre 2008.1
149 Obsoletes: %{mklibname magick 10.9.0 -d} %{mklibname Magick 10.9.0 -d}
150
151 %description -n %{develname}
152 If you want to create applications that will use ImageMagick code or APIs,
153 you'll need to install these packages as well as ImageMagick. These additional
154 packages aren't necessary if you simply want to use ImageMagick, however.
155
156 ImageMagick-devel is an addition to ImageMagick which includes static libraries
157 and header files necessary to develop applications.
158
159 %package -n perl-Image-Magick
160 Summary: Libraries and modules for access to ImageMagick from perl
161 Group: Development/Perl
162 Requires: %{name} = %{version}
163 Provides: perl-Magick = %{version}-%{release}
164 Obsoletes: perl-Magick
165
166 %description -n perl-Image-Magick
167 This is the ImageMagick perl support package. It includes perl modules and
168 support files for access to ImageMagick library from perl.
169
170 %package doc
171 Summary: %{name} Documentation
172 Group: Documentation
173 Obsoletes: ImageMagick-doc < 6.3.2.9-6
174 BuildArch: noarch
175
176 %description doc
177 This package contains HTML/PDF documentation of %{name}.
178
179 %prep
180
181 %setup -q -n ImageMagick-%{rversion}-%minor_rev
182
183 %patch0 -p1 -b .docdir
184 %patch2 -p0 -b .so
185 %patch7 -p0 -b .urw
186 %patch17 -p0 -b .fpx
187 %patch19 -p1 -b .libpath
188 %patch20 -p1 -b .ppc
189 %patch21 -p4 -b .CVE-2014-2030
190 %patch22 -p4 -b .CVE-2014-1958
191 %patch23 -p1 -b .CVE-2014-8354
192 %patch24 -p1 -b .CVE-2014-8355
193 %patch25 -p1 -b .CVE-2014-8562
194 %patch26 -p1 -b .CVE-2014-8716
195
196 bzcat %{SOURCE1} > ImageMagick.pdf
197 install -m 644 %{SOURCE10} %{SOURCE11} %{SOURCE12} %{SOURCE13} .
198 autoreconf -fi
199
200 %build
201 #gw the format-string patch is incomplete:
202 %define Werror_cflags %nil
203 export CFLAGS="%{optflags} -fno-strict-aliasing -fPIC"
204 export CXXFLAGS="%{optflags} -fno-strict-aliasing -fPIC"
205
206 # don't use icecream
207 export PATH=/bin:/usr/bin
208
209 %configure2_5x \
210 --docdir=%{_defaultdocdir}/imagemagick \
211 --with-pic \
212 --enable-shared --disable-static \
213 --enable-fast-install \
214 --with-threads \
215 --with-magick_plus_plus \
216 --with-gslib \
217 --with-wmf \
218 --with-lcms \
219 --with-rsvg \
220 --with-xml \
221 --without-dps \
222 --without-windows-font-dir \
223 --with-modules \
224 --with-perl \
225 --with-perl-options="INSTALLDIRS=vendor CC='%{__cc} -L$PWD/magick/.libs' LDDLFLAGS='-shared -L$PWD/magick/.libs'" \
226 --with-jp2 \
227 --with-gvc \
228 --with-lqr
229
230 # Disable rpath
231 sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
232 sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
233
234 %make
235
236 %if %{build_test}
237 %check
238 # these tests require X
239 if [ -f PerlMagick/t/x11/read.t ]; then
240 mv PerlMagick/t/x11/read.t PerlMagick/t/x11/read.t.disabled
241 fi
242 if [ -f PerlMagick/t/x11/write.t ]; then
243 mv PerlMagick/t/x11/write.t PerlMagick/t/x11/write.t.disabled
244 fi
245 #dlname=`grep "^dlname" Magick++/lib/.libs/libMagick++.la | cut -d\' -f2`
246 #LD_PRELOAD="$PWD/Magick++/lib/.libs/$dlname" VERBOSE="1" make check
247 make check
248 %endif
249
250 %install
251 # (Abel) set LD_RUN_PATH to null, to avoid adding rpath to perlmagick module
252 %makeinstall_std LD_RUN_PATH="" pkgdocdir=/installed_docs
253
254 # fix docs inclusion (fix an unknown new rpm bug)
255 rm -rf installed_docs; mv %{buildroot}/installed_docs .
256
257 # Remove unpackaged files
258 find %{buildroot} -name '*.la' -delete
259
260 # create compatible symlinks
261 ln -s libMagick++-%{qlev}.so %{buildroot}%{_libdir}/libMagick++.so
262 ln -s libMagickCore-%{qlev}.so %{buildroot}%{_libdir}/libMagickCore.so
263 ln -s libMagickWand-%{qlev}.so %{buildroot}%{_libdir}/libMagickWand.so
264
265 %multiarch_binaries %{buildroot}%{_bindir}/Magick-config
266 %multiarch_binaries %{buildroot}%{_bindir}/Magick++-config
267 %multiarch_binaries %{buildroot}%{_bindir}/MagickCore-config
268 %multiarch_binaries %{buildroot}%{_bindir}/MagickWand-config
269 %multiarch_binaries %{buildroot}%{_bindir}/Wand-config
270 %multiarch_includes %{buildroot}%{_includedir}/ImageMagick/magick/magick-config.h
271
272 # nuke rpath
273 chrpath -d %{buildroot}%{perl_vendorarch}/auto/Image/Magick/Magick.so
274
275 # icons
276 install -m 755 -d %{buildroot}%{_liconsdir} \
277 %{buildroot}%{_iconsdir} \
278 %{buildroot}%{_iconsdir}/hicolor/64x64/apps \
279 %{buildroot}%{_miconsdir}
280 install -m 644 magick-icon_16x16.png %{buildroot}%{_miconsdir}/%{name}.png
281 install -m 644 magick-icon_32x32.png %{buildroot}%{_iconsdir}/%{name}.png
282 install -m 644 magick-icon_48x48.png %{buildroot}%{_liconsdir}/%{name}.png
283 install -m 644 magick-icon_64x64.png %{buildroot}%{_iconsdir}/hicolor/64x64/apps/%{name}.png
284
285
286 install -m 755 -d %{buildroot}%{_datadir}/applications/
287 cat > %{buildroot}%{_datadir}/applications/%{_real_vendor}-%{name}.desktop << EOF
288 [Desktop Entry]
289 Name=ImageMagick
290 Comment=Views Graphics files
291 Exec=%{_bindir}/xterm -geometry 40x15 -title ImageMagick +sb -iconic -e %{_bindir}/display
292 Icon=%{name}
293 Terminal=false
294 Type=Application
295 Categories=Graphics;Viewer;
296 EOF
297
298 %files
299 %doc README.txt
300 %{_sysconfdir}/ImageMagick
301 %{_bindir}/animate
302 %{_bindir}/compare
303 %{_bindir}/composite
304 %{_bindir}/convert
305 %{_bindir}/conjure
306 %{_bindir}/display
307 %{_bindir}/identify
308 %{_bindir}/import
309 %{_bindir}/mogrify
310 %{_bindir}/montage
311 %{_bindir}/stream
312 %{_libdir}/ImageMagick-%{rversion}
313 %{_datadir}/ImageMagick-%{rversion}
314 %{_mandir}/man1/*
315 %exclude %{_mandir}/man1/*-config.*
316
317 %files desktop
318 %{_datadir}/applications/*
319 %{_iconsdir}/%{name}.png
320 %{_liconsdir}/%{name}.png
321 %{_miconsdir}/%{name}.png
322 %{_iconsdir}/hicolor/64x64/apps/%{name}.png
323
324 %files -n %{libname}
325 %{_libdir}/libMagick++-%{qlev}.so.%{major}*
326 %{_libdir}/libMagickCore-%{qlev}.so.%{major}*
327 %{_libdir}/libMagickWand-%{qlev}.so.%{major}*
328
329 %files -n %{develname}
330 %{_includedir}/ImageMagick
331 %multiarch %{multiarch_bindir}/Magick-config
332 %multiarch %{multiarch_bindir}/Magick++-config
333 %multiarch %{multiarch_bindir}/MagickCore-config
334 %multiarch %{multiarch_bindir}/MagickWand-config
335 %multiarch %{multiarch_bindir}/Wand-config
336 %multiarch %dir %{multiarch_includedir}/ImageMagick
337 %multiarch %dir %{multiarch_includedir}/ImageMagick/magick
338 %multiarch %{multiarch_includedir}/ImageMagick/magick/magick-config.h
339 %{_bindir}/Magick-config
340 %{_bindir}/Magick++-config
341 %{_bindir}/MagickCore-config
342 %{_bindir}/MagickWand-config
343 %{_bindir}/Wand-config
344 %{_libdir}/*.so
345 %{_libdir}/pkgconfig/*.pc
346 %{_mandir}/man1/*-config.*
347
348 %files -n perl-Image-Magick
349 %{perl_vendorarch}/Image
350 %{perl_vendorarch}/auto/Image
351 %{_mandir}/man3*/*::*.3pm*
352
353 %files doc
354 %doc ImageMagick.pdf ChangeLog LICENSE NEWS* NOTICE
355 %doc QuickStart.txt installed_docs/*

  ViewVC Help
Powered by ViewVC 1.1.26