/[packages]/cauldron/cairo/current/SPECS/cairo.spec
ViewVC logotype

Contents of /cauldron/cairo/current/SPECS/cairo.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 16596 - (show annotations) (download)
Thu Jan 13 21:32:14 2011 UTC (13 years, 3 months ago) by blino
File size: 6307 byte(s)
imported package cairo
1 %if %mandriva_branch == Cooker
2 # Cooker
3 %define release %mkrel 1
4 %else
5 # Old distros
6 %define subrel 1
7 %define release %mkrel 0
8 %endif
9
10 %define lib_major 2
11 %define libname %mklibname cairo %{lib_major}
12 %define libnamedev %mklibname -d cairo
13 %define libnamestaticdev %mklibname -s -d cairo
14
15 %define pixman_version 0.17.6
16
17 #gw check coverage fails in 1.9.4
18 %define enable_test 0
19 %define stable 1
20 %define build_plf 0
21 %define build_doc 1
22
23 %{?_with_plf: %{expand: %%global build_plf 1}}
24 %if %build_plf
25 %define distsuffix plf
26 %endif
27
28
29 Summary: Cairo - multi-platform 2D graphics library
30 Name: cairo
31 Version: 1.10.2
32 Release: %release
33 License: BSD
34 Group: System/Libraries
35 %if %stable
36 Source0: http://cairographics.org/releases/%name-%version.tar.gz
37 Source1: http://cairographics.org/releases/%name-%version.tar.gz.sha1
38 %else
39 Source0: http://cairographics.org/snapshots/%name-%version.tar.gz
40 Source1: http://cairographics.org/snapshots/%name-%version.tar.gz.sha1
41 %endif
42 # gw patches to handle LCD subpixel hinting
43 # http://bugs.freedesktop.org/show_bug.cgi?id=10301
44 Patch4: cairo-04_lcd_filter.dpatch
45 # http://bugs.freedesktop.org/show_bug.cgi?id=11838
46 # http://bugs.freedesktop.org/show_bug.cgi?id=13335
47 # https://bugs.launchpad.net/ubuntu/+source/cairo/+bug/209256
48 # http://forums.fedoraforum.org/showthread.php?p=1094309#post1094309
49 Patch5: cairo-respect-fontconfig.patch
50
51 URL: http://cairographics.org/
52 BuildRequires: freetype2-devel >= 2.1.10
53 BuildRequires: libxext-devel
54 BuildRequires: libx11-devel
55 BuildRequires: libxrender-devel
56 BuildRequires: libfontconfig-devel
57 BuildRequires: glib2-devel
58 %if %enable_test
59 # needed by tests
60 BuildRequires: fonts-ttf-bitstream-vera
61 # only needed for pdf tests
62 #BuildRequires: libpango-devel >= 1.13.0
63 # gw for svg tests
64 BuildRequires: librsvg-devel
65 # gw for ps testing
66 BuildRequires: libspectre-devel
67 # gw for pdf testing
68 BuildRequires: libpoppler-glib-devel
69 %endif
70 BuildRequires: x11-server-xvfb
71 BuildRequires: pixman-devel >= %{pixman_version}
72
73 BuildRequires: libpng-devel
74 %if %build_doc
75 BuildRequires: gtk-doc
76 %endif
77 BuildRoot: %_tmppath/%name-%version-root
78
79 %description
80 Cairo provides anti-aliased vector-based rendering for X. Paths
81 consist of line segments and cubic splines and can be rendered at any
82 width with various join and cap styles. All colors may be specified
83 with optional translucence (opacity/alpha) and combined using the
84 extended Porter/Duff compositing algebra as found in the X Render
85 Extension.
86
87 Cairo exports a stateful rendering API similar in spirit to the path
88 construction, text, and painting operators of PostScript, (with the
89 significant addition of translucence in the imaging model). When
90 complete, the API is intended to support the complete imaging model of
91 PDF 1.4.
92
93 Cairo relies on the Xc library for backend rendering. Xc provides an
94 abstract interface for rendering to multiple target types. As of this
95 writing, Xc allows Cairo to target X drawables as well as generic
96 image buffers. Future backends such as PostScript, PDF, and perhaps
97 OpenGL are currently being planned.
98 %if %{build_plf}
99
100 This package is in PLF because this build has LCD subpixel hinting enabled
101 which are covered by software patents.
102 %endif
103
104 %package -n %{libname}
105 Summary: Cairo - multi-platform 2D graphics library
106 Group: System/Libraries
107 Provides: cairo = %{version}-%{release}
108 Requires: freetype2 >= 2.1.10
109 Requires: %{_lib}pixman-1_0 >= %{pixman_version}
110
111 %description -n %{libname}
112 Cairo provides anti-aliased vector-based rendering for X. Paths
113 consist of line segments and cubic splines and can be rendered at any
114 width with various join and cap styles. All colors may be specified
115 with optional translucence (opacity/alpha) and combined using the
116 extended Porter/Duff compositing algebra as found in the X Render
117 Extension.
118
119 Cairo exports a stateful rendering API similar in spirit to the path
120 construction, text, and painting operators of PostScript, (with the
121 significant addition of translucence in the imaging model). When
122 complete, the API is intended to support the complete imaging model of
123 PDF 1.4.
124
125 Cairo relies on the Xc library for backend rendering. Xc provides an
126 abstract interface for rendering to multiple target types. As of this
127 writing, Xc allows Cairo to target X drawables as well as generic
128 image buffers. Future backends such as PostScript, PDF, and perhaps
129 OpenGL are currently being planned.
130 %if %{build_plf}
131
132 This package is in PLF because this build has LCD subpixel hinting enabled
133 which are covered by software patents.
134 %endif
135
136 %package -n %{libnamedev}
137 Summary: Development files for Cairo library
138 Group: Development/C
139 Requires: %{libname} = %version
140 Provides: %{name}-devel = %version-%release
141 Provides: lib%{name}-devel = %version-%release
142 Obsoletes: %mklibname -d cairo 2
143 Conflicts: %{_lib}cairo1-devel
144
145 %description -n %{libnamedev}
146 Development files for Cairo library.
147
148 %package -n %{libnamestaticdev}
149 Summary: Static Cairo library
150 Group: Development/C
151 Requires: %{libnamedev} = %version
152 Provides: lib%name-static-devel = %version
153 Obsoletes: %mklibname -s -d cairo 2
154
155 %description -n %{libnamestaticdev}
156 Static Cairo library.
157
158
159 %prep
160 %setup -q
161 %if %build_plf
162 %patch4 -p1
163 %patch5 -p1
164 %endif
165
166 #autoreconf -fi
167
168 %build
169 export PTHREAD_LIBS=-lpthread
170 %configure2_5x \
171 %if %build_doc
172 --enable-gtk-doc \
173 %endif
174 --enable-pdf --enable-ps --disable-xcb
175 %make
176
177 %check
178 %if %{enable_test}
179 XDISPLAY=$(i=1; while [ -f /tmp/.X$i-lock ]; do i=$(($i+1)); done; echo $i)
180 %{_bindir}/Xvfb -screen 0 1600x1200x24 :$XDISPLAY &
181 export DISPLAY=:$XDISPLAY
182 make check
183 kill $(cat /tmp/.X$XDISPLAY-lock)
184 %endif
185
186 %install
187 rm -rf $RPM_BUILD_ROOT
188
189 %makeinstall_std
190 rm -f %buildroot%_libdir/cairo/*.a
191
192 %clean
193 rm -rf $RPM_BUILD_ROOT
194
195 %files -n %{libname}
196 %defattr(644,root,root,755)
197 %doc AUTHORS COPYING NEWS README
198 %_libdir/libcairo.so.%{lib_major}*
199 %_libdir/libcairo-gobject.so.%{lib_major}*
200 %_libdir/libcairo-script-interpreter.so.%{lib_major}*
201
202 %files -n %{libnamedev}
203 %defattr(644,root,root,755)
204 %doc RELEASING BIBLIOGRAPHY BUGS ChangeLog
205 %attr(755,root,root) %_bindir/cairo-trace
206 %_libdir/cairo/
207 %_libdir/lib*.so
208 %attr(644,root,root) %_libdir/lib*.la
209 %_includedir/*
210 %_libdir/pkgconfig/*.pc
211 %_datadir/gtk-doc/html/cairo/
212
213 %files -n %{libnamestaticdev}
214 %defattr(644,root,root,755)
215 %_libdir/lib*.a
216
217
218
219

  ViewVC Help
Powered by ViewVC 1.1.30