2
0
mirror of https://codeberg.org/kiss-community/repo synced 2024-11-05 06:25:43 -07:00
repo/extra/freetype-harfbuzz/build
Dylan Araps 225d08b98a
freetype-harfbuzz: 2.10.2+2.7.0
Well, this was a journey.
2020-07-28 14:14:10 +03:00

49 lines
1.1 KiB
Bash
Executable File

#!/bin/sh -e
build_freetype() (
cd freetype
CFLAGS="$CFLAGS -DDEFAULT_TT_INTERPRETER_VERSION=TT_INTERPRETER_VERSION_40" \
./configure \
--prefix=/usr \
--enable-freetype-config \
--with-harfbuzz="$2"
make
make DESTDIR="$1" install
)
build_harfbuzz() (
# Point Harfbuzz to the Freetype files.
export CFLAGS="$CFLAGS -I$1/usr/include/freetype2"
export CXXFLAGS="$CXXFLAGS -I$1/usr/include/freetype2"
export LDFLAGS="$LDFLAGS -L$1/usr/lib"
cd harfbuzz
export DESTDIR="$1"
meson \
--prefix=/usr \
-Dpkg_config_path="$1/usr/lib/pkgconfig" \
-Ddefault_library=both \
-Dglib=enabled \
-Dfreetype=enabled \
-Dcairo=disabled \
-Dicu=disabled \
-Dbenchmark=disabled \
-Dtests=disabled \
. output
ninja -C output
ninja -C output install
)
build_freetype "$1" no
build_harfbuzz "$1"
# Point Freetype to the Harfbuzz files.
export HARFBUZZ_CFLAGS="-I$PWD/harfbuzz/src"
export HARFBUZZ_LIBS="-L$PWD/harfbuzz/output/src -lharfbuzz"
build_freetype "$1" yes