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