As for 10.5, the required dependencies are the following:
devel/bison
devel/cmake
devel/ninja
shells/bash
net/rsync
devel/pcre2
databases/unixODBC
databases/galera26
converters/libiconv
devel/libedit
textproc/libxml2
Bison and cmake are in the "common preinstall commands". Also libxml2, iconv...