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: 4e64139ef6f668df24450f3b81dd0771
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
30 BuildRequires: libtool
31 BuildRequires: pixman-devel >= 0.12.0
32 BuildRequires: pkgconfig
33 BuildRequires: poppler-glib-devel >= 0.8.0
34 BuildRequires: rpm >= 4.4.9-56
36 BuildRequires: libxcb-devel >= 0.9.92
37 BuildRequires: xcb-util-devel >= 0.2
39 %if "%{pld_release}" == "ac"
40 BuildRequires: xrender-devel >= 0.6
42 BuildRequires: xorg-lib-libXrender-devel >= 0.6
44 BuildRequires: zlib-devel
45 Requires: freetype >= 1:2.3.0
46 %{?with_glitz:Requires: glitz >= 0.5.1}
47 Requires: pixman >= 0.12.0
48 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
51 Cairo provides anti-aliased vector-based rendering for X. Paths
52 consist of line segments and cubic splines and can be rendered at any
53 width with various join and cap styles. All colors may be specified
54 with optional translucence (opacity/alpha) and combined using the
55 extended Porter/Duff compositing algebra as found in the X Render
58 Cairo exports a stateful rendering API similar in spirit to the path
59 construction, text, and painting operators of PostScript, (with the
60 significant addition of translucence in the imaging model). When
61 complete, the API is intended to support the complete imaging model of
64 %description -l pl.UTF-8
65 Cairo obsługuje oparty na wektorach rendering z antyaliasingiem dla X.
66 Ścieżki składają się z odcinków i splajnów kubicznych, a renderowane
67 mogą być z dowolną grubością i różnymi stylami połączeń i zakończeń.
68 Wszystkie kolory mogą być podane z opcjonalną półprzezroczystością
69 (podaną przez współczynnik nieprzezroczystości lub alpha) i łączone
70 przy użyciu rozszerzonego algorytmu składania Portera-Duffa, który
71 można znaleźć w rozszerzeniu X Render.
73 Cairo eksportuje stanowe API renderujące w duchu podobne do operatorów
74 konstruowania ścieżek, tekstu i rysowania z PostScriptu (ze znacznym
75 dodatkiem półprzezroczystości w modelu obrazu). Kiedy API zostanie
76 ukończone, ma obsługiwać pełny model obrazu z PDF w wersji 1.4.
79 Summary: Development files for Cairo library
80 Summary(pl.UTF-8): Pliki programistyczne biblioteki Cairo
81 Group: Development/Libraries
82 Requires: %{name} = %{version}-%{release}
83 Requires: fontconfig-devel
84 Requires: freetype-devel >= 1:2.3.0
85 %{?with_glitz:Requires: glitz-devel >= 0.5.1}
86 Requires: libpng-devel
87 %{?with_xcb:Requires: libxcb-devel >= 0.9.92}
88 Requires: pixman-devel >= 0.12.0
89 %{?with_xcb:Requires: xcb-util-devel >= 0.2}
90 %if "%{pld_release}" == "ac"
91 Requires: xrender-devel >= 0.6
93 Requires: xorg-lib-libXrender-devel >= 0.6
97 Development files for Cairo library.
99 %description devel -l pl.UTF-8
100 Pliki programistyczne biblioteki Cairo.
103 Summary: Static Cairo library
104 Summary(pl.UTF-8): Statyczna biblioteka Cairo
105 Group: Development/Libraries
106 Requires: %{name}-devel = %{version}-%{release}
109 Static Cairo library.
111 %description static -l pl.UTF-8
112 Statyczna biblioteka Cairo.
115 Summary: Cairo API documentation
116 Summary(pl.UTF-8): Dokumentacja API Cairo
118 Requires: gtk-doc-common
121 Cairo API documentation.
123 %description apidocs -l pl.UTF-8
124 Dokumentacja API Cairo.
131 %{?with_apidocs:%{__gtkdocize}}
133 %{__aclocal} -I build
139 %{?with_glitz:--enable-glitz} \
140 %{?with_apidocs:--enable-gtk-doc} \
144 %{?with_xcb:--enable-xcb} \
145 --with-html-dir=%{_gtkdocdir}
147 %{?with_tests:%{__make} check}
150 rm -rf $RPM_BUILD_ROOT
153 DESTDIR=$RPM_BUILD_ROOT
155 %{!?with_apidocs:rm -rf $RPM_BUILD_ROOT%{_gtkdocdir}/cairo}
158 rm -rf $RPM_BUILD_ROOT
160 %post -p /sbin/ldconfig
161 %postun -p /sbin/ldconfig
164 %defattr(644,root,root,755)
165 # COPYING contains only notes, not LGPL/MPL texts
166 %doc AUTHORS COPYING ChangeLog NEWS README
167 %attr(755,root,root) %{_libdir}/libcairo.so.*.*.*
168 %attr(755,root,root) %ghost %{_libdir}/libcairo.so.2
171 %defattr(644,root,root,755)
172 %attr(755,root,root) %{_libdir}/libcairo.so
173 %{_libdir}/libcairo.la
175 %{_pkgconfigdir}/cairo.pc
176 %{_pkgconfigdir}/cairo-ft.pc
177 %{_pkgconfigdir}/cairo-pdf.pc
178 %{_pkgconfigdir}/cairo-png.pc
179 %{_pkgconfigdir}/cairo-ps.pc
180 %{_pkgconfigdir}/cairo-svg.pc
181 %{?with_xcb:%{_pkgconfigdir}/cairo-xcb.pc}
182 %{_pkgconfigdir}/cairo-xlib.pc
183 %{_pkgconfigdir}/cairo-xlib-xrender.pc
186 %defattr(644,root,root,755)
187 %{_libdir}/libcairo.a
191 %defattr(644,root,root,755)