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-10-11 15:13:17 +00:00
|
|
|
revision 1
|
|
|
|
sha256 "58d3c2e37d9e6d45229c4486169e62f15a87072219cf696d5a4b277e27908488" => :el_capitan
|
|
|
|
sha256 "55340a5126484de0f00f27f409904e7a7ddd1aefdf478a22c3af6a514c14b4d9" => :yosemite
|
|
|
|
sha256 "b576548c9bf028f731a2990f5ce137d5835f5a4accac4f2698ca17216b2e00f1" => :mavericks
|
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
|
2015-10-11 10:58:52 +00:00
|
|
|
depends_on "re2c" => :build
|
2015-06-29 19:17:28 +00:00
|
|
|
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
|