OSX is based on a BSD kernel and most Open Source software packages will compile on it. You could search for MacPorts or Homebrew. They have pre-compiled binaries for the basic stuff you need.
But let me say this:
Debian and Ubuntu are based around these projects, most of them are packaged and designed to work on Linux based systems. They give you package repositories with dependency tracking for free.
I don't understand why people want to transform their Macs into something they are clearly not targetting. So, if you do not intend to look into Programming for OSX or iOS, why not simply install VMWare, install Linux and do all your great development with proper package managment and so forth.
You can do that on OSX, but you have to bite the bullet and compile most of the stuff yourself, getting stuck on many occasions. I don't see the point.
And it's certainly not "cool", because the only thing you learn from that experience is that it's hard to port open source packages fesigned by people who mostly care about Linux based systems.
(Net BSD "pkgsrc" is far from complete, but it can bootstrap on OSX and the existing packages at least work. You might want to look at that too.)
http://www.pkgsrc.org
http://www.macports.org
http://mxcl.github.io/homebrew/
PS: I've been there, I tried. Install Linux in a VM and be happy. It's way easier.