Update formula_creator.rb

This commit is contained in:
BingoKingo 2025-01-30 12:51:58 +08:00 committed by GitHub
parent 4ee6e96bdf
commit c49cdc260c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -138,7 +138,7 @@ module Homebrew
<% elsif @mode == :perl %> <% elsif @mode == :perl %>
uses_from_macos "perl" uses_from_macos "perl"
<% elsif @mode == :python %> <% elsif @mode == :python %>
depends_on "python" depends_on "python@x.y"
<% elsif @mode == :ruby %> <% elsif @mode == :ruby %>
uses_from_macos "ruby" uses_from_macos "ruby"
<% elsif @mode == :rust %> <% elsif @mode == :rust %>
@ -147,7 +147,7 @@ module Homebrew
# depends_on "cmake" => :build # depends_on "cmake" => :build
<% end %> <% end %>
<% if @mode == :perl %> <% if @mode == :perl || :python || :ruby %>
# Additional dependency # Additional dependency
# resource "" do # resource "" do
# url "" # url ""
@ -201,8 +201,14 @@ module Homebrew
virtualenv_install_with_resources virtualenv_install_with_resources
<% elsif @mode == :ruby %> <% elsif @mode == :ruby %>
ENV["GEM_HOME"] = libexec ENV["GEM_HOME"] = libexec
# resources.each do |r|
# system "gem", "install", r.cached_download, "--ignore-dependencies",
# "--no-document", "--install-dir", libexec
# end
system "gem", "build", "\#{name}.gemspec" system "gem", "build", "\#{name}.gemspec"
system "gem", "install", "\#{name}-\#{@version}.gem" system "gem", "install", "\#{name}-\#{version}.gem"
bin.install libexec/"bin/\#{name}" bin.install libexec/"bin/\#{name}"
bin.env_script_all_files(libexec/"bin", GEM_HOME: ENV["GEM_HOME"]) bin.env_script_all_files(libexec/"bin", GEM_HOME: ENV["GEM_HOME"])
<% elsif @mode == :rust %> <% elsif @mode == :rust %>