PKGNAME=harfbuzz
PKGDES="OpenType text shaping engine"
PKGSEC=libs
PKGDEP="cairo freetype glib graphite icu"
PKGDEP__RETRO="cairo freetype glib"
BUILDDEP="ragel gobject-introspection icu"
BUILDDEP__RETRO="ragel"

ABTYPE=meson
# Note: -Dicu_builtin=false, harfbuzz-icu is still expected by most programs.
MESON_AFTER=(
	"-Dglib=enabled"
	"-Dgobject=enabled"
	"-Dcairo=enabled"
	"-Dchafa=disabled"
	"-Dicu=enabled"
	"-Dgraphite2=enabled"
	"-Dfreetype=enabled"
	"-Dgdi=disabled"
	"-Ddirectwrite=disabled"
	"-Dcoretext=disabled"
	"-Dtests=disabled"
	"-Dintrospection=enabled"
	"-Ddocs=disabled"
	"-Ddoc_tests=false"
	"-Dutilities=enabled"
	"-Dbenchmark=disabled"
	"-Dicu_builtin=false"
	"-Dexperimental_api=false"
	"-Dragel_subproject=false"
)

MESON_AFTER__RETRO=(
	"${MESON_AFTER[@]}"
	"-Dicu=disabled"
	"-Dgraphite2=disabled"
	"-Dintrospection=disabled"
	"-Ddocs=disabled"
	"-Dutilities=disabled"
)

# FIXME: -fexception breaks build.
# Ref: https://github.com/harfbuzz/harfbuzz/issues/3163
AB_FLAGS_EXC=0

# Needed by Afterglow, whereas FAIL_ARCH defaults to mainline-only.
FAIL_ARCH="!(mainline|retro)"
