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