See
this.
Short version:
1. download everything from
here
2. download damageproto
1.1 separately
3. download latest Mesa3D and unpack it somewhere near
4. download the
build-from-tarballs.sh script
5. assuming you're installing to /usr/X11R7.3:
- export PATH=/usr/X11R7.3/bin:$PATH
- export PKG_CONFIG_PATH=/usr/X11R7.3/lib/pkgconfig:$PKG_CONFIG_PATH
6. ./build-from-tarballs.sh -m PATH_TO_MESA -n -bz2 -e /usr/X11R7.3
That's it.
EDIT: you may have to modify the script to suit your needs. I added -j8 to make, removed fonts, docs and all the drivers I didn't need.