]> git.pld-linux.org Git - packages/cairo.git/blame - cairo.spec
add static_libs bcond
[packages/cairo.git] / cairo.spec
CommitLineData
79fcc918
JB
1#
2# Conditional build:
9f933f96 3%bcond_without apidocs # disable gtk-doc
555786d4 4%bcond_without pdf # PDF surface backend
170c8276 5%bcond_without svg # SVG surface backend
75cc31b6 6%bcond_without xcb # XCB backend
75cc31b6 7%bcond_with tests # perform tests (can fail due to out of memory)
74746c26 8%bcond_without static_libs # static libraries
052e014b 9
b7ccdbe1 10Summary: Cairo - multi-platform 2D graphics library
beb0026f 11Summary(pl.UTF-8): Cairo - wieloplatformowa biblioteka graficzna 2D
8c7ef450 12Name: cairo
170c8276 13Version: 1.18.0
4b87f2d2 14Release: 2
9b33cbb5 15License: LGPL v2.1 or MPL v1.1
b7ccdbe1 16Group: Libraries
f965b14a 17Source0: https://www.cairographics.org/releases/%{name}-%{version}.tar.xz
170c8276 18# Source0-md5: 3f0685fbadc530606f965b9645bb51d9
f965b14a 19URL: https://www.cairographics.org/
fde28cff 20BuildRequires: binutils-devel
3396a3ae 21BuildRequires: fontconfig-devel >= 2.2.95
170c8276
JB
22%if %{with tests}
23# ttx
24BuildRequires: fonttools
25%endif
26# pkgconfig(freetype2) >= 25.0.19
27BuildRequires: freetype-devel >= 1:2.13.0
acd7ce6e 28BuildRequires: glib2-devel >= 1:2.14
543a7c78 29%{?with_apidocs:BuildRequires: gtk-doc >= 1.15}
42ecc17e 30BuildRequires: libpng-devel >= 2:1.4.0
555786d4 31%if %{with svg} && %{with tests}
7932577f 32BuildRequires: librsvg-devel >= 2.35.0
555786d4 33%endif
fd24878b 34%if %{with tests}
3396a3ae 35BuildRequires: libspectre-devel >= 0.2.0
555786d4 36%endif
543a7c78 37%{?with_xcb:BuildRequires: libxcb-devel >= 1.6}
7932577f 38BuildRequires: lzo-devel >= 2
170c8276
JB
39BuildRequires: meson >= 0.59.0
40BuildRequires: ninja >= 1.5
41BuildRequires: pixman-devel >= 0.36.0
5a53c090 42BuildRequires: pkgconfig >= 1:0.18
555786d4
JB
43%if %{with pdf} && %{with tests}
44BuildRequires: poppler-glib-devel >= 0.17.4
45%endif
68f80d0c 46BuildRequires: rpm >= 4.4.9-56
6e27b834 47BuildRequires: rpm-build >= 4.6
170c8276 48BuildRequires: rpmbuild(macros) >= 1.736
0c4a4f34 49BuildRequires: sed >= 4.0
543a7c78 50BuildRequires: tar >= 1:1.22
3396a3ae 51BuildRequires: xorg-lib-libX11-devel%{?with_xcb: >= 1.1}
555786d4 52BuildRequires: xorg-lib-libXext-devel
ddb9a7c6 53BuildRequires: xorg-lib-libXrender-devel >= 0.6
543a7c78 54BuildRequires: xz
9bc5a16c 55BuildRequires: zlib-devel
555786d4 56Requires: fontconfig-libs >= 2.2.95
170c8276 57Requires: freetype >= 1:2.13.0
fde28cff 58%{?with_xcb:Requires: libxcb >= 1.6}
170c8276 59Requires: pixman >= 0.36.0
b7ccdbe1 60BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
8c7ef450 61
62%description
76666767 63Cairo provides anti-aliased vector-based rendering for X. Paths
b7ccdbe1
JB
64consist of line segments and cubic splines and can be rendered at any
65width with various join and cap styles. All colors may be specified
66with optional translucence (opacity/alpha) and combined using the
67extended Porter/Duff compositing algebra as found in the X Render
68Extension.
69
70Cairo exports a stateful rendering API similar in spirit to the path
71construction, text, and painting operators of PostScript, (with the
72significant addition of translucence in the imaging model). When
73complete, the API is intended to support the complete imaging model of
74PDF 1.4.
75
65aac246
JR
76%description -l pl.UTF-8
77Cairo obsługuje oparty na wektorach rendering z antyaliasingiem dla X.
78Ścieżki składają się z odcinków i splajnów kubicznych, a renderowane
79mogą być z dowolną grubością i różnymi stylami połączeń i zakończeń.
80Wszystkie kolory mogą być podane z opcjonalną półprzezroczystością
81(podaną przez współczynnik nieprzezroczystości lub alpha) i łączone
9c95588d 82przy użyciu rozszerzonego algorytmu składania Portera-Duffa, który
65aac246
JR
83można znaleźć w rozszerzeniu X Render.
84
85Cairo eksportuje stanowe API renderujące w duchu podobne do operatorów
86konstruowania ścieżek, tekstu i rysowania z PostScriptu (ze znacznym
87dodatkiem półprzezroczystości w modelu obrazu). Kiedy API zostanie
88ukończone, ma obsługiwać pełny model obrazu z PDF w wersji 1.4.
89
8c7ef450 90%package devel
b7ccdbe1 91Summary: Development files for Cairo library
beb0026f 92Summary(pl.UTF-8): Pliki programistyczne biblioteki Cairo
4233927e 93Group: Development/Libraries
b7ccdbe1 94Requires: %{name} = %{version}-%{release}
3396a3ae 95Requires: fontconfig-devel >= 2.2.95
170c8276 96Requires: freetype-devel >= 1:2.13.0
42ecc17e 97Requires: libpng-devel >= 2:1.4.0
fde28cff 98%{?with_xcb:Requires: libxcb-devel >= 1.6}
737c5d82 99Requires: lzo-devel >= 2
170c8276 100Requires: pixman-devel >= 0.36.0
3396a3ae 101Requires: xorg-lib-libX11-devel%{?with_xcb: >= 1.1}
555786d4 102Requires: xorg-lib-libXext-devel
ddb9a7c6 103Requires: xorg-lib-libXrender-devel >= 0.6
555786d4 104Requires: zlib-devel
8c7ef450 105
106%description devel
b7ccdbe1
JB
107Development files for Cairo library.
108
65aac246 109%description devel -l pl.UTF-8
b7ccdbe1 110Pliki programistyczne biblioteki Cairo.
8c7ef450 111
112%package static
b7ccdbe1 113Summary: Static Cairo library
beb0026f 114Summary(pl.UTF-8): Statyczna biblioteka Cairo
4233927e 115Group: Development/Libraries
b7ccdbe1 116Requires: %{name}-devel = %{version}-%{release}
8c7ef450 117
118%description static
b7ccdbe1
JB
119Static Cairo library.
120
65aac246 121%description static -l pl.UTF-8
b7ccdbe1 122Statyczna biblioteka Cairo.
8c7ef450 123
8f628762
JB
124%package gobject
125Summary: GObject functions library for Cairo graphics library
126Summary(pl.UTF-8): Biblioteka funkcji GObject dla biblioteki graficznej Cairo
127Group: Libraries
128Requires: %{name} = %{version}-%{release}
7932577f 129Requires: glib2 >= 1:2.14
8f628762
JB
130
131%description gobject
132GObject functions library for Cairo graphics library.
133
134%description gobject -l pl.UTF-8
135Biblioteka funkcji GObject dla biblioteki graficznej Cairo.
136
137%package gobject-devel
138Summary: Header files for Cairo GObject library
139Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Cairo GObject
140Group: Development/Libraries
141Requires: %{name}-devel = %{version}-%{release}
142Requires: %{name}-gobject = %{version}-%{release}
acd7ce6e 143Requires: glib2-devel >= 1:2.14
8f628762
JB
144
145%description gobject-devel
146Header files for Cairo GObject library.
147
148%description gobject-devel -l pl.UTF-8
149Pliki nagłówkowe biblioteki Cairo GObject.
150
151%package gobject-static
152Summary: Static Cairo GObject library
153Summary(pl.UTF-8): Statyczna biblioteka Cairo GObject
154Group: Development/Libraries
155Requires: %{name}-gobject-devel = %{version}-%{release}
156
157%description gobject-static
158Static Cairo GObject library.
159
160%description gobject-static -l pl.UTF-8
161Statyczna biblioteka Cairo GObject.
162
163%package trace
fde28cff
JB
164Summary: Cairo calls tracing utilities
165Summary(pl.UTF-8): Narzędzia do śledzenia wywołań Cairo
8f628762
JB
166Group: Development/Tools
167Requires: %{name} = %{version}-%{release}
c0a654a7 168Requires: binutils-libs >= 2.21.53
8f628762
JB
169
170%description trace
fde28cff 171Cairo calls tracing utilities.
8f628762
JB
172
173%description trace -l pl.UTF-8
fde28cff 174Narzędzia do śledzenia wywołań Cairo.
8f628762 175
ecad233f 176%package apidocs
177Summary: Cairo API documentation
beb0026f 178Summary(pl.UTF-8): Dokumentacja API Cairo
ecad233f 179Group: Documentation
180Requires: gtk-doc-common
052e014b 181BuildArch: noarch
ecad233f 182
183%description apidocs
184Cairo API documentation.
185
65aac246 186%description apidocs -l pl.UTF-8
d55df9d3 187Dokumentacja API Cairo.
ecad233f 188
8c7ef450 189%prep
56de7934 190%setup -q
8c7ef450 191
192%build
170c8276 193%meson build \
74746c26 194 %{!?with_static_libs:--default-library=shared} \
170c8276
JB
195 -Dfontconfig=enabled \
196 -Dfreetype=enabled \
170c8276
JB
197 -Dgtk_doc=%{__true_false apidocs} \
198 -Dpng=enabled \
fd24878b 199 -Dspectre=%{__enabled_disabled tests} \
170c8276
JB
200 -Dtee=enabled \
201 -Dtests=disabled \
202 -Dxcb=%{__enabled_disabled xcb} \
203 -Dxlib=enabled \
204 -Dzlib=enabled
205
206%ninja_build -C build
207
208%{?with_tests:%ninja_test -C build}
8c7ef450 209
210%install
211rm -rf $RPM_BUILD_ROOT
8c7ef450 212
170c8276 213%ninja_install -C build
8c7ef450 214
8f628762 215# LD_PRELOADable library
74746c26 216%{?with_static_libs:%{__rm} $RPM_BUILD_ROOT%{_libdir}/cairo/libcairo-{fdr,trace}.a}
8452c411 217
8c7ef450 218%clean
219rm -rf $RPM_BUILD_ROOT
220
b7ccdbe1
JB
221%post -p /sbin/ldconfig
222%postun -p /sbin/ldconfig
8c7ef450 223
8f628762
JB
224%post gobject -p /sbin/ldconfig
225%postun gobject -p /sbin/ldconfig
226
b7ccdbe1
JB
227%files
228%defattr(644,root,root,755)
9b33cbb5 229# COPYING contains only notes, not LGPL/MPL texts
170c8276 230%doc AUTHORS BUGS COPYING NEWS README.md
daa7aa2f
JB
231%attr(755,root,root) %{_libdir}/libcairo.so.*.*.*
232%attr(755,root,root) %ghost %{_libdir}/libcairo.so.2
1fb61c53
PZ
233%attr(755,root,root) %{_libdir}/libcairo-script-interpreter.so.*.*.*
234%attr(755,root,root) %ghost %{_libdir}/libcairo-script-interpreter.so.2
8c7ef450 235
236%files devel
237%defattr(644,root,root,755)
daa7aa2f 238%attr(755,root,root) %{_libdir}/libcairo.so
1fb61c53 239%attr(755,root,root) %{_libdir}/libcairo-script-interpreter.so
daa7aa2f 240%{_includedir}/cairo
8f628762 241%exclude %{_includedir}/cairo/cairo-gobject.h
daa7aa2f 242%{_pkgconfigdir}/cairo.pc
1fb61c53 243%{_pkgconfigdir}/cairo-fc.pc
daa7aa2f 244%{_pkgconfigdir}/cairo-ft.pc
555786d4 245%{?with_pdf:%{_pkgconfigdir}/cairo-pdf.pc}
daa7aa2f 246%{_pkgconfigdir}/cairo-png.pc
fd24878b 247%{_pkgconfigdir}/cairo-ps.pc
fde28cff 248%{_pkgconfigdir}/cairo-script.pc
170c8276 249%{_pkgconfigdir}/cairo-script-interpreter.pc
0ecd672c 250%{?with_svg:%{_pkgconfigdir}/cairo-svg.pc}
e9726ad7 251%{_pkgconfigdir}/cairo-tee.pc
8452c411 252%{?with_xcb:%{_pkgconfigdir}/cairo-xcb.pc}
1fb61c53 253%{?with_xcb:%{_pkgconfigdir}/cairo-xcb-shm.pc}
daa7aa2f
JB
254%{_pkgconfigdir}/cairo-xlib.pc
255%{_pkgconfigdir}/cairo-xlib-xrender.pc
b7ccdbe1 256
74746c26 257%if %{with static_libs}
b7ccdbe1
JB
258%files static
259%defattr(644,root,root,755)
daa7aa2f 260%{_libdir}/libcairo.a
1fb61c53 261%{_libdir}/libcairo-script-interpreter.a
74746c26 262%endif
ecad233f 263
8f628762
JB
264%files gobject
265%defattr(644,root,root,755)
266%attr(755,root,root) %{_libdir}/libcairo-gobject.so.*.*.*
267%attr(755,root,root) %ghost %{_libdir}/libcairo-gobject.so.2
268
269%files gobject-devel
270%defattr(644,root,root,755)
271%attr(755,root,root) %{_libdir}/libcairo-gobject.so
8f628762
JB
272%{_includedir}/cairo/cairo-gobject.h
273%{_pkgconfigdir}/cairo-gobject.pc
274
74746c26 275%if %{with static_libs}
8f628762
JB
276%files gobject-static
277%defattr(644,root,root,755)
278%{_libdir}/libcairo-gobject.a
74746c26 279%endif
8f628762
JB
280
281%files trace
282%defattr(644,root,root,755)
283%attr(755,root,root) %{_bindir}/cairo-trace
284%dir %{_libdir}/cairo
170c8276 285%attr(755,root,root) %{_libdir}/cairo/libcairo-fdr.so
8f628762
JB
286%attr(755,root,root) %{_libdir}/cairo/libcairo-trace.so*
287
8452c411 288%if %{with apidocs}
ecad233f 289%files apidocs
290%defattr(644,root,root,755)
291%{_gtkdocdir}/cairo
8452c411 292%endif
This page took 0.319822 seconds and 4 git commands to generate.