swi-prolog: install to libexec and wrap

swi-prolog does not like being called through a symlink, so don't

Fixes Homebrew/homebrew#24323.
This commit is contained in:
Adam Vandenberg 2013-11-22 11:39:58 -08:00
parent 96ab8b6af3
commit b1303f3686

View file

@ -41,7 +41,7 @@ class SwiProlog < Formula
end
def install
args = ["--prefix=#{prefix}", "--mandir=#{man}"]
args = ["--prefix=#{libexec}", "--mandir=#{man}"]
ENV.append 'DISABLE_PKGS', "jpl" unless build.include? "with-jpl"
ENV.append 'DISABLE_PKGS', "xpce" unless build.include? 'with-xpce'
@ -61,6 +61,11 @@ class SwiProlog < Formula
system "./configure", *args
system "make"
system "make install"
(bin/'swipl').write <<-EOS.undent
#!/bin/bash
exec "#{libexec}/bin/swipl" "$@"
EOS
end
def test