3 %bcond_without apidocs # disable gtk-doc
4 %bcond_with glitz # build with glitz backend
5 %bcond_with xcb # enable XCB backend
6 %bcond_with tests # perform tests (can fail due to out of memory)
7 %bcond_without lcd # use own LCD filtering instead of freetype's
9 Summary: Cairo - multi-platform 2D graphics library
10 Summary(pl.UTF-8): Cairo - wieloplatformowa biblioteka graficzna 2D
14 License: LGPL v2.1 or MPL v1.1
16 Source0: http://cairographics.org/releases/%{name}-%{version}.tar.gz
17 # Source0-md5: 487b3d7515752fe57f780d0fd707b01a
18 Patch0: %{name}-link.patch
19 Patch1: http://david.freetype.org/lcd/cairo-1.2.4-lcd-filter-1.patch
20 URL: http://cairographics.org/
21 BuildRequires: autoconf >= 2.54
22 BuildRequires: automake >= 1:1.7
23 BuildRequires: fontconfig-devel
24 %{?with_lcd:BuildRequires: freetype-devel >= 1:2.3.0}
25 %{!?with_lcd:BuildRequires: freetype-devel >= 1:2.1.10}
26 %{?with_glitz:BuildRequires: glitz-devel >= 0.5.1}
27 %{?with_apidocs:BuildRequires: gtk-doc >= 1.3}
28 BuildRequires: libpng-devel
29 BuildRequires: libtool
30 BuildRequires: pkgconfig
31 %{?with_xcb:BuildRequires: libxcb-devel}
32 BuildRequires: xorg-lib-libXrender-devel >= 0.6
33 BuildRequires: zlib-devel
34 Requires: freetype >= 1:2.1.10
35 %{?with_glitz:Requires: glitz >= 0.5.1}
36 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39 Cairo provides anti-aliased vector-based rendering for X. Paths
40 consist of line segments and cubic splines and can be rendered at any
41 width with various join and cap styles. All colors may be specified
42 with optional translucence (opacity/alpha) and combined using the
43 extended Porter/Duff compositing algebra as found in the X Render
46 Cairo exports a stateful rendering API similar in spirit to the path
47 construction, text, and painting operators of PostScript, (with the
48 significant addition of translucence in the imaging model). When
49 complete, the API is intended to support the complete imaging model of
52 Cairo relies on the Xc library for backend rendering. Xc provides an
53 abstract interface for rendering to multiple target types. As of this
54 writing, Xc allows Cairo to target X drawables as well as generic
55 image buffers. Future backends such as PostScript, PDF, and perhaps
56 OpenGL are currently being planned.
58 %description -l pl.UTF-8
59 Cairo obsługuje oparty na wektorach rendering z antyaliasingiem dla X.
60 Ścieżki składają się z odcinków i splajnów kubicznych, a renderowane
61 mogą być z dowolną grubością i różnymi stylami połączeń i zakończeń.
62 Wszystkie kolory mogą być podane z opcjonalną półprzezroczystością
63 (podaną przez współczynnik nieprzezroczystości lub alpha) i łączone
64 przy użyciu rozszerzonego algorytmu mieszania Portera-Duffa, który
65 można znaleźć w rozszerzeniu X Render.
67 Cairo eksportuje stanowe API renderujące w duchu podobne do operatorów
68 konstruowania ścieżek, tekstu i rysowania z PostScriptu (ze znacznym
69 dodatkiem półprzezroczystości w modelu obrazu). Kiedy API zostanie
70 ukończone, ma obsługiwać pełny model obrazu z PDF w wersji 1.4.
72 Cairo do backendowego renderowania wykorzystuje bibliotekę Xc. Xc
73 dostarcza abstrakcyjny interfejs do renderowania na wiele rodzajów
74 wyjść. Aktualnie Xc pozwala Cairo tworzyć obiekty X, a także ogólne
75 bufory obrazu. W przyszłości planowane są takie backendy jak
76 PostScript, PDF i być może OpenGL.
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.1.10
85 %{?with_glitz:Requires: glitz-devel >= 0.5.1}
86 Requires: libpng-devel
87 %{?with_xcb:Requires: libxcb-devel}
88 Requires: xorg-lib-libXrender-devel >= 0.6
91 Development files for Cairo library.
93 %description devel -l pl.UTF-8
94 Pliki programistyczne biblioteki Cairo.
97 Summary: Static Cairo library
98 Summary(pl.UTF-8): Statyczna biblioteka Cairo
99 Group: Development/Libraries
100 Requires: %{name}-devel = %{version}-%{release}
103 Static Cairo library.
105 %description static -l pl.UTF-8
106 Statyczna biblioteka Cairo.
109 Summary: Cairo API documentation
110 Summary(pl.UTF-8): Dokumentacja API Cairo
112 Requires: gtk-doc-common
115 Cairo API documentation.
117 %description apidocs -l pl.UTF-8
118 Dokumentacja API Cairo.
123 %{?with_lcd:%patch1 -p1}
126 %{?with_apidocs:%{__gtkdocize}}
133 %{?with_apidocs:--enable-gtk-doc} \
134 %{?with_xcb:--enable-xcb} \
135 %{?with_glitz:--enable-glitz} \
138 --with-html-dir=%{_gtkdocdir}
140 %{?with_tests:%{__make} check}
143 rm -rf $RPM_BUILD_ROOT
146 DESTDIR=$RPM_BUILD_ROOT
149 rm -rf $RPM_BUILD_ROOT
151 %post -p /sbin/ldconfig
152 %postun -p /sbin/ldconfig
155 %defattr(644,root,root,755)
156 # COPYING contains only notes, not LGPL/MPL texts
157 %doc AUTHORS COPYING ChangeLog NEWS README TODO
158 %attr(755,root,root) %{_libdir}/lib*.so.*.*.*
161 %defattr(644,root,root,755)
162 %attr(755,root,root) %{_libdir}/lib*.so
165 %{_pkgconfigdir}/*.pc
168 %defattr(644,root,root,755)
172 %defattr(644,root,root,755)