]> git.pld-linux.org Git - packages/cairo.git/blame - cairo.spec
- added ft-Use-FT_Done_MM_Var-instead-of-free-when-available,composite_color_glyphs...
[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
70f48568 7%bcond_with gl # 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}
555786d4
JB
23%undefine with_gl
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
23143567 32Release: 4
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}
ba356974 43%if %{with gl} || %{with glesv2} || %{with glesv3} || %{with openvg}
555786d4
JB
44BuildRequires: EGL-devel >= 1.1
45%endif
46%if %{with gl} || %{with openvg}
47BuildRequires: OpenGL-GLX-devel
48%endif
49%{?with_gl:BuildRequires: OpenGL-devel}
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
JB
136%{?with_directfb:Requires: DirectFB-devel}
137%if %{with gl} || %{with glesv2} || %{with openvg}
138Requires: EGL-devel >= 1.1
139%endif
140%{?with_gl:Requires: OpenGL-devel}
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
ER
238%if "%{_rpmversion}" >= "5"
239BuildArch: noarch
240%endif
ecad233f 241
242%description apidocs
243Cairo API documentation.
244
65aac246 245%description apidocs -l pl.UTF-8
d55df9d3 246Dokumentacja API Cairo.
ecad233f 247
8c7ef450 248%prep
56de7934 249%setup -q
c9185d93 250%patch0 -p1
eca05c24 251%patch1 -p1
23143567
JB
252%patch2 -p1
253%patch3 -p1
8c7ef450 254
5028e0d5
JB
255%if %{without tests}
256%{__sed} -i -e '/SUBDIRS += boilerplate test perf/d' Makefile.am
257%endif
258
8c7ef450 259%build
2e75f7d0 260%{?with_apidocs:%{__gtkdocize}}
b7ccdbe1 261%{__libtoolize}
75cc31b6 262%{__aclocal} -I build
8c7ef450 263%{__autoheader}
8c7ef450 264%{__autoconf}
b7ccdbe1 265%{__automake}
7fdf57cf 266%configure \
3396a3ae 267 --disable-silent-rules \
41415830
JR
268 %{__enable_disable cogl} \
269 %{__enable_disable directfb} \
270 %{__enable_disable gl} \
271 %{__enable_disable glesv2} \
ba356974 272 %{__enable_disable glesv3} \
41415830
JR
273 %{__enable_disable apidocs gtk-doc} \
274 %{__enable_disable pdf} \
275 %{__enable_disable ps} \
276 %{__enable_disable qt} \
277 %{__enable_disable svg} \
278 %{__enable_disable openvg vg} \
279 %{__enable_disable xcb} \
c0a654a7 280 --enable-ft \
2d024fa9 281 --enable-png \
e9726ad7 282 --enable-tee \
555786d4 283 --enable-xml \
7fdf57cf 284 --with-html-dir=%{_gtkdocdir}
0c4a4f34 285
8c7ef450 286%{__make}
d71997d7 287%{?with_tests:%{__make} check}
8c7ef450 288
289%install
290rm -rf $RPM_BUILD_ROOT
8c7ef450 291
292%{__make} install \
293 DESTDIR=$RPM_BUILD_ROOT
294
5028e0d5
JB
295# obsoleted by pkg-config
296%{__rm} $RPM_BUILD_ROOT%{_libdir}/libcairo*.la
8f628762
JB
297# LD_PRELOADable library
298%{__rm} $RPM_BUILD_ROOT%{_libdir}/cairo/libcairo-trace.{la,a}
fde28cff
JB
299# LD_PRELOADable modules(?)
300%{__rm} $RPM_BUILD_ROOT%{_libdir}/cairo/cairo-{fdr,sphinx}.{la,a}
8f628762 301
fde28cff 302%{!?with_apidocs:%{__rm} -rf $RPM_BUILD_ROOT%{_gtkdocdir}/cairo}
8452c411 303
8c7ef450 304%clean
305rm -rf $RPM_BUILD_ROOT
306
b7ccdbe1
JB
307%post -p /sbin/ldconfig
308%postun -p /sbin/ldconfig
8c7ef450 309
8f628762
JB
310%post gobject -p /sbin/ldconfig
311%postun gobject -p /sbin/ldconfig
312
b7ccdbe1
JB
313%files
314%defattr(644,root,root,755)
9b33cbb5 315# COPYING contains only notes, not LGPL/MPL texts
2d024fa9 316%doc AUTHORS COPYING ChangeLog NEWS README
daa7aa2f
JB
317%attr(755,root,root) %{_libdir}/libcairo.so.*.*.*
318%attr(755,root,root) %ghost %{_libdir}/libcairo.so.2
1fb61c53
PZ
319%attr(755,root,root) %{_libdir}/libcairo-script-interpreter.so.*.*.*
320%attr(755,root,root) %ghost %{_libdir}/libcairo-script-interpreter.so.2
8c7ef450 321
322%files devel
323%defattr(644,root,root,755)
daa7aa2f 324%attr(755,root,root) %{_libdir}/libcairo.so
1fb61c53 325%attr(755,root,root) %{_libdir}/libcairo-script-interpreter.so
daa7aa2f 326%{_includedir}/cairo
8f628762 327%exclude %{_includedir}/cairo/cairo-gobject.h
daa7aa2f 328%{_pkgconfigdir}/cairo.pc
555786d4 329%{?with_directfb:%{_pkgconfigdir}/cairo-directfb.pc}
ba356974 330%if %{with gl} || %{with glesv2} || %{with glesv3} || %{with openvg}
555786d4
JB
331%{_pkgconfigdir}/cairo-egl.pc
332%endif
1fb61c53 333%{_pkgconfigdir}/cairo-fc.pc
daa7aa2f 334%{_pkgconfigdir}/cairo-ft.pc
555786d4 335%{?with_gl:%{_pkgconfigdir}/cairo-gl.pc}
ba356974
JB
336%{?with_glesv2:%{_pkgconfigdir}/cairo-glesv2.pc}
337%{?with_glesv3:%{_pkgconfigdir}/cairo-glesv3.pc}
555786d4
JB
338%if %{with gl} || %{with openvg}
339%{_pkgconfigdir}/cairo-glx.pc
340%endif
341%{?with_pdf:%{_pkgconfigdir}/cairo-pdf.pc}
daa7aa2f 342%{_pkgconfigdir}/cairo-png.pc
555786d4
JB
343%{?with_ps:%{_pkgconfigdir}/cairo-ps.pc}
344%{?with_qt:%{_pkgconfigdir}/cairo-qt.pc}
fde28cff 345%{_pkgconfigdir}/cairo-script.pc
0ecd672c 346%{?with_svg:%{_pkgconfigdir}/cairo-svg.pc}
e9726ad7 347%{_pkgconfigdir}/cairo-tee.pc
555786d4 348%{?with_openvg:%{_pkgconfigdir}/cairo-vg.pc}
8452c411 349%{?with_xcb:%{_pkgconfigdir}/cairo-xcb.pc}
1fb61c53 350%{?with_xcb:%{_pkgconfigdir}/cairo-xcb-shm.pc}
daa7aa2f
JB
351%{_pkgconfigdir}/cairo-xlib.pc
352%{_pkgconfigdir}/cairo-xlib-xrender.pc
555786d4 353%{_pkgconfigdir}/cairo-xml.pc
b7ccdbe1
JB
354
355%files static
356%defattr(644,root,root,755)
daa7aa2f 357%{_libdir}/libcairo.a
1fb61c53 358%{_libdir}/libcairo-script-interpreter.a
ecad233f 359
8f628762
JB
360%files gobject
361%defattr(644,root,root,755)
362%attr(755,root,root) %{_libdir}/libcairo-gobject.so.*.*.*
363%attr(755,root,root) %ghost %{_libdir}/libcairo-gobject.so.2
364
365%files gobject-devel
366%defattr(644,root,root,755)
367%attr(755,root,root) %{_libdir}/libcairo-gobject.so
8f628762
JB
368%{_includedir}/cairo/cairo-gobject.h
369%{_pkgconfigdir}/cairo-gobject.pc
370
371%files gobject-static
372%defattr(644,root,root,755)
373%{_libdir}/libcairo-gobject.a
374
375%files trace
376%defattr(644,root,root,755)
fde28cff 377%attr(755,root,root) %{_bindir}/cairo-sphinx
8f628762
JB
378%attr(755,root,root) %{_bindir}/cairo-trace
379%dir %{_libdir}/cairo
fde28cff
JB
380%attr(755,root,root) %{_libdir}/cairo/cairo-fdr.so*
381%attr(755,root,root) %{_libdir}/cairo/cairo-sphinx.so*
8f628762
JB
382%attr(755,root,root) %{_libdir}/cairo/libcairo-trace.so*
383
8452c411 384%if %{with apidocs}
ecad233f 385%files apidocs
386%defattr(644,root,root,755)
387%{_gtkdocdir}/cairo
8452c411 388%endif
This page took 0.087337 seconds and 4 git commands to generate.