[ab4fdfc] | 1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
[6732c094] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
[bb41bc7] | 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 |
|
---|
[1fc53421] | 7 | <!ENTITY cairo-download-http "https://www.cairographics.org/releases/cairo-&cairo-version;.tar.xz">
|
---|
[97ccf511] | 8 | <!ENTITY cairo-download-ftp " ">
|
---|
[fa17a25] | 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)">
|
---|
[bb41bc7] | 13 | ]>
|
---|
| 14 |
|
---|
[a2912ff] | 15 | <sect1 id="cairo" xreflabel="Cairo-&cairo-version;">
|
---|
[bb41bc7] | 16 | <?dbhtml filename="cairo.html"?>
|
---|
| 17 |
|
---|
| 18 |
|
---|
[a2912ff] | 19 | <title>Cairo-&cairo-version;</title>
|
---|
[bb41bc7] | 20 |
|
---|
| 21 | <indexterm zone="cairo">
|
---|
[a2912ff] | 22 | <primary sortas="a-Cairo">Cairo</primary>
|
---|
[bb41bc7] | 23 | </indexterm>
|
---|
| 24 |
|
---|
| 25 | <sect2 role="package">
|
---|
[4db1ba6] | 26 | <title>Introduction to Cairo</title>
|
---|
[bb41bc7] | 27 |
|
---|
[521cea0] | 28 | <para>
|
---|
| 29 | <application>Cairo</application> is a 2D graphics library with support for
|
---|
| 30 | multiple output devices. Currently supported output targets include the
|
---|
[1fc53421] | 31 | <application>X</application> Window System, Win32, image buffers,
|
---|
[521cea0] | 32 | PostScript, PDF and SVG. Experimental backends include OpenGL, Quartz and
|
---|
[68d01360] | 33 | XCB file output. <application>Cairo</application> is designed to produce
|
---|
| 34 | consistent output on all output media while taking advantage of display
|
---|
[80cb145] | 35 | hardware acceleration when available (e.g. through the X Render
|
---|
[68d01360] | 36 | Extension). The <application>Cairo</application> API provides operations
|
---|
| 37 | similar to the drawing operators of PostScript and PDF. Operations in
|
---|
[521cea0] | 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
|
---|
[87fc185] | 42 | <ulink url="https://en.wikipedia.org/wiki/Affine_transformation">affine
|
---|
[80cb145] | 43 | transformation</ulink> (scale, rotation, shear, etc.)
|
---|
[521cea0] | 44 | </para>
|
---|
[bb41bc7] | 45 |
|
---|
[3c9b5e9] | 46 | &lfs122_checked;
|
---|
[3af39b1] | 47 |
|
---|
[bb41bc7] | 48 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 49 | <itemizedlist spacing="compact">
|
---|
| 50 | <listitem>
|
---|
[521cea0] | 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>
|
---|
[bb41bc7] | 59 | </listitem>
|
---|
| 60 | <listitem>
|
---|
[521cea0] | 61 | <para>
|
---|
| 62 | Download MD5 sum: &cairo-md5sum;
|
---|
| 63 | </para>
|
---|
[bb41bc7] | 64 | </listitem>
|
---|
| 65 | <listitem>
|
---|
[521cea0] | 66 | <para>
|
---|
| 67 | Download size: &cairo-size;
|
---|
| 68 | </para>
|
---|
[bb41bc7] | 69 | </listitem>
|
---|
| 70 | <listitem>
|
---|
[521cea0] | 71 | <para>
|
---|
| 72 | Estimated disk space required: &cairo-buildsize;
|
---|
| 73 | </para>
|
---|
[bb41bc7] | 74 | </listitem>
|
---|
| 75 | <listitem>
|
---|
[521cea0] | 76 | <para>
|
---|
| 77 | Estimated build time: &cairo-time;
|
---|
| 78 | </para>
|
---|
[bb41bc7] | 79 | </listitem>
|
---|
[521cea0] | 80 | </itemizedlist>
|
---|
| 81 |
|
---|
[1f7aca6] | 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 |
|
---|
[4db1ba6] | 92 | <bridgehead renderas="sect3">Cairo Dependencies</bridgehead>
|
---|
[bb41bc7] | 93 |
|
---|
| 94 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
[b8a081c] | 95 | <para role="required">
|
---|
[1cfd61d] | 96 | <xref linkend="libpng"/> and
|
---|
[b0ae5b7] | 97 | <xref linkend="pixman"/>
|
---|
[4db1ba6] | 98 | </para>
|
---|
| 99 |
|
---|
[f575476] | 100 | <bridgehead renderas="sect4">Recommended</bridgehead>
|
---|
[4db1ba6] | 101 | <para role="recommended">
|
---|
[1cfd61d] | 102 | <xref linkend="fontconfig"/>,
|
---|
[3df8ea47] | 103 | <xref linkend="glib2"/> (required for most GUIs), and
|
---|
[a2912ff] | 104 | <xref linkend="xorg7-lib"/>
|
---|
[b8a081c] | 105 | </para>
|
---|
[bc9c1def] | 106 |
|
---|
[bb41bc7] | 107 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
[b8a081c] | 108 | <para role="optional">
|
---|
[11d14a27] | 109 | <xref linkend="gs"/>,
|
---|
[b8a081c] | 110 | <xref linkend="gtk-doc"/>,
|
---|
[521cea0] | 111 | <xref linkend="libdrm"/>,
|
---|
[11d14a27] | 112 | <xref linkend="librsvg"/>,
|
---|
[f68e46f] | 113 | <xref linkend="libxml2"/>,
|
---|
[652b18b] | 114 | <xref linkend="lzo"/>,
|
---|
[11d14a27] | 115 | <xref linkend="poppler"/>,
|
---|
[ae629f3] | 116 | <xref linkend="valgrind"/>,
|
---|
[ba25a32] | 117 | >k2;, and
|
---|
| 118 | <ulink url="https://www.freedesktop.org/wiki/Software/libspectre/">libspectre</ulink>
|
---|
[b8a081c] | 119 | </para>
|
---|
[6e08fa52] | 120 |
|
---|
[baac59c] | 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>
|
---|
[e641675] | 128 |
|
---|
[bb41bc7] | 129 | </sect2>
|
---|
| 130 |
|
---|
| 131 | <sect2 role="installation">
|
---|
[4db1ba6] | 132 | <title>Installation of Cairo</title>
|
---|
[bb41bc7] | 133 |
|
---|
[1f7aca6] | 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 |
|
---|
[521cea0] | 140 | <para>
|
---|
| 141 | Install <application>Cairo</application> by running the following
|
---|
| 142 | commands:
|
---|
| 143 | </para>
|
---|
[bb41bc7] | 144 |
|
---|
[1fc53421] | 145 | <screen><userinput>mkdir build &&
|
---|
| 146 | cd build &&
|
---|
| 147 |
|
---|
| 148 | meson setup --prefix=/usr --buildtype=release .. &&
|
---|
| 149 | ninja</userinput></screen>
|
---|
[bb41bc7] | 150 |
|
---|
[f575476] | 151 | <para>
|
---|
[48771ae] | 152 | This package does not have a working test suite.
|
---|
[1fc53421] | 153 | <!-- The test suite can be run with 'ninja test', but 488 tests fail and
|
---|
[a2ce753] | 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.-->
|
---|
[521cea0] | 157 | </para>
|
---|
[bb41bc7] | 158 |
|
---|
[521cea0] | 159 | <para>
|
---|
| 160 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 161 | </para>
|
---|
[bb41bc7] | 162 |
|
---|
[1fc53421] | 163 | <screen role="root"><userinput>ninja install</userinput></screen>
|
---|
[bb41bc7] | 164 | </sect2>
|
---|
| 165 |
|
---|
[15a4fb4c] | 166 | <sect2 role="commands">
|
---|
| 167 | <title>Command Explanations</title>
|
---|
| 168 |
|
---|
[6d6005b0] | 169 | <!-- Enabled by default in 1.18.0 (would be -D tee=enabled otherwise)
|
---|
[7251b1d] | 170 | <para>
|
---|
[1fc53421] | 171 | <parameter>- -enable-tee</parameter>: This switch enables the
|
---|
[8558044] | 172 | experimental tee surface backend which is required if using
|
---|
[11d14a27] | 173 | system-installed <application>Cairo</application> with Mozilla applications.
|
---|
[7251b1d] | 174 | </para>
|
---|
[1fc53421] | 175 | -->
|
---|
[7251b1d] | 176 |
|
---|
[a98acfe7] | 177 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
[1fc53421] | 178 | href="../../xincludes/meson-buildtype-release.xml"/>
|
---|
[827336dc] | 179 |
|
---|
[74520e8] | 180 | <para>
|
---|
[6d6005b0] | 181 | <option>-D xlib-xcb=enabled</option>: This switch enables several
|
---|
[5ec23d4] | 182 | experimental Xlib/XCB functions used by some window managers.
|
---|
[74520e8] | 183 | </para>
|
---|
| 184 |
|
---|
[f25b2c03] | 185 | <para>
|
---|
[6d6005b0] | 186 | <option>-D gtk_doc=true</option>: Use this parameter if GTK-Doc is
|
---|
[f25b2c03] | 187 | installed and you wish to create and install the documentation.
|
---|
| 188 | </para>
|
---|
[a2912ff] | 189 |
|
---|
[15a4fb4c] | 190 | </sect2>
|
---|
| 191 |
|
---|
[bb41bc7] | 192 | <sect2 role="content">
|
---|
| 193 | <title>Contents</title>
|
---|
| 194 |
|
---|
| 195 | <segmentedlist>
|
---|
| 196 | <segtitle>Installed Programs</segtitle>
|
---|
[742b99e] | 197 | <segtitle>Installed Libraries</segtitle>
|
---|
[bb41bc7] | 198 | <segtitle>Installed Directories</segtitle>
|
---|
| 199 |
|
---|
| 200 | <seglistitem>
|
---|
[b8a081c] | 201 | <seg>
|
---|
[a2ce753] | 202 | cairo-trace
|
---|
[b8a081c] | 203 | </seg>
|
---|
| 204 | <seg>
|
---|
[1fc53421] | 205 | libcairo.so,
|
---|
| 206 | libcairo-gobject.so, and
|
---|
[4db1ba6] | 207 | libcairo-script-interpreter.so
|
---|
[b8a081c] | 208 | </seg>
|
---|
| 209 | <seg>
|
---|
[1fc53421] | 210 | /usr/include/cairo and
|
---|
| 211 | /usr/lib/cairo
|
---|
[b8a081c] | 212 | </seg>
|
---|
[bb41bc7] | 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 |
|
---|
[827336dc] | 221 | <varlistentry id="cairo-trace">
|
---|
| 222 | <term><command>cairo-trace</command></term>
|
---|
| 223 | <listitem>
|
---|
[521cea0] | 224 | <para>
|
---|
| 225 | generates a log of all calls made by an application to
|
---|
[4c24eb0a] | 226 | <application>Cairo</application>
|
---|
[521cea0] | 227 | </para>
|
---|
[827336dc] | 228 | <indexterm zone="cairo cairo-trace">
|
---|
| 229 | <primary sortas="b-cairo-trace">cairo-trace</primary>
|
---|
| 230 | </indexterm>
|
---|
| 231 | </listitem>
|
---|
| 232 | </varlistentry>
|
---|
| 233 |
|
---|
[bb41bc7] | 234 | <varlistentry id="libcairo">
|
---|
[f575476] | 235 | <term><filename class="libraryfile">libcairo.so</filename></term>
|
---|
[bb41bc7] | 236 | <listitem>
|
---|
[521cea0] | 237 | <para>
|
---|
| 238 | contains the 2D graphics functions required for rendering to the
|
---|
[4c24eb0a] | 239 | various output targets
|
---|
[521cea0] | 240 | </para>
|
---|
[bb41bc7] | 241 | <indexterm zone="cairo libcairo">
|
---|
[4db1ba6] | 242 | <primary sortas="c-libcairo">libcairo.so</primary>
|
---|
[bb41bc7] | 243 | </indexterm>
|
---|
| 244 | </listitem>
|
---|
| 245 | </varlistentry>
|
---|
| 246 |
|
---|
[827336dc] | 247 | <varlistentry id="libcairo-gobject">
|
---|
[7ca0e36] | 248 | <term><filename class="libraryfile">libcairo-gobject.so</filename></term>
|
---|
[827336dc] | 249 | <listitem>
|
---|
[521cea0] | 250 | <para>
|
---|
| 251 | contains functions that integrate
|
---|
[8558044] | 252 | <application>Cairo</application> with
|
---|
[4c24eb0a] | 253 | <application>Glib</application>'s GObject type system
|
---|
[521cea0] | 254 | </para>
|
---|
[827336dc] | 255 | <indexterm zone="cairo libcairo-gobject">
|
---|
[4db1ba6] | 256 | <primary sortas="c-libcairo-gobject">libcairo-gobject.so</primary>
|
---|
[827336dc] | 257 | </indexterm>
|
---|
| 258 | </listitem>
|
---|
| 259 | </varlistentry>
|
---|
| 260 |
|
---|
| 261 | <varlistentry id="libcairo-script-interpreter">
|
---|
[7ca0e36] | 262 | <term><filename class="libraryfile">libcairo-script-interpreter.so</filename></term>
|
---|
[827336dc] | 263 | <listitem>
|
---|
[521cea0] | 264 | <para>
|
---|
| 265 | contains the script interpreter functions for executing and
|
---|
[4c24eb0a] | 266 | manipulating <application>Cairo</application> execution traces
|
---|
[521cea0] | 267 | </para>
|
---|
[827336dc] | 268 | <indexterm zone="cairo libcairo-script-interpreter">
|
---|
[4db1ba6] | 269 | <primary sortas="c-libcairo-script-interpreter">libcairo-script-interpreter.so</primary>
|
---|
[827336dc] | 270 | </indexterm>
|
---|
| 271 | </listitem>
|
---|
| 272 | </varlistentry>
|
---|
[a2912ff] | 273 |
|
---|
[bb41bc7] | 274 | </variablelist>
|
---|
[a2912ff] | 275 |
|
---|
[bb41bc7] | 276 | </sect2>
|
---|
[a2912ff] | 277 |
|
---|
[bb41bc7] | 278 | </sect1>
|
---|