]> git.pld-linux.org Git - packages/cairo.git/blob - cairo.spec
- rebuild with poppler
[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  poppler         # PDF backend
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.8.8
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:  d3e1a1035ae563812d4dd44a74fb0dd0
22 Patch0:         %{name}-link.patch
23 URL:            http://cairographics.org/
24 BuildRequires:  autoconf >= 2.58
25 BuildRequires:  automake >= 1:1.8
26 BuildRequires:  fontconfig-devel
27 BuildRequires:  freetype-devel >= 1:2.3.0
28 %{?with_glitz:BuildRequires:    glitz-devel >= 0.5.1}
29 %{?with_apidocs:BuildRequires:  gtk-doc >= 1.6}
30 BuildRequires:  libpng-devel
31 BuildRequires:  libtool
32 BuildRequires:  pixman-devel >= 0.12.0
33 BuildRequires:  pkgconfig
34 %{?with_poppler:BuildRequires:  poppler-glib-devel >= 0.8.0}
35 BuildRequires:  rpm >= 4.4.9-56
36 %if %{with xcb}
37 BuildRequires:  libxcb-devel >= 0.9.92
38 BuildRequires:  xcb-util-devel >= 0.2
39 %endif
40 %if "%{pld_release}" == "ac"
41 BuildRequires:  xrender-devel >= 0.6
42 %else
43 BuildRequires:  xorg-lib-libXrender-devel >= 0.6
44 %endif
45 BuildRequires:  zlib-devel
46 Requires:       freetype >= 1:2.3.0
47 %{?with_glitz:Requires: glitz >= 0.5.1}
48 Requires:       pixman >= 0.12.0
49 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
50
51 %description
52 Cairo provides anti-aliased vector-based rendering for X. Paths
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
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
71 przy użyciu rozszerzonego algorytmu składania Portera-Duffa, który
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
79 %package devel
80 Summary:        Development files for Cairo library
81 Summary(pl.UTF-8):      Pliki programistyczne biblioteki Cairo
82 Group:          Development/Libraries
83 Requires:       %{name} = %{version}-%{release}
84 Requires:       fontconfig-devel
85 Requires:       freetype-devel >= 1:2.3.0
86 %{?with_glitz:Requires: glitz-devel >= 0.5.1}
87 Requires:       libpng-devel
88 %{?with_xcb:Requires:   libxcb-devel >= 0.9.92}
89 Requires:       pixman-devel >= 0.12.0
90 %{?with_xcb:Requires:   xcb-util-devel >= 0.2}
91 %if "%{pld_release}" == "ac"
92 Requires:       xrender-devel >= 0.6
93 %else
94 Requires:       xorg-lib-libXrender-devel >= 0.6
95 %endif
96
97 %description devel
98 Development files for Cairo library.
99
100 %description devel -l pl.UTF-8
101 Pliki programistyczne biblioteki Cairo.
102
103 %package static
104 Summary:        Static Cairo library
105 Summary(pl.UTF-8):      Statyczna biblioteka Cairo
106 Group:          Development/Libraries
107 Requires:       %{name}-devel = %{version}-%{release}
108
109 %description static
110 Static Cairo library.
111
112 %description static -l pl.UTF-8
113 Statyczna biblioteka Cairo.
114
115 %package apidocs
116 Summary:        Cairo API documentation
117 Summary(pl.UTF-8):      Dokumentacja API Cairo
118 Group:          Documentation
119 Requires:       gtk-doc-common
120
121 %description apidocs
122 Cairo API documentation.
123
124 %description apidocs -l pl.UTF-8
125 Dokumentacja API Cairo.
126
127 %prep
128 %setup -q
129 %patch0 -p1
130
131 %build
132 %{?with_apidocs:%{__gtkdocize}}
133 %{__libtoolize}
134 %{__aclocal} -I build
135 %{__autoheader}
136 %{__autoconf}
137 %{__automake}
138 %configure \
139         --enable-freetype \
140         %{?with_glitz:--enable-glitz} \
141         %{?with_apidocs:--enable-gtk-doc} \
142         --enable-pdf=%{?with_poppler:yes}%{!?with_poppler:no} \
143         --enable-png \
144         --enable-ps \
145         %{?with_xcb:--enable-xcb} \
146         --with-html-dir=%{_gtkdocdir}
147 %{__make}
148 %{?with_tests:%{__make} check}
149
150 %install
151 rm -rf $RPM_BUILD_ROOT
152
153 %{__make} install \
154         DESTDIR=$RPM_BUILD_ROOT
155
156 %{!?with_apidocs:rm -rf $RPM_BUILD_ROOT%{_gtkdocdir}/cairo}
157
158 %clean
159 rm -rf $RPM_BUILD_ROOT
160
161 %post   -p /sbin/ldconfig
162 %postun -p /sbin/ldconfig
163
164 %files
165 %defattr(644,root,root,755)
166 # COPYING contains only notes, not LGPL/MPL texts
167 %doc AUTHORS COPYING ChangeLog NEWS README
168 %attr(755,root,root) %{_libdir}/libcairo.so.*.*.*
169 %attr(755,root,root) %ghost %{_libdir}/libcairo.so.2
170
171 %files devel
172 %defattr(644,root,root,755)
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 %{?with_poppler:%{_pkgconfigdir}/cairo-pdf.pc}
179 %{_pkgconfigdir}/cairo-png.pc
180 %{_pkgconfigdir}/cairo-ps.pc
181 %{_pkgconfigdir}/cairo-svg.pc
182 %{?with_xcb:%{_pkgconfigdir}/cairo-xcb.pc}
183 %{_pkgconfigdir}/cairo-xlib.pc
184 %{_pkgconfigdir}/cairo-xlib-xrender.pc
185
186 %files static
187 %defattr(644,root,root,755)
188 %{_libdir}/libcairo.a
189
190 %if %{with apidocs}
191 %files apidocs
192 %defattr(644,root,root,755)
193 %{_gtkdocdir}/cairo
194 %endif
This page took 0.078615 seconds and 3 git commands to generate.