]>
Commit | Line | Data |
---|---|---|
79fcc918 JB |
1 | # |
2 | # Conditional build: | |
9f933f96 | 3 | %bcond_without apidocs # disable gtk-doc |
dd4d1358 | 4 | %bcond_with glitz # build with glitz backend |
b2aa6d0c | 5 | %bcond_without xcb # XCB backend |
d71997d7 | 6 | %bcond_with tests # perform tests (can fail due to out of memory) |
6e13550b | 7 | %bcond_without lcd # use own LCD filtering instead of freetype's |
79fcc918 | 8 | # |
b7ccdbe1 | 9 | Summary: Cairo - multi-platform 2D graphics library |
beb0026f | 10 | Summary(pl.UTF-8): Cairo - wieloplatformowa biblioteka graficzna 2D |
8c7ef450 | 11 | Name: cairo |
daa7aa2f | 12 | Version: 1.4.14 |
cd8b0a49 | 13 | Release: 2 |
9b33cbb5 | 14 | License: LGPL v2.1 or MPL v1.1 |
b7ccdbe1 | 15 | Group: Libraries |
0b5be3e0 | 16 | Source0: http://cairographics.org/releases/%{name}-%{version}.tar.gz |
daa7aa2f | 17 | # Source0-md5: e8c442ff821c0719a69508fecba9038f |
c9185d93 | 18 | Patch0: %{name}-link.patch |
44c917c9 | 19 | # updated from http://david.freetype.org/lcd/cairo-1.2.4-lcd-filter-1.patch |
47cd2c77 JB |
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 | |
d55df9d3 | 22 | Patch1: %{name}-1.2.4-lcd-filter-1.patch |
8c7ef450 | 23 | URL: http://cairographics.org/ |
79fcc918 | 24 | BuildRequires: autoconf >= 2.54 |
c9185d93 | 25 | BuildRequires: automake >= 1:1.7 |
9bc5a16c | 26 | BuildRequires: fontconfig-devel |
6e13550b | 27 | %{!?with_lcd:BuildRequires: freetype-devel >= 1:2.1.10} |
d55df9d3 | 28 | %{?with_lcd:BuildRequires: freetype-devel >= 1:2.3.0} |
2e75f7d0 | 29 | %{?with_glitz:BuildRequires: glitz-devel >= 0.5.1} |
9f933f96 | 30 | %{?with_apidocs:BuildRequires: gtk-doc >= 1.3} |
9bc5a16c | 31 | BuildRequires: libpng-devel |
b7ccdbe1 JB |
32 | BuildRequires: libtool |
33 | BuildRequires: pkgconfig | |
b2aa6d0c | 34 | %if %{with xcb} |
fe1a27be JB |
35 | BuildRequires: libxcb-devel >= 0.9.92 |
36 | BuildRequires: xcb-util-devel >= 0.2 | |
b2aa6d0c | 37 | %endif |
ddb9a7c6 | 38 | BuildRequires: xorg-lib-libXrender-devel >= 0.6 |
9bc5a16c | 39 | BuildRequires: zlib-devel |
89b0db42 JB |
40 | %{!?with_lcd:Requires: freetype >= 1:2.1.10} |
41 | %{?with_lcd:Requires: freetype >= 1:2.3.0} | |
2e75f7d0 | 42 | %{?with_glitz:Requires: glitz >= 0.5.1} |
b7ccdbe1 | 43 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
8c7ef450 | 44 | |
45 | %description | |
b7ccdbe1 JB |
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 | ||
65aac246 JR |
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 | |
9c95588d | 65 | przy użyciu rozszerzonego algorytmu składania Portera-Duffa, który |
65aac246 JR |
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 | ||
8c7ef450 | 73 | %package devel |
b7ccdbe1 | 74 | Summary: Development files for Cairo library |
beb0026f | 75 | Summary(pl.UTF-8): Pliki programistyczne biblioteki Cairo |
4233927e | 76 | Group: Development/Libraries |
b7ccdbe1 | 77 | Requires: %{name} = %{version}-%{release} |
9bc5a16c | 78 | Requires: fontconfig-devel |
df2e7d34 | 79 | Requires: freetype-devel >= 1:2.1.10 |
2e75f7d0 | 80 | %{?with_glitz:Requires: glitz-devel >= 0.5.1} |
9bc5a16c | 81 | Requires: libpng-devel |
fe1a27be JB |
82 | %{?with_xcb:Requires: libxcb-devel >= 0.9.92} |
83 | %{?with_xcb:Requires: xcb-util-devel >= 0.2} | |
ddb9a7c6 | 84 | Requires: xorg-lib-libXrender-devel >= 0.6 |
8c7ef450 | 85 | |
86 | %description devel | |
b7ccdbe1 JB |
87 | Development files for Cairo library. |
88 | ||
65aac246 | 89 | %description devel -l pl.UTF-8 |
b7ccdbe1 | 90 | Pliki programistyczne biblioteki Cairo. |
8c7ef450 | 91 | |
92 | %package static | |
b7ccdbe1 | 93 | Summary: Static Cairo library |
beb0026f | 94 | Summary(pl.UTF-8): Statyczna biblioteka Cairo |
4233927e | 95 | Group: Development/Libraries |
b7ccdbe1 | 96 | Requires: %{name}-devel = %{version}-%{release} |
8c7ef450 | 97 | |
98 | %description static | |
b7ccdbe1 JB |
99 | Static Cairo library. |
100 | ||
65aac246 | 101 | %description static -l pl.UTF-8 |
b7ccdbe1 | 102 | Statyczna biblioteka Cairo. |
8c7ef450 | 103 | |
ecad233f | 104 | %package apidocs |
105 | Summary: Cairo API documentation | |
beb0026f | 106 | Summary(pl.UTF-8): Dokumentacja API Cairo |
ecad233f | 107 | Group: Documentation |
108 | Requires: gtk-doc-common | |
109 | ||
110 | %description apidocs | |
111 | Cairo API documentation. | |
112 | ||
65aac246 | 113 | %description apidocs -l pl.UTF-8 |
d55df9d3 | 114 | Dokumentacja API Cairo. |
ecad233f | 115 | |
8c7ef450 | 116 | %prep |
56de7934 | 117 | %setup -q |
c9185d93 | 118 | %patch0 -p1 |
6e13550b | 119 | %{?with_lcd:%patch1 -p1} |
8c7ef450 | 120 | |
121 | %build | |
2e75f7d0 | 122 | %{?with_apidocs:%{__gtkdocize}} |
b7ccdbe1 | 123 | %{__libtoolize} |
8c7ef450 | 124 | %{__aclocal} |
125 | %{__autoheader} | |
8c7ef450 | 126 | %{__autoconf} |
b7ccdbe1 | 127 | %{__automake} |
7fdf57cf | 128 | %configure \ |
9f933f96 | 129 | %{?with_apidocs:--enable-gtk-doc} \ |
79fcc918 | 130 | %{?with_xcb:--enable-xcb} \ |
dd4d1358 | 131 | %{?with_glitz:--enable-glitz} \ |
0b5be3e0 | 132 | --enable-ps \ |
133 | --enable-pdf \ | |
7fdf57cf | 134 | --with-html-dir=%{_gtkdocdir} |
8c7ef450 | 135 | %{__make} |
d71997d7 | 136 | %{?with_tests:%{__make} check} |
8c7ef450 | 137 | |
138 | %install | |
139 | rm -rf $RPM_BUILD_ROOT | |
8c7ef450 | 140 | |
141 | %{__make} install \ | |
142 | DESTDIR=$RPM_BUILD_ROOT | |
143 | ||
8452c411 ER |
144 | %{!?with_apidocs:rm -rf $RPM_BUILD_ROOT%{_gtkdocdir}/cairo} |
145 | ||
8c7ef450 | 146 | %clean |
147 | rm -rf $RPM_BUILD_ROOT | |
148 | ||
b7ccdbe1 JB |
149 | %post -p /sbin/ldconfig |
150 | %postun -p /sbin/ldconfig | |
8c7ef450 | 151 | |
b7ccdbe1 JB |
152 | %files |
153 | %defattr(644,root,root,755) | |
9b33cbb5 | 154 | # COPYING contains only notes, not LGPL/MPL texts |
f5c18fd7 | 155 | %doc AUTHORS COPYING ChangeLog NEWS README TODO |
daa7aa2f JB |
156 | %attr(755,root,root) %{_libdir}/libcairo.so.*.*.* |
157 | %attr(755,root,root) %ghost %{_libdir}/libcairo.so.2 | |
8c7ef450 | 158 | |
159 | %files devel | |
160 | %defattr(644,root,root,755) | |
daa7aa2f JB |
161 | %attr(755,root,root) %{_libdir}/libcairo.so |
162 | %{_libdir}/libcairo.la | |
163 | %{_includedir}/cairo | |
164 | %{_pkgconfigdir}/cairo.pc | |
165 | %{_pkgconfigdir}/cairo-ft.pc | |
166 | %{_pkgconfigdir}/cairo-pdf.pc | |
167 | %{_pkgconfigdir}/cairo-png.pc | |
168 | %{_pkgconfigdir}/cairo-ps.pc | |
169 | %{_pkgconfigdir}/cairo-svg.pc | |
8452c411 | 170 | %{?with_xcb:%{_pkgconfigdir}/cairo-xcb.pc} |
daa7aa2f JB |
171 | %{_pkgconfigdir}/cairo-xlib.pc |
172 | %{_pkgconfigdir}/cairo-xlib-xrender.pc | |
b7ccdbe1 JB |
173 | |
174 | %files static | |
175 | %defattr(644,root,root,755) | |
daa7aa2f | 176 | %{_libdir}/libcairo.a |
ecad233f | 177 | |
8452c411 | 178 | %if %{with apidocs} |
ecad233f | 179 | %files apidocs |
180 | %defattr(644,root,root,755) | |
181 | %{_gtkdocdir}/cairo | |
8452c411 | 182 | %endif |