2014-01-12 00:22:03 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Gringo < Formula
|
|
|
|
homepage 'http://potassco.sourceforge.net/'
|
2014-03-23 22:39:42 +00:00
|
|
|
url 'https://downloads.sourceforge.net/project/potassco/gringo/4.3.0/gringo-4.3.0-source.tar.gz'
|
|
|
|
sha1 'dccb55c2c690ebe1f6599a43b6072bfb50eb5e83'
|
2014-01-12 00:22:03 +00:00
|
|
|
|
2014-03-23 22:45:18 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
|
|
|
sha1 "1dc4996fd4469e987a5aab9c205cf157c3460c01" => :mavericks
|
|
|
|
end
|
|
|
|
|
2014-01-12 00:22:03 +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
|
|
|
|
2014-03-26 21:42:51 +00:00
|
|
|
# Fixes missing include; fixed upstream:
|
|
|
|
# http://sourceforge.net/p/potassco/code/8274/tree//trunk/gringo/app/gringo/main.cc?diff=5083e8f9bfc09e133b25ad84:8273
|
|
|
|
patch :p3, :DATA
|
|
|
|
|
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
|
|
|
|
inreplace "SConstruct",
|
|
|
|
"env['CXX'] = 'g++'",
|
|
|
|
"env['CXX'] = '#{ENV['CXX']}'"
|
2014-02-25 15:39:31 +00:00
|
|
|
scons "--build-dir=release", "gringo", "clingo"
|
2014-01-12 00:22:03 +00:00
|
|
|
bin.install "build/release/gringo", "build/release/clingo"
|
|
|
|
end
|
|
|
|
end
|
2014-03-26 21:42:51 +00:00
|
|
|
|
|
|
|
__END__
|
|
|
|
--- a/trunk/gringo/app/gringo/main.cc
|
|
|
|
+++ b/trunk/gringo/app/gringo/main.cc
|
|
|
|
@@ -33,6 +33,7 @@
|
|
|
|
#include <gringo/scripts.hh>
|
|
|
|
#include <gringo/version.hh>
|
|
|
|
#include <gringo/control.hh>
|
|
|
|
+#include <climits>
|
|
|
|
#include <iostream>
|
|
|
|
#include <stdexcept>
|
|
|
|
#include <program_opts/application.h>
|