portmidi is a subproject of portmedia.
PortMidi source files are available as a .zip file in the Download section link.
Instructions for using PmDefaults to set default Midi input and output devices are PmDefaults.
Another way to install portmidi is by using SVN to get a copy of the portmidi source files. This is recommended if you would like to track the latest versions or work as a developer.