# Description: An OpenType text shaping engine
# URL: https://github.com/harfbuzz/harfbuzz
# Maintainer: CRUX System Team, core-ports at crux dot nu
# Depends on: cairo gobject-introspection
# Optional: chafa graphite2 icu

name=harfbuzz
version=8.4.0
release=1
source=(https://github.com/harfbuzz/harfbuzz/releases/download/$version/$name-$version.tar.xz)

build() {
  meson setup build $name-$version \
    --prefix=/usr \
    --buildtype=plain \
    --wrap-mode nodownload \
    -D b_lto=true \
    -D b_pie=true \
    -D benchmark=disabled \
    -D docs=disabled \
    -D tests=disabled \
    -D graphite=auto
  meson compile -C build -j ${JOBS:-1}
  DESTDIR=$PKG meson install -C build
}
