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 lcd # freetype LCD filtering (instead of internal)
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: a198d509f9e3a35b78de8bb02174ebb9
22 Patch0: %{name}-link.patch
23 Patch1: %{name}-lt.patch
24 Patch2: %{name}-am.patch
25 # The lcd patch is being maintained at
26 # http://bugs.freedesktop.org/show_bug.cgi?id=10301
27 Patch3: %{name}-lcd-filter.patch
28 URL: http://cairographics.org/
29 BuildRequires: autoconf >= 2.58
30 BuildRequires: automake >= 1:1.8
31 BuildRequires: fontconfig-devel
32 %{!?with_lcd:BuildRequires: freetype-devel >= 1:2.1.10}
33 %{?with_lcd:BuildRequires: freetype-devel >= 1:2.3.0}
34 %{?with_glitz:BuildRequires: glitz-devel >= 0.5.1}
35 %{?with_apidocs:BuildRequires: gtk-doc >= 1.6}
36 BuildRequires: libpng-devel
37 BuildRequires: libtool
38 BuildRequires: pixman-devel >= 0.10.0
39 BuildRequires: pkgconfig
40 BuildRequires: poppler-glib-devel >= 0.8.0
41 BuildRequires: rpm >= 4.4.9-56
43 BuildRequires: libxcb-devel >= 0.9.92
44 BuildRequires: xcb-util-devel >= 0.2
46 %if "%{pld_release}" == "ac"
47 BuildRequires: xrender-devel >= 0.6
49 BuildRequires: xorg-lib-libXrender-devel >= 0.6
51 BuildRequires: zlib-devel
52 %{!?with_lcd:Requires: freetype >= 1:2.1.10}
53 %{?with_lcd:Requires: freetype >= 1:2.3.0}
54 %{?with_glitz:Requires: glitz >= 0.5.1}
55 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
58 Cairo provides anti-aliased vector-based rendering for X. Paths
59 consist of line segments and cubic splines and can be rendered at any
60 width with various join and cap styles. All colors may be specified
61 with optional translucence (opacity/alpha) and combined using the
62 extended Porter/Duff compositing algebra as found in the X Render
65 Cairo exports a stateful rendering API similar in spirit to the path
66 construction, text, and painting operators of PostScript, (with the
67 significant addition of translucence in the imaging model). When
68 complete, the API is intended to support the complete imaging model of
71 %description -l pl.UTF-8
72 Cairo obsługuje oparty na wektorach rendering z antyaliasingiem dla X.
73 Ścieżki składają się z odcinków i splajnów kubicznych, a renderowane
74 mogą być z dowolną grubością i różnymi stylami połączeń i zakończeń.
75 Wszystkie kolory mogą być podane z opcjonalną półprzezroczystością
76 (podaną przez współczynnik nieprzezroczystości lub alpha) i łączone
77 przy użyciu rozszerzonego algorytmu składania Portera-Duffa, który
78 można znaleźć w rozszerzeniu X Render.
80 Cairo eksportuje stanowe API renderujące w duchu podobne do operatorów
81 konstruowania ścieżek, tekstu i rysowania z PostScriptu (ze znacznym
82 dodatkiem półprzezroczystości w modelu obrazu). Kiedy API zostanie
83 ukończone, ma obsługiwać pełny model obrazu z PDF w wersji 1.4.
86 Summary: Development files for Cairo library
87 Summary(pl.UTF-8): Pliki programistyczne biblioteki Cairo
88 Group: Development/Libraries
89 Requires: %{name} = %{version}-%{release}
90 Requires: fontconfig-devel
91 Requires: freetype-devel >= 1:2.1.10
92 %{?with_glitz:Requires: glitz-devel >= 0.5.1}
93 Requires: libpng-devel
94 %{?with_xcb:Requires: libxcb-devel >= 0.9.92}
95 Requires: pixman-devel >= 0.10.0
96 %{?with_xcb:Requires: xcb-util-devel >= 0.2}
97 %if "%{pld_release}" == "ac"
98 Requires: xrender-devel >= 0.6
100 Requires: xorg-lib-libXrender-devel >= 0.6
104 Development files for Cairo library.
106 %description devel -l pl.UTF-8
107 Pliki programistyczne biblioteki Cairo.
110 Summary: Static Cairo library
111 Summary(pl.UTF-8): Statyczna biblioteka Cairo
112 Group: Development/Libraries
113 Requires: %{name}-devel = %{version}-%{release}
116 Static Cairo library.
118 %description static -l pl.UTF-8
119 Statyczna biblioteka Cairo.
122 Summary: Cairo API documentation
123 Summary(pl.UTF-8): Dokumentacja API Cairo
125 Requires: gtk-doc-common
128 Cairo API documentation.
130 %description apidocs -l pl.UTF-8
131 Dokumentacja API Cairo.
138 %{?with_lcd:%patch3 -p1}
141 %{?with_apidocs:%{__gtkdocize}}
148 %{?with_apidocs:--enable-gtk-doc} \
149 %{?with_xcb:--enable-xcb} \
150 %{?with_glitz:--enable-glitz} \
155 --with-html-dir=%{_gtkdocdir}
157 %{?with_tests:%{__make} check}
160 rm -rf $RPM_BUILD_ROOT
163 DESTDIR=$RPM_BUILD_ROOT
165 %{!?with_apidocs:rm -rf $RPM_BUILD_ROOT%{_gtkdocdir}/cairo}
168 rm -rf $RPM_BUILD_ROOT
170 %post -p /sbin/ldconfig
171 %postun -p /sbin/ldconfig
174 %defattr(644,root,root,755)
175 # COPYING contains only notes, not LGPL/MPL texts
176 %doc AUTHORS COPYING ChangeLog NEWS README
177 %attr(755,root,root) %{_libdir}/libcairo.so.*.*.*
178 %attr(755,root,root) %ghost %{_libdir}/libcairo.so.2
181 %defattr(644,root,root,755)
182 %attr(755,root,root) %{_libdir}/libcairo.so
183 %{_libdir}/libcairo.la
185 %{_pkgconfigdir}/cairo.pc
186 %{_pkgconfigdir}/cairo-ft.pc
187 %{_pkgconfigdir}/cairo-pdf.pc
188 %{_pkgconfigdir}/cairo-png.pc
189 %{_pkgconfigdir}/cairo-ps.pc
190 %{_pkgconfigdir}/cairo-svg.pc
191 %{?with_xcb:%{_pkgconfigdir}/cairo-xcb.pc}
192 %{_pkgconfigdir}/cairo-xlib.pc
193 %{_pkgconfigdir}/cairo-xlib-xrender.pc
196 %defattr(644,root,root,755)
197 %{_libdir}/libcairo.a
201 %defattr(644,root,root,755)