How to 'custom install' with brew?
To install something by building from the source, you can use -s.
For your case:

brew install wine -s


Without -s, brew attempts to download binary package ("bottle") and install it.