There's a patch in files that introduces an #ifdef for WITH_NVIDIA_GL. Unfortunately the ports Makefile sets WITH_NVIDIA_GL=0 if it is not defined and thus triggers the #ifdef as well.
also the #ifdef is followed by an #elif without parameters, so it's still broken after fixing the makefile. The #elif has to be replaced with #else.
How-To-Repeat: Just try to build without NVIDIA and you will see that it attempts to build for NVIDIA anyway (it will miss a function ending with NV, which should end with MESA).
I'll take it.
Fixed by flz@.