aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlastair Harrison2015-03-07 16:08:19 +0100
committerMike McQuaid2015-03-08 09:38:06 +0000
commit8b915a542e0dca71a7c56b069893e9f6c527e6e7 (patch)
tree82de598b53a4ef0c6142b2e866ed0174d6242bab
parent8b3d4dbf5b2792596985930ff27764fd88544743 (diff)
downloadhomebrew-8b915a542e0dca71a7c56b069893e9f6c527e6e7.tar.bz2
cppcheck: fix —-with-gui option
- In 1.68, gui.qrc no longer references a cfg dir, so removed the previously-required inreplace. - The QT build now requires HAVE_RULES to be explicitly enabled, so added that to the qmake invocation. - Fixed a clang compile errors by applying a patch from upstream that hasn’t yet made it into an official release. - Caused .app to be installed directly in the prefix dir, not the bin dir - that was stopping ‘brew linkapps’ from working. Closes #37417. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
-rw-r--r--Library/Formula/cppcheck.rb14
1 files changed, 8 insertions, 6 deletions
diff --git a/Library/Formula/cppcheck.rb b/Library/Formula/cppcheck.rb
index 5d4834cc5..db3356489 100644
--- a/Library/Formula/cppcheck.rb
+++ b/Library/Formula/cppcheck.rb
@@ -19,6 +19,12 @@ class Cppcheck < Formula
depends_on "pcre" if build.with? "rules"
depends_on "qt" if build.with? "gui"
+ # Upstream patches for OS X + Clang compilation
+ patch do
+ url "https://github.com/danmar/cppcheck/commit/141a071.diff"
+ sha1 "4ccc8d814709d0e221c533a5556da4b1aa5fbead"
+ end
+
def install
# Man pages aren't installed as they require docbook schemas.
@@ -36,18 +42,14 @@ class Cppcheck < Formula
if build.with? "gui"
cd "gui" do
- # fix make not finding cfg directory:
- # https://github.com/Homebrew/homebrew/issues/27756
- inreplace "gui.qrc", "../cfg/", "#{prefix}/cfg/"
-
if build.with? "rules"
- system "qmake"
+ system "qmake", "HAVE_RULES=yes"
else
system "qmake", "HAVE_RULES=no"
end
system "make"
- bin.install "cppcheck-gui.app"
+ prefix.install "cppcheck-gui.app"
end
end
end