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