If you come from a previous macports installation you need to uninstall sumo and fox toolkit first:
sudo port uninstall sumo sudo port uninstall fox
If you did not already install homebrew, do so by invoking
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
make sure your homebrew db is up-to-date
Install SUMO stable via the SUMO Brew Formula:
brew tap dlr-ts/sumo brew install sumo
After the installation you need to log out/in in order to let X11 start automatically, when calling a gui-based application like "sumo-gui". (Alternatively, you may start X11 manually by pressing cmd-space and entering "XQuartz").
Using Macports (legacy)#
This uses a packaged version of sumo which is convenient but may lag behind the latest official release of SUMO.
You should start by installing Macports. Afterwards start a terminal session and run
sudo port install sumo
While this will install a SUMO version you maybe do not want to use, it will pull in all dependencies you need.
If you want to build from a repository checkout you should additionally do
sudo port install automake autoconf
If you wish to use clang rather than gcc for compilation do:
./configure CXX=clang++ CXXFLAGS="-stdlib=libstdc++"
Thanks to all MacOS builders for sharing their insights.