Recommended is to have this:
sudo apt-get install bison flex python-dev libboost-python-dev cmake libxxf86dga-dev libode-dev libtiff5-dev libpng12-dev libssl-dev libgtk2.0-dev nvidia-cg-dev libopenal-dev libhighgui-dev libopencv-dev libeigen3-dev libavdevice-dev libavfilter-dev libbullet-dev libcogl-dev blt-dev freeglut3-dev nvidia-cg-toolkit python-pmw python-tk libgl1-mesa-dev
Next start compiling:
$ makepanda/makepanda.py --everything
If there will be an error during compiling then, probably you must remove: libgles1-mesa-dev and libgles2-mesa-dev
sudo apt-get remove libgles1-mesa-dev libgles2-mesa-dev
and try one again.
If you see:
Build successfully finished, elapsed time:
then you can start make .deb package:
$ makepanda/makepanda.py --everything --installer
and after this install your package from work dir of panda tree. That is all
PS. Also I have installed last wine 1.7.8 on system