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.
X11.app allows you to run applications using the X Window System, which is the traditional display server on most other UNIX like systems. Additionally, the Xquartz project provides an updated version of the X server.
As of Mac OS X 10.5 Leopard, X11.app is included in the default installation. You can just skip this section for any later version of Mac OS X.
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.