3 %bcond_without apidocs # disable gtk-doc
4 %bcond_with glitz # build with glitz backend
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: d3e1a1035ae563812d4dd44a74fb0dd0
21 Patch0: %{name}-link.patch
22 URL: http://cairographics.org/
23 BuildRequires: autoconf >= 2.58
24 BuildRequires: automake >= 1:1.8
25 BuildRequires: fontconfig-devel
26 BuildRequires: freetype-devel >= 1:2.3.0
27 %{?with_glitz:BuildRequires: glitz-devel >= 0.5.1}
28 %{?with_apidocs:BuildRequires: gtk-doc >= 1.6}
29 BuildRequires: libpng-devel >= 2:1.4.0
30 BuildRequires: libtool
31 BuildRequires: pixman-devel >= 0.12.0
32 BuildRequires: pkgconfig
33 BuildRequires: rpm >= 4.4.9-56
35 BuildRequires: libxcb-devel >= 0.9.92
36 BuildRequires: xcb-util-devel >= 0.2
38 %if "%{pld_release}" == "ac"
39 BuildRequires: xrender-devel >= 0.6
41 BuildRequires: xorg-lib-libXrender-devel >= 0.6
43 BuildRequires: zlib-devel
44 Requires: freetype >= 1:2.3.0
45 %{?with_glitz:Requires: glitz >= 0.5.1}
46 Requires: pixman >= 0.12.0
47 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
50 Cairo provides anti-aliased vector-based rendering for X. Paths
51 consist of line segments and cubic splines and can be rendered at any
52 width with various join and cap styles. All colors may be specified
53 with optional translucence (opacity/alpha) and combined using the
54 extended Porter/Duff compositing algebra as found in the X Render
57 Cairo exports a stateful rendering API similar in spirit to the path
58 construction, text, and painting operators of PostScript, (with the
59 significant addition of translucence in the imaging model). When
60 complete, the API is intended to support the complete imaging model of
63 %description -l pl.UTF-8
64 Cairo obsługuje oparty na wektorach rendering z antyaliasingiem dla X.
65 Ścieżki składają się z odcinków i splajnów kubicznych, a renderowane
66 mogą być z dowolną grubością i różnymi stylami połączeń i zakończeń.
67 Wszystkie kolory mogą być podane z opcjonalną półprzezroczystością
68 (podaną przez współczynnik nieprzezroczystości lub alpha) i łączone
69 przy użyciu rozszerzonego algorytmu składania Portera-Duffa, który
70 można znaleźć w rozszerzeniu X Render.
72 Cairo eksportuje stanowe API renderujące w duchu podobne do operatorów
73 konstruowania ścieżek, tekstu i rysowania z PostScriptu (ze znacznym
74 dodatkiem półprzezroczystości w modelu obrazu). Kiedy API zostanie
75 ukończone, ma obsługiwać pełny model obrazu z PDF w wersji 1.4.
78 Summary: Development files for Cairo library
79 Summary(pl.UTF-8): Pliki programistyczne biblioteki Cairo
80 Group: Development/Libraries
81 Requires: %{name} = %{version}-%{release}
82 Requires: fontconfig-devel
83 Requires: freetype-devel >= 1:2.3.0
84 %{?with_glitz:Requires: glitz-devel >= 0.5.1}
85 Requires: libpng-devel >= 2:1.4.0
86 %{?with_xcb:Requires: libxcb-devel >= 0.9.92}
87 Requires: pixman-devel >= 0.12.0
88 %{?with_xcb:Requires: xcb-util-devel >= 0.2}
89 %if "%{pld_release}" == "ac"
90 Requires: xrender-devel >= 0.6
92 Requires: xorg-lib-libXrender-devel >= 0.6
96 Development files for Cairo library.
98 %description devel -l pl.UTF-8
99 Pliki programistyczne biblioteki Cairo.
102 Summary: Static Cairo library
103 Summary(pl.UTF-8): Statyczna biblioteka Cairo
104 Group: Development/Libraries
105 Requires: %{name}-devel = %{version}-%{release}
108 Static Cairo library.
110 %description static -l pl.UTF-8
111 Statyczna biblioteka Cairo.
114 Summary: Cairo API documentation
115 Summary(pl.UTF-8): Dokumentacja API Cairo
117 Requires: gtk-doc-common
120 Cairo API documentation.
122 %description apidocs -l pl.UTF-8
123 Dokumentacja API Cairo.
130 %{?with_apidocs:%{__gtkdocize}}
132 %{__aclocal} -I build
138 %{?with_glitz:--enable-glitz} \
139 %{?with_apidocs:--enable-gtk-doc} \
143 %{?with_xcb:--enable-xcb} \
144 --with-html-dir=%{_gtkdocdir}
146 %{?with_tests:%{__make} check}
149 rm -rf $RPM_BUILD_ROOT
152 DESTDIR=$RPM_BUILD_ROOT
154 %{!?with_apidocs:rm -rf $RPM_BUILD_ROOT%{_gtkdocdir}/cairo}
157 rm -rf $RPM_BUILD_ROOT
159 %post -p /sbin/ldconfig
160 %postun -p /sbin/ldconfig
163 %defattr(644,root,root,755)
164 # COPYING contains only notes, not LGPL/MPL texts
165 %doc AUTHORS COPYING ChangeLog NEWS README
166 %attr(755,root,root) %{_libdir}/libcairo.so.*.*.*
167 %attr(755,root,root) %ghost %{_libdir}/libcairo.so.2
170 %defattr(644,root,root,755)
171 %attr(755,root,root) %{_libdir}/libcairo.so
172 %{_libdir}/libcairo.la
174 %{_pkgconfigdir}/cairo.pc
175 %{_pkgconfigdir}/cairo-ft.pc
176 %{_pkgconfigdir}/cairo-pdf.pc
177 %{_pkgconfigdir}/cairo-png.pc
178 %{_pkgconfigdir}/cairo-ps.pc
179 %{_pkgconfigdir}/cairo-svg.pc
180 %{?with_xcb:%{_pkgconfigdir}/cairo-xcb.pc}
181 %{_pkgconfigdir}/cairo-xlib.pc
182 %{_pkgconfigdir}/cairo-xlib-xrender.pc
185 %defattr(644,root,root,755)
186 %{_libdir}/libcairo.a
190 %defattr(644,root,root,755)