homebrew-core/Formula/minisat.rb
BrewTestBot 95884bae22 Formula files style updates.
Closes Homebrew/homebrew#42407.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-08-03 14:21:42 +01:00

46 lines
1.4 KiB
Ruby

class Minisat < Formula
desc "Boolean satisfiability (SAT) problem solver"
homepage "http://minisat.se"
url "https://github.com/niklasso/minisat/archive/releases/2.2.0.tar.gz"
sha256 "3ed44da999744c0a1be269df23c3ed8731cdb83c44a4f3aa29b3d6859bb2a4da"
# Fix some declaration errors; see:
# http://groups.google.com/group/minisat/browse_thread/thread/f5b6a180cadbb214
patch :DATA
fails_with :clang do
cause "error: friend declaration specifying a default argument must be a definition"
end
def install
ENV["MROOT"] = buildpath
system "make", "-C", "simp", "r"
bin.install "simp/minisat_release" => "minisat"
end
end
__END__
diff --git a/utils/System.cc b/utils/System.cc
index a7cf53f..feeaf3c 100644
--- a/utils/System.cc
+++ b/utils/System.cc
@@ -78,16 +78,17 @@ double Minisat::memUsed(void) {
struct rusage ru;
getrusage(RUSAGE_SELF, &ru);
return (double)ru.ru_maxrss / 1024; }
-double MiniSat::memUsedPeak(void) { return memUsed(); }
+double Minisat::memUsedPeak(void) { return memUsed(); }
#elif defined(__APPLE__)
#include <malloc/malloc.h>
-double Minisat::memUsed(void) {
+double Minisat::memUsed() {
malloc_statistics_t t;
malloc_zone_statistics(NULL, &t);
return (double)t.max_size_in_use / (1024*1024); }
+double Minisat::memUsedPeak() { return memUsed(); }
#else
double Minisat::memUsed() {