Download: FreeBSD OS X
pgRouting can be installed via ports:
cd /usr/ports/databases/pgRouting make install clean
pkg install pgrouting
brew install pgrouting
The installation command in is pretty much all one needs to do on macOS if homebrew is installed. The requirements can be installed via brew as well and are configured here: https://github.com/Homebrew/homebrew-core/blob/master/Formula/pgrouting.rb. Specific versions for pgrouting can't be chosen at the moment. The version defined in the formulas file will be installed. If specific versions are need to be, there is https://github.com/Homebrew/homebrew-versions.