- remove support for IO objects, since we no longer access ::DATA
directly
- since we don't need to support IO objects, use a separate class for
string patches and stop wrapping strings in StringIO ojects
`needs` allows formulae to specify dependencies on cross-compiler
dependencies, allowing multiple failures to be specified in a single
statement. For instance, `needs :cxx11` adds seven compiler failures.
ClosesHomebrew/homebrew#22912.
Symlinks in opt and LinkedKegs point directly at a keg in the cellar, so
only resolving one symlink should suffice, and make it clear what path
we are actually interested in.
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, "..."
In order to allow kegs built with the same version but differing formula
revisions to coexist, we must encode the revision as part of the keg's
name. This is necessary to actually perform an upgrade, as we cannot
upgrade a keg in-place, and temporarily moving it pending the result of
the upgrade is error-prone and potentially slow.
To accomplish this, we introduce a new Formula#pkg_version method that
concatenates the active_spec version with the formula revision. An
exception is made for a formula that has no revision: the tag is
omitted. This preserves compatibility with existing installations.