diff options
| author | Nicolas Ojeda Bar | 2014-08-28 14:52:53 +0100 |
|---|---|---|
| committer | Jack Nagel | 2014-08-30 11:01:32 -0500 |
| commit | 065391d975c8e26f2acdd346d41569c1ffdcdbac (patch) | |
| tree | 5ef33b440c7a0c23a0ae223517384f655a8c591c /Library | |
| parent | 0dc1befbd0da5f118b30daffa5946c8eac30973f (diff) | |
| download | homebrew-065391d975c8e26f2acdd346d41569c1ffdcdbac.tar.bz2 | |
gringo 4.4 & clasp 3.1 & aspcud 1.9
Closes #31946.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/aspcud.rb | 80 | ||||
| -rw-r--r-- | Library/Formula/clasp.rb | 4 | ||||
| -rw-r--r-- | Library/Formula/gringo.rb | 25 |
3 files changed, 21 insertions, 88 deletions
diff --git a/Library/Formula/aspcud.rb b/Library/Formula/aspcud.rb index 445ab3fdf..f2b996b81 100644 --- a/Library/Formula/aspcud.rb +++ b/Library/Formula/aspcud.rb @@ -2,8 +2,8 @@ require 'formula' class Aspcud < Formula homepage 'http://potassco.sourceforge.net/' - url 'https://downloads.sourceforge.net/project/potassco/aspcud/1.8.0/aspcud-1.8.0-source.tar.gz' - sha1 '8e05dca2bcf3a388a985317b71f2fcd5586351f7' + url 'https://downloads.sourceforge.net/project/potassco/aspcud/1.9.0/aspcud-1.9.0-source.tar.gz' + sha1 'ae77772c2424620b3064d0dfe795c26b1c8aa778' depends_on 'boost' => :build depends_on 'cmake' => :build @@ -11,68 +11,22 @@ class Aspcud < Formula depends_on 'gringo' depends_on 'clasp' - patch :DATA - def install - system "make" - inreplace "scripts/aspcud.sh", "$base/encodings", "#{share}/encodings" - bin.install "build/release/bin/cudf2lp" - bin.install "scripts/aspcud.sh" => "aspcud" - share.install "scripts/encodings" + mkdir "build" do + system "cmake", "..", "-DGRINGO_LOC=#{Formula["gringo"].bin}/gringo", "-DCLASP_LOC=#{Formula["clasp"].bin}/clasp", *std_cmake_args + system "make" + system "make", "install" + end end -end - -__END__ -FreeBSD SVN: http://svnweb.freebsd.org/ports/head/math/aspcud/files/patch-libcudf-src-dependency.cpp?revision=339367 ---- a/libcudf/src/dependency.cpp.orig 2014-01-10 15:13:07.000000000 +0000 -+++ b/libcudf/src/dependency.cpp 2014-01-10 15:29:32.000000000 +0000 -@@ -49,6 +49,7 @@ - struct CudfPackageRefFilter - { - CudfPackageRefFilter(const Cudf::PackageRef &ref) : ref(ref) { } -+ CudfPackageRefFilter &operator = (const CudfPackageRefFilter &t) { return *this; } - bool operator()(const Entity *entity) - { - switch(ref.op) ---- a/scripts/aspcud.sh.orig 2014-01-10 09:34:53.000000000 +0000 -+++ b/scripts/aspcud.sh 2014-01-12 00:02:07.000000000 +0000 -@@ -60,7 +62,20 @@ - echo - } --base="$(dirname "$(readlink -f "$0")")" -+# solve the missing `readlink -f` option on OSX -+canonical_readlink() -+{ -+ cd `dirname $1`; -+ __filename=`basename $1`; -+ if [ -h "$__filename" ]; then -+ canonical_readlink `readlink $__filename`; -+ else -+ echo "`pwd -P`/$__filename"; -+ fi -+} -+ -+ -+base=$(canonical_readlink $0) + test do + fixture = <<-EOS.undent + package: foo + version: 1 - # default options - clasp_opts_def=( "--opt-heu=1" "--sat-prepro" "--restarts=L,128" "--heuristic=VSIDS" "--opt-hierarch=1" "--local-restarts" "--del-max=200000,250" "--save-progress=0" ) -@@ -125,8 +125,16 @@ - [[ ${#gringo_opts[*]} -eq 0 ]] && gringo_opts=( "${gringo_opts_def[@]}" ) - clasp_opts=( "${clasp_opts[@]}" "${clasp_opts_implicit[@]}" ) - -+trendycriterion="-count(removed),-notuptodate(solution),-unsat_recommends(solution),-count(new)" -+ -+if [[ $3 == trendy ]]; then -+ criterion=$trendycriterion; -+else -+ criterion=`echo $3 | sed -E -e 's/([+-])(new|removed|changed)/\1count(\2)/g' -e 's/([+-])(notuptodate|unsat_recommends)([^(]|$)/\1\2(solution)\3/g' -e 's/([+-])sum(([a-z]*))/\1sum(\2,solution)/g'` -+fi -+ - if [[ $# -eq 3 ]]; then -- cudf_opts=( "${cudf_opts[@]}" "-c" "$3" ) -+ cudf_opts=( "${cudf_opts[@]}" "-c" "$criterion" ) - elif echo $(basename "$0") | grep -q "paranoid"; then - [[ $# -ne 2 ]] && { die "error: exactly two arguments expected"; } - cudf_opts=( "${cudf_opts[@]}" "-c" "paranoid" ) + request: foo >= 1 + EOS + (testpath/'in.cudf').write(fixture) + system "#{bin}/aspcud", "in.cudf", "out.cudf" + end +end diff --git a/Library/Formula/clasp.rb b/Library/Formula/clasp.rb index 55444c0af..e21d4af25 100644 --- a/Library/Formula/clasp.rb +++ b/Library/Formula/clasp.rb @@ -2,8 +2,8 @@ require 'formula' class Clasp < Formula homepage 'http://potassco.sourceforge.net/' - url 'https://downloads.sourceforge.net/project/potassco/clasp/2.1.4/clasp-2.1.4-source.tar.gz' - sha1 '4c6ec3ee2f68fd5f9b3574ebb5a8b069d65d12df' + url 'https://downloads.sourceforge.net/project/potassco/clasp/3.1.0/clasp-3.1.0-source.tar.gz' + sha1 '57297b641d6900a639e09c2a1c73549707f337b7' option 'with-mt', 'Enable multi-thread support' diff --git a/Library/Formula/gringo.rb b/Library/Formula/gringo.rb index cbcced99e..7433ecd1b 100644 --- a/Library/Formula/gringo.rb +++ b/Library/Formula/gringo.rb @@ -2,13 +2,8 @@ require 'formula' class Gringo < Formula homepage 'http://potassco.sourceforge.net/' - url 'https://downloads.sourceforge.net/project/potassco/gringo/4.3.0/gringo-4.3.0-source.tar.gz' - sha1 'dccb55c2c690ebe1f6599a43b6072bfb50eb5e83' - - bottle do - cellar :any - sha1 "1dc4996fd4469e987a5aab9c205cf157c3460c01" => :mavericks - end + url 'https://downloads.sourceforge.net/project/potassco/gringo/4.4.0/gringo-4.4.0-source.tar.gz' + sha1 'c39a1c3cfe64b62e39e6abcc8f813e2d1d17251e' depends_on 're2c' => :build depends_on 'scons' => :build @@ -16,10 +11,6 @@ class Gringo < Formula needs :cxx11 - # 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 - def install # Allow pre-10.9 clangs to build in C++11 mode ENV.libcxx @@ -30,15 +21,3 @@ class Gringo < Formula bin.install "build/release/gringo", "build/release/clingo" end end - -__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> |
