As I understand it, sys-apps/xdg-desktop-portal is only used for Wayland support, and should therefore be an optional dependency.
Looking at the ebuild, it seems like there may be other deps that ought to be conditional too, but I didn't investigate them
wayland support is non-optional in krfb.
That's not true. Deleting the xdg-desktop-portal and pipewire ebuild dependencies, krfb builds and works perfectly fine.
They look not hard required but automagic (but we avoid it by depending on them unconditionally: https://invent.kde.org/network/krfb/-/blob/master/CMakeLists.txt#L82, I think. Please submit a patch upstream to add CMake options.
https://invent.kde.org/network/krfb/-/merge_requests/30/diffs
Thanks for taking this bug where it belongs then.