3 %bcond_without apidocs # disable gtk-doc
4 %bcond_with cogl # Cogl surface backend [incompatible with cogl 1.12.x]
5 %bcond_with directfb # DirectFB surface backend
6 %bcond_with drm # DRM surface backend
7 %bcond_with gl # OpenGL surface backend, http://lists.pld-linux.org/mailman/pipermail/pld-devel-en/2015-May/024387.html
8 %bcond_with glesv2 # OpenGLESv2 surface backend (mutually exclusive with gl)
9 %bcond_with openvg # OpenVG surface backend
10 %bcond_without pdf # PDF surface backend
11 %bcond_without ps # PS surface backend
12 %bcond_without svg # SVG surface backend (disable to boostrap librsvg)
13 %bcond_with qt # Qt surface backend [expects qt_draw_glyphs() API in Qt 4.7+]
14 %if "%{pld_release}" == "ac"
15 %bcond_with xcb # XCB backend
17 %bcond_without xcb # XCB backend
19 %bcond_with tests # perform tests (can fail due to out of memory)
24 Summary: Cairo - multi-platform 2D graphics library
25 Summary(pl.UTF-8): Cairo - wieloplatformowa biblioteka graficzna 2D
29 License: LGPL v2.1 or MPL v1.1
31 Source0: https://www.cairographics.org/releases/%{name}-%{version}.tar.xz
32 # Source0-md5: 9f0db9dbfca0966be8acd682e636d165
33 Patch0: %{name}-link.patch
34 Patch1: %{name}-gobject-deps.patch
35 URL: https://www.cairographics.org/
36 %{?with_directfb:BuildRequires: DirectFB-devel}
37 %if %{with gl} || %{with glesv2} || %{with openvg}
38 BuildRequires: EGL-devel >= 1.1
40 %if %{with gl} || %{with openvg}
41 BuildRequires: OpenGL-GLX-devel
43 %{?with_gl:BuildRequires: OpenGL-devel}
44 %{?with_glesv2:BuildRequires: OpenGLESv2-devel >= 2.0}
45 %{?with_openvg:BuildRequires: OpenVG-devel}
46 %{?with_qt:BuildRequires: QtGui-devel >= 4.4.0}
47 BuildRequires: autoconf >= 2.63
48 BuildRequires: automake >= 1:1.11
49 BuildRequires: binutils-devel
50 %{?with_cogl:BuildRequires: cogl-devel}
51 BuildRequires: fontconfig-devel >= 2.2.95
52 BuildRequires: freetype-devel >= 1:2.3.0
53 BuildRequires: glib2-devel >= 1:2.14
54 %{?with_apidocs:BuildRequires: gtk-doc >= 1.15}
55 %{?with_drm:BuildRequires: libdrm-devel}
56 BuildRequires: libpng-devel >= 2:1.4.0
57 %if %{with svg} && %{with tests}
58 BuildRequires: librsvg-devel >= 2.35.0
60 %if %{with ps} && %{with tests}
61 BuildRequires: libspectre-devel >= 0.2.0
63 BuildRequires: libtool >= 2:2.2
64 %{?with_xcb:BuildRequires: libxcb-devel >= 1.6}
65 BuildRequires: lzo-devel >= 2
66 BuildRequires: pixman-devel >= 0.30.0
67 BuildRequires: pkgconfig >= 1:0.18
68 %if %{with pdf} && %{with tests}
69 BuildRequires: poppler-glib-devel >= 0.17.4
71 BuildRequires: rpm >= 4.4.9-56
72 BuildRequires: sed >= 4.0
73 BuildRequires: tar >= 1:1.22
74 %{?with_drm:BuildRequires: udev-devel >= 1:136}
75 %if "%{pld_release}" == "ac"
76 BuildRequires: xrender-devel >= 0.6
78 BuildRequires: xorg-lib-libX11-devel%{?with_xcb: >= 1.1}
79 BuildRequires: xorg-lib-libXext-devel
80 BuildRequires: xorg-lib-libXrender-devel >= 0.6
83 BuildRequires: zlib-devel
84 %{?with_qt:Requires: QtGui >= 4.4.0}
85 Requires: fontconfig-libs >= 2.2.95
86 Requires: freetype >= 1:2.3.0
87 %{?with_xcb:Requires: libxcb >= 1.6}
88 Requires: pixman >= 0.30.0
89 %{?with_drm:Requires: udev-libs >= 1:136}
90 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
93 Cairo provides anti-aliased vector-based rendering for X. Paths
94 consist of line segments and cubic splines and can be rendered at any
95 width with various join and cap styles. All colors may be specified
96 with optional translucence (opacity/alpha) and combined using the
97 extended Porter/Duff compositing algebra as found in the X Render
100 Cairo exports a stateful rendering API similar in spirit to the path
101 construction, text, and painting operators of PostScript, (with the
102 significant addition of translucence in the imaging model). When
103 complete, the API is intended to support the complete imaging model of
106 %description -l pl.UTF-8
107 Cairo obsługuje oparty na wektorach rendering z antyaliasingiem dla X.
108 Ścieżki składają się z odcinków i splajnów kubicznych, a renderowane
109 mogą być z dowolną grubością i różnymi stylami połączeń i zakończeń.
110 Wszystkie kolory mogą być podane z opcjonalną półprzezroczystością
111 (podaną przez współczynnik nieprzezroczystości lub alpha) i łączone
112 przy użyciu rozszerzonego algorytmu składania Portera-Duffa, który
113 można znaleźć w rozszerzeniu X Render.
115 Cairo eksportuje stanowe API renderujące w duchu podobne do operatorów
116 konstruowania ścieżek, tekstu i rysowania z PostScriptu (ze znacznym
117 dodatkiem półprzezroczystości w modelu obrazu). Kiedy API zostanie
118 ukończone, ma obsługiwać pełny model obrazu z PDF w wersji 1.4.
121 Summary: Development files for Cairo library
122 Summary(pl.UTF-8): Pliki programistyczne biblioteki Cairo
123 Group: Development/Libraries
124 Requires: %{name} = %{version}-%{release}
125 %{?with_directfb:Requires: DirectFB-devel}
126 %if %{with gl} || %{with glesv2} || %{with openvg}
127 Requires: EGL-devel >= 1.1
129 %{?with_gl:Requires: OpenGL-devel}
130 %{?with_glesv2:Requires: OpenGLESv2-devel >= 2.0}
131 %{?with_openvg:Requires: OpenVG-devel}
132 %{?with_qt:Requires: QtGui-devel >= 4.4.0}
133 %{?with_cogl:Requires: cogl-devel}
134 Requires: fontconfig-devel >= 2.2.95
135 Requires: freetype-devel >= 1:2.3.0
136 %{?with_drm:Requires: libdrm-devel}
137 Requires: libpng-devel >= 2:1.4.0
138 %{?with_xcb:Requires: libxcb-devel >= 1.6}
139 Requires: lzo-devel >= 2
140 Requires: pixman-devel >= 0.30.0
141 %{?with_drm:Requires: udev-devel >= 1:136}
142 %if "%{pld_release}" == "ac"
143 Requires: xrender-devel >= 0.6
145 Requires: xorg-lib-libX11-devel%{?with_xcb: >= 1.1}
146 Requires: xorg-lib-libXext-devel
147 Requires: xorg-lib-libXrender-devel >= 0.6
152 Development files for Cairo library.
154 %description devel -l pl.UTF-8
155 Pliki programistyczne biblioteki Cairo.
158 Summary: Static Cairo library
159 Summary(pl.UTF-8): Statyczna biblioteka Cairo
160 Group: Development/Libraries
161 Requires: %{name}-devel = %{version}-%{release}
164 Static Cairo library.
166 %description static -l pl.UTF-8
167 Statyczna biblioteka Cairo.
170 Summary: GObject functions library for Cairo graphics library
171 Summary(pl.UTF-8): Biblioteka funkcji GObject dla biblioteki graficznej Cairo
173 Requires: %{name} = %{version}-%{release}
174 Requires: glib2 >= 1:2.14
177 GObject functions library for Cairo graphics library.
179 %description gobject -l pl.UTF-8
180 Biblioteka funkcji GObject dla biblioteki graficznej Cairo.
182 %package gobject-devel
183 Summary: Header files for Cairo GObject library
184 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Cairo GObject
185 Group: Development/Libraries
186 Requires: %{name}-devel = %{version}-%{release}
187 Requires: %{name}-gobject = %{version}-%{release}
188 Requires: glib2-devel >= 1:2.14
190 %description gobject-devel
191 Header files for Cairo GObject library.
193 %description gobject-devel -l pl.UTF-8
194 Pliki nagłówkowe biblioteki Cairo GObject.
196 %package gobject-static
197 Summary: Static Cairo GObject library
198 Summary(pl.UTF-8): Statyczna biblioteka Cairo GObject
199 Group: Development/Libraries
200 Requires: %{name}-gobject-devel = %{version}-%{release}
202 %description gobject-static
203 Static Cairo GObject library.
205 %description gobject-static -l pl.UTF-8
206 Statyczna biblioteka Cairo GObject.
209 Summary: Cairo calls tracing utilities
210 Summary(pl.UTF-8): Narzędzia do śledzenia wywołań Cairo
211 Group: Development/Tools
212 Requires: %{name} = %{version}-%{release}
213 Requires: binutils-libs >= 2.21.53
216 Cairo calls tracing utilities.
218 %description trace -l pl.UTF-8
219 Narzędzia do śledzenia wywołań Cairo.
222 Summary: Cairo API documentation
223 Summary(pl.UTF-8): Dokumentacja API Cairo
225 Requires: gtk-doc-common
226 %if "%{_rpmversion}" >= "5"
231 Cairo API documentation.
233 %description apidocs -l pl.UTF-8
234 Dokumentacja API Cairo.
242 %{?with_apidocs:%{__gtkdocize}}
244 %{__aclocal} -I build
249 --disable-silent-rules \
250 %{__enable_disable cogl} \
251 %{__enable_disable directfb} \
252 %{__enable_disable gl} \
253 %{__enable_disable glesv2} \
254 %{__enable_disable apidocs gtk-doc} \
255 %{__enable_disable pdf} \
256 %{__enable_disable ps} \
257 %{__enable_disable qt} \
258 %{__enable_disable svg} \
259 %{__enable_disable openvg vg} \
260 %{__enable_disable xcb} \
265 --with-html-dir=%{_gtkdocdir}
268 %{?with_tests:%{__make} check}
271 rm -rf $RPM_BUILD_ROOT
274 DESTDIR=$RPM_BUILD_ROOT
276 # LD_PRELOADable library
277 %{__rm} $RPM_BUILD_ROOT%{_libdir}/cairo/libcairo-trace.{la,a}
278 # LD_PRELOADable modules(?)
279 %{__rm} $RPM_BUILD_ROOT%{_libdir}/cairo/cairo-{fdr,sphinx}.{la,a}
281 %{!?with_apidocs:%{__rm} -rf $RPM_BUILD_ROOT%{_gtkdocdir}/cairo}
284 rm -rf $RPM_BUILD_ROOT
286 %post -p /sbin/ldconfig
287 %postun -p /sbin/ldconfig
289 %post gobject -p /sbin/ldconfig
290 %postun gobject -p /sbin/ldconfig
293 %defattr(644,root,root,755)
294 # COPYING contains only notes, not LGPL/MPL texts
295 %doc AUTHORS COPYING ChangeLog NEWS README
296 %attr(755,root,root) %{_libdir}/libcairo.so.*.*.*
297 %attr(755,root,root) %ghost %{_libdir}/libcairo.so.2
298 %attr(755,root,root) %{_libdir}/libcairo-script-interpreter.so.*.*.*
299 %attr(755,root,root) %ghost %{_libdir}/libcairo-script-interpreter.so.2
302 %defattr(644,root,root,755)
303 %attr(755,root,root) %{_libdir}/libcairo.so
304 %attr(755,root,root) %{_libdir}/libcairo-script-interpreter.so
305 %{_libdir}/libcairo.la
306 %{_libdir}/libcairo-script-interpreter.la
308 %exclude %{_includedir}/cairo/cairo-gobject.h
309 %{_pkgconfigdir}/cairo.pc
310 %{?with_directfb:%{_pkgconfigdir}/cairo-directfb.pc}
311 %if %{with gl} || %{with glesv2} || %{with openvg}
312 %{_pkgconfigdir}/cairo-egl.pc
314 %{_pkgconfigdir}/cairo-fc.pc
315 %{_pkgconfigdir}/cairo-ft.pc
316 %{?with_gl:%{_pkgconfigdir}/cairo-gl.pc}
317 %if %{with gl} || %{with openvg}
318 %{_pkgconfigdir}/cairo-glx.pc
320 %{?with_pdf:%{_pkgconfigdir}/cairo-pdf.pc}
321 %{_pkgconfigdir}/cairo-png.pc
322 %{?with_ps:%{_pkgconfigdir}/cairo-ps.pc}
323 %{?with_qt:%{_pkgconfigdir}/cairo-qt.pc}
324 %{_pkgconfigdir}/cairo-script.pc
325 %{?with_svg:%{_pkgconfigdir}/cairo-svg.pc}
326 %{_pkgconfigdir}/cairo-tee.pc
327 %{?with_openvg:%{_pkgconfigdir}/cairo-vg.pc}
328 %{?with_xcb:%{_pkgconfigdir}/cairo-xcb.pc}
329 %{?with_xcb:%{_pkgconfigdir}/cairo-xcb-shm.pc}
330 %{_pkgconfigdir}/cairo-xlib.pc
331 %{_pkgconfigdir}/cairo-xlib-xrender.pc
332 %{_pkgconfigdir}/cairo-xml.pc
335 %defattr(644,root,root,755)
336 %{_libdir}/libcairo.a
337 %{_libdir}/libcairo-script-interpreter.a
340 %defattr(644,root,root,755)
341 %attr(755,root,root) %{_libdir}/libcairo-gobject.so.*.*.*
342 %attr(755,root,root) %ghost %{_libdir}/libcairo-gobject.so.2
345 %defattr(644,root,root,755)
346 %attr(755,root,root) %{_libdir}/libcairo-gobject.so
347 %{_libdir}/libcairo-gobject.la
348 %{_includedir}/cairo/cairo-gobject.h
349 %{_pkgconfigdir}/cairo-gobject.pc
351 %files gobject-static
352 %defattr(644,root,root,755)
353 %{_libdir}/libcairo-gobject.a
356 %defattr(644,root,root,755)
357 %attr(755,root,root) %{_bindir}/cairo-sphinx
358 %attr(755,root,root) %{_bindir}/cairo-trace
359 %dir %{_libdir}/cairo
360 %attr(755,root,root) %{_libdir}/cairo/cairo-fdr.so*
361 %attr(755,root,root) %{_libdir}/cairo/cairo-sphinx.so*
362 %attr(755,root,root) %{_libdir}/cairo/libcairo-trace.so*
366 %defattr(644,root,root,755)