And, as a counter to your experience of not having it mess up a machine, every time you upgrade macOS to the next major version you have to jump through some hoops to get it to play ball again. Painful.
At some point I gave up on the hoops and installed homebrew instead and haven't looked back.
I used pkgsrc on macOS for a while but ended up going back to Homebrew because it was easier and there were more packages relevant to my needs; I also found packages in pkgsrc wouldn’t play nicely with zsh or bash completion sometimes, I believe this was related to patches specifically required for macOS for these packages. The concept of casks is also very nice, as it means I can manage most packages using a single package manager instead of doing dmg->drag-n-drop installations or mucking around with install/uninstall scripts. Building and maintaining a dumb cask formula is also pretty easy for apps where there isn’t already an available cask.
I haven’t used Macports so couldn’t compare - can Macports install .app applications?
Yes, I have Emacs installed via MacPorts for example.
% ls /Applications/MacPorts/
MacVim.app/ Python 3.11/ VLC.app/
Python 2.7/ Python 3.7/ pinentry-mac.app/
Python 3.10/ Transmission.app/[0] https://devenv.sh [1] https://github.com/LnL7/nix-darwin
Did you know you can even install Mac App Store apps?
Here are the relevant bits where my config does it: https://github.com/dustinlyons/nixos-config/blob/main/macos/...
If you aren't using home-manager[4] yet, I strongly recommend taking a look at it.
nix-darwin significantly elevates the competency of MacOS.
[1]: https://gitlab.com/jcdickinson/nix/-/tree/darwin [2]: https://gitlab.com/jcdickinson/nix/-/blob/darwin/packages/ho... [3]: https://gitlab.com/jcdickinson/nix/-/blob/darwin/flake.nix#L... [4]: https://nix-community.github.io/home-manager/
Just like using any popular framework, the most popular one comes with plenty of benefits outside of the technical differences.
While this would be a nuisance for me even today, I was only just starting to dip my toe into programming at that point which meant I lacked the technical knowledge to perform any changes more complicated than pasting in a single line somewhere, which meant it was often game over when a package was broken.
While Homebrew has its problems it’s easy to see how it became popular.
I just checked the Semgrep port and while technically it does have it, it is around 150 releases behind the version brew has.
These days if you have an ugly website, and opaque syntax, you're considered to be an abandoned project. Agree with it or not, your website sends a signal to the user and MacPort's signal says "it'll work till it doesn't and that's fine"
I used macOS for a few years to try it out, and I found that Macports lacked many things I needed. Taking a quick look again, let's see...
* Oclgrind: No.
* Futhark: No.
* GHC: Yes! And updated to boot. (But I'd expect such major programs to be in any package system.)
* MLkit: No.
* hledger: Yes, although not the newest version.
* git-annex: Yes, but a rather old version.
* ispc: Yes, but again a rather old version.
The impression I got (which may be inaccurate) is that Macports has a long tail of older packages, but it does not have a lot of newer stuff. It is very easy and convenient to add packages to Homebrew (just a PR with a package definition in a Ruby DSL; most things are obvious), which I think is the main reason it has become successful.
Nowadays I suggest everyone just use Nix, of course. It's not as slick and has a tough barrier to entry, but it's built on fundamentally better principles than legacy package managers.
Is the Homebrew Ruby DSL much easier than the MacPorts Tcl DSL? I think the main reason Homebrew succeeded was it had binary packages before MacPorts. But a more familiar language helped probably.
In 18 years of using MacPorts, it's never messed up my system, broken something that used to work or decided that I don't get to run commands right now, because it wants to run an upgrade. (It's also never spied on me.)
The price you pay for that is that more things are compiled from scratch, but hey - you only have to do that once, and it only takes like 20 minutes on a modern Mac. Upgrades are generally pretty fast.