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