Mac ports is a command line program which makes it easy to install free code libraries and applications onto OS X machines. Once installed via the website (http://www.macports.org/) you can search for and then install a library with just two lines of code:
> port search qt4 (if say you want to install qt) > sudo port install qt4-mac
The Easy Way
To install MacPorts, simply go to the install page and click the "pkg" installer link near the top that matches you version of OS X.
Manual Installation - for Old Versions of OS X
Way back around 2007 (the time of Tiger and Leopard) it wasn't so easy to install MacPorts. For my own records, here is the process I had to use:
- (1) downloaded source ("DarwinPorts-1.3.2.tar.gz") from MacPorts download page.
- (2) read through "READMERELEASE1"
- (3) opened a terminal window (& changed to downloaded dir) and ran:
> ./configure && make && sudo make install
- (4) then the easiest option was to run:
> cd /opt/local/bin > port sync && sudo port selfupdate > port search qt3 (do this to search for a package/portname) > sudo port install qt3
Searching for and Installing Packages
Most of the "ports" / packages on MacPorts are kept fairly up to date by the MacPorts team. While MacPorts makes is very easy to install a package in just on click, one of its problems is that it prevents a lot of the customization options you get doing it the normal way. In the normal way you can download a package/library from its website and compile it using "./config && make && sudo make install" and setting a bunch of extra compile options/flags you want in the setup phase. Via MacPorts you typically don't get a chance to configure anything.
Some Libraries I've Installed
For my own record here are some libraries I've installed in the past using MacPorts:
fftw-2.1.5 * gsl-1.7 * jpeg-6b * (before libpng) libpng-1.2.12 * tiff-3.8.2 * ImageMagick-6.3.0 * (requires others) cmake * qt-mac-free-3.3.0 * (download from: )