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