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