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