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