Hi!
I just finished touching up a shell script to fully set up and compile The Powder Toy.
The shell script is actually meant to be used with the Vagrant application (and the Vagrant configuration file I included), but runs fine on your own computer too.
One thing Vagrant doesn't do without a lot of preparation, however, is graphical user interfaces. You can fix that by adding a few lines to the build script, but installing the X server anytime someone wants to compile TPT on Linux is a bit tedious.
Get the script (and Vagrantfile) here.