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