Lots of issues here. 12.04 LTS 64bit has issues with wine32...
http://ubuntuforums.org/showthread.php?t=1942266
and many other threads just like it. Basically, ia32-libs-dev DNE for Precise-64. I have not been able to compile a wine32 successfully to date.
Second issue...wine 1.4.1 is the last version of wine to utilize the version of ./d3d9/directx.c that you describe. V1.5+ have the GetDeviceCaps function you mention, but I can't figure out where to put your hack because they did some major overhauling and changed variable names, etc.
Finally, when I have successfully compiled a 64bit version of wine, I can't get the new command (wine64) to do anything.
% wine64 eqgame patchme (from the EQ folder where eqgame.exe resides) doesn't DO anything. No TOS/EULA, nada. Same thing for any other windows programs I attempt to run.
More troubleshooting to follow I guess. Time to dig into where things get installed I guess.
BTW, new rig is awesome otherwise.