]>
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) |
a14e3f3c | 7 | %bcond_with lcd # freetype LCD filtering (instead of internal) [not ready] |
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 |
2d024fa9 | 12 | Version: 1.6.4 |
9478cad6 | 13 | Release: 1 |
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 |
2d024fa9 | 17 | # Source0-md5: a198d509f9e3a35b78de8bb02174ebb9 |
c9185d93 | 18 | Patch0: %{name}-link.patch |
a14e3f3c JB |
19 | Patch1: %{name}-lt.patch |
20 | Patch2: %{name}-am.patch | |
0bc48961 | 21 | # Updated from http://david.freetype.org/lcd/cairo-1.2.4-lcd-filter-1.patch |
22 | # The lcd patch is being maintained at | |
23 | # http://bugs.freedesktop.org/show_bug.cgi?id=10301 | |
24 | # It is not applied upstream for political reasons (patents) and its fate has | |
25 | # not been decided yet AFAIK. -- Qrczak | |
a14e3f3c JB |
26 | # the latest version is for some early 1.5.x and won't be applied upstream to 1.6.x series |
27 | Patch3: %{name}-1.2.4-lcd-filter-1.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 |
b2aa6d0c | 41 | %if %{with xcb} |
fe1a27be JB |
42 | BuildRequires: libxcb-devel >= 0.9.92 |
43 | BuildRequires: xcb-util-devel >= 0.2 | |
b2aa6d0c | 44 | %endif |
ddb9a7c6 | 45 | BuildRequires: xorg-lib-libXrender-devel >= 0.6 |
9bc5a16c | 46 | BuildRequires: zlib-devel |
89b0db42 JB |
47 | %{!?with_lcd:Requires: freetype >= 1:2.1.10} |
48 | %{?with_lcd:Requires: freetype >= 1:2.3.0} | |
535a3783 | 49 | %{?with_glitz:Requires: glitz:Requires: glitz >= 0.5.1} |
b7ccdbe1 | 50 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
8c7ef450 | 51 | |
52 | %description | |
b7ccdbe1 JB |
53 | Cairo provides anti-aliased vector-based rendering for X. Paths |
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 |
df2e7d34 | 86 | Requires: freetype-devel >= 1:2.1.10 |
2e75f7d0 | 87 | %{?with_glitz:Requires: glitz-devel >= 0.5.1} |
9bc5a16c | 88 | Requires: libpng-devel |
fe1a27be | 89 | %{?with_xcb:Requires: libxcb-devel >= 0.9.92} |
535a3783 | 90 | Requires: pixman-devel >= 0.10.0 |
fe1a27be | 91 | %{?with_xcb:Requires: xcb-util-devel >= 0.2} |
ddb9a7c6 | 92 | Requires: xorg-lib-libXrender-devel >= 0.6 |
8c7ef450 | 93 | |
94 | %description devel | |
b7ccdbe1 JB |
95 | Development files for Cairo library. |
96 | ||
65aac246 | 97 | %description devel -l pl.UTF-8 |
b7ccdbe1 | 98 | Pliki programistyczne biblioteki Cairo. |
8c7ef450 | 99 | |
100 | %package static | |
b7ccdbe1 | 101 | Summary: Static Cairo library |
beb0026f | 102 | Summary(pl.UTF-8): Statyczna biblioteka Cairo |
4233927e | 103 | Group: Development/Libraries |
b7ccdbe1 | 104 | Requires: %{name}-devel = %{version}-%{release} |
8c7ef450 | 105 | |
106 | %description static | |
b7ccdbe1 JB |
107 | Static Cairo library. |
108 | ||
65aac246 | 109 | %description static -l pl.UTF-8 |
b7ccdbe1 | 110 | Statyczna biblioteka Cairo. |
8c7ef450 | 111 | |
ecad233f | 112 | %package apidocs |
113 | Summary: Cairo API documentation | |
beb0026f | 114 | Summary(pl.UTF-8): Dokumentacja API Cairo |
ecad233f | 115 | Group: Documentation |
116 | Requires: gtk-doc-common | |
117 | ||
118 | %description apidocs | |
119 | Cairo API documentation. | |
120 | ||
65aac246 | 121 | %description apidocs -l pl.UTF-8 |
d55df9d3 | 122 | Dokumentacja API Cairo. |
ecad233f | 123 | |
8c7ef450 | 124 | %prep |
56de7934 | 125 | %setup -q |
c9185d93 | 126 | %patch0 -p1 |
a14e3f3c JB |
127 | %patch1 -p1 |
128 | %patch2 -p1 | |
129 | %{?with_lcd:%patch3 -p1} | |
8c7ef450 | 130 | |
131 | %build | |
2e75f7d0 | 132 | %{?with_apidocs:%{__gtkdocize}} |
b7ccdbe1 | 133 | %{__libtoolize} |
8c7ef450 | 134 | %{__aclocal} |
135 | %{__autoheader} | |
8c7ef450 | 136 | %{__autoconf} |
b7ccdbe1 | 137 | %{__automake} |
7fdf57cf | 138 | %configure \ |
9f933f96 | 139 | %{?with_apidocs:--enable-gtk-doc} \ |
79fcc918 | 140 | %{?with_xcb:--enable-xcb} \ |
dd4d1358 | 141 | %{?with_glitz:--enable-glitz} \ |
0b5be3e0 | 142 | --enable-ps \ |
143 | --enable-pdf \ | |
2d024fa9 AM |
144 | --enable-png \ |
145 | --enable-freetype \ | |
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 | |
178 | %{_pkgconfigdir}/cairo-pdf.pc | |
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 |