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