2014-01-12 00:22:03 +00:00
|
|
|
class Gringo < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Grounder to translate user-provided logic programs"
|
2015-06-29 19:25:12 +00:00
|
|
|
homepage "http://potassco.sourceforge.net/"
|
|
|
|
url "https://downloads.sourceforge.net/project/potassco/gringo/4.5.0/gringo-4.5.0-source.tar.gz"
|
|
|
|
sha256 "fd7bd8756d3bdf3ed1df1fae9e8a8efdc4bcc613c41086640205e677e0e22f6f"
|
2014-03-23 22:45:18 +00:00
|
|
|
|
2014-08-30 15:59:42 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
2015-06-29 12:47:42 +00:00
|
|
|
sha256 "61e06e100961608e832b74a8221adfbea645269a268485d42808300cb0014c8d" => :yosemite
|
|
|
|
sha256 "987a5a8c950f5df5d5626ed4cc9ba174cb011313ba9ee60263dff94c854202f3" => :mavericks
|
|
|
|
sha256 "c800b81cec82149a45dfa2485d3e4e99ad26b71c7a5543841aa01259ff199dd7" => :mountain_lion
|
2014-08-30 15:59:42 +00:00
|
|
|
end
|
|
|
|
|
2015-06-29 19:25:12 +00:00
|
|
|
depends_on "re2c" => :build
|
|
|
|
depends_on "scons" => :build
|
|
|
|
depends_on "bison" => :build
|
2014-03-26 21:42:25 +00:00
|
|
|
|
2014-04-05 04:16:09 +00:00
|
|
|
needs :cxx11
|
2014-01-12 00:22:03 +00:00
|
|
|
|
|
|
|
def install
|
2014-03-26 21:42:25 +00:00
|
|
|
# Allow pre-10.9 clangs to build in C++11 mode
|
|
|
|
ENV.libcxx
|
2015-06-29 19:25:12 +00:00
|
|
|
|
2014-03-26 21:42:25 +00:00
|
|
|
inreplace "SConstruct",
|
|
|
|
"env['CXX'] = 'g++'",
|
2014-12-15 05:29:02 +00:00
|
|
|
"env['CXX'] = '#{ENV.cxx}'"
|
2015-06-29 19:25:12 +00:00
|
|
|
|
2015-06-27 15:13:06 +00:00
|
|
|
# Fix build problems
|
|
|
|
# https://sourceforge.net/p/potassco/bugs/104/
|
2015-06-29 19:25:12 +00:00
|
|
|
inreplace "libclasp/src/clasp_output.cpp", "using std::isnan;", "// using std::isnan;"
|
|
|
|
|
2015-06-27 15:13:06 +00:00
|
|
|
scons "--build-dir=release", "gringo", "clingo", "reify"
|
|
|
|
bin.install "build/release/gringo", "build/release/clingo", "build/release/reify"
|
2014-01-12 00:22:03 +00:00
|
|
|
end
|
2015-06-29 19:25:12 +00:00
|
|
|
|
|
|
|
test do
|
|
|
|
assert_match /#{version}/, shell_output("#{bin}/gringo --version")
|
|
|
|
end
|
2014-01-12 00:22:03 +00:00
|
|
|
end
|