We know what strategy we want, so going through DownloadStrategyDetector
is wasted work. Now we can remove those patterns from the detector and
have two fewer branches each time through.
This commit introduces a new patch implementation that supports
checksums and caching.
Patches are declared in blocks:
patch do
url ...
sha1 ...
end
A strip level of -p1 is assumed. It can be overridden using a symbol
argument:
patch :p0 do
url ...
sha1 ...
end
Patches can be declared in stable, devel, and head blocks. This form is
preferred over using conditionals.
stable do
# ...
patch do
url ...
sha1 ...
end
end
Embedded (__END__) patches are declared like so:
patch :DATA
patch :p0, :DATA
Patches can also be embedded by passing a string. This makes it possible
to provide multiple embedded patches while making only some of them
conditional.
patch :p0, "..."
* Add options and ENV method to specify building in C++11 mode.
- Set C++ compiler flags to enable C++11 mode.
- To add options to support C++11 mode, a formula can now use
option :cxx11
to provide "--c++11" option, and detect and enable C++11 support in
install method using
ENV.cxx11 if build.cxx11?
ClosesHomebrew/homebrew#22453.