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