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