3 %bcond_with glitz # build with glitz backend
5 Summary: Cairo - multi-platform 2D graphics library - cross Mingw32 version
6 Summary(pl): Cairo - wieloplatformowa biblioteka graficzna 2D - skro¶na wersja Mingw32
7 %define _realname cairo
8 Name: crossmingw32-%{_realname}
11 License: LGPL v2.1 or MPL v1.1
13 Source0: http://cairographics.org/releases/%{_realname}-%{version}.tar.gz
14 # Source0-md5: 487b3d7515752fe57f780d0fd707b01a
15 Patch0: %{_realname}-link.patch
16 URL: http://cairographics.org/
17 BuildRequires: autoconf >= 2.54
18 BuildRequires: automake >= 1:1.7
19 BuildRequires: crossmingw32-fontconfig
20 BuildRequires: crossmingw32-freetype >= 2.1.10
21 %{?with_glitz:BuildRequires: crossmingw32-glitz >= 0.5.1}
22 BuildRequires: crossmingw32-libpng
23 BuildRequires: crossmingw32-pkgconfig
24 BuildRequires: crossmingw32-zlib
25 BuildRequires: libtool
26 Requires: crossmingw32-freetype >= 2.1.10
27 %{?with_glitz:Requires: glitz >= 0.5.1}
28 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 %define no_install_post_strip 1
32 %define target i386-mingw32
33 %define target_platform i386-pc-mingw32
34 %define arch %{_prefix}/%{target}
35 %define gccarch %{_prefix}/lib/gcc-lib/%{target}
36 %define gcclib %{_prefix}/lib/gcc-lib/%{target}/%{version}
38 %define _sysprefix /usr
39 %define _prefix %{_sysprefix}/%{target}
40 %define _pkgconfigdir %{_prefix}/lib/pkgconfig
41 %define __cc %{target}-gcc
42 %define __cxx %{target}-g++
45 Cairo provides anti-aliased vector-based rendering for X. Paths
46 consist of line segments and cubic splines and can be rendered at any
47 width with various join and cap styles. All colors may be specified
48 with optional translucence (opacity/alpha) and combined using the
49 extended Porter/Duff compositing algebra as found in the X Render
52 Cairo exports a stateful rendering API similar in spirit to the path
53 construction, text, and painting operators of PostScript, (with the
54 significant addition of translucence in the imaging model). When
55 complete, the API is intended to support the complete imaging model of
58 Cairo relies on the Xc library for backend rendering. Xc provides an
59 abstract interface for rendering to multiple target types. As of this
60 writing, Xc allows Cairo to target X drawables as well as generic
61 image buffers. Future backends such as PostScript, PDF, and perhaps
62 OpenGL are currently being planned.
65 Cairo obs³uguje oparty na wektorach rendering z antyaliasingiem dla X.
66 ¦cie¿ki sk³adaj± siê z odcinków i splajnów kubicznych, a renderowane
67 mog± byæ z dowoln± grubo¶ci± i ró¿nymi stylami po³±czeñ i zakoñczeñ.
68 Wszystkie kolory mog± byæ podane z opcjonaln± pó³przezroczysto¶ci±
69 (podan± przez wspó³czynnik nieprzezroczysto¶ci lub alpha) i ³±czone
70 przy u¿yciu rozszerzonego algorytmu mieszania Portera-Duffa, który
71 mo¿na znale¼æ w rozszerzeniu X Render.
73 Cairo eksportuje stanowe API renderuj±ce w duchu podobne do operatorów
74 konstruowania ¶cie¿ek, tekstu i rysowania z PostScriptu (ze znacznym
75 dodatkiem pó³przezroczysto¶ci w modelu obrazu). Kiedy API zostanie
76 ukoñczone, ma obs³ugiwaæ pe³ny model obrazu z PDF w wersji 1.4.
78 Cairo do backendowego renderowania wykorzystuje bibliotekê Xc. Xc
79 dostarcza abstrakcyjny interfejs do renderowania na wiele rodzajów
80 wyj¶æ. Aktualnie Xc pozwala Cairo tworzyæ obiekty X, a tak¿e ogólne
81 bufory obrazu. W przysz³o¶ci planowane s± takie backendy jak
82 PostScript, PDF i byæ mo¿e OpenGL.
85 %setup -q -n %{_realname}-%{version}
89 export PKG_CONFIG_PATH=%{_prefix}/lib/pkgconfig
97 RANLIB="%{target}-ranlib" \
99 --host=%{target_platform} \
100 %{?with_glitz:--enable-glitz} \
104 --disable-xlib-render \
110 rm -rf $RPM_BUILD_ROOT
113 DESTDIR=$RPM_BUILD_ROOT
116 rm -rf $RPM_BUILD_ROOT
119 %defattr(644,root,root,755)
120 # COPYING contains only notes, not LGPL/MPL texts
121 %doc AUTHORS COPYING ChangeLog NEWS README TODO
122 %attr(755,root,root) %{_libdir}/lib*.la
123 %attr(755,root,root) %{_libdir}/lib*.a
125 %{_pkgconfigdir}/*.pc