1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
5 | %general-entities;
|
---|
6 |
|
---|
7 | <!ENTITY cairo-download-http "https://www.cairographics.org/releases/cairo-&cairo-version;.tar.xz">
|
---|
8 | <!ENTITY cairo-download-ftp " ">
|
---|
9 | <!ENTITY cairo-md5sum "5ad67c707edd0003f1b91c8bbc0005c1">
|
---|
10 | <!ENTITY cairo-size "31 MB">
|
---|
11 | <!ENTITY cairo-buildsize "93 MB">
|
---|
12 | <!ENTITY cairo-time "0.2 SBU (Using parallelism=4)">
|
---|
13 | ]>
|
---|
14 |
|
---|
15 | <sect1 id="cairo" xreflabel="Cairo-&cairo-version;">
|
---|
16 | <?dbhtml filename="cairo.html"?>
|
---|
17 |
|
---|
18 |
|
---|
19 | <title>Cairo-&cairo-version;</title>
|
---|
20 |
|
---|
21 | <indexterm zone="cairo">
|
---|
22 | <primary sortas="a-Cairo">Cairo</primary>
|
---|
23 | </indexterm>
|
---|
24 |
|
---|
25 | <sect2 role="package">
|
---|
26 | <title>Introduction to Cairo</title>
|
---|
27 |
|
---|
28 | <para>
|
---|
29 | <application>Cairo</application> is a 2D graphics library with support for
|
---|
30 | multiple output devices. Currently supported output targets include the
|
---|
31 | <application>X</application> Window System, Win32, image buffers,
|
---|
32 | PostScript, PDF and SVG. Experimental backends include OpenGL, Quartz and
|
---|
33 | XCB file output. <application>Cairo</application> is designed to produce
|
---|
34 | consistent output on all output media while taking advantage of display
|
---|
35 | hardware acceleration when available (e.g. through the X Render
|
---|
36 | Extension). The <application>Cairo</application> API provides operations
|
---|
37 | similar to the drawing operators of PostScript and PDF. Operations in
|
---|
38 | <application>Cairo</application> include stroking and filling cubic
|
---|
39 | Bézier splines, transforming and compositing translucent images,
|
---|
40 | and antialiased text rendering. All drawing operations can be transformed
|
---|
41 | by any
|
---|
42 | <ulink url="https://en.wikipedia.org/wiki/Affine_transformation">affine
|
---|
43 | transformation</ulink> (scale, rotation, shear, etc.)
|
---|
44 | </para>
|
---|
45 |
|
---|
46 | &lfs122_checked;
|
---|
47 |
|
---|
48 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
49 | <itemizedlist spacing="compact">
|
---|
50 | <listitem>
|
---|
51 | <para>
|
---|
52 | Download (HTTP): <ulink url="&cairo-download-http;"/>
|
---|
53 | </para>
|
---|
54 | </listitem>
|
---|
55 | <listitem>
|
---|
56 | <para>
|
---|
57 | Download (FTP): <ulink url="&cairo-download-ftp;"/>
|
---|
58 | </para>
|
---|
59 | </listitem>
|
---|
60 | <listitem>
|
---|
61 | <para>
|
---|
62 | Download MD5 sum: &cairo-md5sum;
|
---|
63 | </para>
|
---|
64 | </listitem>
|
---|
65 | <listitem>
|
---|
66 | <para>
|
---|
67 | Download size: &cairo-size;
|
---|
68 | </para>
|
---|
69 | </listitem>
|
---|
70 | <listitem>
|
---|
71 | <para>
|
---|
72 | Estimated disk space required: &cairo-buildsize;
|
---|
73 | </para>
|
---|
74 | </listitem>
|
---|
75 | <listitem>
|
---|
76 | <para>
|
---|
77 | Estimated build time: &cairo-time;
|
---|
78 | </para>
|
---|
79 | </listitem>
|
---|
80 | </itemizedlist>
|
---|
81 |
|
---|
82 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
83 | <itemizedlist spacing="compact">
|
---|
84 | <listitem>
|
---|
85 | <para>
|
---|
86 | Required patch:
|
---|
87 | <ulink url="&patch-root;/cairo-&cairo-version;-upstream_fixes-1.patch"/>
|
---|
88 | </para>
|
---|
89 | </listitem>
|
---|
90 | </itemizedlist>
|
---|
91 |
|
---|
92 | <bridgehead renderas="sect3">Cairo Dependencies</bridgehead>
|
---|
93 |
|
---|
94 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
95 | <para role="required">
|
---|
96 | <xref linkend="libpng"/> and
|
---|
97 | <xref linkend="pixman"/>
|
---|
98 | </para>
|
---|
99 |
|
---|
100 | <bridgehead renderas="sect4">Recommended</bridgehead>
|
---|
101 | <para role="recommended">
|
---|
102 | <xref linkend="fontconfig"/>,
|
---|
103 | <xref linkend="glib2"/> (required for most GUIs), and
|
---|
104 | <xref linkend="xorg7-lib"/>
|
---|
105 | </para>
|
---|
106 |
|
---|
107 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
108 | <para role="optional">
|
---|
109 | <xref linkend="gs"/>,
|
---|
110 | <xref linkend="gtk-doc"/>,
|
---|
111 | <xref linkend="libdrm"/>,
|
---|
112 | <xref linkend="librsvg"/>,
|
---|
113 | <xref linkend="libxml2"/>,
|
---|
114 | <xref linkend="lzo"/>,
|
---|
115 | <xref linkend="poppler"/>,
|
---|
116 | <xref linkend="valgrind"/>,
|
---|
117 | >k2;, and
|
---|
118 | <ulink url="https://www.freedesktop.org/wiki/Software/libspectre/">libspectre</ulink>
|
---|
119 | </para>
|
---|
120 |
|
---|
121 | <note>
|
---|
122 | <para>
|
---|
123 | There is a circular dependency between cairo and harfbuzz.
|
---|
124 | If cairo is built before harfbuzz, it is necessary to rebuild cairo
|
---|
125 | after harfbuzz in order to build pango.
|
---|
126 | </para>
|
---|
127 | </note>
|
---|
128 |
|
---|
129 | </sect2>
|
---|
130 |
|
---|
131 | <sect2 role="installation">
|
---|
132 | <title>Installation of Cairo</title>
|
---|
133 |
|
---|
134 | <para>
|
---|
135 | First, fix a bug that causes problems with printing PDF files:
|
---|
136 | </para>
|
---|
137 |
|
---|
138 | <screen><userinput remap="pre">patch -Np1 -i ../cairo-&cairo-version;-upstream_fixes-1.patch</userinput></screen>
|
---|
139 |
|
---|
140 | <para>
|
---|
141 | Install <application>Cairo</application> by running the following
|
---|
142 | commands:
|
---|
143 | </para>
|
---|
144 |
|
---|
145 | <screen><userinput>mkdir build &&
|
---|
146 | cd build &&
|
---|
147 |
|
---|
148 | meson setup --prefix=/usr --buildtype=release .. &&
|
---|
149 | ninja</userinput></screen>
|
---|
150 |
|
---|
151 | <para>
|
---|
152 | This package does not have a working test suite.
|
---|
153 | <!-- The test suite can be run with 'ninja test', but 488 tests fail and
|
---|
154 | 59 tests pass. This seems to be due to minute changes in the expected
|
---|
155 | output, similar to librsvg's tests. Since it's a huge chunk of the tests,
|
---|
156 | let's keep it as "broken" for now.-->
|
---|
157 | </para>
|
---|
158 |
|
---|
159 | <para>
|
---|
160 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
161 | </para>
|
---|
162 |
|
---|
163 | <screen role="root"><userinput>ninja install</userinput></screen>
|
---|
164 | </sect2>
|
---|
165 |
|
---|
166 | <sect2 role="commands">
|
---|
167 | <title>Command Explanations</title>
|
---|
168 |
|
---|
169 | <!-- Enabled by default in 1.18.0 (would be -D tee=enabled otherwise)
|
---|
170 | <para>
|
---|
171 | <parameter>- -enable-tee</parameter>: This switch enables the
|
---|
172 | experimental tee surface backend which is required if using
|
---|
173 | system-installed <application>Cairo</application> with Mozilla applications.
|
---|
174 | </para>
|
---|
175 | -->
|
---|
176 |
|
---|
177 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
178 | href="../../xincludes/meson-buildtype-release.xml"/>
|
---|
179 |
|
---|
180 | <para>
|
---|
181 | <option>-D xlib-xcb=enabled</option>: This switch enables several
|
---|
182 | experimental Xlib/XCB functions used by some window managers.
|
---|
183 | </para>
|
---|
184 |
|
---|
185 | <para>
|
---|
186 | <option>-D gtk_doc=true</option>: Use this parameter if GTK-Doc is
|
---|
187 | installed and you wish to create and install the documentation.
|
---|
188 | </para>
|
---|
189 |
|
---|
190 | </sect2>
|
---|
191 |
|
---|
192 | <sect2 role="content">
|
---|
193 | <title>Contents</title>
|
---|
194 |
|
---|
195 | <segmentedlist>
|
---|
196 | <segtitle>Installed Programs</segtitle>
|
---|
197 | <segtitle>Installed Libraries</segtitle>
|
---|
198 | <segtitle>Installed Directories</segtitle>
|
---|
199 |
|
---|
200 | <seglistitem>
|
---|
201 | <seg>
|
---|
202 | cairo-trace
|
---|
203 | </seg>
|
---|
204 | <seg>
|
---|
205 | libcairo.so,
|
---|
206 | libcairo-gobject.so, and
|
---|
207 | libcairo-script-interpreter.so
|
---|
208 | </seg>
|
---|
209 | <seg>
|
---|
210 | /usr/include/cairo and
|
---|
211 | /usr/lib/cairo
|
---|
212 | </seg>
|
---|
213 | </seglistitem>
|
---|
214 | </segmentedlist>
|
---|
215 |
|
---|
216 | <variablelist>
|
---|
217 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
218 | <?dbfo list-presentation="list"?>
|
---|
219 | <?dbhtml list-presentation="table"?>
|
---|
220 |
|
---|
221 | <varlistentry id="cairo-trace">
|
---|
222 | <term><command>cairo-trace</command></term>
|
---|
223 | <listitem>
|
---|
224 | <para>
|
---|
225 | generates a log of all calls made by an application to
|
---|
226 | <application>Cairo</application>
|
---|
227 | </para>
|
---|
228 | <indexterm zone="cairo cairo-trace">
|
---|
229 | <primary sortas="b-cairo-trace">cairo-trace</primary>
|
---|
230 | </indexterm>
|
---|
231 | </listitem>
|
---|
232 | </varlistentry>
|
---|
233 |
|
---|
234 | <varlistentry id="libcairo">
|
---|
235 | <term><filename class="libraryfile">libcairo.so</filename></term>
|
---|
236 | <listitem>
|
---|
237 | <para>
|
---|
238 | contains the 2D graphics functions required for rendering to the
|
---|
239 | various output targets
|
---|
240 | </para>
|
---|
241 | <indexterm zone="cairo libcairo">
|
---|
242 | <primary sortas="c-libcairo">libcairo.so</primary>
|
---|
243 | </indexterm>
|
---|
244 | </listitem>
|
---|
245 | </varlistentry>
|
---|
246 |
|
---|
247 | <varlistentry id="libcairo-gobject">
|
---|
248 | <term><filename class="libraryfile">libcairo-gobject.so</filename></term>
|
---|
249 | <listitem>
|
---|
250 | <para>
|
---|
251 | contains functions that integrate
|
---|
252 | <application>Cairo</application> with
|
---|
253 | <application>Glib</application>'s GObject type system
|
---|
254 | </para>
|
---|
255 | <indexterm zone="cairo libcairo-gobject">
|
---|
256 | <primary sortas="c-libcairo-gobject">libcairo-gobject.so</primary>
|
---|
257 | </indexterm>
|
---|
258 | </listitem>
|
---|
259 | </varlistentry>
|
---|
260 |
|
---|
261 | <varlistentry id="libcairo-script-interpreter">
|
---|
262 | <term><filename class="libraryfile">libcairo-script-interpreter.so</filename></term>
|
---|
263 | <listitem>
|
---|
264 | <para>
|
---|
265 | contains the script interpreter functions for executing and
|
---|
266 | manipulating <application>Cairo</application> execution traces
|
---|
267 | </para>
|
---|
268 | <indexterm zone="cairo libcairo-script-interpreter">
|
---|
269 | <primary sortas="c-libcairo-script-interpreter">libcairo-script-interpreter.so</primary>
|
---|
270 | </indexterm>
|
---|
271 | </listitem>
|
---|
272 | </varlistentry>
|
---|
273 |
|
---|
274 | </variablelist>
|
---|
275 |
|
---|
276 | </sect2>
|
---|
277 |
|
---|
278 | </sect1>
|
---|