3 %bcond_without apidocs # disable gtk-doc
4 %bcond_without pdf # PDF surface backend
5 %bcond_without svg # SVG surface backend
6 %bcond_without xcb # XCB backend
7 %bcond_with tests # perform tests (can fail due to out of memory)
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: https://www.cairographics.org/releases/%{name}-%{version}.tar.xz
17 # Source0-md5: 3f0685fbadc530606f965b9645bb51d9
18 URL: https://www.cairographics.org/
19 BuildRequires: binutils-devel
20 BuildRequires: fontconfig-devel >= 2.2.95
23 BuildRequires: fonttools
25 # pkgconfig(freetype2) >= 25.0.19
26 BuildRequires: freetype-devel >= 1:2.13.0
27 BuildRequires: glib2-devel >= 1:2.14
28 BuildRequires: gtk+2-devel >= 1:2.0
29 %{?with_apidocs:BuildRequires: gtk-doc >= 1.15}
30 BuildRequires: libpng-devel >= 2:1.4.0
31 %if %{with svg} && %{with tests}
32 BuildRequires: librsvg-devel >= 2.35.0
35 BuildRequires: libspectre-devel >= 0.2.0
37 %{?with_xcb:BuildRequires: libxcb-devel >= 1.6}
38 BuildRequires: lzo-devel >= 2
39 BuildRequires: meson >= 0.59.0
40 BuildRequires: ninja >= 1.5
41 BuildRequires: pixman-devel >= 0.36.0
42 BuildRequires: pkgconfig >= 1:0.18
43 %if %{with pdf} && %{with tests}
44 BuildRequires: poppler-glib-devel >= 0.17.4
46 BuildRequires: rpm >= 4.4.9-56
47 BuildRequires: rpmbuild(macros) >= 1.736
48 BuildRequires: sed >= 4.0
49 BuildRequires: tar >= 1:1.22
50 BuildRequires: xorg-lib-libX11-devel%{?with_xcb: >= 1.1}
51 BuildRequires: xorg-lib-libXext-devel
52 BuildRequires: xorg-lib-libXrender-devel >= 0.6
54 BuildRequires: zlib-devel
55 Requires: fontconfig-libs >= 2.2.95
56 Requires: freetype >= 1:2.13.0
57 %{?with_xcb:Requires: libxcb >= 1.6}
58 Requires: pixman >= 0.36.0
59 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
62 Cairo provides anti-aliased vector-based rendering for X. Paths
63 consist of line segments and cubic splines and can be rendered at any
64 width with various join and cap styles. All colors may be specified
65 with optional translucence (opacity/alpha) and combined using the
66 extended Porter/Duff compositing algebra as found in the X Render
69 Cairo exports a stateful rendering API similar in spirit to the path
70 construction, text, and painting operators of PostScript, (with the
71 significant addition of translucence in the imaging model). When
72 complete, the API is intended to support the complete imaging model of
75 %description -l pl.UTF-8
76 Cairo obsługuje oparty na wektorach rendering z antyaliasingiem dla X.
77 Ścieżki składają się z odcinków i splajnów kubicznych, a renderowane
78 mogą być z dowolną grubością i różnymi stylami połączeń i zakończeń.
79 Wszystkie kolory mogą być podane z opcjonalną półprzezroczystością
80 (podaną przez współczynnik nieprzezroczystości lub alpha) i łączone
81 przy użyciu rozszerzonego algorytmu składania Portera-Duffa, który
82 można znaleźć w rozszerzeniu X Render.
84 Cairo eksportuje stanowe API renderujące w duchu podobne do operatorów
85 konstruowania ścieżek, tekstu i rysowania z PostScriptu (ze znacznym
86 dodatkiem półprzezroczystości w modelu obrazu). Kiedy API zostanie
87 ukończone, ma obsługiwać pełny model obrazu z PDF w wersji 1.4.
90 Summary: Development files for Cairo library
91 Summary(pl.UTF-8): Pliki programistyczne biblioteki Cairo
92 Group: Development/Libraries
93 Requires: %{name} = %{version}-%{release}
94 Requires: fontconfig-devel >= 2.2.95
95 Requires: freetype-devel >= 1:2.13.0
96 Requires: libpng-devel >= 2:1.4.0
97 %{?with_xcb:Requires: libxcb-devel >= 1.6}
98 Requires: lzo-devel >= 2
99 Requires: pixman-devel >= 0.36.0
100 Requires: xorg-lib-libX11-devel%{?with_xcb: >= 1.1}
101 Requires: xorg-lib-libXext-devel
102 Requires: xorg-lib-libXrender-devel >= 0.6
106 Development files for Cairo library.
108 %description devel -l pl.UTF-8
109 Pliki programistyczne biblioteki Cairo.
112 Summary: Static Cairo library
113 Summary(pl.UTF-8): Statyczna biblioteka Cairo
114 Group: Development/Libraries
115 Requires: %{name}-devel = %{version}-%{release}
118 Static Cairo library.
120 %description static -l pl.UTF-8
121 Statyczna biblioteka Cairo.
124 Summary: GObject functions library for Cairo graphics library
125 Summary(pl.UTF-8): Biblioteka funkcji GObject dla biblioteki graficznej Cairo
127 Requires: %{name} = %{version}-%{release}
128 Requires: glib2 >= 1:2.14
131 GObject functions library for Cairo graphics library.
133 %description gobject -l pl.UTF-8
134 Biblioteka funkcji GObject dla biblioteki graficznej Cairo.
136 %package gobject-devel
137 Summary: Header files for Cairo GObject library
138 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Cairo GObject
139 Group: Development/Libraries
140 Requires: %{name}-devel = %{version}-%{release}
141 Requires: %{name}-gobject = %{version}-%{release}
142 Requires: glib2-devel >= 1:2.14
144 %description gobject-devel
145 Header files for Cairo GObject library.
147 %description gobject-devel -l pl.UTF-8
148 Pliki nagłówkowe biblioteki Cairo GObject.
150 %package gobject-static
151 Summary: Static Cairo GObject library
152 Summary(pl.UTF-8): Statyczna biblioteka Cairo GObject
153 Group: Development/Libraries
154 Requires: %{name}-gobject-devel = %{version}-%{release}
156 %description gobject-static
157 Static Cairo GObject library.
159 %description gobject-static -l pl.UTF-8
160 Statyczna biblioteka Cairo GObject.
163 Summary: Cairo calls tracing utilities
164 Summary(pl.UTF-8): Narzędzia do śledzenia wywołań Cairo
165 Group: Development/Tools
166 Requires: %{name} = %{version}-%{release}
167 Requires: binutils-libs >= 2.21.53
170 Cairo calls tracing utilities.
172 %description trace -l pl.UTF-8
173 Narzędzia do śledzenia wywołań Cairo.
176 Summary: Cairo API documentation
177 Summary(pl.UTF-8): Dokumentacja API Cairo
179 Requires: gtk-doc-common
183 Cairo API documentation.
185 %description apidocs -l pl.UTF-8
186 Dokumentacja API Cairo.
191 #%if %{without tests}
192 #%{__sed} -i -e '/SUBDIRS += boilerplate test perf/d' Makefile.am
197 -Dfontconfig=enabled \
199 -Dgtk2-utils=enabled \
200 -Dgtk_doc=%{__true_false apidocs} \
202 -Dspectre=%{__enabled_disabled tests} \
205 -Dxcb=%{__enabled_disabled xcb} \
209 %ninja_build -C build
211 %{?with_tests:%ninja_test -C build}
214 rm -rf $RPM_BUILD_ROOT
216 %ninja_install -C build
218 # LD_PRELOADable library
219 %{__rm} $RPM_BUILD_ROOT%{_libdir}/cairo/libcairo-{fdr,trace}.a
222 rm -rf $RPM_BUILD_ROOT
224 %post -p /sbin/ldconfig
225 %postun -p /sbin/ldconfig
227 %post gobject -p /sbin/ldconfig
228 %postun gobject -p /sbin/ldconfig
231 %defattr(644,root,root,755)
232 # COPYING contains only notes, not LGPL/MPL texts
233 %doc AUTHORS BUGS COPYING NEWS README.md
234 %attr(755,root,root) %{_libdir}/libcairo.so.*.*.*
235 %attr(755,root,root) %ghost %{_libdir}/libcairo.so.2
236 %attr(755,root,root) %{_libdir}/libcairo-script-interpreter.so.*.*.*
237 %attr(755,root,root) %ghost %{_libdir}/libcairo-script-interpreter.so.2
240 %defattr(644,root,root,755)
241 %attr(755,root,root) %{_libdir}/libcairo.so
242 %attr(755,root,root) %{_libdir}/libcairo-script-interpreter.so
244 %exclude %{_includedir}/cairo/cairo-gobject.h
245 %{_pkgconfigdir}/cairo.pc
246 %{_pkgconfigdir}/cairo-fc.pc
247 %{_pkgconfigdir}/cairo-ft.pc
248 %{?with_pdf:%{_pkgconfigdir}/cairo-pdf.pc}
249 %{_pkgconfigdir}/cairo-png.pc
250 %{_pkgconfigdir}/cairo-ps.pc
251 %{_pkgconfigdir}/cairo-script.pc
252 %{_pkgconfigdir}/cairo-script-interpreter.pc
253 %{?with_svg:%{_pkgconfigdir}/cairo-svg.pc}
254 %{_pkgconfigdir}/cairo-tee.pc
255 %{?with_xcb:%{_pkgconfigdir}/cairo-xcb.pc}
256 %{?with_xcb:%{_pkgconfigdir}/cairo-xcb-shm.pc}
257 %{_pkgconfigdir}/cairo-xlib.pc
258 %{_pkgconfigdir}/cairo-xlib-xrender.pc
261 %defattr(644,root,root,755)
262 %{_libdir}/libcairo.a
263 %{_libdir}/libcairo-script-interpreter.a
266 %defattr(644,root,root,755)
267 %attr(755,root,root) %{_libdir}/libcairo-gobject.so.*.*.*
268 %attr(755,root,root) %ghost %{_libdir}/libcairo-gobject.so.2
271 %defattr(644,root,root,755)
272 %attr(755,root,root) %{_libdir}/libcairo-gobject.so
273 %{_includedir}/cairo/cairo-gobject.h
274 %{_pkgconfigdir}/cairo-gobject.pc
276 %files gobject-static
277 %defattr(644,root,root,755)
278 %{_libdir}/libcairo-gobject.a
281 %defattr(644,root,root,755)
282 %attr(755,root,root) %{_bindir}/cairo-trace
283 %dir %{_libdir}/cairo
284 %attr(755,root,root) %{_libdir}/cairo/libcairo-fdr.so
285 %attr(755,root,root) %{_libdir}/cairo/libcairo-trace.so*
289 %defattr(644,root,root,755)