]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_without apidocs # disable gtk-doc | |
4 | %bcond_with glitz # build with glitz backend | |
5 | %bcond_without xcb # XCB backend | |
6 | %bcond_with tests # perform tests (can fail due to out of memory) | |
7 | %bcond_without lcd # use own LCD filtering instead of freetype's | |
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.4.12 | |
13 | Release: 1 | |
14 | License: LGPL v2.1 or MPL v1.1 | |
15 | Group: Libraries | |
16 | Source0: http://cairographics.org/releases/%{name}-%{version}.tar.gz | |
17 | # Source0-md5: 8e50c2c0d56388e4ee94196c0c7a7904 | |
18 | Patch0: %{name}-link.patch | |
19 | # updated from http://david.freetype.org/lcd/cairo-1.2.4-lcd-filter-1.patch | |
20 | # NOTE: this patch wasn't applied upstream, is unmaintained by its author for | |
21 | # about a year and becomes more and more ugly => it's subject to drop soon --q | |
22 | Patch1: cairo-1.2.4-lcd-filter-1.patch | |
23 | URL: http://cairographics.org/ | |
24 | BuildRequires: autoconf >= 2.54 | |
25 | BuildRequires: automake >= 1:1.7 | |
26 | BuildRequires: fontconfig-devel | |
27 | %{?with_lcd:BuildRequires: freetype-devel >= 1:2.3.0} | |
28 | %{!?with_lcd:BuildRequires: freetype-devel >= 1:2.1.10} | |
29 | %{?with_glitz:BuildRequires: glitz-devel >= 0.5.1} | |
30 | %{?with_apidocs:BuildRequires: gtk-doc >= 1.3} | |
31 | BuildRequires: libpng-devel | |
32 | BuildRequires: libtool | |
33 | BuildRequires: pkgconfig | |
34 | %if %{with xcb} | |
35 | BuildRequires: libxcb-devel >= 0.9.92 | |
36 | BuildRequires: xcb-util-devel >= 0.2 | |
37 | %endif | |
38 | BuildRequires: xorg-lib-libXrender-devel >= 0.6 | |
39 | BuildRequires: zlib-devel | |
40 | %{!?with_lcd:Requires: freetype >= 1:2.1.10} | |
41 | %{?with_lcd:Requires: freetype >= 1:2.3.0} | |
42 | %{?with_glitz:Requires: glitz >= 0.5.1} | |
43 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
44 | ||
45 | %description | |
46 | Cairo provides anti-aliased vector-based rendering for X. Paths | |
47 | consist of line segments and cubic splines and can be rendered at any | |
48 | width with various join and cap styles. All colors may be specified | |
49 | with optional translucence (opacity/alpha) and combined using the | |
50 | extended Porter/Duff compositing algebra as found in the X Render | |
51 | Extension. | |
52 | ||
53 | Cairo exports a stateful rendering API similar in spirit to the path | |
54 | construction, text, and painting operators of PostScript, (with the | |
55 | significant addition of translucence in the imaging model). When | |
56 | complete, the API is intended to support the complete imaging model of | |
57 | PDF 1.4. | |
58 | ||
59 | %description -l pl.UTF-8 | |
60 | Cairo obsługuje oparty na wektorach rendering z antyaliasingiem dla X. | |
61 | Ścieżki składają się z odcinków i splajnów kubicznych, a renderowane | |
62 | mogą być z dowolną grubością i różnymi stylami połączeń i zakończeń. | |
63 | Wszystkie kolory mogą być podane z opcjonalną półprzezroczystością | |
64 | (podaną przez współczynnik nieprzezroczystości lub alpha) i łączone | |
65 | przy użyciu rozszerzonego algorytmu składania Portera-Duffa, który | |
66 | można znaleźć w rozszerzeniu X Render. | |
67 | ||
68 | Cairo eksportuje stanowe API renderujące w duchu podobne do operatorów | |
69 | konstruowania ścieżek, tekstu i rysowania z PostScriptu (ze znacznym | |
70 | dodatkiem półprzezroczystości w modelu obrazu). Kiedy API zostanie | |
71 | ukończone, ma obsługiwać pełny model obrazu z PDF w wersji 1.4. | |
72 | ||
73 | %package devel | |
74 | Summary: Development files for Cairo library | |
75 | Summary(pl.UTF-8): Pliki programistyczne biblioteki Cairo | |
76 | Group: Development/Libraries | |
77 | Requires: %{name} = %{version}-%{release} | |
78 | Requires: fontconfig-devel | |
79 | Requires: freetype-devel >= 1:2.1.10 | |
80 | %{?with_glitz:Requires: glitz-devel >= 0.5.1} | |
81 | Requires: libpng-devel | |
82 | %{?with_xcb:Requires: libxcb-devel >= 0.9.92} | |
83 | %{?with_xcb:Requires: xcb-util-devel >= 0.2} | |
84 | Requires: xorg-lib-libXrender-devel >= 0.6 | |
85 | ||
86 | %description devel | |
87 | Development files for Cairo library. | |
88 | ||
89 | %description devel -l pl.UTF-8 | |
90 | Pliki programistyczne biblioteki Cairo. | |
91 | ||
92 | %package static | |
93 | Summary: Static Cairo library | |
94 | Summary(pl.UTF-8): Statyczna biblioteka Cairo | |
95 | Group: Development/Libraries | |
96 | Requires: %{name}-devel = %{version}-%{release} | |
97 | ||
98 | %description static | |
99 | Static Cairo library. | |
100 | ||
101 | %description static -l pl.UTF-8 | |
102 | Statyczna biblioteka Cairo. | |
103 | ||
104 | %package apidocs | |
105 | Summary: Cairo API documentation | |
106 | Summary(pl.UTF-8): Dokumentacja API Cairo | |
107 | Group: Documentation | |
108 | Requires: gtk-doc-common | |
109 | ||
110 | %description apidocs | |
111 | Cairo API documentation. | |
112 | ||
113 | %description apidocs -l pl.UTF-8 | |
114 | Dokumentacja API Cairo. | |
115 | ||
116 | %prep | |
117 | %setup -q | |
118 | %patch0 -p1 | |
119 | %{?with_lcd:%patch1 -p1} | |
120 | ||
121 | %build | |
122 | %{?with_apidocs:%{__gtkdocize}} | |
123 | %{__libtoolize} | |
124 | %{__aclocal} | |
125 | %{__autoheader} | |
126 | %{__autoconf} | |
127 | %{__automake} | |
128 | %configure \ | |
129 | %{?with_apidocs:--enable-gtk-doc} \ | |
130 | %{?with_xcb:--enable-xcb} \ | |
131 | %{?with_glitz:--enable-glitz} \ | |
132 | --enable-ps \ | |
133 | --enable-pdf \ | |
134 | --with-html-dir=%{_gtkdocdir} | |
135 | %{__make} | |
136 | %{?with_tests:%{__make} check} | |
137 | ||
138 | %install | |
139 | rm -rf $RPM_BUILD_ROOT | |
140 | ||
141 | %{__make} install \ | |
142 | DESTDIR=$RPM_BUILD_ROOT | |
143 | ||
144 | %clean | |
145 | rm -rf $RPM_BUILD_ROOT | |
146 | ||
147 | %post -p /sbin/ldconfig | |
148 | %postun -p /sbin/ldconfig | |
149 | ||
150 | %files | |
151 | %defattr(644,root,root,755) | |
152 | # COPYING contains only notes, not LGPL/MPL texts | |
153 | %doc AUTHORS COPYING ChangeLog NEWS README TODO | |
154 | %attr(755,root,root) %{_libdir}/lib*.so.*.*.* | |
155 | ||
156 | %files devel | |
157 | %defattr(644,root,root,755) | |
158 | %attr(755,root,root) %{_libdir}/lib*.so | |
159 | %{_libdir}/lib*.la | |
160 | %{_includedir}/* | |
161 | %{_pkgconfigdir}/*.pc | |
162 | ||
163 | %files static | |
164 | %defattr(644,root,root,755) | |
165 | %{_libdir}/lib*.a | |
166 | ||
167 | %files apidocs | |
168 | %defattr(644,root,root,755) | |
169 | %{_gtkdocdir}/cairo |