Add new cppcheck formula.

Cppcheck - A tool for static C/C++ code analysis
http://sourceforge.net/apps/mediawiki/cppcheck/index.php?title=Main_Page

Doesn't have man pages yet, requires docbook files to generate them.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>

* Add head
* Update to Homebrew style
master
Theo Wadsley 2010-05-01 13:07:17 +10:00 committed by Adam Vandenberg
parent d46282db1d
commit e72e1b3ee7
1 changed files with 17 additions and 0 deletions

17
Formula/cppcheck.rb Normal file
View File

@ -0,0 +1,17 @@
require 'formula'
class Cppcheck < Formula
url 'http://github.com/danmar/cppcheck/tarball/1.42'
homepage 'http://sourceforge.net/apps/mediawiki/cppcheck/index.php?title=Main_Page'
md5 'de8ffbd9d02c4ec01047ef7fd9f208cd'
head 'git://github.com/danmar/cppcheck.git'
def install
# Need to remove "-Wlogical-op" from c++ flags.
cxxflags = "-Wall -Wextra -pedantic -Wfloat-equal -Wcast-qual -O2 -DNDEBUG"
# Pass to make variables.
system "make", "BIN=#{bin}", "CXXFLAGS=#{cxxflags}", "install"
# Man pages aren't installed, they require docbook schemas which I don't know how to install.
end
end