Just to add some of my own thoughts that seem true-ish circa late 2014 at least.
Homebrew, as of a couple of years ago, definitely has the upper hand in terms of mindshare. You'll find a lot of blogs with people talking about how much happier they are with Homebrew - usually because of the whole "Macports pulls in the whole world" vs "Homebrew makes use of what you already have" thing.
However, IMO, Macports is a diferent beast now than it was a couple of years ago. When I first switched to OS X & was using MacPorts the MP philosophy was indeed frustrating because almost everything was built from source. A new installation was particularly painful/slow. However over the past year or so, based purely on my own impressions, it seems like 90% of MP packages are binaries & so installation is actually really fast now. From what I gather HomeBrew is also moving in this direction with "Bottles" but i get the impression that most things you install via HB at this point in time will be compiled from source.
So, if only to offer a countervailing opinion, MacPorts seems to actually be the "faster " option these days. However most peoples opinions of MP seem to be based on experiences from circa 2011-12 or so & dont really take this into account. Take this with a grain of salt though as I'm not a regular HB user (and its rather painful to use both side by side).
I do think HB has advantages that mean it will probably "win the war" in the long run though
- HB is all Ruby whereas MacPorts, and its package formulae, are written in TCL which is....not exactly a popular scripting language. That said its pretty damn simple to create your own portfile.
- HB is based around GitHub & thus seems a lot more welcoming to new contributors whereas MacPorts hosts its own SVN repository somewhere I think - which basically reflects the different ages of both projects I suppose.
- As mentioned the general consensus is that MacPorts has been superseded by HB &, rightly or wrongly, that draws more people towards it.
Otherwise YaOZl & kLy covered the main difference in terms of sudo, dependencies etc pretty well. Personally I do find that MacPorts sometimes leads to some headaches in terms of other programs not expecting anything to be in
/opt/local, things being installed with root permissions etc & there are some things that are generally best not installed with MacPorts (e.g. you can install Rails via MacPorts but you'd be crazy not to install it via Ruby's normal Gem management). Other than that though I'm a big fan of the MacPorts philosophy of building its own little world & not relying on some prepackaged OS X library - when it works, and it mostly does, everything is dead simple. Which is what you want of a Package Manager really. And as i mentioned, at this point in time its pretty damn quick to set most things up.
Hope some of that was useful.