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.gz
21 # Source0-md5: f101a9e88b783337b20b2e26dfd26d5f
22 Patch0: %{name}-link.patch
23 URL: http://cairographics.org/
24 BuildRequires: autoconf >= 2.59
25 BuildRequires: automake >= 1:1.9.6
26 BuildRequires: fontconfig-devel >= 2.2.95
27 BuildRequires: freetype-devel >= 1:2.3.0
28 BuildRequires: glib2-devel >= 1:2.0
29 %{?with_apidocs:BuildRequires: gtk-doc >= 1.6}
30 BuildRequires: libpng-devel >= 2:1.4.0
31 %{?with_svg:BuildRequires: librsvg-devel >= 2.15.0}
32 BuildRequires: libspectre-devel >= 0.2.0
33 BuildRequires: libtool >= 1.4
34 BuildRequires: pixman-devel >= 0.18.4
35 BuildRequires: pkgconfig >= 1:0.9
36 %{?with_tests:BuildRequires: poppler-glib-devel >= 0.13.3}
37 BuildRequires: rpm >= 4.4.9-56
38 BuildRequires: sed >= 4.0
39 BuildRequires: binutils-devel
41 BuildRequires: libxcb-devel >= 1.4
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 Requires: pixman >= 0.18.4
52 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
55 Cairo provides anti-aliased vector-based rendering for X. Paths
56 consist of line segments and cubic splines and can be rendered at any
57 width with various join and cap styles. All colors may be specified
58 with optional translucence (opacity/alpha) and combined using the
59 extended Porter/Duff compositing algebra as found in the X Render
62 Cairo exports a stateful rendering API similar in spirit to the path
63 construction, text, and painting operators of PostScript, (with the
64 significant addition of translucence in the imaging model). When
65 complete, the API is intended to support the complete imaging model of
68 %description -l pl.UTF-8
69 Cairo obsługuje oparty na wektorach rendering z antyaliasingiem dla X.
70 Ścieżki składają się z odcinków i splajnów kubicznych, a renderowane
71 mogą być z dowolną grubością i różnymi stylami połączeń i zakończeń.
72 Wszystkie kolory mogą być podane z opcjonalną półprzezroczystością
73 (podaną przez współczynnik nieprzezroczystości lub alpha) i łączone
74 przy użyciu rozszerzonego algorytmu składania Portera-Duffa, który
75 można znaleźć w rozszerzeniu X Render.
77 Cairo eksportuje stanowe API renderujące w duchu podobne do operatorów
78 konstruowania ścieżek, tekstu i rysowania z PostScriptu (ze znacznym
79 dodatkiem półprzezroczystości w modelu obrazu). Kiedy API zostanie
80 ukończone, ma obsługiwać pełny model obrazu z PDF w wersji 1.4.
83 Summary: Development files for Cairo library
84 Summary(pl.UTF-8): Pliki programistyczne biblioteki Cairo
85 Group: Development/Libraries
86 Requires: %{name} = %{version}-%{release}
87 Requires: fontconfig-devel >= 2.2.95
88 Requires: freetype-devel >= 1:2.3.0
89 Requires: libpng-devel >= 2:1.4.0
90 %{?with_xcb:Requires: libxcb-devel >= 1.4}
91 Requires: pixman-devel >= 0.18.4
92 %if "%{pld_release}" == "ac"
93 Requires: xrender-devel >= 0.6
95 Requires: xorg-lib-libX11-devel%{?with_xcb: >= 1.1}
96 Requires: xorg-lib-libXrender-devel >= 0.6
100 Development files for Cairo library.
102 %description devel -l pl.UTF-8
103 Pliki programistyczne biblioteki Cairo.
106 Summary: Static Cairo library
107 Summary(pl.UTF-8): Statyczna biblioteka Cairo
108 Group: Development/Libraries
109 Requires: %{name}-devel = %{version}-%{release}
112 Static Cairo library.
114 %description static -l pl.UTF-8
115 Statyczna biblioteka Cairo.
118 Summary: GObject functions library for Cairo graphics library
119 Summary(pl.UTF-8): Biblioteka funkcji GObject dla biblioteki graficznej Cairo
121 Requires: %{name} = %{version}-%{release}
124 GObject functions library for Cairo graphics library.
126 %description gobject -l pl.UTF-8
127 Biblioteka funkcji GObject dla biblioteki graficznej Cairo.
129 %package gobject-devel
130 Summary: Header files for Cairo GObject library
131 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Cairo GObject
132 Group: Development/Libraries
133 Requires: %{name}-devel = %{version}-%{release}
134 Requires: %{name}-gobject = %{version}-%{release}
135 Requires: glib2-devel >= 1:2.0
137 %description gobject-devel
138 Header files for Cairo GObject library.
140 %description gobject-devel -l pl.UTF-8
141 Pliki nagłówkowe biblioteki Cairo GObject.
143 %package gobject-static
144 Summary: Static Cairo GObject library
145 Summary(pl.UTF-8): Statyczna biblioteka Cairo GObject
146 Group: Development/Libraries
147 Requires: %{name}-gobject-devel = %{version}-%{release}
149 %description gobject-static
150 Static Cairo GObject library.
152 %description gobject-static -l pl.UTF-8
153 Statyczna biblioteka Cairo GObject.
156 Summary: Cairo calls tracing utility
157 Summary(pl.UTF-8): Narzędzie do śledzenia wywołań Cairo
158 Group: Development/Tools
159 Requires: %{name} = %{version}-%{release}
160 Requires: binutils-libs >= 2.21.53
163 Cairo calls tracing utility.
165 %description trace -l pl.UTF-8
166 Narzędzie do śledzenia wywołań Cairo.
169 Summary: Cairo API documentation
170 Summary(pl.UTF-8): Dokumentacja API Cairo
172 Requires: gtk-doc-common
175 Cairo API documentation.
177 %description apidocs -l pl.UTF-8
178 Dokumentacja API Cairo.
185 %{?with_apidocs:%{__gtkdocize}}
187 %{__aclocal} -I build
192 --disable-silent-rules \
194 %{?with_gl:--enable-gl=yes}\
195 %{?with_apidocs:--enable-gtk-doc} \
199 %{!?with_svg:--disable-svg} \
201 %{?with_xcb:--enable-xcb} \
202 --with-html-dir=%{_gtkdocdir}
204 %{__sed} -i 's/gobject-2.0 glib-2.0//' src/cairo.pc
207 %{?with_tests:%{__make} check}
210 rm -rf $RPM_BUILD_ROOT
213 DESTDIR=$RPM_BUILD_ROOT
215 # LD_PRELOADable library
216 %{__rm} $RPM_BUILD_ROOT%{_libdir}/cairo/libcairo-trace.{la,a}
218 %{!?with_apidocs:rm -rf $RPM_BUILD_ROOT%{_gtkdocdir}/cairo}
221 rm -rf $RPM_BUILD_ROOT
223 %post -p /sbin/ldconfig
224 %postun -p /sbin/ldconfig
226 %post gobject -p /sbin/ldconfig
227 %postun gobject -p /sbin/ldconfig
230 %defattr(644,root,root,755)
231 # COPYING contains only notes, not LGPL/MPL texts
232 %doc AUTHORS COPYING ChangeLog NEWS README
233 %attr(755,root,root) %{_libdir}/libcairo.so.*.*.*
234 %attr(755,root,root) %ghost %{_libdir}/libcairo.so.2
235 %attr(755,root,root) %{_libdir}/libcairo-script-interpreter.so.*.*.*
236 %attr(755,root,root) %ghost %{_libdir}/libcairo-script-interpreter.so.2
239 %defattr(644,root,root,755)
240 %attr(755,root,root) %{_libdir}/libcairo.so
241 %attr(755,root,root) %{_libdir}/libcairo-script-interpreter.so
242 %{_libdir}/libcairo.la
243 %{_libdir}/libcairo-script-interpreter.la
245 %exclude %{_includedir}/cairo/cairo-gobject.h
246 %{_pkgconfigdir}/cairo.pc
247 %{?with_gl:%{_pkgconfigdir}/cairo-gl.pc}
248 %{?with_gl:%{_pkgconfigdir}/cairo-glx.pc}
249 %{_pkgconfigdir}/cairo-fc.pc
250 %{_pkgconfigdir}/cairo-ft.pc
251 %{_pkgconfigdir}/cairo-pdf.pc
252 %{_pkgconfigdir}/cairo-png.pc
253 %{_pkgconfigdir}/cairo-ps.pc
254 %{?with_svg:%{_pkgconfigdir}/cairo-svg.pc}
255 %{_pkgconfigdir}/cairo-tee.pc
256 %{?with_xcb:%{_pkgconfigdir}/cairo-xcb.pc}
257 %{?with_xcb:%{_pkgconfigdir}/cairo-xcb-shm.pc}
258 %{_pkgconfigdir}/cairo-xlib.pc
259 %{_pkgconfigdir}/cairo-xlib-xrender.pc
262 %defattr(644,root,root,755)
263 %{_libdir}/libcairo.a
264 %{_libdir}/libcairo-script-interpreter.a
267 %defattr(644,root,root,755)
268 %attr(755,root,root) %{_libdir}/libcairo-gobject.so.*.*.*
269 %attr(755,root,root) %ghost %{_libdir}/libcairo-gobject.so.2
272 %defattr(644,root,root,755)
273 %attr(755,root,root) %{_libdir}/libcairo-gobject.so
274 %{_libdir}/libcairo-gobject.la
275 %{_includedir}/cairo/cairo-gobject.h
276 %{_pkgconfigdir}/cairo-gobject.pc
278 %files gobject-static
279 %defattr(644,root,root,755)
280 %{_libdir}/libcairo-gobject.a
283 %defattr(644,root,root,755)
284 %attr(755,root,root) %{_bindir}/cairo-trace
285 %dir %{_libdir}/cairo
286 %attr(755,root,root) %{_libdir}/cairo/libcairo-trace.so*
290 %defattr(644,root,root,755)