37 lines
1.0 KiB
Ruby
37 lines
1.0 KiB
Ruby
class RubyBuild < Formula
|
|
desc "Install various Ruby versions and implementations"
|
|
homepage "https://github.com/rbenv/ruby-build"
|
|
url "https://github.com/rbenv/ruby-build/archive/v20201118.tar.gz"
|
|
sha256 "5e09e93c01b0b35130dc27aa002c960e0e0b8ba3923c3db8ab932cc75697cad2"
|
|
license "MIT"
|
|
head "https://github.com/rbenv/ruby-build.git"
|
|
|
|
bottle :unneeded
|
|
|
|
depends_on "autoconf"
|
|
depends_on "pkg-config"
|
|
depends_on "readline"
|
|
|
|
def install
|
|
ENV["PREFIX"] = prefix
|
|
system "./install.sh"
|
|
end
|
|
|
|
def caveats
|
|
<<~EOS
|
|
ruby-build installs a non-Homebrew OpenSSL for each Ruby version installed and these are never upgraded.
|
|
|
|
To link Rubies to Homebrew's OpenSSL 1.1 (which is upgraded) add the following
|
|
to your #{shell_profile}:
|
|
export RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl@1.1)"
|
|
|
|
Note: this may interfere with building old versions of Ruby (e.g <2.4) that use
|
|
OpenSSL <1.1.
|
|
EOS
|
|
end
|
|
|
|
test do
|
|
assert_match "2.0.0", shell_output("#{bin}/ruby-build --definitions")
|
|
end
|
|
end
|