2014-01-21 10:49:53 +00:00
|
|
|
class Aspcud < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Package dependency solver"
|
2015-06-29 19:17:28 +00:00
|
|
|
homepage "http://potassco.sourceforge.net/"
|
|
|
|
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
|
|
|
|
|
2015-06-29 19:17:28 +00:00
|
|
|
depends_on "boost" => :build
|
|
|
|
depends_on "cmake" => :build
|
|
|
|
depends_on "re2c" => :build
|
|
|
|
depends_on "gringo"
|
|
|
|
depends_on "clasp"
|
2014-01-21 10:49:53 +00:00
|
|
|
|
|
|
|
def install
|
2015-06-29 19:17:28 +00:00
|
|
|
args = std_cmake_args
|
|
|
|
args << "-DGRINGO_LOC=#{Formula["gringo"].opt_bin}/gringo"
|
|
|
|
args << "-DCLASP_LOC=#{Formula["clasp"].opt_bin}/clasp"
|
|
|
|
|
2014-08-28 13:52:53 +00:00
|
|
|
mkdir "build" do
|
2015-06-29 19:17:28 +00:00
|
|
|
system "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
|
2015-06-29 19:17:28 +00:00
|
|
|
fixture = <<-EOS.undent
|
2014-08-28 13:52:53 +00:00
|
|
|
package: foo
|
|
|
|
version: 1
|
2014-01-21 10:49:53 +00:00
|
|
|
|
2014-08-28 13:52:53 +00:00
|
|
|
request: foo >= 1
|
|
|
|
EOS
|
2015-06-29 19:17:28 +00:00
|
|
|
|
|
|
|
(testpath/"in.cudf").write(fixture)
|
2014-08-28 13:52:53 +00:00
|
|
|
system "#{bin}/aspcud", "in.cudf", "out.cudf"
|
|
|
|
end
|
|
|
|
end
|