]>
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 |
2d024fa9 AM |
12 | Version: 1.6.4 |
13 | Release: 0.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 |
0bc48961 | 19 | # Updated from http://david.freetype.org/lcd/cairo-1.2.4-lcd-filter-1.patch |
20 | # The lcd patch is being maintained at | |
21 | # http://bugs.freedesktop.org/show_bug.cgi?id=10301 | |
22 | # It is not applied upstream for political reasons (patents) and its fate has | |
23 | # not been decided yet AFAIK. -- Qrczak | |
d55df9d3 | 24 | Patch1: %{name}-1.2.4-lcd-filter-1.patch |
8c7ef450 | 25 | URL: http://cairographics.org/ |
79fcc918 | 26 | BuildRequires: autoconf >= 2.54 |
c9185d93 | 27 | BuildRequires: automake >= 1:1.7 |
9bc5a16c | 28 | BuildRequires: fontconfig-devel |
6e13550b | 29 | %{!?with_lcd:BuildRequires: freetype-devel >= 1:2.1.10} |
d55df9d3 | 30 | %{?with_lcd:BuildRequires: freetype-devel >= 1:2.3.0} |
2e75f7d0 | 31 | %{?with_glitz:BuildRequires: glitz-devel >= 0.5.1} |
9f933f96 | 32 | %{?with_apidocs:BuildRequires: gtk-doc >= 1.3} |
9bc5a16c | 33 | BuildRequires: libpng-devel |
b7ccdbe1 JB |
34 | BuildRequires: libtool |
35 | BuildRequires: pkgconfig | |
2d024fa9 AM |
36 | BuildRequires: pixman-devel >= 0.10.0 |
37 | BuildRequires: poppler-glib-devel >= 0.8.0 | |
b2aa6d0c | 38 | %if %{with xcb} |
fe1a27be JB |
39 | BuildRequires: libxcb-devel >= 0.9.92 |
40 | BuildRequires: xcb-util-devel >= 0.2 | |
b2aa6d0c | 41 | %endif |
ddb9a7c6 | 42 | BuildRequires: xorg-lib-libXrender-devel >= 0.6 |
9bc5a16c | 43 | BuildRequires: zlib-devel |
89b0db42 JB |
44 | %{!?with_lcd:Requires: freetype >= 1:2.1.10} |
45 | %{?with_lcd:Requires: freetype >= 1:2.3.0} | |
2e75f7d0 | 46 | %{?with_glitz:Requires: glitz >= 0.5.1} |
b7ccdbe1 | 47 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
8c7ef450 | 48 | |
49 | %description | |
b7ccdbe1 JB |
50 | Cairo provides anti-aliased vector-based rendering for X. Paths |
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 |
df2e7d34 | 83 | Requires: freetype-devel >= 1:2.1.10 |
2e75f7d0 | 84 | %{?with_glitz:Requires: glitz-devel >= 0.5.1} |
9bc5a16c | 85 | Requires: libpng-devel |
fe1a27be JB |
86 | %{?with_xcb:Requires: libxcb-devel >= 0.9.92} |
87 | %{?with_xcb:Requires: xcb-util-devel >= 0.2} | |
ddb9a7c6 | 88 | Requires: xorg-lib-libXrender-devel >= 0.6 |
8c7ef450 | 89 | |
90 | %description devel | |
b7ccdbe1 JB |
91 | Development files for Cairo library. |
92 | ||
65aac246 | 93 | %description devel -l pl.UTF-8 |
b7ccdbe1 | 94 | Pliki programistyczne biblioteki Cairo. |
8c7ef450 | 95 | |
96 | %package static | |
b7ccdbe1 | 97 | Summary: Static Cairo library |
beb0026f | 98 | Summary(pl.UTF-8): Statyczna biblioteka Cairo |
4233927e | 99 | Group: Development/Libraries |
b7ccdbe1 | 100 | Requires: %{name}-devel = %{version}-%{release} |
8c7ef450 | 101 | |
102 | %description static | |
b7ccdbe1 JB |
103 | Static Cairo library. |
104 | ||
65aac246 | 105 | %description static -l pl.UTF-8 |
b7ccdbe1 | 106 | Statyczna biblioteka Cairo. |
8c7ef450 | 107 | |
ecad233f | 108 | %package apidocs |
109 | Summary: Cairo API documentation | |
beb0026f | 110 | Summary(pl.UTF-8): Dokumentacja API Cairo |
ecad233f | 111 | Group: Documentation |
112 | Requires: gtk-doc-common | |
113 | ||
114 | %description apidocs | |
115 | Cairo API documentation. | |
116 | ||
65aac246 | 117 | %description apidocs -l pl.UTF-8 |
d55df9d3 | 118 | Dokumentacja API Cairo. |
ecad233f | 119 | |
8c7ef450 | 120 | %prep |
56de7934 | 121 | %setup -q |
c9185d93 | 122 | %patch0 -p1 |
6e13550b | 123 | %{?with_lcd:%patch1 -p1} |
8c7ef450 | 124 | |
125 | %build | |
2e75f7d0 | 126 | %{?with_apidocs:%{__gtkdocize}} |
b7ccdbe1 | 127 | %{__libtoolize} |
8c7ef450 | 128 | %{__aclocal} |
129 | %{__autoheader} | |
8c7ef450 | 130 | %{__autoconf} |
b7ccdbe1 | 131 | %{__automake} |
7fdf57cf | 132 | %configure \ |
9f933f96 | 133 | %{?with_apidocs:--enable-gtk-doc} \ |
79fcc918 | 134 | %{?with_xcb:--enable-xcb} \ |
dd4d1358 | 135 | %{?with_glitz:--enable-glitz} \ |
0b5be3e0 | 136 | --enable-ps \ |
137 | --enable-pdf \ | |
2d024fa9 AM |
138 | --enable-png \ |
139 | --enable-freetype \ | |
7fdf57cf | 140 | --with-html-dir=%{_gtkdocdir} |
8c7ef450 | 141 | %{__make} |
d71997d7 | 142 | %{?with_tests:%{__make} check} |
8c7ef450 | 143 | |
144 | %install | |
145 | rm -rf $RPM_BUILD_ROOT | |
8c7ef450 | 146 | |
147 | %{__make} install \ | |
148 | DESTDIR=$RPM_BUILD_ROOT | |
149 | ||
8452c411 ER |
150 | %{!?with_apidocs:rm -rf $RPM_BUILD_ROOT%{_gtkdocdir}/cairo} |
151 | ||
8c7ef450 | 152 | %clean |
153 | rm -rf $RPM_BUILD_ROOT | |
154 | ||
b7ccdbe1 JB |
155 | %post -p /sbin/ldconfig |
156 | %postun -p /sbin/ldconfig | |
8c7ef450 | 157 | |
b7ccdbe1 JB |
158 | %files |
159 | %defattr(644,root,root,755) | |
9b33cbb5 | 160 | # COPYING contains only notes, not LGPL/MPL texts |
2d024fa9 | 161 | %doc AUTHORS COPYING ChangeLog NEWS README |
daa7aa2f JB |
162 | %attr(755,root,root) %{_libdir}/libcairo.so.*.*.* |
163 | %attr(755,root,root) %ghost %{_libdir}/libcairo.so.2 | |
8c7ef450 | 164 | |
165 | %files devel | |
166 | %defattr(644,root,root,755) | |
daa7aa2f JB |
167 | %attr(755,root,root) %{_libdir}/libcairo.so |
168 | %{_libdir}/libcairo.la | |
169 | %{_includedir}/cairo | |
170 | %{_pkgconfigdir}/cairo.pc | |
171 | %{_pkgconfigdir}/cairo-ft.pc | |
172 | %{_pkgconfigdir}/cairo-pdf.pc | |
173 | %{_pkgconfigdir}/cairo-png.pc | |
174 | %{_pkgconfigdir}/cairo-ps.pc | |
175 | %{_pkgconfigdir}/cairo-svg.pc | |
8452c411 | 176 | %{?with_xcb:%{_pkgconfigdir}/cairo-xcb.pc} |
daa7aa2f JB |
177 | %{_pkgconfigdir}/cairo-xlib.pc |
178 | %{_pkgconfigdir}/cairo-xlib-xrender.pc | |
b7ccdbe1 JB |
179 | |
180 | %files static | |
181 | %defattr(644,root,root,755) | |
daa7aa2f | 182 | %{_libdir}/libcairo.a |
ecad233f | 183 | |
8452c411 | 184 | %if %{with apidocs} |
ecad233f | 185 | %files apidocs |
186 | %defattr(644,root,root,755) | |
187 | %{_gtkdocdir}/cairo | |
8452c411 | 188 | %endif |