do not merge untill the above pr is merged a a new version of meson is released with the version https://github.com/mesonbuild/meson/pull/14001/
In general, I'm sceptical that a meson Buildrequires generator can ever work reliably, given that it's possible to do conditional dependencies depending on the environment and / or what other dependencies are available ... looking at the upstream PR, it looks like you'd need to filter those out manually and / or add ones the automation misses anyway. I'm not sure if it's worth doing this then, if it will often be wrong and / or incomplete?
This extracts the baseline dependencies and it is possible that some dependencies are not found which will need to be added manually. This just provides the baseline
do not merge untill the above pr is merged a a new version of meson is released with the version https://github.com/mesonbuild/meson/pull/14001/