]>
Commit | Line | Data |
---|---|---|
79fcc918 JB |
1 | # |
2 | # Conditional build: | |
9f933f96 | 3 | %bcond_without apidocs # disable gtk-doc |
555786d4 JB |
4 | %bcond_with cogl # Cogl surface backend [incompatible with cogl 1.12.x] |
5 | %bcond_with directfb # DirectFB surface backend | |
6 | %bcond_with drm # DRM surface backend | |
7 | %bcond_without gl # OpenGL surface backend | |
8 | %bcond_with glesv2 # OpenGLESv2 surface backend (mutually exclusive with gl) | |
9 | %bcond_with openvg # OpenVG surface backend | |
10 | %bcond_without pdf # PDF surface backend | |
11 | %bcond_without ps # PS surface backend | |
12 | %bcond_without svg # SVG surface backend (disable to boostrap librsvg) | |
13 | %bcond_with qt # Qt surface backend [expects qt_draw_glyphs() API in Qt 4.7+] | |
68f80d0c | 14 | %if "%{pld_release}" == "ac" |
75cc31b6 | 15 | %bcond_with xcb # XCB backend |
68f80d0c | 16 | %else |
75cc31b6 | 17 | %bcond_without xcb # XCB backend |
68f80d0c | 18 | %endif |
75cc31b6 | 19 | %bcond_with tests # perform tests (can fail due to out of memory) |
052e014b | 20 | |
555786d4 JB |
21 | %if %{with glesv2} |
22 | %undefine with_gl | |
23 | %endif | |
b7ccdbe1 | 24 | Summary: Cairo - multi-platform 2D graphics library |
beb0026f | 25 | Summary(pl.UTF-8): Cairo - wieloplatformowa biblioteka graficzna 2D |
8c7ef450 | 26 | Name: cairo |
acd7ce6e AM |
27 | Version: 1.14.0 |
28 | Release: 1 | |
9b33cbb5 | 29 | License: LGPL v2.1 or MPL v1.1 |
b7ccdbe1 | 30 | Group: Libraries |
a5ca8e3c | 31 | Source0: http://cairographics.org/releases/%{name}-%{version}.tar.xz |
acd7ce6e | 32 | # Source0-md5: fc3a5edeba703f906f2241b394f0cced |
c9185d93 | 33 | Patch0: %{name}-link.patch |
8c7ef450 | 34 | URL: http://cairographics.org/ |
555786d4 JB |
35 | %{?with_directfb:BuildRequires: DirectFB-devel} |
36 | %if %{with gl} || %{with glesv2} || %{with openvg} | |
37 | BuildRequires: EGL-devel >= 1.1 | |
38 | %endif | |
39 | %if %{with gl} || %{with openvg} | |
40 | BuildRequires: OpenGL-GLX-devel | |
41 | %endif | |
42 | %{?with_gl:BuildRequires: OpenGL-devel} | |
43 | %{?with_glesv2:BuildRequires: OpenGLESv2-devel >= 2.0} | |
44 | %{?with_openvg:BuildRequires: OpenVG-devel} | |
45 | %{?with_qt:BuildRequires: QtGui-devel >= 4.4.0} | |
543a7c78 JB |
46 | BuildRequires: autoconf >= 2.63 |
47 | BuildRequires: automake >= 1:1.11 | |
fde28cff | 48 | BuildRequires: binutils-devel |
555786d4 | 49 | %{?with_cogl:BuildRequires: cogl-devel} |
3396a3ae | 50 | BuildRequires: fontconfig-devel >= 2.2.95 |
75cc31b6 | 51 | BuildRequires: freetype-devel >= 1:2.3.0 |
acd7ce6e | 52 | BuildRequires: glib2-devel >= 1:2.14 |
543a7c78 | 53 | %{?with_apidocs:BuildRequires: gtk-doc >= 1.15} |
555786d4 | 54 | %{?with_drm:BuildRequires: libdrm-devel} |
42ecc17e | 55 | BuildRequires: libpng-devel >= 2:1.4.0 |
555786d4 | 56 | %if %{with svg} && %{with tests} |
7932577f | 57 | BuildRequires: librsvg-devel >= 2.35.0 |
555786d4 JB |
58 | %endif |
59 | %if %{with ps} && %{with tests} | |
3396a3ae | 60 | BuildRequires: libspectre-devel >= 0.2.0 |
555786d4 | 61 | %endif |
543a7c78 JB |
62 | BuildRequires: libtool >= 2:2.2 |
63 | %{?with_xcb:BuildRequires: libxcb-devel >= 1.6} | |
7932577f | 64 | BuildRequires: lzo-devel >= 2 |
acd7ce6e | 65 | BuildRequires: pixman-devel >= 0.30.0 |
5a53c090 | 66 | BuildRequires: pkgconfig >= 1:0.18 |
555786d4 JB |
67 | %if %{with pdf} && %{with tests} |
68 | BuildRequires: poppler-glib-devel >= 0.17.4 | |
69 | %endif | |
68f80d0c | 70 | BuildRequires: rpm >= 4.4.9-56 |
0c4a4f34 | 71 | BuildRequires: sed >= 4.0 |
543a7c78 | 72 | BuildRequires: tar >= 1:1.22 |
555786d4 | 73 | %{?with_drm:BuildRequires: udev-devel >= 1:136} |
68f80d0c ER |
74 | %if "%{pld_release}" == "ac" |
75 | BuildRequires: xrender-devel >= 0.6 | |
76 | %else | |
3396a3ae | 77 | BuildRequires: xorg-lib-libX11-devel%{?with_xcb: >= 1.1} |
555786d4 | 78 | BuildRequires: xorg-lib-libXext-devel |
ddb9a7c6 | 79 | BuildRequires: xorg-lib-libXrender-devel >= 0.6 |
68f80d0c | 80 | %endif |
543a7c78 | 81 | BuildRequires: xz |
9bc5a16c | 82 | BuildRequires: zlib-devel |
555786d4 JB |
83 | %{?with_qt:Requires: QtGui >= 4.4.0} |
84 | Requires: fontconfig-libs >= 2.2.95 | |
75cc31b6 | 85 | Requires: freetype >= 1:2.3.0 |
fde28cff | 86 | %{?with_xcb:Requires: libxcb >= 1.6} |
acd7ce6e | 87 | Requires: pixman >= 0.30.0 |
8a51f1cc | 88 | %{?with_drm:Requires: udev-libs >= 1:136} |
b7ccdbe1 | 89 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
8c7ef450 | 90 | |
91 | %description | |
76666767 | 92 | Cairo provides anti-aliased vector-based rendering for X. Paths |
b7ccdbe1 JB |
93 | consist of line segments and cubic splines and can be rendered at any |
94 | width with various join and cap styles. All colors may be specified | |
95 | with optional translucence (opacity/alpha) and combined using the | |
96 | extended Porter/Duff compositing algebra as found in the X Render | |
97 | Extension. | |
98 | ||
99 | Cairo exports a stateful rendering API similar in spirit to the path | |
100 | construction, text, and painting operators of PostScript, (with the | |
101 | significant addition of translucence in the imaging model). When | |
102 | complete, the API is intended to support the complete imaging model of | |
103 | PDF 1.4. | |
104 | ||
65aac246 JR |
105 | %description -l pl.UTF-8 |
106 | Cairo obsługuje oparty na wektorach rendering z antyaliasingiem dla X. | |
107 | Ścieżki składają się z odcinków i splajnów kubicznych, a renderowane | |
108 | mogą być z dowolną grubością i różnymi stylami połączeń i zakończeń. | |
109 | Wszystkie kolory mogą być podane z opcjonalną półprzezroczystością | |
110 | (podaną przez współczynnik nieprzezroczystości lub alpha) i łączone | |
9c95588d | 111 | przy użyciu rozszerzonego algorytmu składania Portera-Duffa, który |
65aac246 JR |
112 | można znaleźć w rozszerzeniu X Render. |
113 | ||
114 | Cairo eksportuje stanowe API renderujące w duchu podobne do operatorów | |
115 | konstruowania ścieżek, tekstu i rysowania z PostScriptu (ze znacznym | |
116 | dodatkiem półprzezroczystości w modelu obrazu). Kiedy API zostanie | |
117 | ukończone, ma obsługiwać pełny model obrazu z PDF w wersji 1.4. | |
118 | ||
8c7ef450 | 119 | %package devel |
b7ccdbe1 | 120 | Summary: Development files for Cairo library |
beb0026f | 121 | Summary(pl.UTF-8): Pliki programistyczne biblioteki Cairo |
4233927e | 122 | Group: Development/Libraries |
b7ccdbe1 | 123 | Requires: %{name} = %{version}-%{release} |
555786d4 JB |
124 | %{?with_directfb:Requires: DirectFB-devel} |
125 | %if %{with gl} || %{with glesv2} || %{with openvg} | |
126 | Requires: EGL-devel >= 1.1 | |
127 | %endif | |
128 | %{?with_gl:Requires: OpenGL-devel} | |
129 | %{?with_glesv2:Requires: OpenGLESv2-devel >= 2.0} | |
130 | %{?with_openvg:Requires: OpenVG-devel} | |
131 | %{?with_qt:Requires: QtGui-devel >= 4.4.0} | |
132 | %{?with_cogl:Requires: cogl-devel} | |
3396a3ae | 133 | Requires: fontconfig-devel >= 2.2.95 |
75cc31b6 | 134 | Requires: freetype-devel >= 1:2.3.0 |
555786d4 | 135 | %{?with_drm:Requires: libdrm-devel} |
42ecc17e | 136 | Requires: libpng-devel >= 2:1.4.0 |
fde28cff | 137 | %{?with_xcb:Requires: libxcb-devel >= 1.6} |
737c5d82 | 138 | Requires: lzo-devel >= 2 |
acd7ce6e | 139 | Requires: pixman-devel >= 0.30.0 |
555786d4 | 140 | %{?with_drm:Requires: udev-devel >= 1:136} |
68f80d0c ER |
141 | %if "%{pld_release}" == "ac" |
142 | Requires: xrender-devel >= 0.6 | |
143 | %else | |
3396a3ae | 144 | Requires: xorg-lib-libX11-devel%{?with_xcb: >= 1.1} |
555786d4 | 145 | Requires: xorg-lib-libXext-devel |
ddb9a7c6 | 146 | Requires: xorg-lib-libXrender-devel >= 0.6 |
68f80d0c | 147 | %endif |
555786d4 | 148 | Requires: zlib-devel |
8c7ef450 | 149 | |
150 | %description devel | |
b7ccdbe1 JB |
151 | Development files for Cairo library. |
152 | ||
65aac246 | 153 | %description devel -l pl.UTF-8 |
b7ccdbe1 | 154 | Pliki programistyczne biblioteki Cairo. |
8c7ef450 | 155 | |
156 | %package static | |
b7ccdbe1 | 157 | Summary: Static Cairo library |
beb0026f | 158 | Summary(pl.UTF-8): Statyczna biblioteka Cairo |
4233927e | 159 | Group: Development/Libraries |
b7ccdbe1 | 160 | Requires: %{name}-devel = %{version}-%{release} |
8c7ef450 | 161 | |
162 | %description static | |
b7ccdbe1 JB |
163 | Static Cairo library. |
164 | ||
65aac246 | 165 | %description static -l pl.UTF-8 |
b7ccdbe1 | 166 | Statyczna biblioteka Cairo. |
8c7ef450 | 167 | |
8f628762 JB |
168 | %package gobject |
169 | Summary: GObject functions library for Cairo graphics library | |
170 | Summary(pl.UTF-8): Biblioteka funkcji GObject dla biblioteki graficznej Cairo | |
171 | Group: Libraries | |
172 | Requires: %{name} = %{version}-%{release} | |
7932577f | 173 | Requires: glib2 >= 1:2.14 |
8f628762 JB |
174 | |
175 | %description gobject | |
176 | GObject functions library for Cairo graphics library. | |
177 | ||
178 | %description gobject -l pl.UTF-8 | |
179 | Biblioteka funkcji GObject dla biblioteki graficznej Cairo. | |
180 | ||
181 | %package gobject-devel | |
182 | Summary: Header files for Cairo GObject library | |
183 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Cairo GObject | |
184 | Group: Development/Libraries | |
185 | Requires: %{name}-devel = %{version}-%{release} | |
186 | Requires: %{name}-gobject = %{version}-%{release} | |
acd7ce6e | 187 | Requires: glib2-devel >= 1:2.14 |
8f628762 JB |
188 | |
189 | %description gobject-devel | |
190 | Header files for Cairo GObject library. | |
191 | ||
192 | %description gobject-devel -l pl.UTF-8 | |
193 | Pliki nagłówkowe biblioteki Cairo GObject. | |
194 | ||
195 | %package gobject-static | |
196 | Summary: Static Cairo GObject library | |
197 | Summary(pl.UTF-8): Statyczna biblioteka Cairo GObject | |
198 | Group: Development/Libraries | |
199 | Requires: %{name}-gobject-devel = %{version}-%{release} | |
200 | ||
201 | %description gobject-static | |
202 | Static Cairo GObject library. | |
203 | ||
204 | %description gobject-static -l pl.UTF-8 | |
205 | Statyczna biblioteka Cairo GObject. | |
206 | ||
207 | %package trace | |
fde28cff JB |
208 | Summary: Cairo calls tracing utilities |
209 | Summary(pl.UTF-8): Narzędzia do śledzenia wywołań Cairo | |
8f628762 JB |
210 | Group: Development/Tools |
211 | Requires: %{name} = %{version}-%{release} | |
c0a654a7 | 212 | Requires: binutils-libs >= 2.21.53 |
8f628762 JB |
213 | |
214 | %description trace | |
fde28cff | 215 | Cairo calls tracing utilities. |
8f628762 JB |
216 | |
217 | %description trace -l pl.UTF-8 | |
fde28cff | 218 | Narzędzia do śledzenia wywołań Cairo. |
8f628762 | 219 | |
ecad233f | 220 | %package apidocs |
221 | Summary: Cairo API documentation | |
beb0026f | 222 | Summary(pl.UTF-8): Dokumentacja API Cairo |
ecad233f | 223 | Group: Documentation |
224 | Requires: gtk-doc-common | |
052e014b ER |
225 | %if "%{_rpmversion}" >= "5" |
226 | BuildArch: noarch | |
227 | %endif | |
ecad233f | 228 | |
229 | %description apidocs | |
230 | Cairo API documentation. | |
231 | ||
65aac246 | 232 | %description apidocs -l pl.UTF-8 |
d55df9d3 | 233 | Dokumentacja API Cairo. |
ecad233f | 234 | |
8c7ef450 | 235 | %prep |
56de7934 | 236 | %setup -q |
c9185d93 | 237 | %patch0 -p1 |
8c7ef450 | 238 | |
239 | %build | |
2e75f7d0 | 240 | %{?with_apidocs:%{__gtkdocize}} |
b7ccdbe1 | 241 | %{__libtoolize} |
75cc31b6 | 242 | %{__aclocal} -I build |
8c7ef450 | 243 | %{__autoheader} |
8c7ef450 | 244 | %{__autoconf} |
b7ccdbe1 | 245 | %{__automake} |
7fdf57cf | 246 | %configure \ |
3396a3ae | 247 | --disable-silent-rules \ |
555786d4 JB |
248 | %{?with_cogl:--enable-cogl} \ |
249 | %{?with_directfb:--enable-directfb} \ | |
c0a654a7 | 250 | --enable-ft \ |
555786d4 JB |
251 | %{?with_gl:--enable-gl} \ |
252 | %{?with_glesv2:--enable-glesv2} \ | |
5cbde25f | 253 | %{?with_apidocs:--enable-gtk-doc} \ |
555786d4 | 254 | %{?with_pdf:--enable-pdf} \ |
2d024fa9 | 255 | --enable-png \ |
555786d4 JB |
256 | %{?with_ps:--enable-ps} \ |
257 | %{?with_qt:--enable-qt} \ | |
0ecd672c | 258 | %{!?with_svg:--disable-svg} \ |
e9726ad7 | 259 | --enable-tee \ |
555786d4 | 260 | %{?with_openvg:--enable-vg} \ |
5cbde25f | 261 | %{?with_xcb:--enable-xcb} \ |
555786d4 | 262 | --enable-xml \ |
7fdf57cf | 263 | --with-html-dir=%{_gtkdocdir} |
0c4a4f34 | 264 | |
265 | %{__sed} -i 's/gobject-2.0 glib-2.0//' src/cairo.pc | |
266 | ||
8c7ef450 | 267 | %{__make} |
d71997d7 | 268 | %{?with_tests:%{__make} check} |
8c7ef450 | 269 | |
270 | %install | |
271 | rm -rf $RPM_BUILD_ROOT | |
8c7ef450 | 272 | |
273 | %{__make} install \ | |
274 | DESTDIR=$RPM_BUILD_ROOT | |
275 | ||
8f628762 JB |
276 | # LD_PRELOADable library |
277 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/cairo/libcairo-trace.{la,a} | |
fde28cff JB |
278 | # LD_PRELOADable modules(?) |
279 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/cairo/cairo-{fdr,sphinx}.{la,a} | |
8f628762 | 280 | |
fde28cff | 281 | %{!?with_apidocs:%{__rm} -rf $RPM_BUILD_ROOT%{_gtkdocdir}/cairo} |
8452c411 | 282 | |
8c7ef450 | 283 | %clean |
284 | rm -rf $RPM_BUILD_ROOT | |
285 | ||
b7ccdbe1 JB |
286 | %post -p /sbin/ldconfig |
287 | %postun -p /sbin/ldconfig | |
8c7ef450 | 288 | |
8f628762 JB |
289 | %post gobject -p /sbin/ldconfig |
290 | %postun gobject -p /sbin/ldconfig | |
291 | ||
b7ccdbe1 JB |
292 | %files |
293 | %defattr(644,root,root,755) | |
9b33cbb5 | 294 | # COPYING contains only notes, not LGPL/MPL texts |
2d024fa9 | 295 | %doc AUTHORS COPYING ChangeLog NEWS README |
daa7aa2f JB |
296 | %attr(755,root,root) %{_libdir}/libcairo.so.*.*.* |
297 | %attr(755,root,root) %ghost %{_libdir}/libcairo.so.2 | |
1fb61c53 PZ |
298 | %attr(755,root,root) %{_libdir}/libcairo-script-interpreter.so.*.*.* |
299 | %attr(755,root,root) %ghost %{_libdir}/libcairo-script-interpreter.so.2 | |
8c7ef450 | 300 | |
301 | %files devel | |
302 | %defattr(644,root,root,755) | |
daa7aa2f | 303 | %attr(755,root,root) %{_libdir}/libcairo.so |
1fb61c53 | 304 | %attr(755,root,root) %{_libdir}/libcairo-script-interpreter.so |
90281370 JR |
305 | %{_libdir}/libcairo.la |
306 | %{_libdir}/libcairo-script-interpreter.la | |
daa7aa2f | 307 | %{_includedir}/cairo |
8f628762 | 308 | %exclude %{_includedir}/cairo/cairo-gobject.h |
daa7aa2f | 309 | %{_pkgconfigdir}/cairo.pc |
555786d4 JB |
310 | %{?with_directfb:%{_pkgconfigdir}/cairo-directfb.pc} |
311 | %if %{with gl} || %{with glesv2} || %{with openvg} | |
312 | %{_pkgconfigdir}/cairo-egl.pc | |
313 | %endif | |
1fb61c53 | 314 | %{_pkgconfigdir}/cairo-fc.pc |
daa7aa2f | 315 | %{_pkgconfigdir}/cairo-ft.pc |
555786d4 JB |
316 | %{?with_gl:%{_pkgconfigdir}/cairo-gl.pc} |
317 | %if %{with gl} || %{with openvg} | |
318 | %{_pkgconfigdir}/cairo-glx.pc | |
319 | %endif | |
320 | %{?with_pdf:%{_pkgconfigdir}/cairo-pdf.pc} | |
daa7aa2f | 321 | %{_pkgconfigdir}/cairo-png.pc |
555786d4 JB |
322 | %{?with_ps:%{_pkgconfigdir}/cairo-ps.pc} |
323 | %{?with_qt:%{_pkgconfigdir}/cairo-qt.pc} | |
fde28cff | 324 | %{_pkgconfigdir}/cairo-script.pc |
0ecd672c | 325 | %{?with_svg:%{_pkgconfigdir}/cairo-svg.pc} |
e9726ad7 | 326 | %{_pkgconfigdir}/cairo-tee.pc |
555786d4 | 327 | %{?with_openvg:%{_pkgconfigdir}/cairo-vg.pc} |
8452c411 | 328 | %{?with_xcb:%{_pkgconfigdir}/cairo-xcb.pc} |
1fb61c53 | 329 | %{?with_xcb:%{_pkgconfigdir}/cairo-xcb-shm.pc} |
daa7aa2f JB |
330 | %{_pkgconfigdir}/cairo-xlib.pc |
331 | %{_pkgconfigdir}/cairo-xlib-xrender.pc | |
555786d4 | 332 | %{_pkgconfigdir}/cairo-xml.pc |
b7ccdbe1 JB |
333 | |
334 | %files static | |
335 | %defattr(644,root,root,755) | |
daa7aa2f | 336 | %{_libdir}/libcairo.a |
1fb61c53 | 337 | %{_libdir}/libcairo-script-interpreter.a |
ecad233f | 338 | |
8f628762 JB |
339 | %files gobject |
340 | %defattr(644,root,root,755) | |
341 | %attr(755,root,root) %{_libdir}/libcairo-gobject.so.*.*.* | |
342 | %attr(755,root,root) %ghost %{_libdir}/libcairo-gobject.so.2 | |
343 | ||
344 | %files gobject-devel | |
345 | %defattr(644,root,root,755) | |
346 | %attr(755,root,root) %{_libdir}/libcairo-gobject.so | |
90281370 | 347 | %{_libdir}/libcairo-gobject.la |
8f628762 JB |
348 | %{_includedir}/cairo/cairo-gobject.h |
349 | %{_pkgconfigdir}/cairo-gobject.pc | |
350 | ||
351 | %files gobject-static | |
352 | %defattr(644,root,root,755) | |
353 | %{_libdir}/libcairo-gobject.a | |
354 | ||
355 | %files trace | |
356 | %defattr(644,root,root,755) | |
fde28cff | 357 | %attr(755,root,root) %{_bindir}/cairo-sphinx |
8f628762 JB |
358 | %attr(755,root,root) %{_bindir}/cairo-trace |
359 | %dir %{_libdir}/cairo | |
fde28cff JB |
360 | %attr(755,root,root) %{_libdir}/cairo/cairo-fdr.so* |
361 | %attr(755,root,root) %{_libdir}/cairo/cairo-sphinx.so* | |
8f628762 JB |
362 | %attr(755,root,root) %{_libdir}/cairo/libcairo-trace.so* |
363 | ||
8452c411 | 364 | %if %{with apidocs} |
ecad233f | 365 | %files apidocs |
366 | %defattr(644,root,root,755) | |
367 | %{_gtkdocdir}/cairo | |
8452c411 | 368 | %endif |