]>
Commit | Line | Data |
---|---|---|
79fcc918 JB |
1 | # |
2 | # Conditional build: | |
9f933f96 | 3 | %bcond_without apidocs # disable gtk-doc |
68f80d0c ER |
4 | %bcond_with glitz # build with glitz backend |
5 | %if "%{pld_release}" == "ac" | |
6 | %bcond_with xcb # XCB backend | |
7 | %else | |
8 | %bcond_without xcb # XCB backend | |
9 | %endif | |
10 | %bcond_with tests # perform tests (can fail due to out of memory) | |
11 | %bcond_without lcd # freetype LCD filtering (instead of internal) | |
12 | ||
b7ccdbe1 | 13 | Summary: Cairo - multi-platform 2D graphics library |
beb0026f | 14 | Summary(pl.UTF-8): Cairo - wieloplatformowa biblioteka graficzna 2D |
8c7ef450 | 15 | Name: cairo |
2d024fa9 | 16 | Version: 1.6.4 |
90261086 | 17 | Release: 3 |
9b33cbb5 | 18 | License: LGPL v2.1 or MPL v1.1 |
b7ccdbe1 | 19 | Group: Libraries |
0b5be3e0 | 20 | Source0: http://cairographics.org/releases/%{name}-%{version}.tar.gz |
2d024fa9 | 21 | # Source0-md5: a198d509f9e3a35b78de8bb02174ebb9 |
c9185d93 | 22 | Patch0: %{name}-link.patch |
a14e3f3c JB |
23 | Patch1: %{name}-lt.patch |
24 | Patch2: %{name}-am.patch | |
0bc48961 | 25 | # The lcd patch is being maintained at |
26 | # http://bugs.freedesktop.org/show_bug.cgi?id=10301 | |
ba160419 | 27 | Patch3: %{name}-lcd-filter.patch |
8c7ef450 | 28 | URL: http://cairographics.org/ |
a14e3f3c JB |
29 | BuildRequires: autoconf >= 2.58 |
30 | BuildRequires: automake >= 1:1.8 | |
9bc5a16c | 31 | BuildRequires: fontconfig-devel |
6e13550b | 32 | %{!?with_lcd:BuildRequires: freetype-devel >= 1:2.1.10} |
d55df9d3 | 33 | %{?with_lcd:BuildRequires: freetype-devel >= 1:2.3.0} |
2e75f7d0 | 34 | %{?with_glitz:BuildRequires: glitz-devel >= 0.5.1} |
a14e3f3c | 35 | %{?with_apidocs:BuildRequires: gtk-doc >= 1.6} |
9bc5a16c | 36 | BuildRequires: libpng-devel |
b7ccdbe1 | 37 | BuildRequires: libtool |
2d024fa9 | 38 | BuildRequires: pixman-devel >= 0.10.0 |
535a3783 | 39 | BuildRequires: pkgconfig |
2d024fa9 | 40 | BuildRequires: poppler-glib-devel >= 0.8.0 |
68f80d0c | 41 | BuildRequires: rpm >= 4.4.9-56 |
b2aa6d0c | 42 | %if %{with xcb} |
fe1a27be JB |
43 | BuildRequires: libxcb-devel >= 0.9.92 |
44 | BuildRequires: xcb-util-devel >= 0.2 | |
b2aa6d0c | 45 | %endif |
68f80d0c ER |
46 | %if "%{pld_release}" == "ac" |
47 | BuildRequires: xrender-devel >= 0.6 | |
48 | %else | |
ddb9a7c6 | 49 | BuildRequires: xorg-lib-libXrender-devel >= 0.6 |
68f80d0c | 50 | %endif |
9bc5a16c | 51 | BuildRequires: zlib-devel |
89b0db42 JB |
52 | %{!?with_lcd:Requires: freetype >= 1:2.1.10} |
53 | %{?with_lcd:Requires: freetype >= 1:2.3.0} | |
079e996f | 54 | %{?with_glitz:Requires: glitz >= 0.5.1} |
b7ccdbe1 | 55 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
8c7ef450 | 56 | |
57 | %description | |
b7ccdbe1 JB |
58 | Cairo provides anti-aliased vector-based rendering for X. Paths |
59 | consist of line segments and cubic splines and can be rendered at any | |
60 | width with various join and cap styles. All colors may be specified | |
61 | with optional translucence (opacity/alpha) and combined using the | |
62 | extended Porter/Duff compositing algebra as found in the X Render | |
63 | Extension. | |
64 | ||
65 | Cairo exports a stateful rendering API similar in spirit to the path | |
66 | construction, text, and painting operators of PostScript, (with the | |
67 | significant addition of translucence in the imaging model). When | |
68 | complete, the API is intended to support the complete imaging model of | |
69 | PDF 1.4. | |
70 | ||
65aac246 JR |
71 | %description -l pl.UTF-8 |
72 | Cairo obsługuje oparty na wektorach rendering z antyaliasingiem dla X. | |
73 | Ścieżki składają się z odcinków i splajnów kubicznych, a renderowane | |
74 | mogą być z dowolną grubością i różnymi stylami połączeń i zakończeń. | |
75 | Wszystkie kolory mogą być podane z opcjonalną półprzezroczystością | |
76 | (podaną przez współczynnik nieprzezroczystości lub alpha) i łączone | |
9c95588d | 77 | przy użyciu rozszerzonego algorytmu składania Portera-Duffa, który |
65aac246 JR |
78 | można znaleźć w rozszerzeniu X Render. |
79 | ||
80 | Cairo eksportuje stanowe API renderujące w duchu podobne do operatorów | |
81 | konstruowania ścieżek, tekstu i rysowania z PostScriptu (ze znacznym | |
82 | dodatkiem półprzezroczystości w modelu obrazu). Kiedy API zostanie | |
83 | ukończone, ma obsługiwać pełny model obrazu z PDF w wersji 1.4. | |
84 | ||
8c7ef450 | 85 | %package devel |
b7ccdbe1 | 86 | Summary: Development files for Cairo library |
beb0026f | 87 | Summary(pl.UTF-8): Pliki programistyczne biblioteki Cairo |
4233927e | 88 | Group: Development/Libraries |
b7ccdbe1 | 89 | Requires: %{name} = %{version}-%{release} |
9bc5a16c | 90 | Requires: fontconfig-devel |
df2e7d34 | 91 | Requires: freetype-devel >= 1:2.1.10 |
2e75f7d0 | 92 | %{?with_glitz:Requires: glitz-devel >= 0.5.1} |
9bc5a16c | 93 | Requires: libpng-devel |
fe1a27be | 94 | %{?with_xcb:Requires: libxcb-devel >= 0.9.92} |
535a3783 | 95 | Requires: pixman-devel >= 0.10.0 |
fe1a27be | 96 | %{?with_xcb:Requires: xcb-util-devel >= 0.2} |
68f80d0c ER |
97 | %if "%{pld_release}" == "ac" |
98 | Requires: xrender-devel >= 0.6 | |
99 | %else | |
ddb9a7c6 | 100 | Requires: xorg-lib-libXrender-devel >= 0.6 |
68f80d0c | 101 | %endif |
8c7ef450 | 102 | |
103 | %description devel | |
b7ccdbe1 JB |
104 | Development files for Cairo library. |
105 | ||
65aac246 | 106 | %description devel -l pl.UTF-8 |
b7ccdbe1 | 107 | Pliki programistyczne biblioteki Cairo. |
8c7ef450 | 108 | |
109 | %package static | |
b7ccdbe1 | 110 | Summary: Static Cairo library |
beb0026f | 111 | Summary(pl.UTF-8): Statyczna biblioteka Cairo |
4233927e | 112 | Group: Development/Libraries |
b7ccdbe1 | 113 | Requires: %{name}-devel = %{version}-%{release} |
8c7ef450 | 114 | |
115 | %description static | |
b7ccdbe1 JB |
116 | Static Cairo library. |
117 | ||
65aac246 | 118 | %description static -l pl.UTF-8 |
b7ccdbe1 | 119 | Statyczna biblioteka Cairo. |
8c7ef450 | 120 | |
ecad233f | 121 | %package apidocs |
122 | Summary: Cairo API documentation | |
beb0026f | 123 | Summary(pl.UTF-8): Dokumentacja API Cairo |
ecad233f | 124 | Group: Documentation |
125 | Requires: gtk-doc-common | |
126 | ||
127 | %description apidocs | |
128 | Cairo API documentation. | |
129 | ||
65aac246 | 130 | %description apidocs -l pl.UTF-8 |
d55df9d3 | 131 | Dokumentacja API Cairo. |
ecad233f | 132 | |
8c7ef450 | 133 | %prep |
56de7934 | 134 | %setup -q |
c9185d93 | 135 | %patch0 -p1 |
a14e3f3c JB |
136 | %patch1 -p1 |
137 | %patch2 -p1 | |
138 | %{?with_lcd:%patch3 -p1} | |
8c7ef450 | 139 | |
140 | %build | |
2e75f7d0 | 141 | %{?with_apidocs:%{__gtkdocize}} |
b7ccdbe1 | 142 | %{__libtoolize} |
8c7ef450 | 143 | %{__aclocal} |
144 | %{__autoheader} | |
8c7ef450 | 145 | %{__autoconf} |
b7ccdbe1 | 146 | %{__automake} |
7fdf57cf | 147 | %configure \ |
9f933f96 | 148 | %{?with_apidocs:--enable-gtk-doc} \ |
79fcc918 | 149 | %{?with_xcb:--enable-xcb} \ |
dd4d1358 | 150 | %{?with_glitz:--enable-glitz} \ |
0b5be3e0 | 151 | --enable-ps \ |
152 | --enable-pdf \ | |
2d024fa9 AM |
153 | --enable-png \ |
154 | --enable-freetype \ | |
7fdf57cf | 155 | --with-html-dir=%{_gtkdocdir} |
8c7ef450 | 156 | %{__make} |
d71997d7 | 157 | %{?with_tests:%{__make} check} |
8c7ef450 | 158 | |
159 | %install | |
160 | rm -rf $RPM_BUILD_ROOT | |
8c7ef450 | 161 | |
162 | %{__make} install \ | |
163 | DESTDIR=$RPM_BUILD_ROOT | |
164 | ||
8452c411 ER |
165 | %{!?with_apidocs:rm -rf $RPM_BUILD_ROOT%{_gtkdocdir}/cairo} |
166 | ||
8c7ef450 | 167 | %clean |
168 | rm -rf $RPM_BUILD_ROOT | |
169 | ||
b7ccdbe1 JB |
170 | %post -p /sbin/ldconfig |
171 | %postun -p /sbin/ldconfig | |
8c7ef450 | 172 | |
b7ccdbe1 JB |
173 | %files |
174 | %defattr(644,root,root,755) | |
9b33cbb5 | 175 | # COPYING contains only notes, not LGPL/MPL texts |
2d024fa9 | 176 | %doc AUTHORS COPYING ChangeLog NEWS README |
daa7aa2f JB |
177 | %attr(755,root,root) %{_libdir}/libcairo.so.*.*.* |
178 | %attr(755,root,root) %ghost %{_libdir}/libcairo.so.2 | |
8c7ef450 | 179 | |
180 | %files devel | |
181 | %defattr(644,root,root,755) | |
daa7aa2f JB |
182 | %attr(755,root,root) %{_libdir}/libcairo.so |
183 | %{_libdir}/libcairo.la | |
184 | %{_includedir}/cairo | |
185 | %{_pkgconfigdir}/cairo.pc | |
186 | %{_pkgconfigdir}/cairo-ft.pc | |
187 | %{_pkgconfigdir}/cairo-pdf.pc | |
188 | %{_pkgconfigdir}/cairo-png.pc | |
189 | %{_pkgconfigdir}/cairo-ps.pc | |
190 | %{_pkgconfigdir}/cairo-svg.pc | |
8452c411 | 191 | %{?with_xcb:%{_pkgconfigdir}/cairo-xcb.pc} |
daa7aa2f JB |
192 | %{_pkgconfigdir}/cairo-xlib.pc |
193 | %{_pkgconfigdir}/cairo-xlib-xrender.pc | |
b7ccdbe1 JB |
194 | |
195 | %files static | |
196 | %defattr(644,root,root,755) | |
daa7aa2f | 197 | %{_libdir}/libcairo.a |
ecad233f | 198 | |
8452c411 | 199 | %if %{with apidocs} |
ecad233f | 200 | %files apidocs |
201 | %defattr(644,root,root,755) | |
202 | %{_gtkdocdir}/cairo | |
8452c411 | 203 | %endif |