- Install Xcode from Apple (free registration required): http://developer.apple.com/tools/xcode/ or from your Mac OS X installation disk (macports needs XCode >= 3.1, so if you do not have that version or greater you will need to download the latest version, which is 900+ MB)
- Download and install the MacPorts dmg image from http://www.macports.org
- After installing, update it from the terminal:
sudo port -v selfupdate
Install the build tools needed for MariaDB
sudo port install cmake jemalloc judy openssl boost
Your Mac should now have everything it needs to get, compile, and otherwise work with the MariaDB source code. The next step is to actually get a copy of the code. For help with this see the Getting the MariaDB Source Code page.