1 |
spuhler |
47947 |
%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 Name GraphicsMagick |
11 |
|
|
%define libname %mklibname %name 3 |
12 |
|
|
%define libwandname %mklibname graphicsmagickwand 2 |
13 |
|
|
%define develname %mklibname %name -d |
14 |
fwang |
251948 |
%define version 1.3.15 |
15 |
spuhler |
47947 |
%define qlev Q8 |
16 |
|
|
|
17 |
|
|
Summary: An X application for displaying and manipulating images |
18 |
|
|
Name: graphicsmagick |
19 |
|
|
Version: %{version} |
20 |
blino |
253383 |
Release: %mkrel 2 |
21 |
spuhler |
47947 |
License: GPLv2+ |
22 |
|
|
Group: Graphics |
23 |
|
|
URL: http://www.graphicsmagick.org/ |
24 |
fwang |
195719 |
Source0: http://downloads.sourceforge.net/%{name}/%{Name}-%{version}.tar.xz |
25 |
spuhler |
47947 |
BuildRequires: x11-proto-devel |
26 |
|
|
BuildRequires: perl-devel |
27 |
|
|
BuildRequires: freetype2-devel |
28 |
|
|
Buildrequires: tiff-devel |
29 |
|
|
BuildRequires: png-devel |
30 |
|
|
BuildRequires: jpeg-devel |
31 |
|
|
BuildRequires: jasper-devel |
32 |
|
|
BuildRequires: libwmf-devel |
33 |
|
|
BuildRequires: zlib-devel |
34 |
|
|
BuildRequires: bzip2-devel |
35 |
|
|
BuildRequires: libxml2-devel |
36 |
|
|
BuildRequires: lcms-devel |
37 |
|
|
BuildRequires: libgs-devel |
38 |
|
|
BuildRequires: jbigkit-devel |
39 |
|
|
|
40 |
|
|
%description |
41 |
|
|
GraphicsMagick is the swiss army knife of image processing. It |
42 |
|
|
provides a robust collection of tools and libraries which support |
43 |
|
|
reading, writing, and manipulating an image in over 88 major formats |
44 |
|
|
including important formats like DPX, GIF, JPEG, JPEG-2000, PNG, PDF, |
45 |
|
|
SVG, and TIFF. GraphicsMagick supports huge images on systems that |
46 |
|
|
support large files, and has been tested with gigapixel-size images. |
47 |
|
|
GraphicsMagick can create new images on the fly, making it suitable |
48 |
|
|
for building dynamic Web applications. GraphicsMagick may be used to |
49 |
|
|
resize, rotate, sharpen, color reduce, or add special effects to an |
50 |
|
|
image and save the result in the same or differing image format. |
51 |
|
|
Image processing operations are available from the command line, as |
52 |
|
|
well as through C, C++, Perl, or Windows COM programming interfaces. |
53 |
|
|
Extensions are available from third-parties to support programming in |
54 |
|
|
Python, Tcl, and Ruby. With some modification, language extensions for |
55 |
|
|
ImageMagick may be used. |
56 |
|
|
|
57 |
|
|
%files |
58 |
|
|
%defattr(-,root,root) |
59 |
|
|
%doc ChangeLog *.txt |
60 |
|
|
%{_bindir}/gm |
61 |
|
|
%dir %{_libdir}/GraphicsMagick-%{version}/config |
62 |
|
|
%{_libdir}/GraphicsMagick-%{version}/config/*.mgk |
63 |
|
|
%dir %{_datadir}/GraphicsMagick-%{version}/config |
64 |
|
|
%{_datadir}/GraphicsMagick-%{version}/config/*.mgk |
65 |
|
|
%if %build_modules |
66 |
|
|
%dir %{_libdir}/%{Name}-%{version}/modules-%{qlev} |
67 |
|
|
%{_libdir}/%{Name}-%{version}/modules-%{qlev}/filters |
68 |
|
|
%dir %{_libdir}/%{Name}-%{version}/modules-%{qlev}/coders |
69 |
|
|
%{_libdir}/%{Name}-%{version}/modules-%{qlev}/coders/*.so |
70 |
|
|
%endif |
71 |
|
|
%{_mandir}/man1/GraphicsMagick++-config.1.* |
72 |
|
|
%{_mandir}/man1/GraphicsMagick-config.1.* |
73 |
|
|
%{_mandir}/man1/GraphicsMagickWand-config.1.* |
74 |
|
|
%{_mandir}/man1/gm.1.* |
75 |
|
|
%{_mandir}/man4/miff.4.* |
76 |
|
|
%{_mandir}/man5/quantize.5.* |
77 |
|
|
|
78 |
|
|
#-------------------------------------------------------------- |
79 |
|
|
|
80 |
|
|
%package -n %{libname} |
81 |
|
|
Summary: %Name libraries |
82 |
|
|
Group: System/Libraries |
83 |
|
|
|
84 |
|
|
%description -n %{libname} |
85 |
|
|
This package contains the libraries needed to run programs dynamically |
86 |
|
|
linked with ImageMagick libraries. |
87 |
|
|
|
88 |
|
|
|
89 |
|
|
%files -n %{libname} |
90 |
|
|
%defattr(-,root,root,755) |
91 |
|
|
%{_libdir}/libGraphicsMagick++.so.3* |
92 |
|
|
%{_libdir}/libGraphicsMagick.so.3* |
93 |
|
|
|
94 |
|
|
#-------------------------------------------------------------- |
95 |
|
|
|
96 |
|
|
%package -n %{libwandname} |
97 |
|
|
Summary: %Name libraries |
98 |
|
|
Group: System/Libraries |
99 |
|
|
|
100 |
|
|
%description -n %{libwandname} |
101 |
|
|
This package contains the libraries needed to run programs dynamically |
102 |
|
|
linked with ImageMagick libraries. |
103 |
|
|
|
104 |
|
|
|
105 |
|
|
%files -n %{libwandname} |
106 |
|
|
%defattr(-,root,root,755) |
107 |
|
|
%{_libdir}/libGraphicsMagickWand.so.2* |
108 |
|
|
|
109 |
|
|
#-------------------------------------------------------------- |
110 |
|
|
|
111 |
|
|
%package -n %{develname} |
112 |
|
|
Summary: Static libraries and header files for %{Name} app development |
113 |
|
|
Group: Development/C |
114 |
|
|
Provides: %{name}-devel = %{version}-%{release} |
115 |
|
|
Provides: %{Name}-devel = %{version}-%{release} |
116 |
|
|
Obsoletes: %mklibname -d graphicsmagick 1.1.10 |
117 |
|
|
Requires: %{libname} = %{version} |
118 |
|
|
Requires: %{libwandname} = %{version} |
119 |
|
|
Requires: jbig-devel |
120 |
|
|
%if %{enable_jasper} |
121 |
|
|
Requires: jasper-devel |
122 |
|
|
%endif |
123 |
|
|
%if %{enable_graphwiz} |
124 |
|
|
Requires: graphviz-devel |
125 |
|
|
%define _requires_exceptions 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) |
126 |
|
|
%endif |
127 |
|
|
|
128 |
|
|
%description -n %{develname} |
129 |
|
|
If you want to create applications that will use ImageMagick code or |
130 |
|
|
APIs, you'll need to install these packages as well as |
131 |
|
|
ImageMagick. These additional packages aren't necessary if you simply |
132 |
|
|
want to use ImageMagick, however. |
133 |
|
|
|
134 |
|
|
imagemagick-devel is an addition to ImageMagick which includes static |
135 |
|
|
libraries and header files necessary to develop applications. |
136 |
|
|
|
137 |
|
|
%files -n %{develname} |
138 |
|
|
%defattr(-,root,root) |
139 |
|
|
%{_bindir}/GraphicsMagick++-config |
140 |
|
|
%{_bindir}/GraphicsMagick-config |
141 |
|
|
%{_bindir}/GraphicsMagickWand-config |
142 |
|
|
%dir %{_includedir}/GraphicsMagick |
143 |
|
|
%{_includedir}/GraphicsMagick/Magick++.h |
144 |
|
|
%dir %{_includedir}/GraphicsMagick/magick |
145 |
|
|
%{_includedir}/GraphicsMagick/magick/*.h |
146 |
|
|
%dir %{_includedir}/GraphicsMagick/Magick++ |
147 |
|
|
%{_includedir}/GraphicsMagick/Magick++/*.h |
148 |
|
|
%dir %{_includedir}/GraphicsMagick/wand |
149 |
|
|
%{_includedir}/GraphicsMagick/wand/*.h |
150 |
|
|
%{_libdir}/*.so |
151 |
|
|
%{_libdir}/pkgconfig/*.pc |
152 |
|
|
|
153 |
|
|
#-------------------------------------------------------------- |
154 |
|
|
|
155 |
|
|
%package -n perl-Graphics-Magick |
156 |
|
|
Summary: Libraries and modules for access to %Name from perl |
157 |
|
|
Group: Development/Perl |
158 |
|
|
Requires: %{name} = %{version} |
159 |
|
|
%if %{enable_graphwiz} |
160 |
|
|
Requires: graphviz |
161 |
|
|
%endif |
162 |
|
|
|
163 |
|
|
%description -n perl-Graphics-Magick |
164 |
|
|
This is the %Name perl support package. It includes perl modules |
165 |
|
|
and support files for access to ImageMagick library from perl. |
166 |
|
|
|
167 |
|
|
%files -n perl-Graphics-Magick |
168 |
|
|
%defattr(-,root,root) |
169 |
|
|
%{_mandir}/man3*/*::*.3pm* |
170 |
|
|
%{perl_vendorarch}/Graphics |
171 |
|
|
%{perl_vendorarch}/auto |
172 |
|
|
|
173 |
|
|
#-------------------------------------------------------------- |
174 |
|
|
|
175 |
|
|
%package doc |
176 |
|
|
Summary: %{name} Documentation |
177 |
|
|
Group: Books/Other |
178 |
fwang |
195762 |
BuildArch: noarch |
179 |
spuhler |
47947 |
|
180 |
|
|
%description doc |
181 |
|
|
This package contains HTML/PDF documentation of %{name}. |
182 |
|
|
|
183 |
|
|
|
184 |
|
|
%files doc |
185 |
|
|
%defattr(-,root,root) |
186 |
|
|
%_datadir/doc/GraphicsMagick |
187 |
|
|
|
188 |
|
|
#-------------------------------------------------------------- |
189 |
|
|
|
190 |
|
|
%prep |
191 |
|
|
%setup -q -n %{Name}-%{version} |
192 |
blino |
253364 |
# ImageMagick r4950, rt #70150, gentoo #378197 |
193 |
blino |
253383 |
if [ -r PerlMagick/typemap ]; then |
194 |
|
|
echo "typemap already exists, remove this code from spec file" |
195 |
|
|
exit 1 |
196 |
|
|
fi |
197 |
blino |
253364 |
echo "Graphics::Magick T_PTROBJ" > PerlMagick/typemap |
198 |
spuhler |
47947 |
|
199 |
|
|
%build |
200 |
|
|
%define Werror_cflags %nil |
201 |
|
|
%configure2_5x \ |
202 |
|
|
--enable-fast-install \ |
203 |
|
|
--disable-ltdl-install \ |
204 |
|
|
--without-dps \ |
205 |
|
|
%if %build_modules |
206 |
|
|
--with-modules \ |
207 |
|
|
%else |
208 |
|
|
--without-modules \ |
209 |
|
|
%endif |
210 |
|
|
--enable-shared \ |
211 |
|
|
--disable-static \ |
212 |
|
|
--with-pic \ |
213 |
|
|
%if %{enable_jasper} |
214 |
|
|
--with-jp2 \ |
215 |
|
|
%else |
216 |
|
|
--without-jp2 \ |
217 |
|
|
%endif |
218 |
|
|
--with-perl-options="INSTALLDIRS=vendor" \ |
219 |
|
|
--with-perl |
220 |
|
|
|
221 |
|
|
%make |
222 |
|
|
%make perl-build |
223 |
|
|
|
224 |
|
|
%install |
225 |
|
|
rm -rf %{buildroot} |
226 |
|
|
|
227 |
|
|
%makeinstall_std |
228 |
|
|
%makeinstall_std -C PerlMagick |
229 |
fwang |
143438 |
|
230 |
|
|
find %{buildroot} -name '*.la' | xargs rm |
231 |
spuhler |
47947 |
rm -f %buildroot%{_datadir}/GraphicsMagick-%{version}/{ChangeLog,NEWS.txt} |
232 |
|
|
|
233 |
|
|
%clean |
234 |
|
|
rm -rf %{buildroot} |
235 |
|
|
|
236 |
|
|
|