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