diff --git a/Formula/portable-ruby.rb b/Formula/portable-ruby.rb index ac021bd..dd59bf1 100644 --- a/Formula/portable-ruby.rb +++ b/Formula/portable-ruby.rb @@ -104,6 +104,8 @@ def install inreplace lib/"ruby/#{abi_version}/#{abi_arch}/rbconfig.rb" do |s| s.gsub! ENV.cxx, "c++" s.gsub! ENV.cc, "cc" + # Change e.g. `CONFIG["AR"] = "gcc-ar-11"` to `CONFIG["AR"] = "ar"` + s.gsub!(/(CONFIG\[".+"\] = )"gcc-(.*)-\d+"/, '\\1"\\2"') # C++ compiler might have been disabled because we break it with glibc@2.13 builds s.sub!(/(CONFIG\["CXX"\] = )"false"/, '\\1"c++"') end