What are pros and cons for MacPorts, Fink and Homebrew?

Solution 1:

Definitely Homebrew. I started with Fink, then switched to MacPorts (happier), then Homebrew (much, much happier). These are my reasons for using each (a pro list if you will):

Fink

  • Apt-based - feel right at home if you come from a Debian-based environment.

MacPorts

  • Unlike homebrew do not depend on MacOS library that may change in the future.
  • Install everything in: /opt/local
  • Nice variants system that lets you customise the build.
  • Easy and intuitive port files, also allows you to add your own.
  • Supports many versions of macOS going back to Mac OS X Tiger including PowerPC versions see other answer.

Homebrew

  • Maximum leveraging of what comes with OS X. Unlike Fink or MacPorts, it does not require you to build/install ruby and libraries from scratch just to install some small Ruby-based tool.
  • Installs into /usr/local (Intel) or /opt/homebrew (Apple Silicon)
  • Install without root access.
  • Every installed package is cleanly sandboxed into its own cellar so you don't have stray files all over your system, just symlinks from bin, man, etc.
  • Has guides and automation to create your own formula files (ie. package descriptors).
  • Written in ruby and all formulas are concise ruby scripts.

pkgin

  • Everything installed in: /opt/pkg
  • Backed by pkgsrc community and Joyent
  • Known to work on NetBSD, DragonFly BSD, Solaris, Debian, macOS, Minix

https://pkgsrc.joyent.com/install-on-osx/

http://pkgin.net/

Solution 2:

MacPorts

It is more independent of Mac OS X, this means MacPorts will just ignore many of the system libraries and softwares that already available in Mac OS X and pull its own one instead, which could be slower when the utility you install requires some set of large libraries and softwares.

But this kind of choice is safer because the packages you installed are less influenced by Apple's system update/upgrade procedure.


Homebrew

It is more dependent on existing Mac OS X installed packages, so this will speed up the installation of packages and minimize redundant libraries.

But the risk is installed packages might be broken because of Apple's system update/upgrade.

So, these are the two different kind of tradeoff.

Also, Homebrew takes over /usr/local by default, with which some folks don't like this because it somehow conflict with the unix-tradition and might cause problems if you’ve already installed anything there (MySQL, etc.)


Apart from these differences, considering the packages these two can offer, you can check with these two commands if you already have MacPorts/Homebrew installed, which show you the packages they currently provided:

port list | wc -l
brew search | wc -l

And you will find out that MacPorts has many more packages than Homebrew.

(19399 v.s 3583 on May 13 2016)