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