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