This is coming up on two years old, but it’s the best discussion on the “Homebrew or MacPorts” question that I’ve found.
Thoughts on macOS Package Managers
There’s an extensive follow-up discussion on Hacker News, for those who want to dive deep: https://news.ycombinator.com/item?id=19783624
My take-away was that Homebrew is hipster, and MacPorts is old school. There are trade-offs between the two approaches and projects, and you might naturally gravitate to one or the other. Homebrew is certainly the “cool kid” right now, and is faster to install most things because for dependencies it re-uses tools and libraries pre-installed on macOS. But MacPorts seems to take a safer, more conservative approach, installing all of its own dependencies. Both can be fragile in the face of operating system upgrades, and even updates, but they are fragile in different ways.
I’m personally torn. On the one hand, I prefer the more conservative approach. And I find some of the reportedly autocratic behavior of project maintainers on Homebrew to be a bit troubling. (See the Hacker News discussion.)
On the other hand, I’ve had reasonable success with Homebrew recently (used at work)…right up until things got too complex. When things all work, which is most of the time, Homebrew is a bit easier. And it’s what people are often using when they document how to do something that requires compiled code.
In the end, you sort of need to be a bit of an expert in this area if you’re going to maintain a complex set of non-default tools. If you’re stitching together a dozen different two-year-old blog posts covering different tools, without really understanding them, and expecting it to be problem free…you’re probably going to be disappointed at some point. Three tools? Twenty? Hard to predict when you hit the wall. But when you hit it…then what? (I got lucky, my work laptop was due for replacement shortly after my complex toolset fell apart this Fall, so I got to start over with a clean slate…)
I’m much happier when I find something like Postgres.app, which encapsulates all of PostgreSQL into a downloadable Mac app, and behaves like a Mac app, not a Unix tool with a complex dependency and installation chain. I wish there were more of those…