
Homebrew — MacPorts driving you to drink? Try Homebrew - twampss
http://mxcl.github.com/homebrew/
======
telemachos
Two other ideas worth considering:

GNU stow (<http://www.gnu.org/software/stow/>)

Rudix (<http://rudix.org/>)

Completely opposite approaches, but they're both worth looking at - especially
if you find MacPorts or Fink too much. (Stow takes an approach similar to
Homebrew's use of 'cellar' + individual subdirectories for packages; Rudix
provides precompiled binaries.) Rudix in particular is perfect if you just
want one or two *nix items quick on a Mac.

------
bshep
I currently use MacPorts... just wondering why I should switch?

~~~
tvon
FWIW, I was an early Homebrew user and even contributed a few recipes, but I
moved back to MacPorts because (and no offense to mxcl, but it's kind of
unavoidable) the author seems to do things with little understanding of the
underlying system or justification.

Taking ownership of /user/local is completely utterly pointless and just plain
bad advice. Copy-and-pasting optimization code from the Gentoo wiki is
pointless. Binaries and libs are stripped without must justification, which
will (did for me anyway) cause problems when compoing against the libs (eg,
easy_install-ing anything against homebrew libs caused problems for me).

There has also been a lot of FUD spread about at the expense of MacPorts which
I think is just low class. The anti-Macports complaints basically amount to "I
don't understand this, so I'm going to say it's bad".

That said, it's written in ruby, uses github and the homepage is well done, so
it will probably be wildly popular.

~~~
Locke1689
Just a side note but /usr does not actually stand for /user (although I often
pronounce it that way when speaking). It's actually an initialism standing for
UNIX System Resources.

~~~
doty
You sure that isn't just a backronym? It seems highly unlikely given its peers
(/etc, /lib, /bin, none of which are acronyms) and given the system it lives
in, which I don't think used the word "resources" anywhere else.

When I google I mainly find drive-by assertions that it means "UNIX System
Resources" (and sometimes "User Specific Resources"). The closest I can find
to something real is:

<http://tldp.org/LDP/Linux-Filesystem-Hierarchy/html/usr.html>

------
jnoller
I can't recommend homebrew enough - I've been burned by macports and fink in
the past, and so I had reverted to the time tested "just compile stuff by
hand". Homebrew strikes a good balance between the raw, do it yourself
approach and something as big and intermingled as macports.

~~~
amock
What problems did you have with MacPorts?

~~~
jnoller
Frequently, when actually needing to compile other things (outside of
macports), Macports would be pulled in "magically" and cause issues (such as
gettext and Python-core). Frequent issues debugging strange issues when trying
to port install things, etc.

Homebrew does just enough to work, and get the job done and attempts to "fit
in" with the OS I already have, versus making it's own sandbox off to the
side.

~~~
amock
The problem with accidentally pulling in libraries seems unavoidable with
Homebrew since it uses /usr/local. Is the lack of sandboxing what you think
makes it better? This seems like exactly what you should be looking for.

While I agree that it would be nice to have seamless integration with the OS,
having a completely separate installation helps with things like OS upgrades
or when you need to use a different version of a library that is installed by
the OS. Does Homebrew do anything to handle that kind of problem?

~~~
jnoller
It _can_ use /usr/local - and you can set it up so that /usr/local comes
before the rest of your system as you need to. Yes, an entirely self-contained
sandbox avoids this, but most of the time, I don't want that.

Like I said in a previous comment, most of the time I'd find myself compiling
things by hand into /usr/local anyway.

Please! Use the system's provided libraries. If I need something newer, I'll
brew install it myself. For _me_ homebrew strikes a good balance between
"compile it myself, damn it" and Macports/Fink. The formula are easy to hack
and update (it's simple), and for the most part it just gets ourt of your way.

------
zephjc
this is #1 what drives me nuts about macports:

    
    
        $ port deps clojure-contrib
        Full Name: clojure-contrib @1.1.0
        Build Dependencies:   clojure
        Fetch Dependencies:   git-core
        $ port deps git-core
        Full Name: git-core @1.7.0.2+doc
        Runtime Dependencies: rsync, perl5, p5-error
        Library Dependencies: curl, zlib, openssl, expat, libiconv
    

with no possibility of skipping dependencies

~~~
apinstein
Why don't you just edit the port to add a variant that lets you opt-out of
those dependencies?

Poor package management isn't the fault of MacPorts; a Homebrew port could be
just as poorly designed.

The "variants" infrastructure of MacPorts is one of my favorite parts of
MacPorts, it definitely makes it easier to manage interdependencies IMHO.

~~~
evgen
Truth. Anyone capable of maintaining a homebrew setup has Sufficient skills to
spend five minutes scanning the macports guide and tweaking the port files.
OTOH, building clojure is te leas of the parents problems; he is in for
anworld of painful surprise when he sees how screwed up packaging is. Have a
clojure app? Include your own copy of clojure and clojure-contrib. Have a
clojure editing mode? Do the same. Have a blog entry that mentions clojure? I
think you need to download and squirrel away the jar files in those cases as
well...

I ended up creating my own branch of the port tree for clojure bits just
because of all the patching needed to avoid this "let me grab a copy of
clojure for you" behavior.

~~~
zephjc
Indeed. After looking at various package/dep schemes for clojure, I just gave
up and created my own application and library templates and copy files around
- at least the jar files are small enough that it doesn't really matter.

------
amock
The title here and the quote at the bottom of the page say that it's better
than MacPorts but there doesn't seem to be any comparison between them other
than that. The only thing I've seen people use to say that it's better is that
it's written in Ruby, but that doesn't seem like a big deal. Is there a
comparison of the two somewhere? It seems like the problem people have with
MacPorts is that it's been around longer so there have been more chances for
things to go wrong.

~~~
jeremymcanally
I hated having to download 800mb of dependencies to install something simple.
I already have Perl or lib(whatever); I don't need you to download it and
install it.

I get the reliability argument (i.e., the only way to guarantee stuff builds
right is to manage it yourself), but that's a problem with any platform where
you might compile things alongside the package manager. So, let me manage
that. I don't need a package manager to argue with me about what I want
installed.

~~~
oomkiller
In addition to this argument, I think comparing them is almost like comparing
apples and oranges. They both have their place on your system, but Macports is
like a "lower gear" than Homebrew, and it takes a ton of time to do anything
with it.

------
intranation
There's been lots of in-depth discussion about the pros and cons of MacPorts
or Homebrew on HN already:

<http://news.ycombinator.com/item?id=871341>

~~~
telemachos
And a more recent one (a lot of which ends up focused on /usr/local and sudo):
<http://news.ycombinator.com/item?id=1095793>

------
jwr
I dream of the day when someone properly ports Portage (from Gentoo, the
"emerge" thing) to Mac OS X.

I use MacPorts, and I've used a bunch of various package management systems,
and portage is the only one that lets me maintain servers for > 5 years
without reinstalling the whole thing, just upgrading the packages.

~~~
lut4rp
Sure, just use Gentoo Prefix. <http://www.gentoo.org/proj/en/gentoo-
alt/prefix/>

------
reynhout
So...Homebrew is MacPorts with simplified Portfiles and a smaller dependency
graph?

------
azm
<spelling-nazi> s/compliments/complements/ </spelling-nazi>

The former changes the meaning of the sentence completely.

But otherwise looks great. I would give anything to completely ditch macports.

------
xster
Here's why I don't like MacPort. If I compile a much needed new library by
hand, installing a program that depends on it shouldn't cause MacPort to
download and recompile EVERYTHING by itself again instead of using what's
already there in Apple or compiled. And why does MacPort have 20 times more
dependencies than the same program in Fink? And since it's MACPort and there
are only so many types of Macs, why aren't programs in binaries yet?

------
freetard
A better way to use all those unix tools is to just run Ubuntu in a VM and
develop there, or just replace MacOS with Ubuntu entirely.

~~~
oomkiller
Did ubuntu suddenly get TextMate support? Also, have they fixed the poor
graphics acceleration issues? Didn't think so, go away troll.

~~~
freetard
That's cool if you're happy with OS X. It's just that I know many OS X devs
who use ubuntu in a VM. I'm personally happy with a full install of Ubuntu and
Emacs instead of textmate while others prefer OS X + textmate or emacs or vim
or what have you, to each his/her own. I was just stating an alternative, I
didn't know that was trolling.

~~~
jodrellblank
In a MacOS X package management thread, your solution is "install ubuntu", and
you didn't know that was trolling?

I'm very suspicious of your story.

------
phren0logy
I just installed homebrew a few weeks ago. Consider me a fan. It's extremely
straight-forward, and has almost everything I'm looking for. It's easy to
update, and easy to remove packages.

I might never boot back into Ubuntu.

------
phr
What I'd like to try sometime is NIX ( <http://nixos.org/nix/> ). Getting it
to work well on OSX would be the trick.

Edit: They say it _should_ run on Mac OS X.

------
jokull
Think of it as a framework to build things yourself. It's not strictly a
replacement for MacPorts.

------
whalesalad
Installing wget took about 20 seconds... brilliant.

~~~
kylecordes
Ah, but you _appreciate_ wget much more, if you wait through the amount of
time it takes MacPorts to provide it ;-)

------
t_crayford
Website need formula -> formulae for pluralization.

~~~
JadeNB
How about formulæ? :-)

------
Niten
Has anyone here tried pkgsrc on OS X?

~~~
rtomayko
Yep. It's not bad. I cloned the [experimental git
repository]([http://ftp.netbsd.org/pub/NetBSD/misc/repositories/git/pkgsr...](http://ftp.netbsd.org/pub/NetBSD/misc/repositories/git/pkgsrc))
to `/usr/pkgsrc` and was able to install most packages I tried. They seem to
lag behind current versions quite a bit and some pieces of software I rely on
for work weren't packaged (redis, mongo, etc.).

I used it for a few months but eventually switched over to homebrew because
it's a nice simple system and packages most of the stuff I need.

You have to run a case-insensitive filesystem with pkgsrc (I was anyway) and,
like macports, it does not use system libraries so pretty much everything
needs to be rebuilt under `/usr/pkg`.

It was worth experimenting with. I might check back on it when I get my new
MBP. They have [a lot of packages](<http://pkgsrc.se/>).

