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