findent 3.1.3 (new formula)

Closes #47946.

Signed-off-by: Izaak Beekman <zbeekman@gmail.com>
This commit is contained in:
Izaak Beekman 2019-12-16 10:55:44 -05:00
parent 1af653ea7d
commit d4b7366ea5
No known key found for this signature in database
GPG key ID: A93CE70D8021BD0F

24
Formula/findent.rb Normal file
View file

@ -0,0 +1,24 @@
class Findent < Formula
desc "Indent and beautify Fortran sources and generate dependency information"
homepage "https://www.ratrabbit.nl/ratrabbit/content/findent/introduction"
url "https://downloads.sourceforge.net/project/findent/findent-3.1.3.tar.gz"
sha256 "046c2a274536bd29a07385019c51b3c63e6b553df25b45b41b757b5cf2dab607"
def install
system "./configure", "--disable-debug",
"--disable-dependency-tracking",
"--disable-silent-rules",
"--prefix=#{prefix}"
system "make", "install"
(pkgshare/"test").install %w[test/progfree.f.in test/progfree.f.try.f.ref]
end
test do
cp_r pkgshare/"test/progfree.f.in", testpath
cp_r pkgshare/"test/progfree.f.try.f.ref", testpath
flags = File.open(testpath/"progfree.f.in", &:readline).sub(/ *[!] */, "").chomp
system "#{bin}/findent #{flags} < progfree.f.in > progfree.f.out.f90"
assert_predicate testpath/"progfree.f.out.f90", :exist?
assert compare_file(testpath/"progfree.f.try.f.ref", testpath/"progfree.f.out.f90")
end
end