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