skia2/third_party/harfbuzz
Ben Wagner 639f71ace6 Roll FreeType from 61903609 to 12ef831f (10 commits)
6190360967..12ef831fc3

Also update the roll script to something useful.

Disable: treat-URL-as-trailer
Change-Id: I6fd0e77c06d353568031ebb745fceda44c6ae498
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/453758
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2021-09-29 14:28:39 +00:00
..
BUILD.gn Roll HarfBuzz from 6f190943 to a52c6df3 (2 commits) 2021-09-28 18:52:38 +00:00
config-override.h Ease HarfBuzz API change with feature detection 2021-08-06 17:22:22 +00:00
LICENSE Add LICENSE file to third_party/harfbuzz 2021-08-06 15:01:25 +00:00
README
roll-harfbuzz.sh Roll FreeType from 61903609 to 12ef831f (10 commits) 2021-09-29 14:28:39 +00:00

#!/bin/sh
# Some of HarfBuzz's headers are created at build time using the Ragel
# State Machine Compiler.  To reduce complex dependencies, I pre-built
# these files:
#     hb-buffer-deserialize-json.hh
#     hb-buffer-deserialize-text.hh
#     hb-ot-shape-complex-indic-machine.hh
#     hb-ot-shape-complex-myanmar-machine.hh
#     hb-ot-shape-complex-use-machine.hh
# from these sources:
#     ../externals/harfbuzz/src/hb-buffer-deserialize-json.rl
#     ../externals/harfbuzz/src/hb-buffer-deserialize-text.rl
#     ../externals/harfbuzz/src/hb-ot-shape-complex-indic-machine.rl
#     ../externals/harfbuzz/src/hb-ot-shape-complex-myanmar-machine.rl
#     ../externals/harfbuzz/src/hb-ot-shape-complex-use-machine.rl
#
# The files in this directory are created by installing the
# prerequiste packages, checking out a new version of HarfBuzz, doing
# `./autogen.sh && ./configure && make`, then copying the
# autogenerated .h and .hh files to this directory.
#
# These files are now checked into the git repository and the HarfBuzz
# maintainers keep them up to date by using the build rules in the HarfBuzz
# build. As a result this step is no longer necessary, but if we need to
# regenerate these files ourselves, this is how to do it.

set -e
set -x
for package in automake  libtool pkg-config ragel gtk-doc-tools; do
    if ! ( dpkg-query -W -f'${Status}' "$package" 2>/dev/null | \
        grep -q "ok installed" ); then
        sudo apt-get install "$package"
    fi
done
cd "$(dirname "$0")/../externals/harfbuzz"
./autogen.sh
./configure
make -j4
cp src/hb-version.h ../../harfbuzz/
for RAGEL_FILE in src/*.rl; do
    BUILT_HEADER="src/$(basename "$RAGEL_FILE" '.rl').hh"
    if [ -f "$BUILT_HEADER" ]; then
        cp -v "$BUILT_HEADER" ../../harfbuzz/
    fi
done
git clean -fxd