homebrew-core/Formula/yap.rb
Jack Nagel ec11577107 Switch compilers when no build is specified
Given the current state of OS X compilers, the original fails_with
behavior is becoming less useful, mostly resulting in build failures
each time the compiler is updated. So make the following changes:

When a build is specified, we retain the old behavior: switch compilers
if the available compiler is <= the build, don't switch if it is > the
build.

When no build is specified, unconditionally switch compilers, and don't
output the advice message. This allows us to mark formulae as
perpetually failing, avoiding the need to update formulae each time a
new compiler build is made available.

As a bonus, this makes the logic much easier to reason about.

Closes Homebrew/homebrew#18175.
2013-03-12 13:55:15 -05:00

42 lines
1.3 KiB
Ruby

require 'formula'
class Yap < Formula
homepage 'http://www.dcc.fc.up.pt/~vsc/Yap/index.html'
url 'http://www.dcc.fc.up.pt/~vsc/Yap/yap-6.2.2.tar.gz'
sha1 'a02f80cac67c287645b2ced9502f5ea24a07f1c3'
devel do
url 'http://www.dcc.fc.up.pt/~vsc/Yap/yap-6.3.3.tar.gz'
sha1 'd191e419e5cf74b11e003aae5fe148f3f2f26ac5'
end
depends_on 'gmp'
depends_on 'readline'
fails_with :clang do
cause "Undefined symbols linking for architecture x86_64"
end
def install
system "./configure", "--disable-debug", "--disable-dependency-tracking",
"--enable-tabling",
"--enable-depth-limit",
"--enable-coroutining",
"--enable-threads",
"--enable-pthread-locking",
"--enable-clpbn-bp=no",
"--with-gmp=#{Formula.factory('gmp').opt_prefix}",
"--with-readline=#{Formula.factory('readline').opt_prefix}",
"--with-java=/Library/Java/Home",
"--prefix=#{prefix}"
inreplace 'Makefile', '-DMYDDAS_ODBC', ''
system "make"
system "make install"
end
def test
system "#{bin}/yap -dump-runtime-variables"
end
end