2013-01-18 13:07:23 +00:00
|
|
|
class Clasp < Formula
|
2015-08-01 09:35:45 +00:00
|
|
|
desc "Answer set solver for (extended) normal logic programs"
|
2015-01-02 01:08:23 +00:00
|
|
|
homepage "http://potassco.sourceforge.net/"
|
2015-08-10 05:30:19 +00:00
|
|
|
url "https://downloads.sourceforge.net/project/potassco/clasp/3.1.3/clasp-3.1.3-source.tar.gz"
|
|
|
|
sha256 "f08684eadfa5ae5efa5c06439edc361b775fc55b7c1a9ca862eda8f5bf7e5f1f"
|
2013-01-18 13:07:23 +00:00
|
|
|
|
2014-08-30 15:59:42 +00:00
|
|
|
bottle do
|
2015-09-21 18:49:28 +00:00
|
|
|
cellar :any_skip_relocation
|
|
|
|
sha256 "c1c8dff2446da52ad0d87fc53f14065ef9d92e6a66d27ecd8ed3e7619b6bddea" => :el_capitan
|
2015-08-10 06:50:31 +00:00
|
|
|
sha256 "1cb2579b887870f73fc216c474e841951b01ff26f120273bf536665403f65826" => :yosemite
|
|
|
|
sha256 "06c9bce4ff95e45e4fb78351c658f2d4bbc80fadd2db581e6b9673ec383d4755" => :mavericks
|
|
|
|
sha256 "20058e023ad293199f0c1619953adaea03f84aa25c07f42e3edb9d177447cd52" => :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
|