. "$GRIMOIRE/FUNCTIONS" &&
. "${GRIMOIRE}/MESON_DEPENDS" &&

depends PKG-CONFIG  &&
depends libffi  &&
depends GETTEXT &&
depends pcre2   &&
depends python3 &&
depends python-packaging &&
depends xz-utils &&
if [[ "${GLIB2_BRANCH}" == "devel" ]]; then
  depends python-packaging
fi &&

case "$HOST" in
*-gnu) ;;
*)
  depends libiconv
  ;;
esac &&

optional_depends elfutils '' '' 'manipulate ELF files' &&

if  !  spell_installed  PKG-CONFIG;  then
  force_depends  PKG-CONFIG
fi  &&

depends perl      &&
# It used to be optional, but cannot be until we figure out what to do
# about gdbus-codegen. INSTALL fails without python and leaves us
# without glib2, which can break other serious stuff.
#optional_depends python3   \
#                tests=true \
#                tests=fase \
#                 "Perform post-build testing" &&

optional_depends attr                       \
                 "xattr=true"               \
                 "xattr=false"              \
                 "Build with xattr support" &&

optional_depends libselinux                   \
                 "selinux=enabled"            \
                 "selinux=disabled"           \
                 "Build with selinux support" &&

optional_depends gobject-introspection \
                 introspection=enabled \
                 introspection=disabled \
                 'generate introspection data ' &&

optional_depends gtk-doc                            \
                 "documentation=true"                     \
                 "documentation=false"                    \
                 "Build documentation with gtk-doc" &&

optional_depends libxslt           \
                 "man-pages=enabled"        \
                 "man-pages=disabled"       \
                 "Generate man pages" &&
if is_depends_enabled "${SPELL}" "libxslt"; then
  depends docbook-xsl &&
  depends docutils
fi &&

optional_depends systemtap                               \
                 "systemtap=enabled"                        \
                 "systemtap=disabled"                       \
                 "Include tracing support for systemtap" &&

optional_depends util-linux                    \
                 "libmount=enabled"            \
                 "libmount=disabled"           \
                 "Build with libmount support" &&

depends zlib
