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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.26