]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_without apidocs # disable gtk-doc | |
4 | %bcond_without svg # disable SVG support (to boostrap librsvg) | |
5 | %bcond_with gl # enable OpenGL support | |
6 | %if "%{pld_release}" == "ac" | |
7 | %bcond_with xcb # XCB backend | |
8 | %else | |
9 | %bcond_without xcb # XCB backend | |
10 | %endif | |
11 | %bcond_with tests # perform tests (can fail due to out of memory) | |
12 | # | |
13 | Summary: Cairo - multi-platform 2D graphics library | |
14 | Summary(pl.UTF-8): Cairo - wieloplatformowa biblioteka graficzna 2D | |
15 | Name: cairo | |
16 | Version: 1.12.2 | |
17 | Release: 7 | |
18 | License: LGPL v2.1 or MPL v1.1 | |
19 | Group: Libraries | |
20 | Source0: http://cairographics.org/releases/%{name}-%{version}.tar.xz | |
21 | # Source0-md5: 87649eb75789739d517c743e94879e51 | |
22 | Patch0: %{name}-link.patch | |
23 | URL: http://cairographics.org/ | |
24 | BuildRequires: autoconf >= 2.63 | |
25 | BuildRequires: automake >= 1:1.11 | |
26 | BuildRequires: binutils-devel | |
27 | BuildRequires: fontconfig-devel >= 2.2.95 | |
28 | BuildRequires: freetype-devel >= 1:2.3.0 | |
29 | BuildRequires: glib2-devel >= 1:2.0 | |
30 | %{?with_apidocs:BuildRequires: gtk-doc >= 1.15} | |
31 | BuildRequires: libpng-devel >= 2:1.4.0 | |
32 | %{?with_svg:BuildRequires: librsvg-devel >= 2.15.0} | |
33 | BuildRequires: libspectre-devel >= 0.2.0 | |
34 | BuildRequires: libtool >= 2:2.2 | |
35 | %{?with_xcb:BuildRequires: libxcb-devel >= 1.6} | |
36 | BuildRequires: pixman-devel >= 0.22.0 | |
37 | BuildRequires: pkgconfig >= 1:0.9 | |
38 | %{?with_tests:BuildRequires: poppler-glib-devel >= 0.17.4} | |
39 | BuildRequires: rpm >= 4.4.9-56 | |
40 | BuildRequires: sed >= 4.0 | |
41 | BuildRequires: tar >= 1:1.22 | |
42 | %if "%{pld_release}" == "ac" | |
43 | BuildRequires: xrender-devel >= 0.6 | |
44 | %else | |
45 | BuildRequires: xorg-lib-libX11-devel%{?with_xcb: >= 1.1} | |
46 | BuildRequires: xorg-lib-libXrender-devel >= 0.6 | |
47 | %endif | |
48 | BuildRequires: xz | |
49 | BuildRequires: zlib-devel | |
50 | Requires: freetype >= 1:2.3.0 | |
51 | %{?with_xcb:Requires: libxcb >= 1.6} | |
52 | Requires: pixman >= 0.22.0 | |
53 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
54 | ||
55 | %description | |
56 | Cairo provides anti-aliased vector-based rendering for X. Paths | |
57 | consist of line segments and cubic splines and can be rendered at any | |
58 | width with various join and cap styles. All colors may be specified | |
59 | with optional translucence (opacity/alpha) and combined using the | |
60 | extended Porter/Duff compositing algebra as found in the X Render | |
61 | Extension. | |
62 | ||
63 | Cairo exports a stateful rendering API similar in spirit to the path | |
64 | construction, text, and painting operators of PostScript, (with the | |
65 | significant addition of translucence in the imaging model). When | |
66 | complete, the API is intended to support the complete imaging model of | |
67 | PDF 1.4. | |
68 | ||
69 | %description -l pl.UTF-8 | |
70 | Cairo obsługuje oparty na wektorach rendering z antyaliasingiem dla X. | |
71 | Ścieżki składają się z odcinków i splajnów kubicznych, a renderowane | |
72 | mogą być z dowolną grubością i różnymi stylami połączeń i zakończeń. | |
73 | Wszystkie kolory mogą być podane z opcjonalną półprzezroczystością | |
74 | (podaną przez współczynnik nieprzezroczystości lub alpha) i łączone | |
75 | przy użyciu rozszerzonego algorytmu składania Portera-Duffa, który | |
76 | można znaleźć w rozszerzeniu X Render. | |
77 | ||
78 | Cairo eksportuje stanowe API renderujące w duchu podobne do operatorów | |
79 | konstruowania ścieżek, tekstu i rysowania z PostScriptu (ze znacznym | |
80 | dodatkiem półprzezroczystości w modelu obrazu). Kiedy API zostanie | |
81 | ukończone, ma obsługiwać pełny model obrazu z PDF w wersji 1.4. | |
82 | ||
83 | %package devel | |
84 | Summary: Development files for Cairo library | |
85 | Summary(pl.UTF-8): Pliki programistyczne biblioteki Cairo | |
86 | Group: Development/Libraries | |
87 | Requires: %{name} = %{version}-%{release} | |
88 | Requires: fontconfig-devel >= 2.2.95 | |
89 | Requires: freetype-devel >= 1:2.3.0 | |
90 | Requires: libpng-devel >= 2:1.4.0 | |
91 | %{?with_xcb:Requires: libxcb-devel >= 1.6} | |
92 | Requires: pixman-devel >= 0.22.0 | |
93 | %if "%{pld_release}" == "ac" | |
94 | Requires: xrender-devel >= 0.6 | |
95 | %else | |
96 | Requires: xorg-lib-libX11-devel%{?with_xcb: >= 1.1} | |
97 | Requires: xorg-lib-libXrender-devel >= 0.6 | |
98 | %endif | |
99 | ||
100 | %description devel | |
101 | Development files for Cairo library. | |
102 | ||
103 | %description devel -l pl.UTF-8 | |
104 | Pliki programistyczne biblioteki Cairo. | |
105 | ||
106 | %package static | |
107 | Summary: Static Cairo library | |
108 | Summary(pl.UTF-8): Statyczna biblioteka Cairo | |
109 | Group: Development/Libraries | |
110 | Requires: %{name}-devel = %{version}-%{release} | |
111 | ||
112 | %description static | |
113 | Static Cairo library. | |
114 | ||
115 | %description static -l pl.UTF-8 | |
116 | Statyczna biblioteka Cairo. | |
117 | ||
118 | %package gobject | |
119 | Summary: GObject functions library for Cairo graphics library | |
120 | Summary(pl.UTF-8): Biblioteka funkcji GObject dla biblioteki graficznej Cairo | |
121 | Group: Libraries | |
122 | Requires: %{name} = %{version}-%{release} | |
123 | ||
124 | %description gobject | |
125 | GObject functions library for Cairo graphics library. | |
126 | ||
127 | %description gobject -l pl.UTF-8 | |
128 | Biblioteka funkcji GObject dla biblioteki graficznej Cairo. | |
129 | ||
130 | %package gobject-devel | |
131 | Summary: Header files for Cairo GObject library | |
132 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Cairo GObject | |
133 | Group: Development/Libraries | |
134 | Requires: %{name}-devel = %{version}-%{release} | |
135 | Requires: %{name}-gobject = %{version}-%{release} | |
136 | Requires: glib2-devel >= 1:2.0 | |
137 | ||
138 | %description gobject-devel | |
139 | Header files for Cairo GObject library. | |
140 | ||
141 | %description gobject-devel -l pl.UTF-8 | |
142 | Pliki nagłówkowe biblioteki Cairo GObject. | |
143 | ||
144 | %package gobject-static | |
145 | Summary: Static Cairo GObject library | |
146 | Summary(pl.UTF-8): Statyczna biblioteka Cairo GObject | |
147 | Group: Development/Libraries | |
148 | Requires: %{name}-gobject-devel = %{version}-%{release} | |
149 | ||
150 | %description gobject-static | |
151 | Static Cairo GObject library. | |
152 | ||
153 | %description gobject-static -l pl.UTF-8 | |
154 | Statyczna biblioteka Cairo GObject. | |
155 | ||
156 | %package trace | |
157 | Summary: Cairo calls tracing utilities | |
158 | Summary(pl.UTF-8): Narzędzia do śledzenia wywołań Cairo | |
159 | Group: Development/Tools | |
160 | Requires: %{name} = %{version}-%{release} | |
161 | Requires: binutils-libs >= 2.21.53 | |
162 | ||
163 | %description trace | |
164 | Cairo calls tracing utilities. | |
165 | ||
166 | %description trace -l pl.UTF-8 | |
167 | Narzędzia do śledzenia wywołań Cairo. | |
168 | ||
169 | %package apidocs | |
170 | Summary: Cairo API documentation | |
171 | Summary(pl.UTF-8): Dokumentacja API Cairo | |
172 | Group: Documentation | |
173 | Requires: gtk-doc-common | |
174 | ||
175 | %description apidocs | |
176 | Cairo API documentation. | |
177 | ||
178 | %description apidocs -l pl.UTF-8 | |
179 | Dokumentacja API Cairo. | |
180 | ||
181 | %prep | |
182 | %setup -q | |
183 | %patch0 -p1 | |
184 | ||
185 | %build | |
186 | %{?with_apidocs:%{__gtkdocize}} | |
187 | %{__libtoolize} | |
188 | %{__aclocal} -I build | |
189 | %{__autoheader} | |
190 | %{__autoconf} | |
191 | %{__automake} | |
192 | %configure \ | |
193 | --disable-silent-rules \ | |
194 | --enable-ft \ | |
195 | %{?with_gl:--enable-gl=yes}\ | |
196 | %{?with_apidocs:--enable-gtk-doc} \ | |
197 | --enable-pdf \ | |
198 | --enable-png \ | |
199 | --enable-ps \ | |
200 | %{!?with_svg:--disable-svg} \ | |
201 | --enable-tee \ | |
202 | %{?with_xcb:--enable-xcb} \ | |
203 | --with-html-dir=%{_gtkdocdir} | |
204 | ||
205 | %{__sed} -i 's/gobject-2.0 glib-2.0//' src/cairo.pc | |
206 | ||
207 | %{__make} | |
208 | %{?with_tests:%{__make} check} | |
209 | ||
210 | %install | |
211 | rm -rf $RPM_BUILD_ROOT | |
212 | ||
213 | %{__make} install \ | |
214 | DESTDIR=$RPM_BUILD_ROOT | |
215 | ||
216 | # LD_PRELOADable library | |
217 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/cairo/libcairo-trace.{la,a} | |
218 | # LD_PRELOADable modules(?) | |
219 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/cairo/cairo-{fdr,sphinx}.{la,a} | |
220 | ||
221 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la | |
222 | ||
223 | %{!?with_apidocs:%{__rm} -rf $RPM_BUILD_ROOT%{_gtkdocdir}/cairo} | |
224 | ||
225 | %clean | |
226 | rm -rf $RPM_BUILD_ROOT | |
227 | ||
228 | %post -p /sbin/ldconfig | |
229 | %postun -p /sbin/ldconfig | |
230 | ||
231 | %post gobject -p /sbin/ldconfig | |
232 | %postun gobject -p /sbin/ldconfig | |
233 | ||
234 | %files | |
235 | %defattr(644,root,root,755) | |
236 | # COPYING contains only notes, not LGPL/MPL texts | |
237 | %doc AUTHORS COPYING ChangeLog NEWS README | |
238 | %attr(755,root,root) %{_libdir}/libcairo.so.*.*.* | |
239 | %attr(755,root,root) %ghost %{_libdir}/libcairo.so.2 | |
240 | %attr(755,root,root) %{_libdir}/libcairo-script-interpreter.so.*.*.* | |
241 | %attr(755,root,root) %ghost %{_libdir}/libcairo-script-interpreter.so.2 | |
242 | ||
243 | %files devel | |
244 | %defattr(644,root,root,755) | |
245 | %attr(755,root,root) %{_libdir}/libcairo.so | |
246 | %attr(755,root,root) %{_libdir}/libcairo-script-interpreter.so | |
247 | %{_includedir}/cairo | |
248 | %exclude %{_includedir}/cairo/cairo-gobject.h | |
249 | %{_pkgconfigdir}/cairo.pc | |
250 | %{?with_gl:%{_pkgconfigdir}/cairo-gl.pc} | |
251 | %{?with_gl:%{_pkgconfigdir}/cairo-glx.pc} | |
252 | %{_pkgconfigdir}/cairo-fc.pc | |
253 | %{_pkgconfigdir}/cairo-ft.pc | |
254 | %{_pkgconfigdir}/cairo-pdf.pc | |
255 | %{_pkgconfigdir}/cairo-png.pc | |
256 | %{_pkgconfigdir}/cairo-ps.pc | |
257 | %{_pkgconfigdir}/cairo-script.pc | |
258 | %{?with_svg:%{_pkgconfigdir}/cairo-svg.pc} | |
259 | %{_pkgconfigdir}/cairo-tee.pc | |
260 | %{?with_xcb:%{_pkgconfigdir}/cairo-xcb.pc} | |
261 | %{?with_xcb:%{_pkgconfigdir}/cairo-xcb-shm.pc} | |
262 | %{_pkgconfigdir}/cairo-xlib.pc | |
263 | %{_pkgconfigdir}/cairo-xlib-xrender.pc | |
264 | ||
265 | %files static | |
266 | %defattr(644,root,root,755) | |
267 | %{_libdir}/libcairo.a | |
268 | %{_libdir}/libcairo-script-interpreter.a | |
269 | ||
270 | %files gobject | |
271 | %defattr(644,root,root,755) | |
272 | %attr(755,root,root) %{_libdir}/libcairo-gobject.so.*.*.* | |
273 | %attr(755,root,root) %ghost %{_libdir}/libcairo-gobject.so.2 | |
274 | ||
275 | %files gobject-devel | |
276 | %defattr(644,root,root,755) | |
277 | %attr(755,root,root) %{_libdir}/libcairo-gobject.so | |
278 | %{_includedir}/cairo/cairo-gobject.h | |
279 | %{_pkgconfigdir}/cairo-gobject.pc | |
280 | ||
281 | %files gobject-static | |
282 | %defattr(644,root,root,755) | |
283 | %{_libdir}/libcairo-gobject.a | |
284 | ||
285 | %files trace | |
286 | %defattr(644,root,root,755) | |
287 | %attr(755,root,root) %{_bindir}/cairo-sphinx | |
288 | %attr(755,root,root) %{_bindir}/cairo-trace | |
289 | %dir %{_libdir}/cairo | |
290 | %attr(755,root,root) %{_libdir}/cairo/cairo-fdr.so* | |
291 | %attr(755,root,root) %{_libdir}/cairo/cairo-sphinx.so* | |
292 | %attr(755,root,root) %{_libdir}/cairo/libcairo-trace.so* | |
293 | ||
294 | %if %{with apidocs} | |
295 | %files apidocs | |
296 | %defattr(644,root,root,755) | |
297 | %{_gtkdocdir}/cairo | |
298 | %endif |