]> git.pld-linux.org Git - packages/cairo.git/blame - cairo.spec
- rediffed
[packages/cairo.git] / cairo.spec
CommitLineData
79fcc918
JB
1#
2# Conditional build:
9f933f96 3%bcond_without apidocs # disable gtk-doc
555786d4
JB
4%bcond_with cogl # Cogl surface backend [incompatible with cogl 1.12.x]
5%bcond_with directfb # DirectFB surface backend
6%bcond_with drm # DRM surface backend
c142f05b 7%bcond_with opengl # OpenGL surface backend, http://lists.pld-linux.org/mailman/pipermail/pld-devel-en/2015-May/024387.html
ba356974
JB
8%bcond_with glesv2 # OpenGLESv2 surface backend (mutually exclusive with gl and glesv3)
9%bcond_with glesv3 # OpenGLESv3 surface backend (mutually exclusive with gl and glesv2)
555786d4
JB
10%bcond_with openvg # OpenVG surface backend
11%bcond_without pdf # PDF surface backend
12%bcond_without ps # PS surface backend
13%bcond_without svg # SVG surface backend (disable to boostrap librsvg)
14%bcond_with qt # Qt surface backend [expects qt_draw_glyphs() API in Qt 4.7+]
68f80d0c 15%if "%{pld_release}" == "ac"
75cc31b6 16%bcond_with xcb # XCB backend
68f80d0c 17%else
75cc31b6 18%bcond_without xcb # XCB backend
68f80d0c 19%endif
75cc31b6 20%bcond_with tests # perform tests (can fail due to out of memory)
052e014b 21
ba356974 22%if %{with glesv2} || %{with glesv3}
c142f05b 23%undefine with_opengl
555786d4 24%endif
ba356974
JB
25%if %{with glesv3}
26%undefine with_glesv2
27%endif
b7ccdbe1 28Summary: Cairo - multi-platform 2D graphics library
beb0026f 29Summary(pl.UTF-8): Cairo - wieloplatformowa biblioteka graficzna 2D
8c7ef450 30Name: cairo
a619b3f9 31Version: 1.16.0
f2a9b2c4 32Release: 5
9b33cbb5 33License: LGPL v2.1 or MPL v1.1
b7ccdbe1 34Group: Libraries
f965b14a 35Source0: https://www.cairographics.org/releases/%{name}-%{version}.tar.xz
a619b3f9 36# Source0-md5: f19e0353828269c22bd72e271243a552
c9185d93 37Patch0: %{name}-link.patch
eca05c24 38Patch1: %{name}-gobject-deps.patch
23143567
JB
39Patch2: %{name}-ft-Use-FT_Done_MM_Var-instead-of-free-when-available.patch
40Patch3: %{name}-composite_color_glyphs.patch
f965b14a 41URL: https://www.cairographics.org/
555786d4 42%{?with_directfb:BuildRequires: DirectFB-devel}
c142f05b 43%if %{with opengl} || %{with glesv2} || %{with glesv3} || %{with openvg}
555786d4
JB
44BuildRequires: EGL-devel >= 1.1
45%endif
c142f05b 46%if %{with opengl} || %{with openvg}
555786d4
JB
47BuildRequires: OpenGL-GLX-devel
48%endif
c142f05b 49%{?with_opengl:BuildRequires: OpenGL-devel}
555786d4 50%{?with_glesv2:BuildRequires: OpenGLESv2-devel >= 2.0}
ba356974 51%{?with_glesv3:BuildRequires: OpenGLESv3-devel >= 3.0}
555786d4
JB
52%{?with_openvg:BuildRequires: OpenVG-devel}
53%{?with_qt:BuildRequires: QtGui-devel >= 4.4.0}
543a7c78
JB
54BuildRequires: autoconf >= 2.63
55BuildRequires: automake >= 1:1.11
fde28cff 56BuildRequires: binutils-devel
555786d4 57%{?with_cogl:BuildRequires: cogl-devel}
3396a3ae 58BuildRequires: fontconfig-devel >= 2.2.95
ba356974 59BuildRequires: freetype-devel >= 1:2.5.1
acd7ce6e 60BuildRequires: glib2-devel >= 1:2.14
ba356974
JB
61%if %{with svg} && %{with tests}
62BuildRequires: gtk+2-devel >= 1:2.0
63%endif
543a7c78 64%{?with_apidocs:BuildRequires: gtk-doc >= 1.15}
a619b3f9 65%{?with_drm:BuildRequires: libdrm-devel >= 2.4}
42ecc17e 66BuildRequires: libpng-devel >= 2:1.4.0
555786d4 67%if %{with svg} && %{with tests}
7932577f 68BuildRequires: librsvg-devel >= 2.35.0
555786d4
JB
69%endif
70%if %{with ps} && %{with tests}
3396a3ae 71BuildRequires: libspectre-devel >= 0.2.0
555786d4 72%endif
543a7c78
JB
73BuildRequires: libtool >= 2:2.2
74%{?with_xcb:BuildRequires: libxcb-devel >= 1.6}
7932577f 75BuildRequires: lzo-devel >= 2
acd7ce6e 76BuildRequires: pixman-devel >= 0.30.0
5a53c090 77BuildRequires: pkgconfig >= 1:0.18
555786d4
JB
78%if %{with pdf} && %{with tests}
79BuildRequires: poppler-glib-devel >= 0.17.4
80%endif
68f80d0c 81BuildRequires: rpm >= 4.4.9-56
0c4a4f34 82BuildRequires: sed >= 4.0
543a7c78 83BuildRequires: tar >= 1:1.22
555786d4 84%{?with_drm:BuildRequires: udev-devel >= 1:136}
68f80d0c
ER
85%if "%{pld_release}" == "ac"
86BuildRequires: xrender-devel >= 0.6
87%else
3396a3ae 88BuildRequires: xorg-lib-libX11-devel%{?with_xcb: >= 1.1}
555786d4 89BuildRequires: xorg-lib-libXext-devel
ddb9a7c6 90BuildRequires: xorg-lib-libXrender-devel >= 0.6
68f80d0c 91%endif
543a7c78 92BuildRequires: xz
9bc5a16c 93BuildRequires: zlib-devel
555786d4
JB
94%{?with_qt:Requires: QtGui >= 4.4.0}
95Requires: fontconfig-libs >= 2.2.95
ba356974
JB
96Requires: freetype >= 1:2.5.1
97%{?with_drm:Requires: libdrm >= 2.4}
fde28cff 98%{?with_xcb:Requires: libxcb >= 1.6}
acd7ce6e 99Requires: pixman >= 0.30.0
8a51f1cc 100%{?with_drm:Requires: udev-libs >= 1:136}
b7ccdbe1 101BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
8c7ef450 102
103%description
76666767 104Cairo provides anti-aliased vector-based rendering for X. Paths
b7ccdbe1
JB
105consist of line segments and cubic splines and can be rendered at any
106width with various join and cap styles. All colors may be specified
107with optional translucence (opacity/alpha) and combined using the
108extended Porter/Duff compositing algebra as found in the X Render
109Extension.
110
111Cairo exports a stateful rendering API similar in spirit to the path
112construction, text, and painting operators of PostScript, (with the
113significant addition of translucence in the imaging model). When
114complete, the API is intended to support the complete imaging model of
115PDF 1.4.
116
65aac246
JR
117%description -l pl.UTF-8
118Cairo obsługuje oparty na wektorach rendering z antyaliasingiem dla X.
119Ścieżki składają się z odcinków i splajnów kubicznych, a renderowane
120mogą być z dowolną grubością i różnymi stylami połączeń i zakończeń.
121Wszystkie kolory mogą być podane z opcjonalną półprzezroczystością
122(podaną przez współczynnik nieprzezroczystości lub alpha) i łączone
9c95588d 123przy użyciu rozszerzonego algorytmu składania Portera-Duffa, który
65aac246
JR
124można znaleźć w rozszerzeniu X Render.
125
126Cairo eksportuje stanowe API renderujące w duchu podobne do operatorów
127konstruowania ścieżek, tekstu i rysowania z PostScriptu (ze znacznym
128dodatkiem półprzezroczystości w modelu obrazu). Kiedy API zostanie
129ukończone, ma obsługiwać pełny model obrazu z PDF w wersji 1.4.
130
8c7ef450 131%package devel
b7ccdbe1 132Summary: Development files for Cairo library
beb0026f 133Summary(pl.UTF-8): Pliki programistyczne biblioteki Cairo
4233927e 134Group: Development/Libraries
b7ccdbe1 135Requires: %{name} = %{version}-%{release}
555786d4 136%{?with_directfb:Requires: DirectFB-devel}
c142f05b 137%if %{with opengl} || %{with glesv2} || %{with openvg}
555786d4
JB
138Requires: EGL-devel >= 1.1
139%endif
c142f05b 140%{?with_opengl:Requires: OpenGL-devel}
555786d4 141%{?with_glesv2:Requires: OpenGLESv2-devel >= 2.0}
ba356974 142%{?with_glesv3:Requires: OpenGLESv3-devel >= 3.0}
555786d4
JB
143%{?with_openvg:Requires: OpenVG-devel}
144%{?with_qt:Requires: QtGui-devel >= 4.4.0}
145%{?with_cogl:Requires: cogl-devel}
3396a3ae 146Requires: fontconfig-devel >= 2.2.95
ba356974
JB
147Requires: freetype-devel >= 1:2.5.1
148%{?with_drm:Requires: libdrm-devel >= 2.4}
42ecc17e 149Requires: libpng-devel >= 2:1.4.0
fde28cff 150%{?with_xcb:Requires: libxcb-devel >= 1.6}
737c5d82 151Requires: lzo-devel >= 2
acd7ce6e 152Requires: pixman-devel >= 0.30.0
555786d4 153%{?with_drm:Requires: udev-devel >= 1:136}
68f80d0c
ER
154%if "%{pld_release}" == "ac"
155Requires: xrender-devel >= 0.6
156%else
3396a3ae 157Requires: xorg-lib-libX11-devel%{?with_xcb: >= 1.1}
555786d4 158Requires: xorg-lib-libXext-devel
ddb9a7c6 159Requires: xorg-lib-libXrender-devel >= 0.6
68f80d0c 160%endif
555786d4 161Requires: zlib-devel
8c7ef450 162
163%description devel
b7ccdbe1
JB
164Development files for Cairo library.
165
65aac246 166%description devel -l pl.UTF-8
b7ccdbe1 167Pliki programistyczne biblioteki Cairo.
8c7ef450 168
169%package static
b7ccdbe1 170Summary: Static Cairo library
beb0026f 171Summary(pl.UTF-8): Statyczna biblioteka Cairo
4233927e 172Group: Development/Libraries
b7ccdbe1 173Requires: %{name}-devel = %{version}-%{release}
8c7ef450 174
175%description static
b7ccdbe1
JB
176Static Cairo library.
177
65aac246 178%description static -l pl.UTF-8
b7ccdbe1 179Statyczna biblioteka Cairo.
8c7ef450 180
8f628762
JB
181%package gobject
182Summary: GObject functions library for Cairo graphics library
183Summary(pl.UTF-8): Biblioteka funkcji GObject dla biblioteki graficznej Cairo
184Group: Libraries
185Requires: %{name} = %{version}-%{release}
7932577f 186Requires: glib2 >= 1:2.14
8f628762
JB
187
188%description gobject
189GObject functions library for Cairo graphics library.
190
191%description gobject -l pl.UTF-8
192Biblioteka funkcji GObject dla biblioteki graficznej Cairo.
193
194%package gobject-devel
195Summary: Header files for Cairo GObject library
196Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Cairo GObject
197Group: Development/Libraries
198Requires: %{name}-devel = %{version}-%{release}
199Requires: %{name}-gobject = %{version}-%{release}
acd7ce6e 200Requires: glib2-devel >= 1:2.14
8f628762
JB
201
202%description gobject-devel
203Header files for Cairo GObject library.
204
205%description gobject-devel -l pl.UTF-8
206Pliki nagłówkowe biblioteki Cairo GObject.
207
208%package gobject-static
209Summary: Static Cairo GObject library
210Summary(pl.UTF-8): Statyczna biblioteka Cairo GObject
211Group: Development/Libraries
212Requires: %{name}-gobject-devel = %{version}-%{release}
213
214%description gobject-static
215Static Cairo GObject library.
216
217%description gobject-static -l pl.UTF-8
218Statyczna biblioteka Cairo GObject.
219
220%package trace
fde28cff
JB
221Summary: Cairo calls tracing utilities
222Summary(pl.UTF-8): Narzędzia do śledzenia wywołań Cairo
8f628762
JB
223Group: Development/Tools
224Requires: %{name} = %{version}-%{release}
c0a654a7 225Requires: binutils-libs >= 2.21.53
8f628762
JB
226
227%description trace
fde28cff 228Cairo calls tracing utilities.
8f628762
JB
229
230%description trace -l pl.UTF-8
fde28cff 231Narzędzia do śledzenia wywołań Cairo.
8f628762 232
ecad233f 233%package apidocs
234Summary: Cairo API documentation
beb0026f 235Summary(pl.UTF-8): Dokumentacja API Cairo
ecad233f 236Group: Documentation
237Requires: gtk-doc-common
052e014b 238BuildArch: noarch
ecad233f 239
240%description apidocs
241Cairo API documentation.
242
65aac246 243%description apidocs -l pl.UTF-8
d55df9d3 244Dokumentacja API Cairo.
ecad233f 245
8c7ef450 246%prep
56de7934 247%setup -q
c9185d93 248%patch0 -p1
eca05c24 249%patch1 -p1
23143567
JB
250%patch2 -p1
251%patch3 -p1
8c7ef450 252
5028e0d5
JB
253%if %{without tests}
254%{__sed} -i -e '/SUBDIRS += boilerplate test perf/d' Makefile.am
255%endif
256
8c7ef450 257%build
2e75f7d0 258%{?with_apidocs:%{__gtkdocize}}
b7ccdbe1 259%{__libtoolize}
75cc31b6 260%{__aclocal} -I build
8c7ef450 261%{__autoheader}
8c7ef450 262%{__autoconf}
b7ccdbe1 263%{__automake}
7fdf57cf 264%configure \
3396a3ae 265 --disable-silent-rules \
41415830
JR
266 %{__enable_disable cogl} \
267 %{__enable_disable directfb} \
c142f05b 268 %{__enable_disable opengl gl} \
41415830 269 %{__enable_disable glesv2} \
ba356974 270 %{__enable_disable glesv3} \
41415830
JR
271 %{__enable_disable apidocs gtk-doc} \
272 %{__enable_disable pdf} \
273 %{__enable_disable ps} \
274 %{__enable_disable qt} \
275 %{__enable_disable svg} \
276 %{__enable_disable openvg vg} \
277 %{__enable_disable xcb} \
c0a654a7 278 --enable-ft \
2d024fa9 279 --enable-png \
e9726ad7 280 --enable-tee \
555786d4 281 --enable-xml \
7fdf57cf 282 --with-html-dir=%{_gtkdocdir}
0c4a4f34 283
8c7ef450 284%{__make}
d71997d7 285%{?with_tests:%{__make} check}
8c7ef450 286
287%install
288rm -rf $RPM_BUILD_ROOT
8c7ef450 289
290%{__make} install \
291 DESTDIR=$RPM_BUILD_ROOT
292
5028e0d5
JB
293# obsoleted by pkg-config
294%{__rm} $RPM_BUILD_ROOT%{_libdir}/libcairo*.la
8f628762
JB
295# LD_PRELOADable library
296%{__rm} $RPM_BUILD_ROOT%{_libdir}/cairo/libcairo-trace.{la,a}
fde28cff
JB
297# LD_PRELOADable modules(?)
298%{__rm} $RPM_BUILD_ROOT%{_libdir}/cairo/cairo-{fdr,sphinx}.{la,a}
8f628762 299
fde28cff 300%{!?with_apidocs:%{__rm} -rf $RPM_BUILD_ROOT%{_gtkdocdir}/cairo}
8452c411 301
8c7ef450 302%clean
303rm -rf $RPM_BUILD_ROOT
304
b7ccdbe1
JB
305%post -p /sbin/ldconfig
306%postun -p /sbin/ldconfig
8c7ef450 307
8f628762
JB
308%post gobject -p /sbin/ldconfig
309%postun gobject -p /sbin/ldconfig
310
b7ccdbe1
JB
311%files
312%defattr(644,root,root,755)
9b33cbb5 313# COPYING contains only notes, not LGPL/MPL texts
2d024fa9 314%doc AUTHORS COPYING ChangeLog NEWS README
daa7aa2f
JB
315%attr(755,root,root) %{_libdir}/libcairo.so.*.*.*
316%attr(755,root,root) %ghost %{_libdir}/libcairo.so.2
1fb61c53
PZ
317%attr(755,root,root) %{_libdir}/libcairo-script-interpreter.so.*.*.*
318%attr(755,root,root) %ghost %{_libdir}/libcairo-script-interpreter.so.2
8c7ef450 319
320%files devel
321%defattr(644,root,root,755)
daa7aa2f 322%attr(755,root,root) %{_libdir}/libcairo.so
1fb61c53 323%attr(755,root,root) %{_libdir}/libcairo-script-interpreter.so
daa7aa2f 324%{_includedir}/cairo
8f628762 325%exclude %{_includedir}/cairo/cairo-gobject.h
daa7aa2f 326%{_pkgconfigdir}/cairo.pc
555786d4 327%{?with_directfb:%{_pkgconfigdir}/cairo-directfb.pc}
c142f05b 328%if %{with opengl} || %{with glesv2} || %{with glesv3} || %{with openvg}
555786d4
JB
329%{_pkgconfigdir}/cairo-egl.pc
330%endif
1fb61c53 331%{_pkgconfigdir}/cairo-fc.pc
daa7aa2f 332%{_pkgconfigdir}/cairo-ft.pc
c142f05b 333%{?with_opengl:%{_pkgconfigdir}/cairo-gl.pc}
ba356974
JB
334%{?with_glesv2:%{_pkgconfigdir}/cairo-glesv2.pc}
335%{?with_glesv3:%{_pkgconfigdir}/cairo-glesv3.pc}
c142f05b 336%if %{with opengl} || %{with openvg}
555786d4
JB
337%{_pkgconfigdir}/cairo-glx.pc
338%endif
339%{?with_pdf:%{_pkgconfigdir}/cairo-pdf.pc}
daa7aa2f 340%{_pkgconfigdir}/cairo-png.pc
555786d4
JB
341%{?with_ps:%{_pkgconfigdir}/cairo-ps.pc}
342%{?with_qt:%{_pkgconfigdir}/cairo-qt.pc}
fde28cff 343%{_pkgconfigdir}/cairo-script.pc
0ecd672c 344%{?with_svg:%{_pkgconfigdir}/cairo-svg.pc}
e9726ad7 345%{_pkgconfigdir}/cairo-tee.pc
555786d4 346%{?with_openvg:%{_pkgconfigdir}/cairo-vg.pc}
8452c411 347%{?with_xcb:%{_pkgconfigdir}/cairo-xcb.pc}
1fb61c53 348%{?with_xcb:%{_pkgconfigdir}/cairo-xcb-shm.pc}
daa7aa2f
JB
349%{_pkgconfigdir}/cairo-xlib.pc
350%{_pkgconfigdir}/cairo-xlib-xrender.pc
555786d4 351%{_pkgconfigdir}/cairo-xml.pc
b7ccdbe1
JB
352
353%files static
354%defattr(644,root,root,755)
daa7aa2f 355%{_libdir}/libcairo.a
1fb61c53 356%{_libdir}/libcairo-script-interpreter.a
ecad233f 357
8f628762
JB
358%files gobject
359%defattr(644,root,root,755)
360%attr(755,root,root) %{_libdir}/libcairo-gobject.so.*.*.*
361%attr(755,root,root) %ghost %{_libdir}/libcairo-gobject.so.2
362
363%files gobject-devel
364%defattr(644,root,root,755)
365%attr(755,root,root) %{_libdir}/libcairo-gobject.so
8f628762
JB
366%{_includedir}/cairo/cairo-gobject.h
367%{_pkgconfigdir}/cairo-gobject.pc
368
369%files gobject-static
370%defattr(644,root,root,755)
371%{_libdir}/libcairo-gobject.a
372
373%files trace
374%defattr(644,root,root,755)
fde28cff 375%attr(755,root,root) %{_bindir}/cairo-sphinx
8f628762
JB
376%attr(755,root,root) %{_bindir}/cairo-trace
377%dir %{_libdir}/cairo
fde28cff
JB
378%attr(755,root,root) %{_libdir}/cairo/cairo-fdr.so*
379%attr(755,root,root) %{_libdir}/cairo/cairo-sphinx.so*
8f628762
JB
380%attr(755,root,root) %{_libdir}/cairo/libcairo-trace.so*
381
8452c411 382%if %{with apidocs}
ecad233f 383%files apidocs
384%defattr(644,root,root,755)
385%{_gtkdocdir}/cairo
8452c411 386%endif
This page took 0.118395 seconds and 4 git commands to generate.