Fix build error
[platform/upstream/harfbuzz.git] / docs / html / building.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>Building HarfBuzz: HarfBuzz Manual</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
7 <link rel="home" href="index.html" title="HarfBuzz Manual">
8 <link rel="up" href="install-harfbuzz.html" title="Installing HarfBuzz">
9 <link rel="prev" href="install-harfbuzz.html" title="Installing HarfBuzz">
10 <link rel="next" href="getting-started.html" title="Getting started with HarfBuzz">
11 <meta name="generator" content="GTK-Doc V1.32 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
13 </head>
14 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
16 <td width="100%" align="left" class="shortcuts"></td>
17 <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
18 <td><a accesskey="u" href="install-harfbuzz.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
19 <td><a accesskey="p" href="install-harfbuzz.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
20 <td><a accesskey="n" href="getting-started.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
21 </tr></table>
22 <div class="section">
23 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
24 <a name="building"></a>Building HarfBuzz</h2></div></div></div>
25 <div class="section">
26 <div class="titlepage"><div><div><h3 class="title">
27 <a name="building.linux"></a>Building on Linux</h3></div></div></div>
28 <p>
29       <span class="emphasis"><em>(1)</em></span> To build HarfBuzz on Linux, you must first install the
30       development packages for FreeType, Cairo, and GLib. The exact
31       commands required for this step will vary depending on
32       the Linux distribution you use.
33     </p>
34 <p>
35       For example, on an Ubuntu or Debian system, you would run:
36       </p>
37 <pre class="programlisting"><span class="command"><strong>sudo apt install</strong></span> <span class="package">gcc g++ libfreetype6-dev libglib2.0-dev libcairo2-dev</span></pre>
38 <p>
39       On Fedora, RHEL, CentOS, or other Red-Hat–based systems, you would run:
40       </p>
41 <pre class="programlisting"><span class="command"><strong>sudo yum install</strong></span> <span class="package">gcc gcc-c++ freetype-devel glib2-devel cairo-devel</span></pre>
42 <p>
43
44     </p>
45 <p>
46       <span class="emphasis"><em>(2)</em></span> The next step depends on whether you
47       are building from the source in a downloaded release tarball or
48       from the source directly from the git repository.
49     </p>
50 <p>
51       <span class="emphasis"><em>(2)(a)</em></span> If you downloaded the HarfBuzz
52       source code in a tarball, you can now extract the source.
53     </p>
54 <p>
55       From a shell in the top-level directory of the extracted source
56       code, you can run <span class="command"><strong>meson build</strong></span> followed by
57       <span class="command"><strong>meson compile -C build</strong></span> as with any other standard package.
58     </p>
59 <p>
60       This should leave you with a shared
61       library in the <code class="filename">src/</code> directory, and a few
62       utility programs including <span class="command"><strong>hb-view</strong></span> and
63       <span class="command"><strong>hb-shape</strong></span> under the <code class="filename">util/</code>
64       directory.
65     </p>
66 <p>
67       <span class="emphasis"><em>(2)(b)</em></span> If you are building from the source in the HarfBuzz git
68       repository, rather than installing from a downloaded tarball
69       release, then you must install two more auxiliary tools before you 
70       can build for the first time: <span class="package">pkg-config</span>.
71     </p>
72 <p>
73       On Ubuntu or Debian, run:
74       </p>
75 <pre class="programlisting"><span class="command"><strong>sudo apt-get install</strong></span> <span class="package">meson pkg-config gtk-doc-tools</span></pre>
76 <p>
77       On Fedora, RHEL, CentOS, run:
78       </p>
79 <pre class="programlisting"><span class="command"><strong>sudo yum install</strong></span> <span class="package">meson pkgconfig gtk-doc</span></pre>
80 <p>
81       
82     </p>
83 <p>
84       With <span class="package">pkg-config</span> installed, you can now run
85       <span class="command"><strong>meson build</strong></span> then
86       <span class="command"><strong>meson compile -C build</strong></span> to build HarfBuzz.
87     </p>
88 </div>
89 <div class="section">
90 <div class="titlepage"><div><div><h3 class="title">
91 <a name="building.windows"></a>Building on Windows</h3></div></div></div>
92 <p>
93         <a class="ulink" href="https://mesonbuild.com/Getting-meson.html" target="_top">Install meson</a>
94         and run (from the console) <span class="command"><strong>meson build</strong></span> (by default
95         bundled dependencies are not built, <span class="command"><strong>--wrap-mode=default</strong></span>
96         overrides this), then <span class="command"><strong>meson compile -C build</strong></span> to
97         build HarfBuzz.
98       </p>
99 </div>
100 <div class="section">
101 <div class="titlepage"><div><div><h3 class="title">
102 <a name="building.macos"></a>Building on macOS</h3></div></div></div>
103 <p>
104         There are two ways to build HarfBuzz on Mac systems: MacPorts
105         and Homebrew. The process is similar to the process used on a
106         Linux system.
107       </p>
108 <p>
109         <span class="emphasis"><em>(1)</em></span> You must first install the
110         development packages for FreeType, Cairo, and GLib. If you are
111         using MacPorts, you should run:
112       </p>
113 <pre class="programlisting"><span class="command"><strong>sudo port install</strong></span> <span class="package">freetype glib2 cairo</span></pre>
114 <p>
115       </p>
116 <p>
117         If you are using Homebrew, you should run:
118         </p>
119 <pre class="programlisting"><span class="command"><strong>brew install</strong></span> <span class="package">freetype glib cairo</span></pre>
120 <p>
121       </p>
122 <p>
123         <span class="emphasis"><em>(2)</em></span> The next step depends on whether you are building from the
124         source in a downloaded release tarball or from the source directly
125         from the git repository.
126       </p>
127 <p>
128         <span class="emphasis"><em>(2)(a)</em></span> If you are installing HarfBuzz
129         from a downloaded tarball release, extract the tarball and
130         open a Terminal in the extracted source-code directory. Run:
131         </p>
132 <pre class="programlisting"><span class="command"><strong>meson build</strong></span></pre>
133 <p>
134         followed by:
135         </p>
136 <pre class="programlisting"><span class="command"><strong>meson compile -C build</strong></span></pre>
137 <p>
138         to build HarfBuzz.
139       </p>
140 <p>
141         <span class="emphasis"><em>(2)(b)</em></span> Alternatively, if you are building
142         HarfBuzz from the source in the HarfBuzz git repository, then
143         you must install several built-time dependencies before
144         proceeding.
145       </p>
146 <p>If you are
147         using MacPorts, you should run:
148       </p>
149 <pre class="programlisting"><span class="command"><strong>sudo port install</strong></span> <span class="package">meson pkgconfig gtk-doc</span></pre>
150 <p>
151       to install the build dependencies.
152       </p>
153 <p>If you are using Homebrew, you should run:
154         </p>
155 <pre class="programlisting"><span class="command"><strong>brew install</strong></span> <span class="package">meson pkgconfig gtk-doc</span></pre>
156 <p>
157         Finally, you can run:
158         </p>
159 <pre class="programlisting"><span class="command"><strong>meson build</strong></span></pre>
160 <p>
161       </p>
162 <p>
163         <span class="emphasis"><em>(3)</em></span> You can now build HarfBuzz (on either
164         a MacPorts or a Homebrew system) by running:
165         </p>
166 <pre class="programlisting"><span class="command"><strong>meson build</strong></span></pre>
167 <p>
168         followed by:
169         </p>
170 <pre class="programlisting"><span class="command"><strong>meson compile -C build</strong></span></pre>
171 <p>
172       </p>
173 <p>
174         This should leave you with a shared
175         library in the <code class="filename">src/</code> directory, and a few
176         utility programs including <span class="command"><strong>hb-view</strong></span> and
177         <span class="command"><strong>hb-shape</strong></span> under the <code class="filename">util/</code>
178         directory.
179       </p>
180 </div>
181 <div class="section">
182 <div class="titlepage"><div><div><h3 class="title">
183 <a name="configuration"></a>Configuration options</h3></div></div></div>
184 <p>
185         The instructions in the "Building HarfBuzz" section will build
186         the source code under its default configuration. If needed,
187         the following additional configuration options are available.
188       </p>
189 <div class="variablelist"><table border="0" class="variablelist">
190 <colgroup>
191 <col align="left" valign="top">
192 <col>
193 </colgroup>
194 <tbody>
195 <tr>
196 <td><p><span class="term"><span class="command"><strong>-Dglib=enabled</strong></span></span></p></td>
197 <td>
198 <p>
199              Use <a class="ulink" href="https://developer.gnome.org/glib/" target="_top">GLib</a>. <span class="emphasis"><em>(Default = auto)</em></span>
200             </p>
201 <p>
202               This option enables or disables usage of the GLib
203               library.  The default setting is to check for the
204               presence of GLib and, if it is found, build with
205               GLib support. GLib is native to GNU/Linux systems but is
206               available on other operating system as well.
207             </p>
208 </td>
209 </tr>
210 <tr>
211 <td><p><span class="term"><span class="command"><strong>-Dgobject=enabled</strong></span></span></p></td>
212 <td>
213 <p>
214               Use <a class="ulink" href="https://developer.gnome.org/gobject/stable/" target="_top">GObject</a>. <span class="emphasis"><em>(Default = no)</em></span>
215             </p>
216 <p>
217               This option enables or disables usage of the GObject
218               library. The default setting is to check for the
219               presence of GObject and, if it is found, build with
220               GObject support. GObject is native to GNU/Linux systems but is
221               available on other operating system as well.
222             </p>
223 </td>
224 </tr>
225 <tr>
226 <td><p><span class="term"><span class="command"><strong>-Dcairo=enabled</strong></span></span></p></td>
227 <td>
228 <p>
229               Use <a class="ulink" href="https://cairographics.org/" target="_top">Cairo</a>. <span class="emphasis"><em>(Default = auto)</em></span>
230             </p>
231 <p>
232               This option enables or disables usage of the Cairo
233               graphics-rendering library. The default setting is to
234               check for the presence of Cairo and, if it is found,
235               build with Cairo support.
236             </p>
237 <p>
238               Note: Cairo is used only by the HarfBuzz
239               command-line utilities, and not by the HarfBuzz library.
240             </p>
241 </td>
242 </tr>
243 <tr>
244 <td><p><span class="term"><span class="command"><strong>-Dicu=enabled</strong></span></span></p></td>
245 <td>
246 <p>
247               Use the <a class="ulink" href="http://site.icu-project.org/home" target="_top">ICU</a> library. <span class="emphasis"><em>(Default = auto)</em></span>
248             </p>
249 <p>
250               This option enables or disables usage of the
251               <span class="emphasis"><em>International Components for
252               Unicode</em></span> (ICU) library, which provides access
253               to Unicode Character Database (UCD) properties as well
254               as normalization and conversion functions. The default
255               setting is to check for the presence of ICU and, if it
256               is found, build with ICU support.
257             </p>
258 </td>
259 </tr>
260 <tr>
261 <td><p><span class="term"><span class="command"><strong>-Dgraphite=enabled</strong></span></span></p></td>
262 <td>
263 <p>
264               Use the <a class="ulink" href="http://graphite.sil.org/" target="_top">Graphite2</a> library. <span class="emphasis"><em>(Default = no)</em></span>
265             </p>
266 <p>
267               This option enables or disables usage of the Graphite2
268               library, which provides support for the Graphite shaping
269               model. 
270             </p>
271 </td>
272 </tr>
273 <tr>
274 <td><p><span class="term"><span class="command"><strong>-Dfreetype=enabled</strong></span></span></p></td>
275 <td>
276 <p>
277               Use the <a class="ulink" href="https://www.freetype.org/" target="_top">FreeType</a> library. <span class="emphasis"><em>(Default = auto)</em></span>
278             </p>
279 <p>
280               This option enables or disables usage of the FreeType
281               font-rendering library. The default setting is to check for the
282               presence of FreeType and, if it is found, build with
283               FreeType support.
284             </p>
285 </td>
286 </tr>
287 <tr>
288 <td><p><span class="term"><span class="command"><strong>-Dgdi=enabled</strong></span></span></p></td>
289 <td>
290 <p>
291               Use the <a class="ulink" href="https://docs.microsoft.com/en-us/windows/desktop/intl/uniscribe" target="_top">Uniscribe</a>
292               library (experimental). <span class="emphasis"><em>(Default = no)</em></span>
293             </p>
294 <p>
295               This option enables or disables usage of the Uniscribe
296               font-rendering library. Uniscribe is available on
297               Windows systems. Uniscribe support is used only for
298               testing purposes and does not need to be enabled for
299               HarfBuzz to run on Windows systems.
300             </p>
301 </td>
302 </tr>
303 <tr>
304 <td><p><span class="term"><span class="command"><strong>-Ddirectwrite=enabled</strong></span></span></p></td>
305 <td>
306 <p>
307               Use the <a class="ulink" href="https://docs.microsoft.com/en-us/windows/desktop/directwrite/direct-write-portal" target="_top">DirectWrite</a> library (experimental). <span class="emphasis"><em>(Default = no)</em></span>
308             </p>
309 <p>
310               This option enables or disables usage of the DirectWrite
311               font-rendering library. DirectWrite is available on
312               Windows systems. DirectWrite support is used only for
313               testing purposes and does not need to be enabled for
314               HarfBuzz to run on Windows systems.
315             </p>
316 </td>
317 </tr>
318 <tr>
319 <td><p><span class="term"><span class="command"><strong>-Dcoretext=enabled</strong></span></span></p></td>
320 <td>
321 <p>
322               Use the <a class="ulink" href="https://developer.apple.com/documentation/coretext" target="_top">CoreText</a> library. <span class="emphasis"><em>(Default = no)</em></span>
323             </p>
324 <p>
325               This option enables or disables usage of the CoreText
326               library. CoreText is available on macOS and iOS systems.
327             </p>
328 </td>
329 </tr>
330 <tr>
331 <td><p><span class="term"><span class="command"><strong>-Ddocs=enabled</strong></span></span></p></td>
332 <td>
333 <p>
334               Use <a class="ulink" href="https://github.com/GNOME/gtk-doc" target="_top">GTK-Doc</a>. <span class="emphasis"><em>(Default = no)</em></span>
335             </p>
336 <p>
337               This option enables the building of the documentation.
338             </p>
339 </td>
340 </tr>
341 </tbody>
342 </table></div>
343 </div>
344 </div>
345 <div class="footer">
346 <hr>Generated by GTK-Doc V1.32</div>
347 </body>
348 </html>