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