If you wonder how Firebird 2.1.3 stable can be compiled on Freebsd 8.1 wonder no more , Here is the thread with patches and instructions needed .

He does have some nice tutorials on the website with Freepascal and extJS