homebrew-core/Formula/astyle.rb

34 lines
1.1 KiB
Ruby
Raw Normal View History

2011-03-10 05:11:03 +00:00
class Astyle < Formula
desc "Source code beautifier for C, C++, C#, and Java"
homepage "http://astyle.sourceforge.net/"
url "https://downloads.sourceforge.net/project/astyle/astyle/astyle%202.06/astyle_2.06_macos.tar.gz"
sha256 "ad26b437365add1ec718b0f5f7c03ef0297616528619c2d1de19e940cd18d88a"
head "svn://svn.code.sf.net/p/astyle/code/trunk/AStyle"
2009-06-14 23:55:32 +00:00
2014-11-17 08:51:38 +00:00
bottle do
2015-09-23 16:30:10 +00:00
cellar :any_skip_relocation
2017-01-02 12:01:46 +00:00
sha256 "00b19ebc8e22131555090f45a62fe8e47bc147cbb6bd20b46126f64ececff0ba" => :sierra
sha256 "7e80942d28e0b8767f65e4f90c0b783ffaebb5ed31ffc26278ebaf3c50563ca8" => :el_capitan
sha256 "a3b000b925c1585ef9a5770da73f99a12e650d820a29a482afbe79838f599309" => :yosemite
2014-11-17 08:51:38 +00:00
end
2009-06-14 23:55:32 +00:00
def install
cd "src" do
system "make", "CXX=#{ENV.cxx}", "-f", "../build/mac/Makefile"
bin.install "bin/astyle"
2009-06-14 23:55:32 +00:00
end
end
test do
(testpath/"test.c").write("int main(){return 0;}\n")
system "#{bin}/astyle", "--style=gnu", "--indent=spaces=4",
"--lineend=linux", "#{testpath}/test.c"
assert_equal File.read("test.c"), <<-EOS.undent
int main()
{
return 0;
}
EOS
end
end