If you want to compile your development environment from scratch, instead of using packages included with OS X, and without resorting to third party package managers like Homebrew, then check out my guide on GitHub (lukejanicke / wp-mac-dev-env).
The guide contains complete instructions for compiling a WordPress development environment in OS X from scratch. All essential packages and their dependencies are compiled from the latest source code and configured manually, including packages already bundled with OS X. This gives you full control over a cutting edge environment at the expense of some convenience.
It’s based on Patrick Bougie’s excellent Compiling a Web Development Environment on Mac OS X. For a more comprehensive web development environment, and instructions for previous versions of OS X, please refer to Patrick’s guide.
My guide only includes the packages and dependencies necessary for a basic WordPress development environment (i.e. themes and plugins). It also adds some necessary steps for newer package versions, and includes instructions for configuring Apache virtual hosts, WordPress and WP-CLI.
The environment described is not suitable for production. To create a local environment that more closely resembles a production environment in terms of security and features, take a look at Vagrant, Docker and Roots.