. "${GRIMOIRE}/CMAKE_DEPENDS" &&

if [[ "${WEECHAT_BRANCH}" == "scm" ]]; then
  depends git
fi &&

depends curl &&
depends zlib &&
depends libgcrypt &&
depends GETTEXT &&

depends gnutls &&
depends ca-certificates &&

optional_depends asciidoctor "-DENABLE_DOC=ON" "-DENABLE_DOC=OFF" "build documentation?" &&
if is_depends_enabled asciidoctor; then
  depends source-highlight
fi &&

optional_depends xsltproc "-DENABLE_MAN=ON" "-DENABLE_MAN=OFF" "build manpages" &&
if is_depends_enabled xsltproc; then
  depends docbook-xml &&
  depends docbook-xsl
fi &&


optional_depends perl "-DENABLE_PERL=ON" "-DENABLE_PERL=ON" "Turns on Perl script plugin" &&
optional_depends python3 "-DENABLE_PYTHON=ON" "-DENABLE_PYTHON=OFF" "Turns on Python 3 script plugin" &&
optional_depends RUBY "-DENABLE_RUBY=ON" "-DENABLE_RUBY=OFF" "Turns on Ruby script plugin" &&
optional_depends LUA "-DENABLE_LUA=ON" "-DENABLE_LUA=OFF" "Turn on Lua script plugin" &&
optional_depends PHP "-DENABLE_PHP=ON" "-DENABLE_PHP=OFF" "Turn on PHP script plugin" &&
optional_depends aspell "-DENABLE_SPELL=ON" "-DENABLE_SPELL=OFF" "Turn on Aspell plugin" &&
optional_depends guile "-DENABLE_GUILE=ON" "-DENABLE_GUILE=OFF" "Turn on Scheme script plugin" &&
optional_depends libv8 "-DENABLE_JAVASCRIPT=ON" "-DENABLE_JAVASCRIPT=OFF" "Turn on JavaScript script plugin" &&
optional_depends ncurses "-DENABLE_NCURSES=ON" "-DENABLE_NCURSES=OFF" "Enable ncurses interface" &&
optional_depends tcl "-DENABLE_TCL=ON" "-DENABLE_TCL=OFF" "Enable tcl script plugin" &&
optional_depends zstd "-DENABLE_ZSTD=ON" "-DENABLE_ZSTD=OFF" "for Zstandard compression" &&
optional_depends cjson "-DENABLE_CJSON=ON" "-DENABLE_CJSON=OFF" "for JSON support?" &&

if is_depends_enabled $SPELL aspell; then
  optional_depends enchant "-DENABLE_ENCHANT=ON" "-DENABLE_ENCHANT=OFF" "enable Enchant lib for Aspell plugin"
fi
