Merge branch 'upstream' into tizen
[platform/upstream/harfbuzz.git] / BUILD.md
index 86285c6..55e950e 100644 (file)
--- a/BUILD.md
+++ b/BUILD.md
@@ -1,33 +1,32 @@
-On Linux, install the development packages for
-[FreeType](http://www.freedesktop.org/wiki/Software/FreeType/),
-Cairo, and GLib. For example, on Ubuntu / Debian, you would do:
-* sudo apt-get install gcc g++ libfreetype6-dev libglib2.0-dev libcairo2-dev
+On Linux, install the development packages for FreeType, Cairo, and GLib. For
+example, on Ubuntu / Debian, you would do:
+
+    $ 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:
-* sudo yum install gcc gcc-c++ freetype-devel glib2-devel cairo-devel
 
-on the Mac, using MacPorts:
-* sudo port install freetype glib2 cairo
+    $ sudo dnf install meson pkgconfig gtk-doc gcc gcc-c++ freetype-devel glib2-devel cairo-devel
+
+and on ArchLinux and Manjaro:
+
+    $ sudo pacman -Suy meson pkg-config ragel gcc freetype2 glib2 cairo
+
+On macOS:
+
+    brew install pkg-config ragel gtk-doc freetype glib cairo meson
 
-or using Homebrew:
-* brew install freetype glib cairo
+Then use meson to build the project like:
 
-If you are using a tarball, you can now proceed to running configure and make
-as with any other standard package. That should leave you with a shared
-library in src/, and a few utility programs including hb-view and hb-shape
-under util/.  From the tarball, NMake Makefiles are also provided in win32/,
-which supports building HarfBuzz using Visual Studio, with a README.txt that
-gives instructions on building using NMake.
-If you are bootstraping from git, you need a few more tools before you can
-run autogen.sh for the first time. Namely, pkg-config and ragel. Again,
-on Ubuntu / Debian:
-* sudo apt-get install autoconf automake libtool pkg-config ragel gtk-doc-tools
+    meson build && meson test -Cbuild
 
-and on Fedora, RHEL, CentOS:
-* sudo yum install autoconf automake libtool pkgconfig ragel gtk-doc
+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.  It is recommended to install CMake either manually
+or via the Visual Studio installer when building with MSVC, using meson.
 
-on the Mac, using MacPorts:
-* sudo port install autoconf automake libtool pkgconfig ragel gtk-doc
+Our CI configurations are also a good source of learning how to build HarfBuzz.
 
-or using Homebrew:
-* brew port install autoconf automake libtool pkgconfig ragel gtk-doc
+There is also amalgamated source provided with HarfBuzz which reduces whole process
+of building HarfBuzz to `g++ src/harfbuzz.cc -fno-exceptions` but there is
+no guarantee provided with buildability and reliability of features you get.