3 %bcond_without apidocs # disable gtk-doc
4 %bcond_without svg # disable SVG support (to boostrap librsvg)
5 %if "%{pld_release}" == "ac"
6 %bcond_with xcb # XCB backend
8 %bcond_without xcb # XCB backend
10 %bcond_with tests # perform tests (can fail due to out of memory)
12 Summary: Cairo - multi-platform 2D graphics library
13 Summary(pl.UTF-8): Cairo - wieloplatformowa biblioteka graficzna 2D
17 License: LGPL v2.1 or MPL v1.1
19 Source0: http://cairographics.org/releases/%{name}-%{version}.tar.gz
20 # Source0-md5: f101a9e88b783337b20b2e26dfd26d5f
21 Patch0: %{name}-link.patch
22 URL: http://cairographics.org/
23 BuildRequires: autoconf >= 2.59
24 BuildRequires: automake >= 1:1.9.6
25 BuildRequires: fontconfig-devel >= 2.2.95
26 BuildRequires: freetype-devel >= 1:2.3.0
27 BuildRequires: glib2-devel >= 1:2.0
28 %{?with_apidocs:BuildRequires: gtk-doc >= 1.6}
29 BuildRequires: libpng-devel >= 2:1.4.0
30 %{?with_svg:BuildRequires: librsvg-devel >= 2.15.0}
31 BuildRequires: libspectre-devel >= 0.2.0
32 BuildRequires: libtool >= 1.4
33 BuildRequires: pixman-devel >= 0.18.4
34 BuildRequires: pkgconfig >= 1:0.9
35 %{?with_tests:BuildRequires: poppler-glib-devel >= 0.13.3}
36 BuildRequires: rpm >= 4.4.9-56
37 BuildRequires: sed >= 4.0
38 BuildRequires: binutils-devel
40 BuildRequires: libxcb-devel >= 1.4
42 %if "%{pld_release}" == "ac"
43 BuildRequires: xrender-devel >= 0.6
45 BuildRequires: xorg-lib-libX11-devel%{?with_xcb: >= 1.1}
46 BuildRequires: xorg-lib-libXrender-devel >= 0.6
48 BuildRequires: zlib-devel
49 Requires: freetype >= 1:2.3.0
50 Requires: pixman >= 0.18.4
51 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
54 Cairo provides anti-aliased vector-based rendering for X. Paths
55 consist of line segments and cubic splines and can be rendered at any
56 width with various join and cap styles. All colors may be specified
57 with optional translucence (opacity/alpha) and combined using the
58 extended Porter/Duff compositing algebra as found in the X Render
61 Cairo exports a stateful rendering API similar in spirit to the path
62 construction, text, and painting operators of PostScript, (with the
63 significant addition of translucence in the imaging model). When
64 complete, the API is intended to support the complete imaging model of
67 %description -l pl.UTF-8
68 Cairo obsługuje oparty na wektorach rendering z antyaliasingiem dla X.
69 Ścieżki składają się z odcinków i splajnów kubicznych, a renderowane
70 mogą być z dowolną grubością i różnymi stylami połączeń i zakończeń.
71 Wszystkie kolory mogą być podane z opcjonalną półprzezroczystością
72 (podaną przez współczynnik nieprzezroczystości lub alpha) i łączone
73 przy użyciu rozszerzonego algorytmu składania Portera-Duffa, który
74 można znaleźć w rozszerzeniu X Render.
76 Cairo eksportuje stanowe API renderujące w duchu podobne do operatorów
77 konstruowania ścieżek, tekstu i rysowania z PostScriptu (ze znacznym
78 dodatkiem półprzezroczystości w modelu obrazu). Kiedy API zostanie
79 ukończone, ma obsługiwać pełny model obrazu z PDF w wersji 1.4.
82 Summary: Development files for Cairo library
83 Summary(pl.UTF-8): Pliki programistyczne biblioteki Cairo
84 Group: Development/Libraries
85 Requires: %{name} = %{version}-%{release}
86 Requires: fontconfig-devel >= 2.2.95
87 Requires: freetype-devel >= 1:2.3.0
88 Requires: libpng-devel >= 2:1.4.0
89 %{?with_xcb:Requires: libxcb-devel >= 1.4}
90 Requires: pixman-devel >= 0.18.4
91 %if "%{pld_release}" == "ac"
92 Requires: xrender-devel >= 0.6
94 Requires: xorg-lib-libX11-devel%{?with_xcb: >= 1.1}
95 Requires: xorg-lib-libXrender-devel >= 0.6
99 Development files for Cairo library.
101 %description devel -l pl.UTF-8
102 Pliki programistyczne biblioteki Cairo.
105 Summary: Static Cairo library
106 Summary(pl.UTF-8): Statyczna biblioteka Cairo
107 Group: Development/Libraries
108 Requires: %{name}-devel = %{version}-%{release}
111 Static Cairo library.
113 %description static -l pl.UTF-8
114 Statyczna biblioteka Cairo.
117 Summary: GObject functions library for Cairo graphics library
118 Summary(pl.UTF-8): Biblioteka funkcji GObject dla biblioteki graficznej Cairo
120 Requires: %{name} = %{version}-%{release}
123 GObject functions library for Cairo graphics library.
125 %description gobject -l pl.UTF-8
126 Biblioteka funkcji GObject dla biblioteki graficznej Cairo.
128 %package gobject-devel
129 Summary: Header files for Cairo GObject library
130 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Cairo GObject
131 Group: Development/Libraries
132 Requires: %{name}-devel = %{version}-%{release}
133 Requires: %{name}-gobject = %{version}-%{release}
134 Requires: glib2-devel >= 1:2.0
136 %description gobject-devel
137 Header files for Cairo GObject library.
139 %description gobject-devel -l pl.UTF-8
140 Pliki nagłówkowe biblioteki Cairo GObject.
142 %package gobject-static
143 Summary: Static Cairo GObject library
144 Summary(pl.UTF-8): Statyczna biblioteka Cairo GObject
145 Group: Development/Libraries
146 Requires: %{name}-gobject-devel = %{version}-%{release}
148 %description gobject-static
149 Static Cairo GObject library.
151 %description gobject-static -l pl.UTF-8
152 Statyczna biblioteka Cairo GObject.
155 Summary: Cairo calls tracing utility
156 Summary(pl.UTF-8): Narzędzie do śledzenia wywołań Cairo
157 Group: Development/Tools
158 Requires: %{name} = %{version}-%{release}
159 Requires: binutils-libs >= 2.21.53
162 Cairo calls tracing utility.
164 %description trace -l pl.UTF-8
165 Narzędzie do śledzenia wywołań Cairo.
168 Summary: Cairo API documentation
169 Summary(pl.UTF-8): Dokumentacja API Cairo
171 Requires: gtk-doc-common
174 Cairo API documentation.
176 %description apidocs -l pl.UTF-8
177 Dokumentacja API Cairo.
184 %{?with_apidocs:%{__gtkdocize}}
186 %{__aclocal} -I build
191 --disable-silent-rules \
193 %{?with_apidocs:--enable-gtk-doc} \
197 %{!?with_svg:--disable-svg} \
199 %{?with_xcb:--enable-xcb} \
200 --with-html-dir=%{_gtkdocdir}
202 %{__sed} -i 's/gobject-2.0 glib-2.0//' src/cairo.pc
205 %{?with_tests:%{__make} check}
208 rm -rf $RPM_BUILD_ROOT
211 DESTDIR=$RPM_BUILD_ROOT
213 # LD_PRELOADable library
214 %{__rm} $RPM_BUILD_ROOT%{_libdir}/cairo/libcairo-trace.{la,a}
216 %{!?with_apidocs:rm -rf $RPM_BUILD_ROOT%{_gtkdocdir}/cairo}
219 rm -rf $RPM_BUILD_ROOT
221 %post -p /sbin/ldconfig
222 %postun -p /sbin/ldconfig
224 %post gobject -p /sbin/ldconfig
225 %postun gobject -p /sbin/ldconfig
228 %defattr(644,root,root,755)
229 # COPYING contains only notes, not LGPL/MPL texts
230 %doc AUTHORS COPYING ChangeLog NEWS README
231 %attr(755,root,root) %{_libdir}/libcairo.so.*.*.*
232 %attr(755,root,root) %ghost %{_libdir}/libcairo.so.2
233 %attr(755,root,root) %{_libdir}/libcairo-script-interpreter.so.*.*.*
234 %attr(755,root,root) %ghost %{_libdir}/libcairo-script-interpreter.so.2
237 %defattr(644,root,root,755)
238 %attr(755,root,root) %{_libdir}/libcairo.so
239 %attr(755,root,root) %{_libdir}/libcairo-script-interpreter.so
240 %{_libdir}/libcairo.la
241 %{_libdir}/libcairo-script-interpreter.la
243 %exclude %{_includedir}/cairo/cairo-gobject.h
244 %{_pkgconfigdir}/cairo.pc
245 %{_pkgconfigdir}/cairo-fc.pc
246 %{_pkgconfigdir}/cairo-ft.pc
247 %{_pkgconfigdir}/cairo-pdf.pc
248 %{_pkgconfigdir}/cairo-png.pc
249 %{_pkgconfigdir}/cairo-ps.pc
250 %{?with_svg:%{_pkgconfigdir}/cairo-svg.pc}
251 %{_pkgconfigdir}/cairo-tee.pc
252 %{?with_xcb:%{_pkgconfigdir}/cairo-xcb.pc}
253 %{?with_xcb:%{_pkgconfigdir}/cairo-xcb-shm.pc}
254 %{_pkgconfigdir}/cairo-xlib.pc
255 %{_pkgconfigdir}/cairo-xlib-xrender.pc
258 %defattr(644,root,root,755)
259 %{_libdir}/libcairo.a
260 %{_libdir}/libcairo-script-interpreter.a
263 %defattr(644,root,root,755)
264 %attr(755,root,root) %{_libdir}/libcairo-gobject.so.*.*.*
265 %attr(755,root,root) %ghost %{_libdir}/libcairo-gobject.so.2
268 %defattr(644,root,root,755)
269 %attr(755,root,root) %{_libdir}/libcairo-gobject.so
270 %{_libdir}/libcairo-gobject.la
271 %{_includedir}/cairo/cairo-gobject.h
272 %{_pkgconfigdir}/cairo-gobject.pc
274 %files gobject-static
275 %defattr(644,root,root,755)
276 %{_libdir}/libcairo-gobject.a
279 %defattr(644,root,root,755)
280 %attr(755,root,root) %{_bindir}/cairo-trace
281 %dir %{_libdir}/cairo
282 %attr(755,root,root) %{_libdir}/cairo/libcairo-trace.so*
286 %defattr(644,root,root,755)