]> git.pld-linux.org Git - packages/cairo.git/blob - cairo.spec
- release 3
[packages/cairo.git] / cairo.spec
1 #
2 # Conditional build:
3 %bcond_without  apidocs         # disable gtk-doc
4 %bcond_with             glitz           # build with glitz backend
5 %if "%{pld_release}" == "ac"
6 %bcond_with             xcb                     # XCB backend
7 %else
8 %bcond_without  xcb                     # XCB backend
9 %endif
10 %bcond_with     tests                   # perform tests (can fail due to out of memory)
11 %bcond_without  lcd                     # freetype LCD filtering (instead of internal)
12
13 Summary:        Cairo - multi-platform 2D graphics library
14 Summary(pl.UTF-8):      Cairo - wieloplatformowa biblioteka graficzna 2D
15 Name:           cairo
16 Version:        1.6.4
17 Release:        3
18 License:        LGPL v2.1 or MPL v1.1
19 Group:          Libraries
20 Source0:        http://cairographics.org/releases/%{name}-%{version}.tar.gz
21 # Source0-md5:  a198d509f9e3a35b78de8bb02174ebb9
22 Patch0:         %{name}-link.patch
23 Patch1:         %{name}-lt.patch
24 Patch2:         %{name}-am.patch
25 # The lcd patch is being maintained at
26 # http://bugs.freedesktop.org/show_bug.cgi?id=10301
27 Patch3:         %{name}-lcd-filter.patch
28 URL:            http://cairographics.org/
29 BuildRequires:  autoconf >= 2.58
30 BuildRequires:  automake >= 1:1.8
31 BuildRequires:  fontconfig-devel
32 %{!?with_lcd:BuildRequires:     freetype-devel >= 1:2.1.10}
33 %{?with_lcd:BuildRequires:      freetype-devel >= 1:2.3.0}
34 %{?with_glitz:BuildRequires:    glitz-devel >= 0.5.1}
35 %{?with_apidocs:BuildRequires:  gtk-doc >= 1.6}
36 BuildRequires:  libpng-devel
37 BuildRequires:  libtool
38 BuildRequires:  pixman-devel >= 0.10.0
39 BuildRequires:  pkgconfig
40 BuildRequires:  poppler-glib-devel >= 0.8.0
41 BuildRequires:  rpm >= 4.4.9-56
42 %if %{with xcb}
43 BuildRequires:  libxcb-devel >= 0.9.92
44 BuildRequires:  xcb-util-devel >= 0.2
45 %endif
46 %if "%{pld_release}" == "ac"
47 BuildRequires:  xrender-devel >= 0.6
48 %else
49 BuildRequires:  xorg-lib-libXrender-devel >= 0.6
50 %endif
51 BuildRequires:  zlib-devel
52 %{!?with_lcd:Requires:  freetype >= 1:2.1.10}
53 %{?with_lcd:Requires:   freetype >= 1:2.3.0}
54 %{?with_glitz:Requires: glitz >= 0.5.1}
55 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
56
57 %description
58 Cairo provides anti-aliased vector-based rendering for X. Paths
59 consist of line segments and cubic splines and can be rendered at any
60 width with various join and cap styles. All colors may be specified
61 with optional translucence (opacity/alpha) and combined using the
62 extended Porter/Duff compositing algebra as found in the X Render
63 Extension.
64
65 Cairo exports a stateful rendering API similar in spirit to the path
66 construction, text, and painting operators of PostScript, (with the
67 significant addition of translucence in the imaging model). When
68 complete, the API is intended to support the complete imaging model of
69 PDF 1.4.
70
71 %description -l pl.UTF-8
72 Cairo obsługuje oparty na wektorach rendering z antyaliasingiem dla X.
73 Ścieżki składają się z odcinków i splajnów kubicznych, a renderowane
74 mogą być z dowolną grubością i różnymi stylami połączeń i zakończeń.
75 Wszystkie kolory mogą być podane z opcjonalną półprzezroczystością
76 (podaną przez współczynnik nieprzezroczystości lub alpha) i łączone
77 przy użyciu rozszerzonego algorytmu składania Portera-Duffa, który
78 można znaleźć w rozszerzeniu X Render.
79
80 Cairo eksportuje stanowe API renderujące w duchu podobne do operatorów
81 konstruowania ścieżek, tekstu i rysowania z PostScriptu (ze znacznym
82 dodatkiem półprzezroczystości w modelu obrazu). Kiedy API zostanie
83 ukończone, ma obsługiwać pełny model obrazu z PDF w wersji 1.4.
84
85 %package devel
86 Summary:        Development files for Cairo library
87 Summary(pl.UTF-8):      Pliki programistyczne biblioteki Cairo
88 Group:          Development/Libraries
89 Requires:       %{name} = %{version}-%{release}
90 Requires:       fontconfig-devel
91 Requires:       freetype-devel >= 1:2.1.10
92 %{?with_glitz:Requires: glitz-devel >= 0.5.1}
93 Requires:       libpng-devel
94 %{?with_xcb:Requires:   libxcb-devel >= 0.9.92}
95 Requires:       pixman-devel >= 0.10.0
96 %{?with_xcb:Requires:   xcb-util-devel >= 0.2}
97 %if "%{pld_release}" == "ac"
98 Requires:       xrender-devel >= 0.6
99 %else
100 Requires:       xorg-lib-libXrender-devel >= 0.6
101 %endif
102
103 %description devel
104 Development files for Cairo library.
105
106 %description devel -l pl.UTF-8
107 Pliki programistyczne biblioteki Cairo.
108
109 %package static
110 Summary:        Static Cairo library
111 Summary(pl.UTF-8):      Statyczna biblioteka Cairo
112 Group:          Development/Libraries
113 Requires:       %{name}-devel = %{version}-%{release}
114
115 %description static
116 Static Cairo library.
117
118 %description static -l pl.UTF-8
119 Statyczna biblioteka Cairo.
120
121 %package apidocs
122 Summary:        Cairo API documentation
123 Summary(pl.UTF-8):      Dokumentacja API Cairo
124 Group:          Documentation
125 Requires:       gtk-doc-common
126
127 %description apidocs
128 Cairo API documentation.
129
130 %description apidocs -l pl.UTF-8
131 Dokumentacja API Cairo.
132
133 %prep
134 %setup -q
135 %patch0 -p1
136 %patch1 -p1
137 %patch2 -p1
138 %{?with_lcd:%patch3 -p1}
139
140 %build
141 %{?with_apidocs:%{__gtkdocize}}
142 %{__libtoolize}
143 %{__aclocal}
144 %{__autoheader}
145 %{__autoconf}
146 %{__automake}
147 %configure \
148         %{?with_apidocs:--enable-gtk-doc} \
149         %{?with_xcb:--enable-xcb} \
150         %{?with_glitz:--enable-glitz} \
151         --enable-ps \
152         --enable-pdf \
153         --enable-png \
154         --enable-freetype \
155         --with-html-dir=%{_gtkdocdir}
156 %{__make}
157 %{?with_tests:%{__make} check}
158
159 %install
160 rm -rf $RPM_BUILD_ROOT
161
162 %{__make} install \
163         DESTDIR=$RPM_BUILD_ROOT
164
165 %{!?with_apidocs:rm -rf $RPM_BUILD_ROOT%{_gtkdocdir}/cairo}
166
167 %clean
168 rm -rf $RPM_BUILD_ROOT
169
170 %post   -p /sbin/ldconfig
171 %postun -p /sbin/ldconfig
172
173 %files
174 %defattr(644,root,root,755)
175 # COPYING contains only notes, not LGPL/MPL texts
176 %doc AUTHORS COPYING ChangeLog NEWS README
177 %attr(755,root,root) %{_libdir}/libcairo.so.*.*.*
178 %attr(755,root,root) %ghost %{_libdir}/libcairo.so.2
179
180 %files devel
181 %defattr(644,root,root,755)
182 %attr(755,root,root) %{_libdir}/libcairo.so
183 %{_libdir}/libcairo.la
184 %{_includedir}/cairo
185 %{_pkgconfigdir}/cairo.pc
186 %{_pkgconfigdir}/cairo-ft.pc
187 %{_pkgconfigdir}/cairo-pdf.pc
188 %{_pkgconfigdir}/cairo-png.pc
189 %{_pkgconfigdir}/cairo-ps.pc
190 %{_pkgconfigdir}/cairo-svg.pc
191 %{?with_xcb:%{_pkgconfigdir}/cairo-xcb.pc}
192 %{_pkgconfigdir}/cairo-xlib.pc
193 %{_pkgconfigdir}/cairo-xlib-xrender.pc
194
195 %files static
196 %defattr(644,root,root,755)
197 %{_libdir}/libcairo.a
198
199 %if %{with apidocs}
200 %files apidocs
201 %defattr(644,root,root,755)
202 %{_gtkdocdir}/cairo
203 %endif
This page took 0.085677 seconds and 4 git commands to generate.