From b1303f368649967c80f26dfebd3dd7c6c51352f5 Mon Sep 17 00:00:00 2001 From: Adam Vandenberg Date: Fri, 22 Nov 2013 11:39:58 -0800 Subject: [PATCH] swi-prolog: install to libexec and wrap swi-prolog does not like being called through a symlink, so don't Fixes Homebrew/homebrew#24323. --- Formula/swi-prolog.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Formula/swi-prolog.rb b/Formula/swi-prolog.rb index ae9e28adef..b63e3b4ed3 100644 --- a/Formula/swi-prolog.rb +++ b/Formula/swi-prolog.rb @@ -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