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