2014-01-21 10:49:53 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Aspcud < Formula
|
|
|
|
homepage 'http://potassco.sourceforge.net/'
|
2014-08-28 13:52:53 +00:00
|
|
|
url 'https://downloads.sourceforge.net/project/potassco/aspcud/1.9.0/aspcud-1.9.0-source.tar.gz'
|
|
|
|
sha1 'ae77772c2424620b3064d0dfe795c26b1c8aa778'
|
2014-01-21 10:49:53 +00:00
|
|
|
|
2014-08-30 15:59:42 +00:00
|
|
|
bottle do
|
|
|
|
sha1 "f1471e364b9efae91452e8cc76fae1c388920f2d" => :mavericks
|
|
|
|
sha1 "351b927b946fd88ed0f0ac5c74dcaf605fcc919f" => :mountain_lion
|
|
|
|
sha1 "2ce63783516196205d651e86388a9c7707ba783d" => :lion
|
|
|
|
end
|
|
|
|
|
2014-01-21 10:49:53 +00:00
|
|
|
depends_on 'boost' => :build
|
|
|
|
depends_on 'cmake' => :build
|
|
|
|
depends_on 're2c' => :build
|
|
|
|
depends_on 'gringo'
|
|
|
|
depends_on 'clasp'
|
|
|
|
|
|
|
|
def install
|
2014-08-28 13:52:53 +00:00
|
|
|
mkdir "build" do
|
|
|
|
system "cmake", "..", "-DGRINGO_LOC=#{Formula["gringo"].bin}/gringo", "-DCLASP_LOC=#{Formula["clasp"].bin}/clasp", *std_cmake_args
|
|
|
|
system "make"
|
|
|
|
system "make", "install"
|
|
|
|
end
|
2014-01-21 10:49:53 +00:00
|
|
|
end
|
|
|
|
|
2014-08-28 13:52:53 +00:00
|
|
|
test do
|
|
|
|
fixture = <<-EOS.undent
|
|
|
|
package: foo
|
|
|
|
version: 1
|
2014-01-21 10:49:53 +00:00
|
|
|
|
2014-08-28 13:52:53 +00:00
|
|
|
request: foo >= 1
|
|
|
|
EOS
|
|
|
|
(testpath/'in.cudf').write(fixture)
|
|
|
|
system "#{bin}/aspcud", "in.cudf", "out.cudf"
|
|
|
|
end
|
|
|
|
end
|