As a long-term Fink user, I've found it hard to summon up the energy to move to Macports (previously known as Darwin Ports), until now. A dead disk provided the necessary impetus to overcome this energy barrier.
MacPorts—so I am told by friends I trust—is closer to the Mac zeitgeist, and has more packages available in fresher versions.
My first experience was not good. I tried the standard install from .dmg with two fresh, fully updated installs of Leopard + x11 + XCode Tools—one on my ageing MBP; one on a sparking new MacBook Air. Neither succeeded in creating the code>.profile that is supposed to adjust the PATH environment variable.
You should start with a standard install as it does almost everything—and may even do it all, for some it succeeds.
In the environment of a shell accessing packages installed by MacPorts,
PATH should include
MANPATH should include
/opt/local/share/man. The standard install is meant to create a
.profile to achieve this. It didn't.
Googling macports leopard profile led to various suggestions (as usual, others have encountered this problem before me). One of these works—others don't.
Do not add the new paths to
Do not add new files named
MacPorts, containing the new paths, to
Do create a file
~/.profile containing the following code:
export PATH=/opt/local/bin:/opt/local/sbin:$PATH export MANPATH=/opt/local/share/man:$MANPATH
Then you can type
sudo port -d update in a fresh terminal window, to update your MacPorts installation, and
sudo port install emacs-app, for example, to install a Cocoa version of emacs.
You'll find the Emacs installed as a regular application in
Note: If you already have a
.bash_login, you can and should append the commands above to that file, and optionally rename rename that file as
.profile, instead of creating a new
Explanation: (for the full story try
When bash is invoked as an interactive login shell, or as a non-inter-active shell with the --login option, it first reads and executes commands from the file /etc/profile, if that file exists. After reading that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and reads and executes commands from the first one that exists and is readable.