2014-12-14 20:29:05 +00:00
|
|
|
class AbiComplianceChecker < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Check binary and source compatibility for C/C++"
|
2014-12-14 20:29:05 +00:00
|
|
|
homepage "http://ispras.linuxbase.org/index.php/ABI_compliance_checker"
|
|
|
|
url "https://github.com/lvc/abi-compliance-checker/archive/1.99.9.tar.gz"
|
2015-08-03 12:55:31 +00:00
|
|
|
sha256 "52b0daca89fcda73cde126497c8015ca823417074ba02fcff68b7acf2f45e516"
|
2014-12-14 20:29:05 +00:00
|
|
|
|
|
|
|
depends_on "ctags"
|
|
|
|
depends_on "gcc" => :run
|
|
|
|
|
|
|
|
def install
|
|
|
|
system "perl", "Makefile.pl", "-install", "--prefix=#{prefix}"
|
|
|
|
rm bin/"abi-compliance-checker.cmd"
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
(testpath/"test.xml").write <<-EOS.undent
|
|
|
|
<version>1.0</version>
|
|
|
|
<headers>#{Formula["ctags"].include}</headers>
|
|
|
|
<libs>#{Formula["ctags"].lib}</libs>
|
|
|
|
EOS
|
|
|
|
gcc_suffix = Formula["gcc"].version.to_s.slice(/\d\.\d+/)
|
|
|
|
system bin/"abi-compliance-checker", "-cross-gcc", "gcc-" + gcc_suffix,
|
|
|
|
"-lib", "ctags",
|
|
|
|
"-old", testpath/"test.xml",
|
|
|
|
"-new", testpath/"test.xml"
|
|
|
|
end
|
|
|
|
end
|