The past few months I saw more and more mentions of Homebrew, as an alternative to MacPorts. When setting up a new Lion install, I figured it was worth checking out, see if all the positive posts were true. The supposed benefits of Homebrew:
- Homebrew installs packages into their own isolated prefixes and then symlinked into /usr/local.
- It uses the libs that are already installed on your mac.
- Way better command line user interface
- Homebrew and it’s installation scripts are hosted at Github
- The installation scripts (aka recepies) and Homebrew itself are written in ruby.
Some benefits can be discarded right away:
- The installation scripts are written in Ruby: So? It’s easy to understand a portfile. Maybe easier than Ruby even (if you don’t happen to know the language).
- Packages are installes into an isolated prefix: Ports are installed in
/opt/local/, which on my machine only has MacPorts, pretty isolated I’d say.
- It’s hosted at Github: granted, I love Github, but MacPorts is still available on apublic repository.
The command line user interface of Homebrew is colored, which is an advantage over MacPorts, but other than that, I have no problems with MacPorts’ CLI: it’s just as easy to type
port install php than
brew install php.
That leaves one advantage: it uses the libs that are already installed on your Mac. Clearly, this is a benefit, and MacPorts should look to adopt this behaviour.
Given that Homebrew has no apparent disadvantages as opposed to MacPorts, I gave it a try. While it’s a bit faster, and I’m a sucker for a colored terminal, I ran into one dealbreaking issue, when installing a server:
The mcrypt extension is missing. Please check your PHP configuration.
OK, no problem. I ran into these types of issues frequently with MacPorts. Most of the time they were solved by running
port install php5-mcrypt. But not on Homebrew: I googled the issue and came across two posts with solutions. Both solutions require me to manually download, configure and compile the extension and PHP itself. Wait, what? On MacPorts this is a one line install, but for Homebrew, this has to be described in a long post?
If this is the Homebrew way of doing things, count me out. I did a search for available PHP extensions, and found only Solr. MacPorts has about 110 extensions, and all for PHP5.
There is one very critical requirement for a package manager: a extensive list of available and up-to-date software. And by that standard, at least for now, Homebrew has its ass handed to it by MacPorts.