Now that homebrew/versions has been deprecated, homebrew/core supports multiple versions of formulae with a new naming format.
In homebrew/versions the formula for GCC 6 was named gcc6.rb
and began with class Gcc6 < Formula
. In homebrew/core this same formula is named [email protected]
and begins with class GccAT6 < Formula
.
Versioned formulae we include in homebrew/core must meet the following standards:
[email protected]
and foo
, and foo
depends on openssl
then you must instead use openssl
.keg_only :versioned_formula
to allow users to have multiple versions installed at once.keg_only :versioned_formula
should not post_install
anything in the HOMEBREW_PREFIX
that conflicts with or duplicates the non-versioned counterpart (or other versioned formulae). For example, a node@6
formula should not install its npm
into HOMEBREW_PREFIX
like the node
formula does.install_on_request
formulae.resource
s that require security updates. For example, a node@6
formula should not have an npm
resource but instead rely on the npm
provided by the upstream tarball.Homebrew’s versions are not intended to be used for any old versions you personally require for your project. You should create your own tap for formulae you or your organisation wish to control the versioning of or those that do not meet the above standards. Software that has regular API or ABI breaking releases still needs to meet all the above requirements; that a brew upgrade
has broken something for you is not an argument for us to add and maintain a formula for you.
If there is a formula that currently exists in the Homebrew/homebrew-core repository or has existed in the past (i.e. was migrated or deleted), you can recover it for your own use with the brew extract
command. This will copy the desired version of the formula into a custom tap. For example, if your project depends on automake
1.12 instead of the most recent version, you can obtain the automake
formula at version 1.12 by running brew extract automake <YOUR_GITHUB_USER>/<YOUR_TAP_REPOSITORY_NAME> --version=1.12
. Formulae obtained this way may contain deprecated, disabled or removed Homebrew syntax (e.g. checksums may be sha1
instead of sha256
); the brew extract
command does not edit or update formulae to meet current standards and style requirements.
We may temporarily add versioned formulae for our own needs that do not meet these standards in homebrew/core. The presence of a versioned formula there does not imply it will be maintained indefinitely or that we are willing to accept any more versions that do not meet the requirements above.
© 2009–present Homebrew contributors
Licensed under the BSD 2-Clause License.
https://docs.brew.sh/Versions