sanity: warn about unnused LIB_DEPENDS entries
stage-qa already warns about missing dependencies. However, it does not warn
about possibly unneeded ones.
This change tries to address this, by simply walking the list of linked against
shared libraries and then matching the entries of LIB_DEPENDS against them.
Note: this may lead to false positives -- as always, user your brain,
and don't rely on output of static tools alone.
Possible output might look like:
[...]
> Running Q/A tests (stage-qa)
Warning: you might not need LIB_DEPENDS on libqgpgme.so
Warning: you might not need LIB_DEPENDS on libintl.so
Warning: you might not need LIB_DEPENDS on libKF5IconThemes.so
Warning: you might not need LIB_DEPENDS on libqca-qt5.so
Warning: you might not need LIB_DEPENDS on libQt5Test.so
[...]
Note, that in this case all are false positives.
Differential Revision: https://reviews.freebsd.org/D27304