Tonight, I wanted to make x11/rxvt-unicode and sysutils/tmux to work with 256 colors.
It took me around 2 hours to get this working.
So how to get that working?
Step 1
uninstall devel/ncurses
install devel/ncurses-devel
Step 2
Reinstall all ports that used to depend on devel/ncurses.
For me it was only x11/rxvt-unicode.
Step 3
In your ~/.Xdefaults add this line
Depending on your window manager, you may need to run
Step 4
Restart urxvtd (if you're using it).
Step 5
Run this script to check if it works
Screenshoots
Without tmux:
With tmux:
Tips
Judging by source of /usr/ports/Mk/bsd.ncurses.mk you can set
in /etc/make.conf to automatically use devel/ncurses-devel next time you reinstall your system (instead of devel/ncurses).
Note: Haven't tested this, but it should work
References
1) http://blog.ijun.org/2011/09/install-tmux-on-freebsd-tutorial-step.html
2) Lots of improvisation and experimenting
It took me around 2 hours to get this working.
So how to get that working?
Step 1
uninstall devel/ncurses
install devel/ncurses-devel
Step 2
Reinstall all ports that used to depend on devel/ncurses.
For me it was only x11/rxvt-unicode.
Step 3
In your ~/.Xdefaults add this line
Code:
URxvt.termName: xterm-256color
Depending on your window manager, you may need to run
$ xrdb ~/.Xdefaults
Step 4
Restart urxvtd (if you're using it).
Step 5
Run this script to check if it works
Screenshoots
Without tmux:

With tmux:

Tips
Judging by source of /usr/ports/Mk/bsd.ncurses.mk you can set
Code:
NCURSES_PORT=devel/ncurses-devel
Note: Haven't tested this, but it should work

References
1) http://blog.ijun.org/2011/09/install-tmux-on-freebsd-tutorial-step.html
2) Lots of improvisation and experimenting