For anyone on #FreeBSD main (aka Current) branch of src and x11/nvidia-driver* start failing to build, please track Bug 288236.
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=288236
Considering possibility that more kmod ports are affected, I'm now proposing fix on src side, but if it's rejected, I have another plan.