Installing MacPorts
Introduction
This document describes the process for installing MacPorts, based on the MacPorts Installation Guide. There are also more instruction in the MacPorts Documentation. All options and alternatives are not described here, just one relatively simple way of installing MacPorts.
Installing X11
Apple's X11 is installed as standard on Leopard (10.5) and Snow Leopard (10.6). On Tiger (10.4) it is an optional install. It can be installed from the original installation DVDs.
Both the X11 and X11SDK are needed. The X11SDK is part of the Xcode Tools package (see the Xcode Tools section below). You can check whether these are installed by looking for com.apple.pkg.X11User.bom and com.apple.pkg.X11SDKLeo.bom in /Library/Receipts/boms/. On Mac OS X 10.4, the files are named X11User.pkg and X11SDK.pkg in /Library/Receipts/.
The following command should list these packages, if found:
Note: Only tested on Tiger.
$ find -E /Library/Receipts -regex '.*(com\.apple\.pkg\.X11(User|SDKLeo)\.bom|X11(User|SDK)\.pkg)'
Xcode Tools
Whilst the Xcode Tools package is included on the installation DVDs, it is recommended to download the latest version from the Apple Developer's Connection website. You have to register to download the tools. The free membership package suffices our needs. Note: The Xcode Tools package is a significant download size. The download sizes are shown against each download link.
Install the Xcode Tools and X11 SDK packages as follows:
Login to the Apple Developer Connection
Follow the link to the "Downloads" section
Select "Developer Tools" from the "Downloads" side bar
Search the Developer Tools page for the latest version of Xcode for your version of Mac OS X
At the time of writing, the versions are:Mac OS X Xcode Tools Version 10.4 Tiger 2.5 10.5 Leopard 3 .1.4 10.6 Snow Leopard 3.2.1 Run the Xcode Tools package installer
Select the "Customize" option and open the "Applications" category and ensure that the "X11 SDK" option is selected
Make sure the command line development option is also selected
Select the "Install" option
MacPorts
To install the binary version of MacPorts:
Download the latest MacPorts-1.x.x.dmg disk image from the MacPorts download directory. Don't choose those containing -rc or -beta in their file name.
Run the installer choosing the "easy" installation option
That's it. MacPorts is now installed.
References
-- Frank Dean - 07 Feb 2010