Wine has quite a few dependencies we have to fulfil before attempting to build. The first one is Xcode - if you don't have that already installed, get it from the App Store. Note that after installing Xcode you need to run it once to accept the license agreement before being able to use it in the build scripts later.
The other dependencies are easiest to get via brew - get it from brew.sh if you haven't already. Wine already exists as a brew recipe, and we can use that to pull down the dependencies.
First, though, we need to get XQuartz:
brew install Caskroom/cask/xquartz
Then to get Wine and its dependencies:
brew install --devel wine
This takes an hour or so, just so you know.
Now everything should be ready to get the Wine source f…