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