Saturday, March 10, 2007

Installing MacPorts on Mac OS X 10.4.8

Basically followed what's written in InstallingMacPorts.

But there were some things that didn't work.
So I write what was successful on my machine.

1. Install Xcode Tools.
From "Mac OS X Install Disk 1", select "Xcode Tools" -> click on "XcodeTools.mpkg".
Follow the installation window.

2. Install XWindows (X11).
From "Mac OS X Install Disk 1", click on "Optional Installs.mpkg".
Follow the installation window up to the step "Installation Type".
Under the right pane with the title "Custom Install on Macintosh HD", expand "Applications" -> check on "X11" -> click on "Install".
Follow the installation window until the end.

3. Set Shell environment.

As a root user (I think sudo would do, too), under its home folder(/var/root), add the followings to .profile file.

export PATH=/opt/local/bin:/opt/local/sbin:$PATH
export DISPLAY=:0.0
export EDITOR=/usr/bin/vim

Save the file.
Execute "source ~/.profile".

As a root user (again I think sudo would do, too), add the following to /etc/X11/xinit/xinitrc.
source ~/.profile

4. Install MacPorts.
Download the latest MacPorts dmg file.
Click on the file to mount it.
Under the mounted directory, click on pkg file.
Follow the installation window.

5. Update MacPorts via selfupdate.
Execute "sudo port -d selfupdate".

No comments: