views:

510

answers:

6

got a new mac, need to have it setup ready for development. I heard great things about macports, should i use it? Is it really easier than manually download and compile? anyone has any problems using it?

It is for typical ruby web development stuff.

thanks

A: 

I prefer macports, but some people like doing it themselves. Macports tends to be behind releases, but it's still good for me

James Deville
+3  A: 

It really is easier than doing it manually. For example:

sudo port install gimp

will download, build, and install Gimp, plus all its dependencies. There are a lot of dependencies.

If you're doing "typical" stuff, the versions of stuff in MacPorts will be sufficient. Only if you need to be on the bleeding edge will you need to bypass MacPorts and download and install manually.

Greg Hewgill
Bad example -- when I tried installing gimp on a fresh machine, it just hung computing the dependencies (apparently its dependency checking algorithm is really inefficient when you're missing lots and lots of them). Solution was to first install its major dependencies such as glib, and then install gimp.
Adam Rosenfield
I haven't seen that problem. But it's quite possible that when I installed gimp, I already had a number of its dependencies installed from previous runs.
Greg Hewgill
+5  A: 

Try homebrew. It's really good because it's highly optimized, and has no redundant packages.

It's also built in Ruby, which seems particularly relevant to you.

Peter
+1  A: 

While macports can make installation easier, it's the difference between 4 commands (wget/tar/configure/make) and 1 command. Where macports really shines is in package management. If you're primarily interested in Ruby development, RubyGems might be all you need. If you're doing Ruby on Rails, macports will be quite helpful with all the non-ruby software you'll need. If you want to go completely GUI, you can use Porticus as a macports frontend.

I have had the occasional problem during the build phase, but that's under Tiger, which is behind the times.

outis
Unfortunately, it's not that easy. Most stuff does not compile unless you patch it heavily. Macports not only does the wget/tar/configure/make step. it does patching and special configuration for your platform depending also on the variations you want. As of today, Macports is the only one I know providing decent support for Snow Leopard (fink does not).
Stefano Borini
Good point about patches. Out of 6221 ports, macports provides patches for 1498 (I'm not factoring in patches that must be downloaded). For each package, we find a mean of 108 lines changed (added or deleted by a patch, where altering a line counts as 2 changes), a median of 26 line changes and a mode of 2. Standard deviation is 1426. The distribution of line change counts has quite a long tail. If you define the tail to be the number of line change counts that occur for 4 packages or less, the tail is 7/10 of the line change counts.
outis
I only rarely download something that needs patching, but occasionally the dependencies really cause a headache.
Chris Lutz
A: 

The strongest problem with macports is that it's not cross platform, and it's hard to specify a well defined development scenario (e.g. you use Foo version 1.2.3, Bar version 0.5.6 etc.). It makes your life easier, but as of today, I still haven't found a decent solution to the definition and building of a development runtime environment which is efficient, easy and cross platform. See also this question.

So my suggestion is: go with macports, unless you want very strict control of your development environment.

Stefano Borini
A: 

You should use a package manager unless you have a well defined, specific reason not to.

'Course, I prefer fink.

dmckee