| 1 | #!/bin/shscip-shell filesystem . . `/bin/sh`. |
| 2 | # Some of HarfBuzz's headers are created at build time using the Ragel |
| 3 | # State Machine Compiler. To reduce complex dependencies, I pre-built |
| 4 | # these files: |
| 5 | # hb-buffer-deserialize-json.hh |
| 6 | # hb-buffer-deserialize-text.hh |
| 7 | # hb-ot-shape-complex-indic-machine.hh |
| 8 | # hb-ot-shape-complex-myanmar-machine.hh |
| 9 | # hb-ot-shape-complex-use-machine.hh |
| 10 | # from these sources: |
| 11 | # ../externals/harfbuzz/src/hb-buffer-deserialize-json.rl |
| 12 | # ../externals/harfbuzz/src/hb-buffer-deserialize-text.rl |
| 13 | # ../externals/harfbuzz/src/hb-ot-shape-complex-indic-machine.rl |
| 14 | # ../externals/harfbuzz/src/hb-ot-shape-complex-myanmar-machine.rl |
| 15 | # ../externals/harfbuzz/src/hb-ot-shape-complex-use-machine.rl |
| 16 | # |
| 17 | # The files in this directory are created by installing the |
| 18 | # prerequiste packages, checking out a new version of HarfBuzz, doing |
| 19 | # `./autogen.sh && ./configure && make`, then copying the |
| 20 | # autogenerated .h and .hh files to this directory. |
| 21 | # |
| 22 | # These files are now checked into the git repository and the HarfBuzz |
| 23 | # maintainers keep them up to date by using the build rules in the HarfBuzz |
| 24 | # build. As a result this step is no longer necessary, but if we need to |
| 25 | # regenerate these files ourselves, this is how to do it. |
| 26 | |
| 27 | set -e |
| 28 | set -x |
| 29 | for package in automake libtool pkg-config ragel gtk-doc-tools; do |
| 30 | if ! ( dpkg-queryscip-shell system . . dpkg-query. -W -f'${Status}' "$package" 2>/dev/nullscip-shell filesystem . . `/dev/null`. | \ |
| 31 | grep -q "ok installed" ); then |
| 32 | sudoscip-shell system . . sudo. apt-get install "$package" |
| 33 | fi |
| 34 | done |
| 35 | cd "$(dirnamescip-shell system . . dirname. "$0")/../externals/harfbuzz" |
| 36 | ./autogen.sh |
| 37 | ./configure |
| 38 | makescip-shell system . . make. -j4 |
| 39 | cpscip-shell system . . cp. src/hb-version.h ../../harfbuzz/ |
| 40 | for RAGEL_FILE in src/*.rl; do |
| 41 | BUILT_HEADER="src/$(basenamescip-shell system . . basename. "$RAGEL_FILE" '.rl').hh" |
| 42 | if [scip-shell system . . `[`. -f "$BUILT_HEADER" ]; then |
| 43 | cpscip-shell system . . cp. -v "$BUILT_HEADER" ../../harfbuzz/ |
| 44 | fi |
| 45 | done |
| 46 | gitscip-shell system . . git. clean -fxd |