How to ‘custom install’ with brew

homebrewinstallterminalwine

So I have to edit the install of wine, and apply a custom patch. The patch I want is here…

https://bugs.winehq.org/attachment.cgi?id=38156

and when I add these lines with brew edit wine

patch do
  url "https://bugs.winehq.org/attachment.cgi?id=38156"
  sha256 "f1c4537f38e258c810ca33455e0947e3b2be1087bf9445fadac00424f294c004"
end

and then try to install, it does not actually add the patch. It seems to be downloading it from a prepackaged and compiled source because this is the terminal output…

==> Downloading https://homebrew.bintray.com/bottles/wine-1.8.1.el_capitan.bottle.tar.gz
######################################################################## 100.0%
==> Pouring wine-1.8.1.el_capitan.bottle.tar.gz
==> Caveats
You may want to get winetricks:
  brew install winetricks

 By default Wine uses a native Mac driver. To switch to the X11 driver, use
regedit to set the "graphics" key under "HKCUSoftwareWineDrivers" to
"x11" (or use winetricks).

For best results with X11, install the latest version of XQuartz:
  https://xquartz.macosforge.org/
==> Summary
?  /usr/local/Cellar/wine/1.8.1: 2,504 files, 260.8M

and not downloading from where it says to in the brew edit wine file…

stable do
url "https://dl.winehq.org/wine/source/1.8/wine-1.8.1.tar.bz2"
mirror "https://downloads.sourceforge.net/project/wine/Source/wine-1.8.1.tar.bz2"
sha256 "149ad3daaf8593b36c5c061285df0ec2a25e20ea48c61323be91088c4d22ca97"

Best Answer

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.