This chapter shows you how to install MacPorts and its prerequisites step-by-step. Note that the sections about installing X11 and installing Xcode are Mac OS X specific. If you wish to install MacPorts on another platform, first make sure you have X11 and gcc installed, and then skip ahead to installing MacPorts from source and continue to the end of the chapter.
It is recommended that you install the X Window System (X11) even if you don't plan to run X11 applications immediately. Apple's X11 server is normally used to display X11 applications, though you could also install the xorg-server port. If Apple's X11 wasn't installed when Mac OS X was installed, follow these steps.
Insert the “Mac OS X Install Disk” and run the package named “Optional Installs”.
At the software selection window expand the Applications category and click the check box beside X11 (and nothing else).
Click to install X11.
Before launching an X11 application on Mac OS X 10.4, you must open X11.app and start an xterm session. Later OS versions should launch X11.app automatically when an X11 application is run from the Terminal.
%%xterm
After the X11 session window opens, you may launch X11 apps from another terminal window. See Optional X11 Settings if you wish to launch X11 applications from an X11 session window.
X11 and the X11SDK (from Xcode Tools) are both required for X11
apps. To verify the presence of both, check for files
com.apple.pkg.X11User.bom &
com.apple.pkg.X11SDKLeo.bom in
/Library/Receipts/boms/. On Mac OS X 10.4, look for
files X11User.pkg &
X11SDK.pkg in
/Library/Receipts/.
To launch X11 applications directly from an X11 window (instead of
a regular terminal window), you need to make it so X11 sessions opened
using the menu bar respect your .profile
file.
Open X11 and select from the menu.
Double-click the menu item and change: “xterm” to “xterm -ls”
Click to save the change.