harfbuzz/BUILD.md

42 lines
2.1 KiB
Markdown
Raw Normal View History

2016-05-06 14:24:39 +00:00
On Linux, install the development packages for FreeType,
Cairo, and GLib. For example, on Ubuntu / Debian, you would do:
2018-01-02 17:15:18 +00:00
sudo apt-get install meson pkg-config ragel gtk-doc-tools gcc g++ libfreetype6-dev libglib2.0-dev libcairo2-dev
whereas on Fedora, RHEL, CentOS, and other Red Hat based systems you would do:
2018-01-02 17:15:18 +00:00
sudo dnf install meson pkgconfig gtk-doc gcc gcc-c++ freetype-devel glib2-devel cairo-dev
and on ArchLinux and Manjaro:
2017-10-12 08:41:47 +00:00
sudo pacman -Suy meson pkg-config ragel gcc freetype2 glib2 cairo
2018-01-02 17:15:18 +00:00
then use meson to build the project like `meson build && meson test -Cbuild`.
2020-07-06 12:34:54 +00:00
On macOS, `brew install pkg-config ragel gtk-doc freetype glib cairo meson` then use
meson like above.
2018-01-02 17:15:18 +00:00
2020-07-06 17:10:19 +00:00
On Windows, meson can build the project like above if a working MSVC's cl.exe (`vcvarsall.bat`)
or gcc/clang is already on your path, and if you use something like `meson build --wrap-mode=default`
it fetches and compiles most of the dependencies also.
2020-07-06 12:34:54 +00:00
2020-07-06 17:10:19 +00:00
There is also amalgam source provided with HarfBuzz which reduces whole process of building
HarfBuzz like `g++ src/harfbuzz.cc -fno-exceptions` but there is not guarantee provided
with buildability and reliability of features you get.
Our CI is also good source of learning how to build HarfBuzz.
Linux packagers are advised to at least use `--buildtype=release` (or any other way
to enable regular compiler optimization) and `-Dauto_features=enabled --wrap-mode=nodownload`
2020-07-06 12:34:54 +00:00
and install any other needed packages (most distributions build harfbuzz with
2020-07-06 17:10:19 +00:00
graphite support which needs to be enabled separately, `-Dgraphite=enabled`),
2020-07-06 12:34:54 +00:00
and follow other best practices of packaging a meson project.
2020-07-06 17:10:19 +00:00
Examples of meson built harfbuzz packages,
* https://git.archlinux.org/svntogit/packages.git/tree/trunk?h=packages/harfbuzz
Which uses https://git.archlinux.org/svntogit/packages.git/tree/trunk/arch-meson?h=packages/meson
* https://git.alpinelinux.org/aports/tree/main/harfbuzz
Which uses https://git.alpinelinux.org/aports/tree/main/meson/abuild-meson
* https://github.com/msys2/MINGW-packages/blob/master/mingw-w64-harfbuzz/PKGBUILD
2020-07-06 17:52:42 +00:00
* (feel free to add your distribution's source link here)