2015-01-02 01:08:23 +00:00
|
|
|
require "formula"
|
2013-01-18 13:07:23 +00:00
|
|
|
|
|
|
|
class Clasp < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "An answer set solver for (extended) normal logic programs"
|
2015-01-02 01:08:23 +00:00
|
|
|
homepage "http://potassco.sourceforge.net/"
|
2015-08-01 00:27:51 +00:00
|
|
|
url "https://downloads.sourceforge.net/project/potassco/clasp/3.1.2/clasp-3.1.2-source.tar.gz"
|
|
|
|
sha256 "77d5b8fc9617436f7ba37f3c80ad2ce963dfefb7ddaf8ae14d5a4f40a30cc9d3"
|
2013-01-18 13:07:23 +00:00
|
|
|
|
2014-08-30 15:59:42 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
2015-01-02 01:34:12 +00:00
|
|
|
sha1 "0ac56c1eb46713865ead22812d8000978e0ff63b" => :yosemite
|
|
|
|
sha1 "b40b58db856ac11dfbaa64fb28213bc3350fc986" => :mavericks
|
|
|
|
sha1 "16aca848e54eae150b7f6b2a3d9d8bdd4d510fac" => :mountain_lion
|
2014-08-30 15:59:42 +00:00
|
|
|
end
|
|
|
|
|
2015-01-02 01:08:23 +00:00
|
|
|
option "with-mt", "Enable multi-thread support"
|
2013-01-18 13:07:23 +00:00
|
|
|
|
2015-01-02 01:08:23 +00:00
|
|
|
depends_on "tbb" if build.with? "mt"
|
2013-01-18 13:07:23 +00:00
|
|
|
|
|
|
|
def install
|
2014-03-06 20:40:26 +00:00
|
|
|
if build.with? "mt"
|
2015-01-02 01:08:23 +00:00
|
|
|
ENV["TBB30_INSTALL_DIR"] = Formula["tbb"].opt_prefix
|
|
|
|
build_dir = "build/release_mt"
|
2013-01-18 13:07:23 +00:00
|
|
|
else
|
2015-01-02 01:08:23 +00:00
|
|
|
build_dir = "build/release"
|
2013-01-18 13:07:23 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
args = %W[
|
|
|
|
--config=release
|
|
|
|
--prefix=#{prefix}
|
|
|
|
]
|
2014-03-06 20:40:26 +00:00
|
|
|
args << "--with-mt" if build.with? "mt"
|
2013-01-18 13:07:23 +00:00
|
|
|
|
|
|
|
bin.mkpath
|
|
|
|
system "./configure.sh", *args
|
2014-04-17 04:10:11 +00:00
|
|
|
system "make", "-C", build_dir, "install"
|
2013-01-18 13:07:23 +00:00
|
|
|
end
|
2015-08-01 00:27:51 +00:00
|
|
|
|
|
|
|
test do
|
|
|
|
assert_match /#{version}/, shell_output("#{bin}/clasp --version")
|
|
|
|
end
|
2013-01-18 13:07:23 +00:00
|
|
|
end
|