diff options
| author | Libor Wagner | 2011-10-07 14:24:29 +0200 |
|---|---|---|
| committer | Adam Vandenberg | 2012-03-30 21:56:15 -0700 |
| commit | 1878019905f41512026d54e07c94a3e7d461b6bc (patch) | |
| tree | 17369a768dfecc5b0cfd33cbd44065d3cec35521 | |
| parent | dadcf1c03a023eeac143ee2e57d009a1a74d1e74 (diff) | |
| download | homebrew-1878019905f41512026d54e07c94a3e7d461b6bc.tar.bz2 | |
Minisat 2.2.0
"MiniSat is a minimalistic, open-source SAT solver, developed to help
researchers and developers alike to get started on SAT."
[http://minisat.se]
Closes #8011.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
| -rw-r--r-- | Library/Formula/minisat.rb | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/Library/Formula/minisat.rb b/Library/Formula/minisat.rb new file mode 100644 index 000000000..8198fac38 --- /dev/null +++ b/Library/Formula/minisat.rb @@ -0,0 +1,46 @@ +require 'formula' + +class Minisat < Formula + homepage 'http://minisat.se' + url 'https://github.com/niklasso/minisat/tarball/releases/2.2.0' + md5 '2274977506042714811968afca01b68d' + + # Fixes compilation on mac; in next upstream release. See: + # http://groups.google.com/group/minisat/browse_thread/thread/f5b6a180cadbb214 + def patches + DATA + end + + def install + ENV['MROOT'] = Dir.pwd + Dir.chdir 'simp' + system "make", "r" + bin.install '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() { |
