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
9 %bcond_without xcb # XCB backend
11 %bcond_with tests # perform tests (can fail due to out of memory)
13 Summary: Cairo - multi-platform 2D graphics library
14 Summary(pl.UTF-8): Cairo - wieloplatformowa biblioteka graficzna 2D
18 License: LGPL v2.1 or MPL v1.1
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.59
25 BuildRequires: automake >= 1:1.9.6
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.6}
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 >= 1.4
35 BuildRequires: pixman-devel >= 0.22.0
36 BuildRequires: pkgconfig >= 1:0.9
37 %{?with_tests:BuildRequires: poppler-glib-devel >= 0.17.4}
38 BuildRequires: rpm >= 4.4.9-56
39 BuildRequires: sed >= 4.0
41 BuildRequires: libxcb-devel >= 1.6
43 %if "%{pld_release}" == "ac"
44 BuildRequires: xrender-devel >= 0.6
46 BuildRequires: xorg-lib-libX11-devel%{?with_xcb: >= 1.1}
47 BuildRequires: xorg-lib-libXrender-devel >= 0.6
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)
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
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
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.
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.
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
96 Requires: xorg-lib-libX11-devel%{?with_xcb: >= 1.1}
97 Requires: xorg-lib-libXrender-devel >= 0.6
101 Development files for Cairo library.
103 %description devel -l pl.UTF-8
104 Pliki programistyczne biblioteki Cairo.
107 Summary: Static Cairo library
108 Summary(pl.UTF-8): Statyczna biblioteka Cairo
109 Group: Development/Libraries
110 Requires: %{name}-devel = %{version}-%{release}
113 Static Cairo library.
115 %description static -l pl.UTF-8
116 Statyczna biblioteka Cairo.
119 Summary: GObject functions library for Cairo graphics library
120 Summary(pl.UTF-8): Biblioteka funkcji GObject dla biblioteki graficznej Cairo
122 Requires: %{name} = %{version}-%{release}
125 GObject functions library for Cairo graphics library.
127 %description gobject -l pl.UTF-8
128 Biblioteka funkcji GObject dla biblioteki graficznej Cairo.
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
138 %description gobject-devel
139 Header files for Cairo GObject library.
141 %description gobject-devel -l pl.UTF-8
142 Pliki nagłówkowe biblioteki Cairo GObject.
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}
150 %description gobject-static
151 Static Cairo GObject library.
153 %description gobject-static -l pl.UTF-8
154 Statyczna biblioteka Cairo GObject.
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
164 Cairo calls tracing utilities.
166 %description trace -l pl.UTF-8
167 Narzędzia do śledzenia wywołań Cairo.
170 Summary: Cairo API documentation
171 Summary(pl.UTF-8): Dokumentacja API Cairo
173 Requires: gtk-doc-common
176 Cairo API documentation.
178 %description apidocs -l pl.UTF-8
179 Dokumentacja API Cairo.
186 %{?with_apidocs:%{__gtkdocize}}
188 %{__aclocal} -I build
193 --disable-silent-rules \
195 %{?with_gl:--enable-gl=yes}\
196 %{?with_apidocs:--enable-gtk-doc} \
200 %{!?with_svg:--disable-svg} \
202 %{?with_xcb:--enable-xcb} \
203 --with-html-dir=%{_gtkdocdir}
205 %{__sed} -i 's/gobject-2.0 glib-2.0//' src/cairo.pc
208 %{?with_tests:%{__make} check}
211 rm -rf $RPM_BUILD_ROOT
214 DESTDIR=$RPM_BUILD_ROOT
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}
221 %{!?with_apidocs:%{__rm} -rf $RPM_BUILD_ROOT%{_gtkdocdir}/cairo}
224 rm -rf $RPM_BUILD_ROOT
226 %post -p /sbin/ldconfig
227 %postun -p /sbin/ldconfig
229 %post gobject -p /sbin/ldconfig
230 %postun gobject -p /sbin/ldconfig
233 %defattr(644,root,root,755)
234 # COPYING contains only notes, not LGPL/MPL texts
235 %doc AUTHORS COPYING ChangeLog NEWS README
236 %attr(755,root,root) %{_libdir}/libcairo.so.*.*.*
237 %attr(755,root,root) %ghost %{_libdir}/libcairo.so.2
238 %attr(755,root,root) %{_libdir}/libcairo-script-interpreter.so.*.*.*
239 %attr(755,root,root) %ghost %{_libdir}/libcairo-script-interpreter.so.2
242 %defattr(644,root,root,755)
243 %attr(755,root,root) %{_libdir}/libcairo.so
244 %attr(755,root,root) %{_libdir}/libcairo-script-interpreter.so
245 %{_libdir}/libcairo.la
246 %{_libdir}/libcairo-script-interpreter.la
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
266 %defattr(644,root,root,755)
267 %{_libdir}/libcairo.a
268 %{_libdir}/libcairo-script-interpreter.a
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
276 %defattr(644,root,root,755)
277 %attr(755,root,root) %{_libdir}/libcairo-gobject.so
278 %{_libdir}/libcairo-gobject.la
279 %{_includedir}/cairo/cairo-gobject.h
280 %{_pkgconfigdir}/cairo-gobject.pc
282 %files gobject-static
283 %defattr(644,root,root,755)
284 %{_libdir}/libcairo-gobject.a
287 %defattr(644,root,root,755)
288 %attr(755,root,root) %{_bindir}/cairo-sphinx
289 %attr(755,root,root) %{_bindir}/cairo-trace
290 %dir %{_libdir}/cairo
291 %attr(755,root,root) %{_libdir}/cairo/cairo-fdr.so*
292 %attr(755,root,root) %{_libdir}/cairo/cairo-sphinx.so*
293 %attr(755,root,root) %{_libdir}/cairo/libcairo-trace.so*
297 %defattr(644,root,root,755)