/[packages]/cauldron/imagemagick/current/SPECS/imagemagick.spec
ViewVC logotype

Contents of /cauldron/imagemagick/current/SPECS/imagemagick.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1450563 - (show annotations) (download)
Tue Oct 8 11:27:20 2019 UTC (2 months ago) by kekepower
File size: 11158 byte(s)
- Update to version 7.0.8.68

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

  ViewVC Help
Powered by ViewVC 1.1.26