I removed the relevant packages (outside the package manager in some cases as it would otherwise mean getting rid of dependencies I wanted to keep) and then built Mesa, GLAMOR, xf86-video-ati and libtxc_dxtn in that order (libtxc_dxtn is a runtime dependency if I remember rightly). The key thing was using the right configure switches to make sure the dri modules and so on go to the right location, but you can figure this out by looking at your existing system first. Also, if you are on an x64 system, you will obviously need to build Mesa twice if you want 32-bit compatibility.
Sorry, not very precise I know but hopefully will point you in the right direction - bear in mind the way I did it could potentially hose your X install if the ABIs are mismatched or anything else like that, so take great care :-D
I think there is also a way to build a separate Mesa and use that with LD_LIBRARY_PATH, not tried it myself though.