debian/rules.flags: disable Modesetting DRI3 on all platforms.
Raspberry Pi OS patches xorg-server-source and adds a modesetting DRI3 option, which is enabled by default ("auto" mode) and checks for epoxy and gbm.
Technically, the patch is broken, because "auto" mode should notice that DRI3 is already disabled and not check for additional software in that case, but it still does, and fails if the requirements are not fulfilled.
Luckily, we can just disable the option globally. While only Raspberry Pi OS features this patch, unknown configure options are ignored (minus issuing a warning) and everything will continue to work fine.