I’m trying to write a formula for a library that requires a Bison version newer than that provided by macOS to build. (macOS has Bison 2.3, and I need Bison 2.6).
When I add
depends_on "bison" => :build to my Formula, it builds, but
brew audit --new-formula says
Dependency 'bison' is provided by macOS; please replace 'depends_on' with 'uses_from_macos'.
But if I use
uses_from_macos "bison" => :build, my Formula fails to build from source because the macOS Bison is too old.
What’s the right way to handle this?