As much as I like the FreeBSD installer, it doesn't always install the latest version of the ports collection. If I were installing from a CD/DVD, I could understand when a dated copy of the collection was copied from the installatiogn media. After all, you can't put software onto a CD that hasn't been written yet. But what really astounds me is that ports collection installed from FTP isn't the most updated set. Here's how to get updated in a hurry.
You could just download the entire ports hierarchy and decompress it. This is the fastest method, though only the first time you install the collection. In the future, you won't want to download 50MB of Makefiles when you just want what's changed.
So we'll use CVSup instead, which is a program that updates a local copy of a source tree with a master tree, like the one on the FreeBSD CVS server. In the past, building CVSup from ports took quite a long time due to the Modula-3 dependency. So I got used to installing CVSup from the packages collection.
# /stand/sysinstall
Select Configure, then Packages. Choose FTP, selecting a mirror that is geographically close to you. This will help keep the master server less burdened. From there select Devel, and choose cvsup-without-gui-16.1h. Install it.
To update your ports once, run this command. Depending on your connection speed, you might want to go make dinner or read a book. It could take quite a while.
# /usr/local/bin/cvsup -g -L 1 -h cvsup1.us.freebsd.org /usr/share/examples/cvsup/ports-supfile
For repeated updates I like to customize the supfile a bit. Copying the ports-supfile from the examples directory to the directory with all of my other configuration files keeps my work seperate from the original distribution. In addition to adding CVSup to root's crontab, I generally comment out parts of the ports collection that I don't need, and therefore don't need to update (specifically, foreign language packages).
# mkdir /usr/local/etc/cvsup # cp /usr/share/examples/cvsup/ports-supfile /usr/local/etc/cvsup/
Placing the following line in root's crontab will run cvsup at 3:30 every morning.
30 3 * * * /usr/local/bin/cvsup -g -L 1 /usr/local/etc/cvsup/ports-supfile
If the servers are full, busy or unaccessible, CVSup with automatically wait a few hours and try again.
More information about cvsup is available in the Using CVSup chapter of the FreeBSD Handbook.