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