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