I’ve recently released a guide for Compiling a Web Development Environment on Mac OS X. Some of the packages included in the guide are Git, MySQL, MongoDB, SQLite, Apache, Ruby, PHP, GraphicsMagick, etc.
Please feel free to fork the guide on GitHub and send me a pull request with updates. The goal is to keep the guide up-to-date. Let me know if there are other packages you would like to have included in the guide. I’m always open to suggestions.