The title says all :)
Hints: put a # before S=.... put a # before epatch..., but I don't have it compiled completely yet, so I don't know blender3d finally gets the right config from the right dir.
I've posted a kind of ebuild-hack on the forums: http://forums.gentoo.org/viewtopic-p-2978554.html#2978554
2.40 is in the tree.