If you don't have Homebrew here is what you need to install it.
Apple Xcode Command Line tools.
Open a terminal session and enter the command gcc and press enter. If you dont have it, it will prompt you to install them. Choose the Install option.
XQuartz.
Go to
http://xquartz.macosforge.org/ and install the dmg file listed there.
Then run the install command on the homebrew page
http://brew.sh
If you use Macports these are the equivalent commands.
sudo port install wine
sudo port install winetricks