]> git.pld-linux.org Git - packages/cairo.git/blob - cairo.spec
- release 10
[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 %bcond_with     gl              # enable OpenGL support
6 %if "%{pld_release}" == "ac"
7 %bcond_with     xcb             # XCB backend
8 %else
9 %bcond_without  xcb             # XCB backend
10 %endif
11 %bcond_with     tests           # perform tests (can fail due to out of memory)
12 #
13 Summary:        Cairo - multi-platform 2D graphics library
14 Summary(pl.UTF-8):      Cairo - wieloplatformowa biblioteka graficzna 2D
15 Name:           cairo
16 Version:        1.10.2
17 Release:        10
18 License:        LGPL v2.1 or MPL v1.1
19 Group:          Libraries
20 Source0:        http://cairographics.org/releases/%{name}-%{version}.tar.gz
21 # Source0-md5:  f101a9e88b783337b20b2e26dfd26d5f
22 Patch0:         %{name}-link.patch
23 URL:            http://cairographics.org/
24 BuildRequires:  autoconf >= 2.59
25 BuildRequires:  automake >= 1:1.9.6
26 BuildRequires:  fontconfig-devel >= 2.2.95
27 BuildRequires:  freetype-devel >= 1:2.3.0
28 BuildRequires:  glib2-devel >= 1:2.0
29 %{?with_apidocs:BuildRequires:  gtk-doc >= 1.6}
30 BuildRequires:  libpng-devel >= 2:1.4.0
31 %{?with_svg:BuildRequires:      librsvg-devel >= 2.15.0}
32 BuildRequires:  libspectre-devel >= 0.2.0
33 BuildRequires:  libtool >= 1.4
34 BuildRequires:  pixman-devel >= 0.18.4
35 BuildRequires:  pkgconfig >= 1:0.9
36 %{?with_tests:BuildRequires:    poppler-glib-devel >= 0.13.3}
37 BuildRequires:  rpm >= 4.4.9-56
38 BuildRequires:  sed >= 4.0
39 BuildRequires:  binutils-devel
40 %if %{with xcb}
41 BuildRequires:  libxcb-devel >= 1.4
42 %endif
43 %if "%{pld_release}" == "ac"
44 BuildRequires:  xrender-devel >= 0.6
45 %else
46 BuildRequires:  xorg-lib-libX11-devel%{?with_xcb: >= 1.1}
47 BuildRequires:  xorg-lib-libXrender-devel >= 0.6
48 %endif
49 BuildRequires:  zlib-devel
50 Requires:       freetype >= 1:2.3.0
51 Requires:       pixman >= 0.18.4
52 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
53
54 %description
55 Cairo provides anti-aliased vector-based rendering for X. Paths
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
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
74 przy użyciu rozszerzonego algorytmu składania Portera-Duffa, który
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
82 %package devel
83 Summary:        Development files for Cairo library
84 Summary(pl.UTF-8):      Pliki programistyczne biblioteki Cairo
85 Group:          Development/Libraries
86 Requires:       %{name} = %{version}-%{release}
87 Requires:       fontconfig-devel >= 2.2.95
88 Requires:       freetype-devel >= 1:2.3.0
89 Requires:       libpng-devel >= 2:1.4.0
90 %{?with_xcb:Requires:   libxcb-devel >= 1.4}
91 Requires:       pixman-devel >= 0.18.4
92 %if "%{pld_release}" == "ac"
93 Requires:       xrender-devel >= 0.6
94 %else
95 Requires:       xorg-lib-libX11-devel%{?with_xcb: >= 1.1}
96 Requires:       xorg-lib-libXrender-devel >= 0.6
97 %endif
98
99 %description devel
100 Development files for Cairo library.
101
102 %description devel -l pl.UTF-8
103 Pliki programistyczne biblioteki Cairo.
104
105 %package static
106 Summary:        Static Cairo library
107 Summary(pl.UTF-8):      Statyczna biblioteka Cairo
108 Group:          Development/Libraries
109 Requires:       %{name}-devel = %{version}-%{release}
110
111 %description static
112 Static Cairo library.
113
114 %description static -l pl.UTF-8
115 Statyczna biblioteka Cairo.
116
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}
160 Requires:       binutils-libs >= 2.21.53
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
168 %package apidocs
169 Summary:        Cairo API documentation
170 Summary(pl.UTF-8):      Dokumentacja API Cairo
171 Group:          Documentation
172 Requires:       gtk-doc-common
173
174 %description apidocs
175 Cairo API documentation.
176
177 %description apidocs -l pl.UTF-8
178 Dokumentacja API Cairo.
179
180 %prep
181 %setup -q
182 %patch0 -p1
183
184 %build
185 %{?with_apidocs:%{__gtkdocize}}
186 %{__libtoolize}
187 %{__aclocal} -I build
188 %{__autoheader}
189 %{__autoconf}
190 %{__automake}
191 %configure \
192         --disable-silent-rules \
193         --enable-ft \
194         %{?with_gl:--enable-gl=yes}\
195         %{?with_apidocs:--enable-gtk-doc} \
196         --enable-pdf \
197         --enable-png \
198         --enable-ps \
199         %{!?with_svg:--disable-svg} \
200         --enable-tee \
201         %{?with_xcb:--enable-xcb} \
202         --with-html-dir=%{_gtkdocdir}
203
204 %{__sed} -i 's/gobject-2.0 glib-2.0//' src/cairo.pc
205
206 %{__make}
207 %{?with_tests:%{__make} check}
208
209 %install
210 rm -rf $RPM_BUILD_ROOT
211
212 %{__make} install \
213         DESTDIR=$RPM_BUILD_ROOT
214
215 # LD_PRELOADable library
216 %{__rm} $RPM_BUILD_ROOT%{_libdir}/cairo/libcairo-trace.{la,a}
217
218 %{!?with_apidocs:rm -rf $RPM_BUILD_ROOT%{_gtkdocdir}/cairo}
219
220 %clean
221 rm -rf $RPM_BUILD_ROOT
222
223 %post   -p /sbin/ldconfig
224 %postun -p /sbin/ldconfig
225
226 %post   gobject -p /sbin/ldconfig
227 %postun gobject -p /sbin/ldconfig
228
229 %files
230 %defattr(644,root,root,755)
231 # COPYING contains only notes, not LGPL/MPL texts
232 %doc AUTHORS COPYING ChangeLog NEWS README
233 %attr(755,root,root) %{_libdir}/libcairo.so.*.*.*
234 %attr(755,root,root) %ghost %{_libdir}/libcairo.so.2
235 %attr(755,root,root) %{_libdir}/libcairo-script-interpreter.so.*.*.*
236 %attr(755,root,root) %ghost %{_libdir}/libcairo-script-interpreter.so.2
237
238 %files devel
239 %defattr(644,root,root,755)
240 %attr(755,root,root) %{_libdir}/libcairo.so
241 %attr(755,root,root) %{_libdir}/libcairo-script-interpreter.so
242 %{_libdir}/libcairo.la
243 %{_libdir}/libcairo-script-interpreter.la
244 %{_includedir}/cairo
245 %exclude %{_includedir}/cairo/cairo-gobject.h
246 %{_pkgconfigdir}/cairo.pc
247 %{?with_gl:%{_pkgconfigdir}/cairo-gl.pc}
248 %{?with_gl:%{_pkgconfigdir}/cairo-glx.pc}
249 %{_pkgconfigdir}/cairo-fc.pc
250 %{_pkgconfigdir}/cairo-ft.pc
251 %{_pkgconfigdir}/cairo-pdf.pc
252 %{_pkgconfigdir}/cairo-png.pc
253 %{_pkgconfigdir}/cairo-ps.pc
254 %{?with_svg:%{_pkgconfigdir}/cairo-svg.pc}
255 %{_pkgconfigdir}/cairo-tee.pc
256 %{?with_xcb:%{_pkgconfigdir}/cairo-xcb.pc}
257 %{?with_xcb:%{_pkgconfigdir}/cairo-xcb-shm.pc}
258 %{_pkgconfigdir}/cairo-xlib.pc
259 %{_pkgconfigdir}/cairo-xlib-xrender.pc
260
261 %files static
262 %defattr(644,root,root,755)
263 %{_libdir}/libcairo.a
264 %{_libdir}/libcairo-script-interpreter.a
265
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
288 %if %{with apidocs}
289 %files apidocs
290 %defattr(644,root,root,755)
291 %{_gtkdocdir}/cairo
292 %endif
This page took 0.062137 seconds and 4 git commands to generate.