2011-03-10 05:11:03 +00:00
|
|
|
class GnuProlog < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Prolog compiler with constraint solving"
|
2014-12-29 01:06:41 +00:00
|
|
|
homepage "http://www.gprolog.org/"
|
|
|
|
url "http://gprolog.univ-paris1.fr/gprolog-1.4.4.tar.gz"
|
2015-08-03 12:55:31 +00:00
|
|
|
sha256 "18c0e9644b33afd4dd3cdf29f94c099ad820d65e0c99da5495b1ae43b4f2b18e"
|
2011-08-19 19:59:50 +00:00
|
|
|
|
2014-11-11 17:24:36 +00:00
|
|
|
bottle do
|
2015-11-19 15:45:31 +00:00
|
|
|
sha256 "d1145e39194fda08dd0653e90cb37b516fc0aaac7c4820462586b36fc5dbc7cf" => :yosemite
|
|
|
|
sha256 "0c185324002089662da4d313b01d7fd6831ff477808cfc9b7a19f42449ba9f2f" => :mavericks
|
|
|
|
sha256 "4e167ef6d2dddf1d52bb39a093accdde86ea94711b0e7507d5e0f2c1507e789b" => :mountain_lion
|
2014-11-11 17:24:36 +00:00
|
|
|
end
|
|
|
|
|
2013-11-19 18:05:10 +00:00
|
|
|
# Upstream patch:
|
|
|
|
# http://sourceforge.net/p/gprolog/code/ci/784b3443a0a2f087c1d1e7976739fa517efe6af6
|
2014-03-17 00:35:07 +00:00
|
|
|
patch do
|
2014-04-26 19:48:32 +00:00
|
|
|
url "https://gist.githubusercontent.com/jacknagel/7549696/raw/3078eef282ca141c95a0bf74396f4248bbe34775/gprolog-clang.patch"
|
2015-08-03 12:55:31 +00:00
|
|
|
sha256 "3b47551d96f23ab697f37a68ab206219ee29f747bc46b9f0cae9b60c5dafa3b2"
|
2012-06-27 23:01:26 +00:00
|
|
|
end
|
|
|
|
|
2009-11-17 18:29:10 +00:00
|
|
|
def install
|
2014-12-29 01:06:41 +00:00
|
|
|
cd "src" do
|
2012-07-07 04:15:11 +00:00
|
|
|
system "./configure", "--prefix=#{prefix}", "--with-doc-dir=#{doc}"
|
2013-11-19 18:05:10 +00:00
|
|
|
ENV.deparallelize
|
2014-11-11 17:05:29 +00:00
|
|
|
system "make"
|
2013-11-19 18:05:10 +00:00
|
|
|
system "make", "install"
|
2009-11-17 18:29:10 +00:00
|
|
|
end
|
|
|
|
end
|
2014-12-29 01:06:41 +00:00
|
|
|
|
|
|
|
test do
|
|
|
|
(testpath/"test.pl").write <<-EOS.undent
|
|
|
|
:- initialization(main).
|
|
|
|
main :- write('Hello World!'), nl, halt.
|
|
|
|
EOS
|
|
|
|
system "#{bin}/gplc", "test.pl"
|
|
|
|
assert_match /Hello World!/, shell_output("./test")
|
|
|
|
end
|
2009-11-17 18:29:10 +00:00
|
|
|
end
|