]>
Commit | Line | Data |
---|---|---|
79fcc918 JB |
1 | # |
2 | # Conditional build: | |
9f933f96 | 3 | %bcond_without apidocs # disable gtk-doc |
dd4d1358 | 4 | %bcond_with glitz # build with glitz backend |
2e75f7d0 | 5 | %bcond_with xcb # enable XCB backend |
d71997d7 | 6 | %bcond_with tests # perform tests (can fail due to out of memory) |
79fcc918 | 7 | # |
b7ccdbe1 | 8 | Summary: Cairo - multi-platform 2D graphics library |
65aac246 | 9 | Summary(pl.UTF-8): Cairo - wieloplatformowa biblioteka graficzna 2D |
8c7ef450 | 10 | Name: cairo |
b3c48879 | 11 | Version: 1.2.6 |
8f4a0f50 | 12 | Release: 2 |
9b33cbb5 | 13 | License: LGPL v2.1 or MPL v1.1 |
b7ccdbe1 | 14 | Group: Libraries |
0b5be3e0 | 15 | Source0: http://cairographics.org/releases/%{name}-%{version}.tar.gz |
b3c48879 | 16 | # Source0-md5: 487b3d7515752fe57f780d0fd707b01a |
c9185d93 | 17 | Patch0: %{name}-link.patch |
8c7ef450 | 18 | URL: http://cairographics.org/ |
79fcc918 | 19 | BuildRequires: autoconf >= 2.54 |
c9185d93 | 20 | BuildRequires: automake >= 1:1.7 |
9bc5a16c | 21 | BuildRequires: fontconfig-devel |
df2e7d34 | 22 | BuildRequires: freetype-devel >= 1:2.1.10 |
2e75f7d0 | 23 | %{?with_glitz:BuildRequires: glitz-devel >= 0.5.1} |
9f933f96 | 24 | %{?with_apidocs:BuildRequires: gtk-doc >= 1.3} |
9bc5a16c | 25 | BuildRequires: libpng-devel |
b7ccdbe1 JB |
26 | BuildRequires: libtool |
27 | BuildRequires: pkgconfig | |
2e75f7d0 | 28 | %{?with_xcb:BuildRequires: libxcb-devel} |
ddb9a7c6 | 29 | BuildRequires: xorg-lib-libXrender-devel >= 0.6 |
9bc5a16c | 30 | BuildRequires: zlib-devel |
df2e7d34 | 31 | Requires: freetype >= 1:2.1.10 |
2e75f7d0 | 32 | %{?with_glitz:Requires: glitz >= 0.5.1} |
b7ccdbe1 | 33 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
8c7ef450 | 34 | |
35 | %description | |
b7ccdbe1 JB |
36 | Cairo provides anti-aliased vector-based rendering for X. Paths |
37 | consist of line segments and cubic splines and can be rendered at any | |
38 | width with various join and cap styles. All colors may be specified | |
39 | with optional translucence (opacity/alpha) and combined using the | |
40 | extended Porter/Duff compositing algebra as found in the X Render | |
41 | Extension. | |
42 | ||
43 | Cairo exports a stateful rendering API similar in spirit to the path | |
44 | construction, text, and painting operators of PostScript, (with the | |
45 | significant addition of translucence in the imaging model). When | |
46 | complete, the API is intended to support the complete imaging model of | |
47 | PDF 1.4. | |
48 | ||
49 | Cairo relies on the Xc library for backend rendering. Xc provides an | |
50 | abstract interface for rendering to multiple target types. As of this | |
51 | writing, Xc allows Cairo to target X drawables as well as generic | |
52 | image buffers. Future backends such as PostScript, PDF, and perhaps | |
53 | OpenGL are currently being planned. | |
54 | ||
65aac246 JR |
55 | %description -l pl.UTF-8 |
56 | Cairo obsługuje oparty na wektorach rendering z antyaliasingiem dla X. | |
57 | Ścieżki składają się z odcinków i splajnów kubicznych, a renderowane | |
58 | mogą być z dowolną grubością i różnymi stylami połączeń i zakończeń. | |
59 | Wszystkie kolory mogą być podane z opcjonalną półprzezroczystością | |
60 | (podaną przez współczynnik nieprzezroczystości lub alpha) i łączone | |
61 | przy użyciu rozszerzonego algorytmu mieszania Portera-Duffa, który | |
62 | można znaleźć w rozszerzeniu X Render. | |
63 | ||
64 | Cairo eksportuje stanowe API renderujące w duchu podobne do operatorów | |
65 | konstruowania ścieżek, tekstu i rysowania z PostScriptu (ze znacznym | |
66 | dodatkiem półprzezroczystości w modelu obrazu). Kiedy API zostanie | |
67 | ukończone, ma obsługiwać pełny model obrazu z PDF w wersji 1.4. | |
68 | ||
69 | Cairo do backendowego renderowania wykorzystuje bibliotekę Xc. Xc | |
70 | dostarcza abstrakcyjny interfejs do renderowania na wiele rodzajów | |
71 | wyjść. Aktualnie Xc pozwala Cairo tworzyć obiekty X, a także ogólne | |
72 | bufory obrazu. W przyszłości planowane są takie backendy jak | |
73 | PostScript, PDF i być może OpenGL. | |
8c7ef450 | 74 | |
75 | %package devel | |
b7ccdbe1 | 76 | Summary: Development files for Cairo library |
65aac246 | 77 | Summary(pl.UTF-8): Pliki programistyczne biblioteki Cairo |
4233927e | 78 | Group: Development/Libraries |
b7ccdbe1 | 79 | Requires: %{name} = %{version}-%{release} |
9bc5a16c | 80 | Requires: fontconfig-devel |
df2e7d34 | 81 | Requires: freetype-devel >= 1:2.1.10 |
2e75f7d0 | 82 | %{?with_glitz:Requires: glitz-devel >= 0.5.1} |
9bc5a16c | 83 | Requires: libpng-devel |
2e75f7d0 | 84 | %{?with_xcb:Requires: libxcb-devel} |
ddb9a7c6 | 85 | Requires: xorg-lib-libXrender-devel >= 0.6 |
8c7ef450 | 86 | |
87 | %description devel | |
b7ccdbe1 JB |
88 | Development files for Cairo library. |
89 | ||
65aac246 | 90 | %description devel -l pl.UTF-8 |
b7ccdbe1 | 91 | Pliki programistyczne biblioteki Cairo. |
8c7ef450 | 92 | |
93 | %package static | |
b7ccdbe1 | 94 | Summary: Static Cairo library |
65aac246 | 95 | Summary(pl.UTF-8): Statyczna biblioteka Cairo |
4233927e | 96 | Group: Development/Libraries |
b7ccdbe1 | 97 | Requires: %{name}-devel = %{version}-%{release} |
8c7ef450 | 98 | |
99 | %description static | |
b7ccdbe1 JB |
100 | Static Cairo library. |
101 | ||
65aac246 | 102 | %description static -l pl.UTF-8 |
b7ccdbe1 | 103 | Statyczna biblioteka Cairo. |
8c7ef450 | 104 | |
ecad233f | 105 | %package apidocs |
106 | Summary: Cairo API documentation | |
65aac246 | 107 | Summary(pl.UTF-8): Dokumentacja API Cairo |
ecad233f | 108 | Group: Documentation |
109 | Requires: gtk-doc-common | |
110 | ||
111 | %description apidocs | |
112 | Cairo API documentation. | |
113 | ||
65aac246 | 114 | %description apidocs -l pl.UTF-8 |
ecad233f | 115 | Dokumentacja API Cairo. |
116 | ||
8c7ef450 | 117 | %prep |
56de7934 | 118 | %setup -q |
c9185d93 | 119 | %patch0 -p1 |
8c7ef450 | 120 | |
121 | %build | |
2e75f7d0 | 122 | %{?with_apidocs:%{__gtkdocize}} |
b7ccdbe1 | 123 | %{__libtoolize} |
8c7ef450 | 124 | %{__aclocal} |
125 | %{__autoheader} | |
8c7ef450 | 126 | %{__autoconf} |
b7ccdbe1 | 127 | %{__automake} |
7fdf57cf | 128 | %configure \ |
9f933f96 | 129 | %{?with_apidocs:--enable-gtk-doc} \ |
79fcc918 | 130 | %{?with_xcb:--enable-xcb} \ |
dd4d1358 | 131 | %{?with_glitz:--enable-glitz} \ |
0b5be3e0 | 132 | --enable-ps \ |
133 | --enable-pdf \ | |
7fdf57cf | 134 | --with-html-dir=%{_gtkdocdir} |
8c7ef450 | 135 | %{__make} |
d71997d7 | 136 | %{?with_tests:%{__make} check} |
8c7ef450 | 137 | |
138 | %install | |
139 | rm -rf $RPM_BUILD_ROOT | |
8c7ef450 | 140 | |
141 | %{__make} install \ | |
142 | DESTDIR=$RPM_BUILD_ROOT | |
143 | ||
144 | %clean | |
145 | rm -rf $RPM_BUILD_ROOT | |
146 | ||
b7ccdbe1 JB |
147 | %post -p /sbin/ldconfig |
148 | %postun -p /sbin/ldconfig | |
8c7ef450 | 149 | |
b7ccdbe1 JB |
150 | %files |
151 | %defattr(644,root,root,755) | |
9b33cbb5 | 152 | # COPYING contains only notes, not LGPL/MPL texts |
f5c18fd7 | 153 | %doc AUTHORS COPYING ChangeLog NEWS README TODO |
b7ccdbe1 | 154 | %attr(755,root,root) %{_libdir}/lib*.so.*.*.* |
8c7ef450 | 155 | |
156 | %files devel | |
157 | %defattr(644,root,root,755) | |
b7ccdbe1 JB |
158 | %attr(755,root,root) %{_libdir}/lib*.so |
159 | %{_libdir}/lib*.la | |
8c7ef450 | 160 | %{_includedir}/* |
b7ccdbe1 JB |
161 | %{_pkgconfigdir}/*.pc |
162 | ||
163 | %files static | |
164 | %defattr(644,root,root,755) | |
165 | %{_libdir}/lib*.a | |
ecad233f | 166 | |
167 | %files apidocs | |
168 | %defattr(644,root,root,755) | |
169 | %{_gtkdocdir}/cairo |