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