Building MacPort 1.5.0 on Leopard
Prerequisites:
* XCode tools installed
Download a source archive of MacPorts.
curl -O http://svn.macports.org/repository/macports/downloads/MacPorts-1.5.0/MacPorts-1.5.0.tar.gz
Without specifying any options, the configure script may fail. It can't find libXll.dylib, after some struggle I found a workaround.
./configure LDFLAGS=-L/Developer/SDKs/MacOSX10.5.sdk/usr/X11/lib
make
sudo make install
Add PATH and MANPATH for your .zshenv or .bashrc.
PATH=$PATH:/opt/local/bin
MANPATH=$MANPATH:/opt/local/share/man
Lastly, re-launch a shell session, do selfupdate.
sudo port -d selfupdate