2014-01-21 10:49:53 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Aspcud < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Package dependency solver"
|
2014-01-21 10:49:53 +00:00
|
|
|
homepage 'http://potassco.sourceforge.net/'
|
2015-06-27 22:05:40 +00:00
|
|
|
url 'https://downloads.sourceforge.net/project/potassco/aspcud/1.9.1/aspcud-1.9.1-source.tar.gz'
|
|
|
|
sha256 'e0e917a9a6c5ff080a411ff25d1174e0d4118bb6759c3fe976e2e3cca15e5827'
|
2014-01-21 10:49:53 +00:00
|
|
|
|
2014-08-30 15:59:42 +00:00
|
|
|
bottle do
|
2015-06-29 12:47:42 +00:00
|
|
|
sha256 "060fd7d438962d4cfb70b51121fef20f00c4bb5d510c0a7881b99e747c4e9cc5" => :yosemite
|
|
|
|
sha256 "4f326145031beef979e4cc6590f77e65a35cd7ac71cb9129320524cbc5459235" => :mavericks
|
|
|
|
sha256 "f37a5588eece4ffb99b5eb5acd224f71f2286b482d85428bd2b76853acd23c7c" => :mountain_lion
|
2014-08-30 15:59:42 +00:00
|
|
|
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
|
2014-09-21 14:46:22 +00:00
|
|
|
system "cmake", "..", "-DGRINGO_LOC=#{Formula["gringo"].opt_bin}/gringo", "-DCLASP_LOC=#{Formula["clasp"].opt_bin}/clasp", *std_cmake_args
|
2014-08-28 13:52:53 +00:00
|
|
|
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
|