Skip to content

Commit

Permalink
Merge pull request #18310 from cho-m/m4-env
Browse files Browse the repository at this point in the history
  • Loading branch information
carlocab authored Sep 11, 2024
2 parents 0d2210b + 99d81b4 commit d2c443a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 19 deletions.
10 changes: 10 additions & 0 deletions Library/Homebrew/extend/os/mac/extend/ENV/super.rb
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,16 @@ def setup_build_environment(formula: nil, cc: nil, build_bottle: false, bottle_a
MacOS::CLT::PKG_PATH
end

# This is a workaround for the missing `m4` in Xcode CLT 15.3, which was
# reported in FB13679972. Apple has fixed this in Xcode CLT 16.0.
# See https://github.com/Homebrew/homebrew-core/issues/165388
if deps.none? { |d| d.name == "m4" } &&
MacOS.active_developer_dir == MacOS::CLT::PKG_PATH &&
!File.exist?("#{MacOS::CLT::PKG_PATH}/usr/bin/m4") &&
(gm4 = DevelopmentTools.locate("gm4").to_s).present?
self["M4"] = gm4
end

generic_setup_build_environment(formula:, cc:, build_bottle:, bottle_arch:,
testing_formula:, debug_symbols:)

Expand Down
19 changes: 0 additions & 19 deletions Library/Homebrew/shims/mac/super/m4

This file was deleted.

0 comments on commit d2c443a

Please sign in to comment.