From 7c7155a5c45faa254db0ede1a10f3ee3d73c79fa Mon Sep 17 00:00:00 2001 From: Mitchell Blank Jr Date: Sun, 6 Dec 2020 15:36:31 +0000 Subject: [PATCH] nvi: fix build with Xcode 12 Usual issue with -Wimplicit-function-declaration being an error by default now. Normal $CFLAGS fix doesn't quite work due to some flaws in the project's autoconf bits but this alternative works. Closes #66341. Signed-off-by: FX Coudert Signed-off-by: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com> --- Formula/nvi.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Formula/nvi.rb b/Formula/nvi.rb index c4257f31a6fcb..3e164cc7e77bc 100644 --- a/Formula/nvi.rb +++ b/Formula/nvi.rb @@ -51,9 +51,13 @@ class Nvi < Formula def install cd "dist" do + # Xcode 12 needs the "-Wno-implicit-function-declaration" to compile successfully + # The usual trick of setting $CFLAGS in the environment doesn't work for this + # configure file though, but specifying an explicit CC setting does system "./configure", "--prefix=#{prefix}", "--program-prefix=n", - "--disable-dependency-tracking" + "--disable-dependency-tracking", + "CC=" + ENV.cc + " -Wno-implicit-function-declaration" system "make" ENV.deparallelize system "make", "install"