]> git.pld-linux.org Git - packages/cairo.git/blob - cairo.spec
- fix a bug that caused dot (from graphviz) to crash
[packages/cairo.git] / cairo.spec
1 #
2 # Conditional build:
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_without  gl              # OpenGL surface backend
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
16 %else
17 %bcond_without  xcb             # XCB backend
18 %endif
19 %bcond_with     tests           # perform tests (can fail due to out of memory)
20
21 %if %{with glesv2}
22 %undefine       with_gl
23 %endif
24 Summary:        Cairo - multi-platform 2D graphics library
25 Summary(pl.UTF-8):      Cairo - wieloplatformowa biblioteka graficzna 2D
26 Name:           cairo
27 Version:        1.14.0
28 Release:        4
29 License:        LGPL v2.1 or MPL v1.1
30 Group:          Libraries
31 Source0:        http://cairographics.org/releases/%{name}-%{version}.tar.xz
32 # Source0-md5:  fc3a5edeba703f906f2241b394f0cced
33 Patch0:         %{name}-link.patch
34 Patch1:         %{name}-gobject-deps.patch
35 Patch2:         %{name}-fix_crash_in_fill_xrgb32_lerp_opaque_spans.patch
36 URL:            http://cairographics.org/
37 %{?with_directfb:BuildRequires: DirectFB-devel}
38 %if %{with gl} || %{with glesv2} || %{with openvg}
39 BuildRequires:  EGL-devel >= 1.1
40 %endif
41 %if %{with gl} || %{with openvg}
42 BuildRequires:  OpenGL-GLX-devel
43 %endif
44 %{?with_gl:BuildRequires:       OpenGL-devel}
45 %{?with_glesv2:BuildRequires:   OpenGLESv2-devel >= 2.0}
46 %{?with_openvg:BuildRequires:   OpenVG-devel}
47 %{?with_qt:BuildRequires:       QtGui-devel >= 4.4.0}
48 BuildRequires:  autoconf >= 2.63
49 BuildRequires:  automake >= 1:1.11
50 BuildRequires:  binutils-devel
51 %{?with_cogl:BuildRequires:     cogl-devel}
52 BuildRequires:  fontconfig-devel >= 2.2.95
53 BuildRequires:  freetype-devel >= 1:2.3.0
54 BuildRequires:  glib2-devel >= 1:2.14
55 %{?with_apidocs:BuildRequires:  gtk-doc >= 1.15}
56 %{?with_drm:BuildRequires:      libdrm-devel}
57 BuildRequires:  libpng-devel >= 2:1.4.0
58 %if %{with svg} && %{with tests}
59 BuildRequires:  librsvg-devel >= 2.35.0
60 %endif
61 %if %{with ps} && %{with tests}
62 BuildRequires:  libspectre-devel >= 0.2.0
63 %endif
64 BuildRequires:  libtool >= 2:2.2
65 %{?with_xcb:BuildRequires:      libxcb-devel >= 1.6}
66 BuildRequires:  lzo-devel >= 2
67 BuildRequires:  pixman-devel >= 0.30.0
68 BuildRequires:  pkgconfig >= 1:0.18
69 %if %{with pdf} && %{with tests}
70 BuildRequires:  poppler-glib-devel >= 0.17.4
71 %endif
72 BuildRequires:  rpm >= 4.4.9-56
73 BuildRequires:  sed >= 4.0
74 BuildRequires:  tar >= 1:1.22
75 %{?with_drm:BuildRequires:      udev-devel >= 1:136}
76 %if "%{pld_release}" == "ac"
77 BuildRequires:  xrender-devel >= 0.6
78 %else
79 BuildRequires:  xorg-lib-libX11-devel%{?with_xcb: >= 1.1}
80 BuildRequires:  xorg-lib-libXext-devel
81 BuildRequires:  xorg-lib-libXrender-devel >= 0.6
82 %endif
83 BuildRequires:  xz
84 BuildRequires:  zlib-devel
85 %{?with_qt:Requires:    QtGui >= 4.4.0}
86 Requires:       fontconfig-libs >= 2.2.95
87 Requires:       freetype >= 1:2.3.0
88 %{?with_xcb:Requires:   libxcb >= 1.6}
89 Requires:       pixman >= 0.30.0
90 %{?with_drm:Requires:   udev-libs >= 1:136}
91 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
92
93 %description
94 Cairo provides anti-aliased vector-based rendering for X. Paths
95 consist of line segments and cubic splines and can be rendered at any
96 width with various join and cap styles. All colors may be specified
97 with optional translucence (opacity/alpha) and combined using the
98 extended Porter/Duff compositing algebra as found in the X Render
99 Extension.
100
101 Cairo exports a stateful rendering API similar in spirit to the path
102 construction, text, and painting operators of PostScript, (with the
103 significant addition of translucence in the imaging model). When
104 complete, the API is intended to support the complete imaging model of
105 PDF 1.4.
106
107 %description -l pl.UTF-8
108 Cairo obsługuje oparty na wektorach rendering z antyaliasingiem dla X.
109 Ścieżki składają się z odcinków i splajnów kubicznych, a renderowane
110 mogą być z dowolną grubością i różnymi stylami połączeń i zakończeń.
111 Wszystkie kolory mogą być podane z opcjonalną półprzezroczystością
112 (podaną przez współczynnik nieprzezroczystości lub alpha) i łączone
113 przy użyciu rozszerzonego algorytmu składania Portera-Duffa, który
114 można znaleźć w rozszerzeniu X Render.
115
116 Cairo eksportuje stanowe API renderujące w duchu podobne do operatorów
117 konstruowania ścieżek, tekstu i rysowania z PostScriptu (ze znacznym
118 dodatkiem półprzezroczystości w modelu obrazu). Kiedy API zostanie
119 ukończone, ma obsługiwać pełny model obrazu z PDF w wersji 1.4.
120
121 %package devel
122 Summary:        Development files for Cairo library
123 Summary(pl.UTF-8):      Pliki programistyczne biblioteki Cairo
124 Group:          Development/Libraries
125 Requires:       %{name} = %{version}-%{release}
126 %{?with_directfb:Requires:      DirectFB-devel}
127 %if %{with gl} || %{with glesv2} || %{with openvg}
128 Requires:       EGL-devel >= 1.1
129 %endif
130 %{?with_gl:Requires:    OpenGL-devel}
131 %{?with_glesv2:Requires:        OpenGLESv2-devel >= 2.0}
132 %{?with_openvg:Requires:        OpenVG-devel}
133 %{?with_qt:Requires:    QtGui-devel >= 4.4.0}
134 %{?with_cogl:Requires:  cogl-devel}
135 Requires:       fontconfig-devel >= 2.2.95
136 Requires:       freetype-devel >= 1:2.3.0
137 %{?with_drm:Requires:   libdrm-devel}
138 Requires:       libpng-devel >= 2:1.4.0
139 %{?with_xcb:Requires:   libxcb-devel >= 1.6}
140 Requires:       lzo-devel >= 2
141 Requires:       pixman-devel >= 0.30.0
142 %{?with_drm:Requires:   udev-devel >= 1:136}
143 %if "%{pld_release}" == "ac"
144 Requires:       xrender-devel >= 0.6
145 %else
146 Requires:       xorg-lib-libX11-devel%{?with_xcb: >= 1.1}
147 Requires:       xorg-lib-libXext-devel
148 Requires:       xorg-lib-libXrender-devel >= 0.6
149 %endif
150 Requires:       zlib-devel
151
152 %description devel
153 Development files for Cairo library.
154
155 %description devel -l pl.UTF-8
156 Pliki programistyczne biblioteki Cairo.
157
158 %package static
159 Summary:        Static Cairo library
160 Summary(pl.UTF-8):      Statyczna biblioteka Cairo
161 Group:          Development/Libraries
162 Requires:       %{name}-devel = %{version}-%{release}
163
164 %description static
165 Static Cairo library.
166
167 %description static -l pl.UTF-8
168 Statyczna biblioteka Cairo.
169
170 %package gobject
171 Summary:        GObject functions library for Cairo graphics library
172 Summary(pl.UTF-8):      Biblioteka funkcji GObject dla biblioteki graficznej Cairo
173 Group:          Libraries
174 Requires:       %{name} = %{version}-%{release}
175 Requires:       glib2 >= 1:2.14
176
177 %description gobject
178 GObject functions library for Cairo graphics library.
179
180 %description gobject -l pl.UTF-8
181 Biblioteka funkcji GObject dla biblioteki graficznej Cairo.
182
183 %package gobject-devel
184 Summary:        Header files for Cairo GObject library
185 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki Cairo GObject
186 Group:          Development/Libraries
187 Requires:       %{name}-devel = %{version}-%{release}
188 Requires:       %{name}-gobject = %{version}-%{release}
189 Requires:       glib2-devel >= 1:2.14
190
191 %description gobject-devel
192 Header files for Cairo GObject library.
193
194 %description gobject-devel -l pl.UTF-8
195 Pliki nagłówkowe biblioteki Cairo GObject.
196
197 %package gobject-static
198 Summary:        Static Cairo GObject library
199 Summary(pl.UTF-8):      Statyczna biblioteka Cairo GObject
200 Group:          Development/Libraries
201 Requires:       %{name}-gobject-devel = %{version}-%{release}
202
203 %description gobject-static
204 Static Cairo GObject library.
205
206 %description gobject-static -l pl.UTF-8
207 Statyczna biblioteka Cairo GObject.
208
209 %package trace
210 Summary:        Cairo calls tracing utilities
211 Summary(pl.UTF-8):      Narzędzia do śledzenia wywołań Cairo
212 Group:          Development/Tools
213 Requires:       %{name} = %{version}-%{release}
214 Requires:       binutils-libs >= 2.21.53
215
216 %description trace
217 Cairo calls tracing utilities.
218
219 %description trace -l pl.UTF-8
220 Narzędzia do śledzenia wywołań Cairo.
221
222 %package apidocs
223 Summary:        Cairo API documentation
224 Summary(pl.UTF-8):      Dokumentacja API Cairo
225 Group:          Documentation
226 Requires:       gtk-doc-common
227 %if "%{_rpmversion}" >= "5"
228 BuildArch:      noarch
229 %endif
230
231 %description apidocs
232 Cairo API documentation.
233
234 %description apidocs -l pl.UTF-8
235 Dokumentacja API Cairo.
236
237 %prep
238 %setup -q
239 %patch0 -p1
240 %patch1 -p1
241 %patch2 -p1
242
243 %build
244 %{?with_apidocs:%{__gtkdocize}}
245 %{__libtoolize}
246 %{__aclocal} -I build
247 %{__autoheader}
248 %{__autoconf}
249 %{__automake}
250 %configure \
251         --disable-silent-rules \
252         %{?with_cogl:--enable-cogl} \
253         %{?with_directfb:--enable-directfb} \
254         --enable-ft \
255         %{?with_gl:--enable-gl} \
256         %{?with_glesv2:--enable-glesv2} \
257         %{?with_apidocs:--enable-gtk-doc} \
258         %{?with_pdf:--enable-pdf} \
259         --enable-png \
260         %{?with_ps:--enable-ps} \
261         %{?with_qt:--enable-qt} \
262         %{!?with_svg:--disable-svg} \
263         --enable-tee \
264         %{?with_openvg:--enable-vg} \
265         %{?with_xcb:--enable-xcb} \
266         --enable-xml \
267         --with-html-dir=%{_gtkdocdir}
268
269 %{__make}
270 %{?with_tests:%{__make} check}
271
272 %install
273 rm -rf $RPM_BUILD_ROOT
274
275 %{__make} install \
276         DESTDIR=$RPM_BUILD_ROOT
277
278 # LD_PRELOADable library
279 %{__rm} $RPM_BUILD_ROOT%{_libdir}/cairo/libcairo-trace.{la,a}
280 # LD_PRELOADable modules(?)
281 %{__rm} $RPM_BUILD_ROOT%{_libdir}/cairo/cairo-{fdr,sphinx}.{la,a}
282
283 %{!?with_apidocs:%{__rm} -rf $RPM_BUILD_ROOT%{_gtkdocdir}/cairo}
284
285 %clean
286 rm -rf $RPM_BUILD_ROOT
287
288 %post   -p /sbin/ldconfig
289 %postun -p /sbin/ldconfig
290
291 %post   gobject -p /sbin/ldconfig
292 %postun gobject -p /sbin/ldconfig
293
294 %files
295 %defattr(644,root,root,755)
296 # COPYING contains only notes, not LGPL/MPL texts
297 %doc AUTHORS COPYING ChangeLog NEWS README
298 %attr(755,root,root) %{_libdir}/libcairo.so.*.*.*
299 %attr(755,root,root) %ghost %{_libdir}/libcairo.so.2
300 %attr(755,root,root) %{_libdir}/libcairo-script-interpreter.so.*.*.*
301 %attr(755,root,root) %ghost %{_libdir}/libcairo-script-interpreter.so.2
302
303 %files devel
304 %defattr(644,root,root,755)
305 %attr(755,root,root) %{_libdir}/libcairo.so
306 %attr(755,root,root) %{_libdir}/libcairo-script-interpreter.so
307 %{_libdir}/libcairo.la
308 %{_libdir}/libcairo-script-interpreter.la
309 %{_includedir}/cairo
310 %exclude %{_includedir}/cairo/cairo-gobject.h
311 %{_pkgconfigdir}/cairo.pc
312 %{?with_directfb:%{_pkgconfigdir}/cairo-directfb.pc}
313 %if %{with gl} || %{with glesv2} || %{with openvg}
314 %{_pkgconfigdir}/cairo-egl.pc
315 %endif
316 %{_pkgconfigdir}/cairo-fc.pc
317 %{_pkgconfigdir}/cairo-ft.pc
318 %{?with_gl:%{_pkgconfigdir}/cairo-gl.pc}
319 %if %{with gl} || %{with openvg}
320 %{_pkgconfigdir}/cairo-glx.pc
321 %endif
322 %{?with_pdf:%{_pkgconfigdir}/cairo-pdf.pc}
323 %{_pkgconfigdir}/cairo-png.pc
324 %{?with_ps:%{_pkgconfigdir}/cairo-ps.pc}
325 %{?with_qt:%{_pkgconfigdir}/cairo-qt.pc}
326 %{_pkgconfigdir}/cairo-script.pc
327 %{?with_svg:%{_pkgconfigdir}/cairo-svg.pc}
328 %{_pkgconfigdir}/cairo-tee.pc
329 %{?with_openvg:%{_pkgconfigdir}/cairo-vg.pc}
330 %{?with_xcb:%{_pkgconfigdir}/cairo-xcb.pc}
331 %{?with_xcb:%{_pkgconfigdir}/cairo-xcb-shm.pc}
332 %{_pkgconfigdir}/cairo-xlib.pc
333 %{_pkgconfigdir}/cairo-xlib-xrender.pc
334 %{_pkgconfigdir}/cairo-xml.pc
335
336 %files static
337 %defattr(644,root,root,755)
338 %{_libdir}/libcairo.a
339 %{_libdir}/libcairo-script-interpreter.a
340
341 %files gobject
342 %defattr(644,root,root,755)
343 %attr(755,root,root) %{_libdir}/libcairo-gobject.so.*.*.*
344 %attr(755,root,root) %ghost %{_libdir}/libcairo-gobject.so.2
345
346 %files gobject-devel
347 %defattr(644,root,root,755)
348 %attr(755,root,root) %{_libdir}/libcairo-gobject.so
349 %{_libdir}/libcairo-gobject.la
350 %{_includedir}/cairo/cairo-gobject.h
351 %{_pkgconfigdir}/cairo-gobject.pc
352
353 %files gobject-static
354 %defattr(644,root,root,755)
355 %{_libdir}/libcairo-gobject.a
356
357 %files trace
358 %defattr(644,root,root,755)
359 %attr(755,root,root) %{_bindir}/cairo-sphinx
360 %attr(755,root,root) %{_bindir}/cairo-trace
361 %dir %{_libdir}/cairo
362 %attr(755,root,root) %{_libdir}/cairo/cairo-fdr.so*
363 %attr(755,root,root) %{_libdir}/cairo/cairo-sphinx.so*
364 %attr(755,root,root) %{_libdir}/cairo/libcairo-trace.so*
365
366 %if %{with apidocs}
367 %files apidocs
368 %defattr(644,root,root,755)
369 %{_gtkdocdir}/cairo
370 %endif
This page took 0.0665249999999999 seconds and 4 git commands to generate.